00001 00008 #ifndef tibi_dabo_gui_MAIN_WINDOW_H 00009 #define tibi_dabo_gui_MAIN_WINDOW_H 00010 00011 /***************************************************************************** 00012 ** Includes 00013 *****************************************************************************/ 00014 00015 #include <QtGui/QMainWindow> 00016 #include "ui_main_window_ecmr.h" 00017 #include "qnode_ecmr.hpp" 00018 00019 /***************************************************************************** 00020 ** Namespace 00021 *****************************************************************************/ 00022 00023 namespace tibi_dabo_gui { 00024 00025 /***************************************************************************** 00026 ** Interface [MainWindow] 00027 *****************************************************************************/ 00031 class MainWindow : public QMainWindow { 00032 Q_OBJECT 00033 00034 public: 00035 MainWindow(int argc, char** argv, QWidget *parent = 0); 00036 ~MainWindow(); 00037 00038 void ReadSettings(); // Load up qt program settings at startup 00039 void WriteSettings(); // Save qt program settings when closing 00040 00041 void closeEvent(QCloseEvent *event); // Overloaded function 00042 00043 public Q_SLOTS: 00044 /****************************************** 00045 ** Auto-connections (connectSlotsByName()) 00046 *******************************************/ 00047 void on_actionAbout_triggered(); 00048 //void on_button_home_clicked(bool check ); 00049 void on_button_question_0_clicked(bool check); 00050 void on_button_question_1_clicked(bool check); 00051 void on_button_question_2_clicked(bool check); 00052 void on_button_question_3_clicked(bool check); 00053 void on_button_question_4_clicked(bool check); 00054 void on_button_question_5_clicked(bool check); 00055 void on_button_cat_clicked(bool check); 00056 void on_button_eng_clicked(bool check); 00057 void on_button_esp_clicked(bool check); 00058 void on_button_pause_clicked(bool check); 00059 void on_button_yes_clicked(bool check); 00060 void on_button_no_clicked(bool check); 00061 void on_button_help_clicked(bool check); 00062 void on_button_stop_clicked(bool check); 00063 void mousePressEvent(QMouseEvent *event); 00064 void changedTab(); 00065 //void imageLabelClicked(QMouseEvent *event); 00066 00067 00068 /****************************************** 00069 ** Manual connections 00070 *******************************************/ 00071 void timerDone(); 00072 void loadImage(); 00073 void checkAssistance(); 00074 void setLanguage(int index); 00075 00076 private: 00077 Ui::MainWindowDesign_ecmr ui; 00078 QNode qnode; 00079 bool playImage; 00080 std::vector< std::vector<std::string> > tabs; 00081 std::vector< std::vector<std::string> > info; 00082 int image_width_original; 00083 int image_height_original; 00084 int image_width; 00085 int image_height; 00086 int lastLanguage; 00087 00088 void loadTexts(); 00089 }; 00090 00091 } // namespace tibi_dabo_gui 00092 00093 #endif // tibi_dabo_gui_MAIN_WINDOW_H