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 __MARKETPACKWIDGET_HPP__
00057 #define __MARKETPACKWIDGET_HPP__
00058
00059
00060 #include <gtkmm.h>
00061
00062 #include <openfluid/dllexport.hpp>
00063 #include <openfluid/market/MarketInfos.hpp>
00064
00065
00066 namespace openfluid { namespace guicommon {
00067
00068
00069
00070
00071 class DLLEXPORT MarketPackWidget : public Gtk::EventBox
00072 {
00073
00074 public:
00075 typedef sigc::signal<void> signal_install_modified_t;
00076
00077 private:
00078
00079 openfluid::market::MetaPackageInfo m_MetaPackInfo;
00080
00081 std::string m_EditedBuildOptions;
00082
00083 Gtk::Image* m_EmptyCartImage;
00084 Gtk::Image* m_FullCartImage;
00085
00086 Gtk::Label m_IDLabel;
00087 Gtk::HBox m_FormatHBox;
00088 Gtk::Label m_FormatLabel;
00089 Gtk::ComboBox m_FormatCombo;
00090 Gtk::Button m_ConfigButton;
00091 Gtk::VBox m_DetailsLeftVBox;
00092 Gtk::HBox m_MainHBox;
00093 Gtk::ToggleButton m_InstallToggle;
00094
00095 Gtk::VBox m_DetailsRightVBox;
00096 Gtk::Label m_LicenseLabel;
00097 Gtk::Label m_VersionLabel;
00098
00099
00100 Glib::RefPtr<Gtk::ListStore> m_RefFormatComboBoxModel;
00101
00102 class FormatComboColumns : public Gtk::TreeModel::ColumnRecord
00103 {
00104 public:
00105
00106 Gtk::TreeModelColumn<Glib::ustring> m_FormatName;
00107 Gtk::TreeModelColumn<openfluid::market::MetaPackageInfo::SelectionType> m_SelType;
00108
00109 FormatComboColumns() { add(m_FormatName); add(m_SelType); }
00110 };
00111
00112 FormatComboColumns m_FormatColumns;
00113
00114 void onInstallModified();
00115
00116 void onConfigClicked();
00117
00118 bool onButtonRelease(GdkEventButton* Event);
00119
00120 static std::string replaceByUnknownIfEmpty(const std::string& Str);
00121
00122 static std::string replaceByNoneIfEmpty(const std::string& Str);
00123
00124
00125 protected:
00126 signal_install_modified_t m_signal_install_modified;
00127
00128
00129 public:
00130 MarketPackWidget(const openfluid::market::MetaPackageInfo& MetaPackInfo);
00131
00132 ~MarketPackWidget();
00133
00134 std::string getID() const { return m_MetaPackInfo.ID; };
00135
00136 bool isInstall() const { return m_InstallToggle.get_active(); };
00137
00138 void setInstall(bool Install) { m_InstallToggle.set_active(Install); };
00139
00140 openfluid::market::MetaPackageInfo::SelectionType getPackageFormat() const;
00141
00142 signal_install_modified_t signal_install_modified();
00143
00144 std::string getEditedBuildOptions() const { return m_EditedBuildOptions; };
00145
00146 void updateDisplayedInfos();
00147
00148
00149 };
00150
00151
00152 } }
00153
00154
00155 #endif