SpikeStream Application Library  0.2
ArchiveWidget.h
Go to the documentation of this file.
00001 #ifndef ARCHIVEWIDGET_H
00002 #define ARCHIVEWIDGET_H
00003 
00004 //SpikeStream includes
00005 #include "ArchiveInfo.h"
00006 #include "ArchivePlayerThread.h"
00007 using namespace spikestream;
00008 
00009 //Qt includes
00010 #include <QAction>
00011 #include <QToolBar>
00012 #include <QWidget>
00013 #include <QLayout>
00014 #include <QHash>
00015 #include <QPushButton>
00016 #include <QLabel>
00017 #include <QComboBox>
00018 
00019 namespace spikestream{
00020 
00021         class ArchiveWidget : public QWidget {
00022                 Q_OBJECT
00023 
00024                 public:
00025                         ArchiveWidget(QWidget* parent=0);
00026                         ~ArchiveWidget();
00027 
00028                 signals:
00029                         void archiveChanged();
00030 
00031                 private slots:
00032                         void archivePlayerStopped();
00033                         void deleteArchive();
00034                         void loadArchive();
00035                         void loadArchiveList();
00036                         void networkChanged();
00037                         void rewindButtonPressed();
00038                         void playButtonPressed();
00039                         void stepButtonPressed();
00040                         void fastForwardButtonPressed();
00041                         void stopButtonPressed();
00042                         void frameRateComboChanged(int);
00043                         void setArchiveProperties();
00044                         void updateTimeStep(unsigned timeStep, const QList<unsigned>& neuronIDList);
00045 
00046 
00047                 private:
00048                         //======================  VARIABLES  =====================
00050                         QHash<unsigned int, ArchiveInfo> archiveInfoMap;
00051 
00054                         QGridLayout* gridLayout;
00055 
00057                         QToolBar* toolBar;
00058 
00060                         bool ignoreButton;
00061 
00063                         ArchivePlayerThread* archivePlayer;
00064 
00066                         bool rewind;
00067 
00069                         bool step;
00070 
00073                         bool archiveOpen;
00074 
00076                         QAction* playAction;
00077 
00079                         QAction* stopAction;
00080 
00082                         QAction* fastForwardAction;
00083 
00085                         QComboBox* frameRateCombo;
00086 
00088                         QLabel* timeStepLabel;
00089 
00091                         QLabel* maxTimeStepLabel;
00092 
00093                         // Columns for different types of information
00094                         const static int propCol = 0;
00095                         const static int idCol = 1;
00096                         const static int netIDCol = 2;
00097                         const static int dateCol = 3;
00098                         const static int descCol = 4;
00099                         const static int loadButCol = 5;
00100                         const static int delButCol = 6;
00101                         const static int numCols = 7;
00102 
00103                         //========================  METHODS  =========================
00104                         QToolBar* getToolBar();
00105                         void loadArchive(ArchiveInfo& archiveInfo);
00106                         void reset();
00107                         void rewindArchive();
00108                         void setMaxTimeStepLabel();
00109                         void stepArchive();
00110 
00111     };
00112 }
00113 
00114 #endif//ARCHIVEWIDGET_H
00115 
 All Classes Files Functions Variables Typedefs Friends Defines