experimentassistant.h

Go to the documentation of this file.
00001 /*  -*- c++ -*-  (for Emacs)
00002  *
00003  *  experimentassistant.h
00004  *  Digest
00005  * 
00006  *  Created by Aidan Lane on Thu Nov 3 2005.
00007  *  Copyright (c) 2005-2006 Optimisation and Constraint Solving Group,
00008  *  Monash University. All rights reserved.
00009  *
00010  *  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version.
00014  *
00015  *  This program is distributed in the hope that it will be useful,
00016  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  *  GNU General Public License for more details.
00019  *
00020  *  You should have received a copy of the GNU General Public License
00021  *  along with this program; if not, write to the Free Software
00022  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00023  */
00024 
00025 #ifndef EXPERIMENTASSISTANT_H
00026 #define EXPERIMENTASSISTANT_H
00027 
00028 
00029 #include "DigestGuiCore/guicomponentwidgets.h"
00030 
00031 #include <QList>
00032 
00033 #include <jni.h>
00034 
00035 #include "ui_experimentassistantform.h"
00036 
00037 class QStandardItemModel;
00038 
00039 class CategoryItemModel;
00040 class DigestDbController;
00041 class GestureQueryModel;
00042 
00043 
00044 class ExperimentAssistant : public GuiDbComponentDialog {
00045 
00046   Q_OBJECT
00047 
00048   enum Step { Introduction,
00049               SelectRecognisers,
00050               SelectGestures,
00051               FinalDetails,
00052               ConfirmDetails,
00053               PerformingExperiments,
00054               Finished,
00055               Closed };
00056 
00057 public:
00058   ExperimentAssistant( DigestDbController* controller,
00059                        JavaVM* jvm,
00060                        QWidget* parent = 0, Qt::WindowFlags flags = 0 );
00061 
00062 
00063 protected:
00064   void resetEvent( VEvent* );
00065   void experimentsEvent( VExperimentsEvent* );
00066 
00067 
00068 private slots:
00069   void on_goBackButton_clicked();
00070   void on_continueButton_clicked();
00071 
00072   void gotoStep( ExperimentAssistant::Step step );
00073   void reflectCurrentStep();
00074 
00075   void gatherDetails();
00076   void beginExperiments();
00077 
00078   void onCategoryModelDataChanged();
00079 
00080 
00081 private:
00082   void initWidgets();
00083   static void initStaticStrs();
00084 
00085   QString detailsAsHtml() const;
00086 
00087   JavaVM* m_jvm;
00088 
00089   Ui::ExperimentAssistantForm ui;
00090   int m_currentStep;
00091 
00092   CategoryItemModel*   m_categoryModel;
00093   GestureQueryModel*   m_gestureModel;
00094   QStandardItemModel*  m_dummyModel;
00095 
00096   QString m_gestureQuery;
00097 
00098   // Details:
00099   QList<int>  m_recogniserIds;
00100   QString     m_labelStr;
00101   QString     m_notesStr;
00102   QList<int>  m_gestureIds;
00103 
00104   QHash<int, int> m_recogToExper;
00105 };
00106 
00107 
00108 #endif  // ! EXPERIMENTASSISTANT_H

Generated on Mon Jul 30 09:46:50 2007 for Digest by  doxygen 1.5.2