Go to the documentation of this file.00001
00002 #ifndef vgui_qt_dialog_impl_h_
00003 #define vgui_qt_dialog_impl_h_
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include <vgui/internals/vgui_dialog_impl.h>
00020
00021 #include <QDialog>
00022 #include <QObject>
00023 #include <QGroupBox>
00024 #include <QLineEdit>
00025 #include <QSpinBox>
00026
00027
00028
00029
00030 class vgui_qt_dialog_impl :
00031 public QDialog,
00032 public vgui_dialog_impl
00033 {
00034 Q_OBJECT
00035 public:
00036 vgui_qt_dialog_impl(const char* name);
00037 ~vgui_qt_dialog_impl() {}
00038
00039 void* bool_field_widget(const char*, bool&);
00040 void* int_field_widget(const char*, int&);
00041 void* long_field_widget(const char*, long&);
00042 void* float_field_widget(const char*, float&);
00043 void* double_field_widget(const char*, double&);
00044 void* string_field_widget(const char*, vcl_string&);
00045 void* choice_field_widget(const char*, const vcl_vector<vcl_string>&, int&);
00046
00047 void* text_message_widget(const char*);
00048 void* file_browser_widget(const char*, vcl_string&, vcl_string&);
00049 void* inline_file_browser_widget(const char *,vcl_string&, vcl_string&);
00050 void* color_chooser_widget(const char *,vcl_string&);
00051 void* inline_color_chooser_widget(const char *,vcl_string&);
00052 void* inline_tableau_widget(const vgui_tableau_sptr tab,
00053 unsigned int width, unsigned int height);
00054 void modal(bool m);
00055
00056 bool ask();
00057 };
00058
00059
00060
00061 class vgui_qt_filebrowser_impl : public QGroupBox
00062 {
00063 Q_OBJECT
00064 public:
00065 vgui_qt_filebrowser_impl(QWidget* parent, const vcl_string& t, const vcl_string& f, const vcl_string& s);
00066 ~vgui_qt_filebrowser_impl() {}
00067
00068 vcl_string file() const { return vcl_string(edit_->text().toLatin1()); }
00069
00070 public slots:
00071 void get_a_file();
00072
00073 private:
00074 vcl_string title_;
00075 vcl_string filter_;
00076 QLineEdit* edit_;
00077 };
00078
00079 class vgui_qt_colorchooser_impl : public QGroupBox
00080 {
00081 Q_OBJECT
00082 public:
00083 vgui_qt_colorchooser_impl(QWidget* parent, const char*, vcl_string&);
00084 ~vgui_qt_colorchooser_impl() {}
00085
00086 vcl_string color() const { return value_; }
00087
00088 private:
00089 void update_color_string();
00090
00091 public slots:
00092 void get_a_color();
00093 void change_red(int);
00094 void change_green(int);
00095 void change_blue(int);
00096 void change_alpha(int);
00097
00098 private:
00099 vcl_string& value_;
00100 QColor color_;
00101 QFrame* frame_;
00102 QSpinBox *rbox_, *gbox_, *bbox_, *abox_;
00103 };
00104
00105
00106 class vgui_qt_tableau_impl : public QWidget
00107 {
00108 Q_OBJECT
00109 public:
00110 vgui_qt_tableau_impl(QWidget* parent, const vgui_tableau_sptr tab,
00111 unsigned int width, unsigned int height);
00112 ~vgui_qt_tableau_impl() {}
00113 };
00114
00115 #endif // vgui_qt_dialog_impl_h_