00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef PREFERENCESDIALOG_H
00019 #define PREFERENCESDIALOG_H
00020
00021 #include <gtkmm.h>
00022
00023 #include <string>
00024 #include <iostream>
00025 #include <stdio.h>
00026 using namespace std;
00027
00028 class StockMarketVector;
00029 class Preferences;
00030
00035 class PreferencesDialog : public Gtk::Window {
00036 private:
00037 Gtk::VBox *vbox;
00038 Gtk::HBox *hbox;
00039 Gtk::Frame *hboxFrame;
00040 Gtk::VBox *vboxOptions;
00041 Gtk::Label *label;
00042 Gtk::HSeparator *hSep;
00043 Gtk::ScrolledWindow *scrolledWindowTreeView;
00044
00045
00046 Gtk::CheckButton *autoSaveOnExitCheckButton, *saveDialogOnExitCheckButton;
00047
00048 string stringStockmarket, stringTeletext;
00049 string stringSaveOptions;
00050 string stringOther, stringOnExit;
00051
00052
00053 class ModelColumns : public Gtk::TreeModel::ColumnRecord {
00054 public:
00055 ModelColumns() {
00056 add(m_col_name);
00057 }
00058 Gtk::TreeModelColumn<Glib::ustring> m_col_name;
00059 };
00060
00061 ModelColumns m_Columns;
00062 Gtk::TreeView m_TreeView;
00063 Glib::RefPtr<Gtk::TreeStore> m_refTreeModel;
00064
00065 StockMarketVector *stockMarketVector;
00066 Preferences *preferences;
00067
00068 void quit();
00069 void finish();
00070
00071 void initSaveOptions();
00072
00073 void destroySaveOptions();
00074
00075 void eventRowSelected();
00076 void eventAutoSaveOnExitCheckButton();
00077 void eventSaveDialogOnExitCheckButton();
00078
00079 public:
00080 PreferencesDialog(StockMarketVector * const stockMarketVector, Preferences * const preferences);
00081 ~PreferencesDialog();
00082
00083 protected:
00084 virtual bool on_delete_event(GdkEventAny *event);
00085
00086 };
00087
00088 #endif