MainWindow.h
00001 #ifndef _MAINWINDOW_H
00002 #define _MAINWINDOW_H
00003
00011
00012 #include <usvgwidgets/USVGImage.h>
00013 #include <uwidgets/ULockNotebook.h>
00014 #include <uwidgets/UJournal.h>
00015 #include <uwidgets/UProxyWidget.h>
00016 #include <ctime>
00017 #include <uwidgets/UPrinterInterface.h>
00018 #include <typical/IndicatorTwoState.h>
00019 #include <typical/IndicatorFourState.h>
00020 #include <typical/GDG.h>
00021 #include <typical/VDG.h>
00022 #include <objects/SimpleObject.h>
00023 #include <uniwidgets/UPostcreate.h>
00024
00025
00026
00027 #include <webkit/webkit.h>
00028 #include <iomanip>
00029 #include <UniXML.h>
00030 #include <gtkmm/comboboxentrytext.h>
00031 #include <glibmm/regex.h>
00032
00033 class MTRSetup;
00034 class JournalDate;
00035 class ClockConfig;
00036 class FailureDialog;
00037 class Clock;
00045 class MainWindow
00046 {
00047 public:
00048 MainWindow(string gladedir, string guifile, string svgdir, string mtr_prog_path, string weblog_addr, std::list<std::string> screens);
00049 ~MainWindow() {delete w;};
00051 Gtk::Window *w;
00052
00053 protected:
00062 virtual void init_tabs(Gtk::Notebook *n, string &_gladedir, string &_svgdir, string &_weblog_addr, Gtk::ProgressBar &_bar, std::list<std::string> &_screens);
00063
00064 private:
00065
00066 Gtk::Notebook *jb;
00067 bool full_state, is_pressed;
00068
00069
00070 bool on_key_event(GdkEventKey *e);
00071
00072 bool pressed(GdkEventButton *eb);
00073
00074 bool released(GdkEventButton *eb);
00075
00076 void show_conf_menu();
00077
00078 void hide_conf_menu();
00079
00080 void reboot();
00081
00082 void poweroff();
00083
00084 void page_switched(GtkNotebookPage *pg, guint cur_pg);
00085
00086 void make_shot();
00087
00088 void save_to_flash();
00089
00090 void switch_lock();
00091
00092 guint page;
00093 Clock *clock;
00094 ClockConfig *cc;
00095 JournalDate *jd;
00096 FailureDialog *fw;
00097 MTRSetup *ms;
00098 Gtk::Dialog *dialog;
00099 Gtk::Label *failure_message;
00100 Gtk::CheckButton* check_button;
00101 ULockNotebook* lock_notebook;
00102 };
00103
00104 #endif