SpikeStream Application Library  0.2
NetworksWidget.h
Go to the documentation of this file.
00001 #ifndef NETWORKSWIDGET_H
00002 #define NETWORKSWIDGET_H
00003 
00004 //SpikeStream includes
00005 #include "NetworkDaoThread.h"
00006 #include "Network.h"
00007 #include "NetworkManager.h"
00008 using namespace spikestream;
00009 
00010 //Qt includes
00011 #include <QWidget>
00012 #include <QLayout>
00013 #include <QHash>
00014 #include <QProgressDialog>
00015 #include <QTimer>
00016 
00017 namespace spikestream {
00018 
00020     class NetworksWidget : public QWidget {
00021                 Q_OBJECT
00022 
00023                 public:
00024                         NetworksWidget(QWidget *parent=0);
00025                         ~NetworksWidget();
00026 
00027                 signals:
00028                         void networkChanged();
00029 
00030                 private slots:
00031                         void addNetworks();
00032                         void addNewNetwork();
00033                         void deleteNetwork();
00034                         void loadNetwork();
00035                         void loadNetworkList();
00036                         void networkManagerFinished();
00037                         void prototypeNetwork();
00038                         void saveNetwork();
00039                         void setNetworkProperties();
00040                         void updateProgress(int stepsCompleted, int totalSteps, QString message, bool showCancelButton);
00041 
00042                 private:
00043                         //======================  VARIABLES  =====================
00045                         QHash<unsigned int, NetworkInfo> networkInfoMap;
00046 
00049                         QGridLayout* gridLayout;
00050 
00052                         NetworkManager* networkManager;
00053 
00055                         QProgressDialog* progressDialog;
00056 
00058                         Network* newNetwork;
00059 
00061                         QList<QWidget*> cleanUpList;
00062 
00064                         unsigned deleteNetworkID;
00065 
00067                         bool progressUpdating;
00068 
00070                         bool cancelButtonVisible;
00071 
00073                         static const int propCol = 0;
00074                         static const int idCol = 1;
00075                         static const int nameCol = 2;
00076                         static const int descCol = 3;
00077                         static const int spacer1Col = 4;
00078                         static const int loadCol = 5;
00079                         static const int protoCol = 6;
00080                         static const int delCol = 7;
00081                         static const int saveCol = 8;
00082 
00083                         static const int numCols = 9;
00084 
00085                         //=======================  METHODS  ======================
00086                         void loadNetwork(NetworkInfo& netInfo, bool prototypeMode = false);
00087                         void reset();
00088     };
00089 
00090 }
00091 
00092 #endif//NETWORKSWIDGET_H
00093 
 All Classes Files Functions Variables Typedefs Friends Defines