SpikeStream Application Library  0.2
NetworkManager.h
Go to the documentation of this file.
00001 #ifndef NETWORKMANAGER_H
00002 #define NETWORKMANAGER_H
00003 
00004 //SpikeStream includes
00005 #include "Network.h"
00006 #include "SpikeStreamThread.h"
00007 
00008 namespace spikestream {
00009 
00012         class NetworkManager : public SpikeStreamThread {
00013                 Q_OBJECT
00014 
00015                 public:
00016                         NetworkManager();
00017                         ~NetworkManager();
00018                         void cancel();
00019                         int getCurrentTask() { return currentTask; }
00020                         void run();
00021                         void startDeleteNetwork(unsigned networkID);
00022                         void startLoadNetwork(Network* network);
00023                         void startSaveNetwork(Network* network);
00024 
00025                         //================  VARIABLES  ==================
00027                         static const int UNDEFINED_TASK = 0;
00028 
00030                         static const int DELETE_NETWORK_TASK = 1;
00031 
00033                         static const int LOAD_NETWORK_TASK = 2;
00034 
00036                         static const int SAVE_NETWORK_TASK = 3;
00037 
00038 
00039                 signals:
00040                         void progress(int stepsCompleted, int totalSteps, QString message, bool showCancelButton);
00041 
00042 
00043                 private:
00044                         //================  VARIABLES  ==================
00046                         Network* network;
00047 
00049                         unsigned networkID;
00050 
00052                         int currentTask;
00053 
00054 
00055         };
00056 
00057 
00058 }
00059 
00060 #endif//NETWORKMANAGER_H
 All Classes Files Functions Variables Typedefs Friends Defines