TarzaNN
TarzaNN neural network simulator
C:/Users/albertlr/projects/TarzaNN/TarzaNN/UI_MainWindow.h
Go to the documentation of this file.
00001 /****************************************************************************
00002  **
00003  ** Copyright C 2002-2012 Laboratory for Active and Attentive Vision (LAAV), Department of Computer Science and Engineering, York University, Toronto, ON, Canada.
00004  ** All rights reserved.
00005  **
00006  ** This file is part of the TarzaNN Neural Network Simulator.
00007  **
00008  ** This file may be distributed and/or modified under the terms of the
00009  ** GNU General Public License version 2 as published by the Free Software
00010  ** Foundation and appearing in the file LICENSE.GPL included in the
00011  ** packaging of this file.
00012  **
00013  ** See http://www.tarzann.org/gpl/ for GPL licensing information.
00014  **
00015  ** Contact info@tarzann.org if any conditions of this licensing are
00016  ** not clear to you.
00017  **
00018  ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00019  ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00020  **
00021  ****************************************************************************/
00022 
00023 #ifndef UI_MAINWINDOW_H
00024 #define UI_MAINWINDOW_H
00025 
00026 #include <QVariant>
00027 #include <QMainWindow>
00028 #include <QDockWidget>
00029 #include <QListView>
00030 #include <QStringListModel>
00031 #include <QEvent>
00032 #include <QMenu>
00033 #include <QVBoxLayout>
00034 #include <QHBoxLayout>
00035 #include <QGridLayout>
00036 #include "UI_FeaturePlaneViewer.h"
00037 #include "Network.h"
00038 
00039 class QVBoxLayout;
00040 class QHBoxLayout;
00041 class QGridLayout;
00042 class QListWidget;
00043 class QListWidgetItem;
00044 class QPushButton;
00045 class QTabWidget;
00046 class QAction;
00047 class QPoint;
00048 class MainWindowMM;
00049 
00050 enum { CLOSED, ABANDONED };
00051 
00052 class UI_MainWindow : public QMainWindow
00053 {
00054     Q_OBJECT
00055         
00056 public:
00057     UI_MainWindow( QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0 );
00058     ~UI_MainWindow();
00059         
00060     void initActions();
00061     void initMenuBar();
00062         
00063     QListWidget* fplist;
00064     QTabWidget* tabWidget;
00065         
00066     UI_FeaturePlaneViewer* fpview;
00067         
00068     QMenu* networkMenu;
00069     QMenu* viewMenu;
00070     QMenu* simulationMenu;
00071         bool displayMixedView;
00072         bool displaySelectiveTuningView;
00073 
00075         void openNeuronTimeCourse(FeaturePlaneAbstract* theFP);
00076 
00077 public slots:
00078         void slotNetworkDesigner();
00079         void slotFMRIView();
00080         void slot3DView();
00081         void slotToggleLayerByLayer();
00082     void slotTogglePauseAfterEachStep();
00083     void slotMoveToNextStep();
00084         void slotToggleMixedView();
00085         void slotToggleSelectiveTuningView();
00086 
00087         void slotToggleSelectiveTuning();
00088         void enableSelectiveTuning();
00089         
00090         void slotStartSimulation();
00091         void slotPauseSimulation();
00092         void slotTerminateSimulation();
00093         void slotQuit();
00094         int slotCloseNetwork();
00095         int slotCloseNetwork(bool cancelable);
00096     void slotLoadNetwork();
00097     void slotLoadNewNetwork();
00098     void slotProcessEvents();
00099 
00100         void slotSignalPause();
00101         void slotSignalResume();
00102 
00103         void closeEvent(QCloseEvent *event);
00104         
00105         void slotSaveLearning();
00106         void slotLoadLearning();
00107         
00108         void slotDisplayNetworkData();
00109         void slotSaveNetwork();
00110         void slotFplistContextMenuRequested( const QPoint & pos);
00111         void slotViewFixations();
00112         void slotViewFeaturePlane();
00113         void slotViewNeuronTimeCourse();
00114     void customEvent(QEvent *event);
00115         void slotSaveSnapshots();
00116         void slotMotionModel();
00117 #ifdef PREDEFINED
00118         void slotLoadPredefinedNetwork();
00119 #endif /*PREDEFINED*/
00120         
00121 protected:
00122         QVBoxLayout* UI_MainWindowLayout;
00123     QGridLayout* tabLayout;
00124     QListView *messageWindow;
00125         QStringListModel *messageModel;
00126         QStringList messages;
00127     Network * NN;
00128         MainWindowMM *motionModel;
00129     bool isSimulationRunning;
00130         QDockWidget* fplistDock, *messageDock;
00131         QAction *beginSimulation;
00132         QAction *beginLearning;
00133         QAction *pauseSimulation;
00134         QAction *terminateSimulation;
00135         QAction *layerMode;
00136         QAction *pauseMode;
00137         QAction *nextStep;
00138         QAction *stmwtaMode;
00139         QAction* stmView;
00140         QAction* mixedView;
00141         QAction* saveLearningSimulation;
00142         QAction* loadLearningSimulation;
00143         
00144 protected slots:
00145         virtual void languageChange();
00146 };
00147 
00148 #endif // UI_MAINWINDOW_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines