00001 00008 #ifndef rocon_qorchestra_MAIN_WINDOW_H 00009 #define rocon_qorchestra_MAIN_WINDOW_H 00010 00011 /***************************************************************************** 00012 ** Includes 00013 *****************************************************************************/ 00014 00015 #include <QtGui/QMainWindow> 00016 #include "ui_main_window.h" 00017 #include "qnode.hpp" 00018 00019 /***************************************************************************** 00020 ** Namespace 00021 *****************************************************************************/ 00022 00023 namespace rocon_qorchestra { 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 void showNoMasterMessage(); 00043 00044 public Q_SLOTS: 00045 /****************************************** 00046 ** Auto-connections (connectSlotsByName()) 00047 *******************************************/ 00048 void on_actionAbout_triggered(); 00049 void on_button_connect_clicked(bool check ); 00050 void on_checkbox_use_environment_stateChanged(int state); 00051 void on_table_view_concert_clients_clicked(const QModelIndex &index); 00052 void on_table_view_client_apps_clicked(const QModelIndex &index); 00053 void on_button_update_concert_clients_clicked(); 00054 void on_button_install_app_clicked(); 00055 void on_button_uninstall_app_clicked(); 00056 void on_button_check_implementation_clicked(); 00057 void on_button_start_implementation_clicked(); 00058 void on_button_stop_implementation_clicked(); 00059 void on_button_view_implementation_clicked(); 00060 00061 /****************************************** 00062 ** Manual connections 00063 *******************************************/ 00064 void updateConcertClientsViews(); 00065 void updateClientAppsViews( QStandardItemModel* ); 00066 void updateAppDetailsViews( QStandardItemModel* ); 00067 void updateViewImplementations(); 00068 void installMissingAppsBox( const QStandardItem* ); 00069 void enableStartSolution(); 00070 00071 Q_SIGNALS: 00072 void tableViewConcertClientsClicked( const QModelIndex &index ); 00073 void tableViewClientAppsClicked( const QModelIndex &index ); 00074 //void tableViewSolutionsClicked( const QModelIndex &index ); 00075 void buttonUpdateConcertClientsClicked(); 00076 void buttonInstallAppClicked( const QModelIndex &index ); 00077 void buttonUninstallAppClicked( const QModelIndex &index ); 00078 void installMissingAppsConfirmed( const QStandardItem* ); 00079 void startSolution(); 00080 00081 private: 00082 Ui::MainWindowDesign ui; 00083 QNode qnode; 00084 QModelIndex client_app_list_index_; 00085 }; 00086 00087 } // namespace rocon_qorchestra 00088 00089 #endif // rocon_qorchestra_MAIN_WINDOW_H