00001 00008 #ifndef QTUTORIALS_MAIN_WINDOW_H 00009 #define QTUTORIALS_MAIN_WINDOW_H 00010 00011 /***************************************************************************** 00012 ** Includes 00013 *****************************************************************************/ 00014 00015 #include <QtGui/QMainWindow> 00016 00017 #ifndef Q_MOC_RUN 00018 #include "common/ui_main_window.h" 00019 #include "qnode.hpp" 00020 #endif 00021 00022 /***************************************************************************** 00023 ** Interface [MainWindow] 00024 *****************************************************************************/ 00028 class MainWindow : public QMainWindow { 00029 Q_OBJECT 00030 00031 public: 00032 MainWindow(QNode *node, QWidget *parent = 0); 00033 ~MainWindow(); 00034 00035 void ReadSettings(); // Load up qt program settings at startup 00036 void WriteSettings(); // Save qt program settings when closing 00037 00038 void closeEvent(QCloseEvent *event); // Overloaded function 00039 void showNoMasterMessage(); 00040 00041 public Q_SLOTS: 00042 // Put automatically triggered slots here (because of connectSlotsByName()) 00043 // void on_button_enable_clicked(bool check); // example only 00044 void on_actionAbout_triggered(); 00045 void on_button_connect_clicked(bool check ); 00046 void on_checkbox_use_environment_stateChanged(int state); 00047 00048 /****************************************** 00049 ** Manual connections 00050 *******************************************/ 00051 void updateLoggingView(); // no idea why this can't connect automatically 00052 00053 private: 00054 Ui::MainWindowDesign ui; 00055 QNode *qnode; 00056 }; 00057 00058 #endif // QTUTORIALS_MAIN_WINDOW_H