Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

SpikeStreamMainWindow.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   SpikeStream Application                                               *
00003  *   Copyright (C) 2007 by David Gamez                                     *
00004  *   david@davidgamez.eu                                                   *
00005  *   Version 0.1                                                           *
00006  *                                                                         *
00007  *   This program is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU General Public License as published by  *
00009  *   the Free Software Foundation; either version 2 of the License, or     *
00010  *   (at your option) any later version.                                   *
00011  *                                                                         *
00012  *   This program is distributed in the hope that it will be useful,       *
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00015  *   GNU General Public License for more details.                          *
00016  *                                                                         *
00017  *   You should have received a copy of the GNU General Public License     *
00018  *   along with this program; if not, write to the                         *
00019  *   Free Software Foundation, Inc.,                                       *
00020  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00021  ***************************************************************************/
00022 
00023 #ifndef SPIKESTREAMMAINWINDOW_H
00024 #define SPIKESTREAMMAINWINDOW_H
00025 
00026 //SpikeStream includes
00027 #include "DBInterface.h"
00028 #include "NetworkViewer.h"
00029 #include "NetworkViewerProperties.h"
00030 #include "SimulationManager.h"
00031 #include "SimulationWidget.h"
00032 #include "ArchiveManager.h"
00033 #include "ConnectionWidget.h"
00034 #include "LayerWidget.h"
00035 #include "BusyDialog.h"
00036 #include "SpikeStreamApplication.h"
00037 #include "ArchiveWidget.h"
00038 
00039 //Qt includes
00040 #include <qmainwindow.h>
00041 #include <qtabwidget.h>
00042 #include <qapplication.h>
00043 #include <qprocess.h>
00044 #include <qtimer.h>
00045 #include <qaccel.h>
00046 
00047 
00048 //-------------------------- SpikeStream Main Window -----------------------
00049 /*! The main class of the application and the widget below the Spike Stream
00050         Application. Responsible for setting up the various widgets, coordinating
00051         communication between them and for loading and saving databases.*/
00052 //--------------------------------------------------------------------------
00053 
00054 class SpikeStreamMainWindow: public QMainWindow {
00055     Q_OBJECT
00056 
00057         public:
00058                 SpikeStreamMainWindow(SpikeStreamApplication *ssApp);
00059                 ~SpikeStreamMainWindow();
00060                 NetworkViewer* getNetworkViewer();
00061                 void reloadConnectionDetails();
00062                 void reloadConnections();
00063                 void reloadNeuronGroups();
00064                 void setFromNeuronID(unsigned int neurGrpID, unsigned int fromNeurID);
00065                 void setToNeuronID(unsigned int toNeurID);
00066                 void setSplashScreenMessage(QString);
00067                 void simulationDestroyed();     
00068                 void simulationInitialised();
00069 
00070 
00071                 //======================== VARIABLES ===================================
00072                 /*! Static reference to the main application to invoke global methods 
00073                         to reload neuron groups etc. */
00074                 static SpikeStreamMainWindow* spikeStrMainWin;
00075 
00076                 /*! Static reference to the QApplication to control rendering, lock
00077                         global mutexes, etc. */
00078                 static SpikeStreamApplication* spikeStreamApplication;
00079 
00080                 /*! Root directory of the application set once and used by other classes
00081                         to load files etc.*/
00082                 static QString workingDirectory;
00083 
00084 
00085         public slots:
00086                 void reloadPatterns();
00087         
00088         
00089         private slots:
00090                 void about();
00091                 void acceleratorKeyPressed(int acceleratorID);
00092                 void clearDatabases();
00093                 void closeEvent( QCloseEvent* );
00094                 void importConnectionMatrix();
00095                 void loadDatabases();
00096                 void managePatterns();
00097                 void manageProbes();
00098                 void reloadDevices();
00099                 void reloadEverything();
00100                 void saveDatabases();
00101 
00102 
00103         private:
00104                 //======================== VARIABLES ==================================
00105                 //Database handling classes
00106                 DBInterface* networkDBInterface;
00107                 DBInterface* archiveDBInterface;
00108                 DBInterface* patternDBInterface;
00109                 DBInterface* deviceDBInterface;
00110 
00111                 //Store references to classes that we need to access
00112                 SimulationManager* simulationManager;
00113                 ArchiveManager* archiveManager;
00114                 NetworkViewer* networkViewer;
00115                 NetworkViewerProperties *networkViewerProperties;
00116                 SimulationWidget *simulationWidget;
00117                 ConnectionWidget *connectionWidget;
00118                 LayerWidget *layerWidget;
00119                 ArchiveWidget *archiveWidget;
00120                 QTabWidget *tabWidget;
00121                 QAccel* keyboardAccelerator;
00122         
00123                 /*! Default location for looking for image files, scripts, etc.*/
00124                 QString defaultFileLocation;
00125 
00126 
00127                 //=========================== METHODS ===============================
00128                 /*! Declare copy constructor private so it cannot be used inadvertently. */
00129                 SpikeStreamMainWindow (const SpikeStreamMainWindow&);
00130 
00131                 /*! Declare assignment private so it cannot be used inadvertently.*/
00132                 SpikeStreamMainWindow operator = (const SpikeStreamMainWindow&);
00133 
00134 };
00135 
00136 
00137 #endif//SPIKESTREAMMAINWINDOW_H

Generated on Mon Sep 3 22:29:04 2007 for SpikeStream Application by  doxygen 1.4.4