Monitor
|
00001 #ifndef MAINWINDOW_H 00002 #define MAINWINDOW_H 00003 00004 #include <QMainWindow> 00005 #include <QStandardItemModel> 00006 #include "graphwidget.h" 00007 #include "stub/my-commmodel.h" 00008 #include "settingsdialog.h" 00009 #include "replaydialog.h" 00010 00011 class GraphWidget; 00012 class SettingsDialog; 00013 class ReplayDialog; 00014 namespace Ui { 00015 class MainWindow; 00016 } 00017 00018 class MainWindow : public QMainWindow 00019 { 00020 Q_OBJECT 00021 00022 public: 00023 explicit MainWindow(QWidget *parent = 0); 00024 ~MainWindow(); 00025 SettingsDialog *settingsDialog; 00026 ReplayDialog *replayDialog; 00027 00028 int getInactiveThreshold(); 00029 00030 00031 CommModel * getComm(); 00032 void updateSettings(int _refreshRate, int _inactiveThreshold, bool _doPhysics, bool _showSignalStrength, bool _showThroughput, 00033 bool _showInactivityTime, bool _showLatency); 00034 00035 public slots: 00039 void updateList(); 00040 00041 private slots: 00042 00043 00053 void on_playbackButton_released(); 00054 void on_settingsButton_released(); 00055 void on_playButton_released(); 00056 void setNodeInModel(int row, node* myNode, node* sourceNode, QStandardItemModel* model, CommModel* comm); 00057 00058 void setNodeInAllModel(int row, node* myNode, QStandardItemModel* model); 00059 void togglePlaying(); 00060 00061 private: 00063 Ui::MainWindow *ui; 00065 QGraphicsScene *m_scene; 00067 GraphWidget *widget; 00069 CommModel *comm; 00071 node *ocu; 00073 node *selectedNode; 00075 bool isPlaying; 00077 bool firstTime; 00079 QTimer * timer; 00080 00082 int refreshRate; 00084 int inactiveThreshold; 00086 bool doPhysics; 00088 bool showSignalStrength; 00090 bool showThroughput; 00092 bool showInactivityTime; 00094 bool showLatency; 00095 00096 }; 00097 00098 #endif // MAINWINDOW_H