Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00056 #ifndef __MARKETCLIENTASSISTANT_HPP__
00057 #define __MARKETCLIENTASSISTANT_HPP__
00058
00059 #include <gtkmm/assistant.h>
00060 #include <gtkmm/box.h>
00061 #include <gtkmm/label.h>
00062 #include <gtkmm/combobox.h>
00063 #include <gtkmm/liststore.h>
00064 #include <gtkmm/scrolledwindow.h>
00065 #include <gtkmm/button.h>
00066 #include <gtkmm/radiobutton.h>
00067 #include <gtkmm/alignment.h>
00068 #include <gtkmm/progressbar.h>
00069 #include <gtkmm/textview.h>
00070
00071 #include <openfluid/dllexport.hpp>
00072 #include <openfluid/market/MarketClient.hpp>
00073
00074
00075 namespace openfluid { namespace guicommon {
00076
00077 class MarketPackWidget;
00078
00079
00080 class DLLEXPORT MarketClientAssistant : public Gtk::Assistant
00081 {
00082
00083 private:
00084
00085
00086 Gtk::VBox m_SelectionPageBox;
00087
00088 Gtk::HBox m_URLBox;
00089 Gtk::Label m_URLLabel;
00090 Gtk::ComboBox m_URLCombo;
00091 Glib::RefPtr<Gtk::ListStore> m_RefURLComboBoxModel;
00092
00093 class URLComboColumns : public Gtk::TreeModel::ColumnRecord
00094 {
00095 public:
00096
00097 Gtk::TreeModelColumn<Glib::ustring> m_Name;
00098 Gtk::TreeModelColumn<Glib::ustring> m_URL;
00099
00100 URLComboColumns() { add(m_Name); add(m_URL); }
00101 };
00102
00103 URLComboColumns m_URLColumns;
00104
00105
00106 Gtk::VBox m_AvailPacksBox;
00107
00108 Gtk::ScrolledWindow m_AvailPacksSWindow;
00109
00110 Gtk::HBox m_ActionButtonsBox;
00111 Gtk::Button m_SelectAllButton;
00112 Gtk::Button m_SelectNoneButton;
00113 Gtk::Button m_CommonBuildConfigButton;
00114
00115 std::list<MarketPackWidget*> mp_AvailPacksWidgets;
00116
00117 void onURLComboChanged();
00118
00119 void onPackageInstallModified();
00120
00121 void onSelectAllClicked();
00122
00123 void onSelectNoneClicked();
00124
00125 void onCommonBuildConfigClicked();
00126
00127
00128
00129 Gtk::VBox m_LicensesPageBox;
00130
00131 Gtk::Label m_LicensesLabel;
00132
00133 Gtk::HBox m_LicensesReviewBox;
00134 Gtk::TreeView m_LicensesTreeView;
00135
00136 Glib::RefPtr<Gtk::ListStore> m_RefLicenseTreeViewModel;
00137
00138 class LicensesTreeViewColumns : public Gtk::TreeModel::ColumnRecord
00139 {
00140 public:
00141
00142 Gtk::TreeModelColumn<Glib::ustring> m_ID;
00143
00144 LicensesTreeViewColumns() { add(m_ID); }
00145 };
00146
00147 LicensesTreeViewColumns m_LicensesColumns;
00148
00149 Glib::RefPtr<Gtk::TreeSelection> m_RefLicensesTreeSelection;
00150
00151 Gtk::TextView m_LicensesTextView;
00152
00153 Glib::RefPtr<Gtk::TextBuffer> m_RefLicenseTextBuffer;
00154
00155
00156 Gtk::ScrolledWindow m_LicensesListSWindow;
00157 Gtk::ScrolledWindow m_LicensesReviewSWindow;
00158
00159 Gtk::RadioButton m_LicensesAcceptRadio;
00160 Gtk::RadioButton m_LicensesDoNotRadio;
00161
00162
00163 void onLicensesTreeviewChanged();
00164
00165 void onLicenseRadioClicked();
00166
00167
00168 Gtk::VBox m_InstallPageBox;
00169
00170 Gtk::TreeView m_InstallTreeView;
00171 Glib::RefPtr<Gtk::TreeView> m_RefInstallTreeView;
00172
00173 Glib::RefPtr<Gtk::ListStore> m_RefInstallTreeViewModel;
00174
00175 class InstallTreeViewColumns : public Gtk::TreeModel::ColumnRecord
00176 {
00177 public:
00178
00179 Gtk::TreeModelColumn<Glib::ustring> m_ID;
00180 Gtk::TreeModelColumn<Glib::ustring> m_Format;
00181 Gtk::TreeModelColumn<Glib::ustring> m_Status;
00182
00183 InstallTreeViewColumns() { add(m_ID); add(m_Format); add(m_Status);}
00184 };
00185
00186 InstallTreeViewColumns m_InstallColumns;
00187
00188
00189 Gtk::ScrolledWindow m_InstallSWindow;
00190 Gtk::ProgressBar m_InstallProgressBar;
00191 Gtk::Button m_ViewLogButton;
00192 Gtk::Alignment m_LogButtonAlign;
00193
00194 void onInstallTimeoutOnce();
00195
00196 void onViewLogClicked();
00197
00198
00199 void setupSelectionPage();
00200 void setupConfirmationPage();
00201 void setupLicensesPage();
00202 void setupDownloadPage();
00203
00204
00205 void onApply();
00206 void onCancel();
00207 void onClose();
00208 void onPrepare(Gtk::Widget* Widget);
00209
00210 void updateAvailPacksTreeview();
00211
00212 void updateInstallTreeview();
00213
00214 void initializeLicencesTreeView();
00215
00216 openfluid::market::MarketClient m_MarketClient;
00217
00218 int m_InstallationTimeout;
00219
00220 public:
00221 MarketClientAssistant();
00222
00223 virtual ~MarketClientAssistant();
00224
00225
00226 };
00227
00228 } }
00229
00230
00231 #endif