00001 #ifndef FAITH__COMBOBOX_H 00002 #define FAITH__COMBOBOX_H 00003 00004 #include <faith/widget.h> 00005 #include <faith/ui.h> 00006 00007 namespace Faith 00008 { 00009 00010 class FAITH_UI_EXPORT ComboBox : public Faith::Widget 00011 { 00012 Q_OBJECT 00013 struct ComboBoxPrivate; 00014 ComboBoxPrivate *d; 00015 00016 void init(); 00017 00018 public: 00019 ComboBox(Faith::Widget *parent, const char *name=0); 00020 ComboBox(const Faith::String &s, Faith::Widget *parent, const char *name=0); 00021 ComboBox(const std::list<Faith::String> &s, Faith::Widget *parent, const char *name=0); 00022 00023 ~ComboBox(); 00024 00025 bool editable() const { return true; } 00026 00027 Faith::Size sizeHint() const; 00028 00029 String text() const; 00030 00031 public slots: 00032 void setText(const Faith::String &text); 00033 00034 protected: 00035 void paintEvent(Faith::PaintEvent *e); 00036 void resizeEvent(Faith::ResizeEvent *e); 00037 void mousePressEvent(Faith::MouseEvent *e); 00038 00039 bool eventFilter(Faith::Object *filtered, Faith::Event *e); 00040 00041 private slots: 00042 void listBoxCurrentChanged(const Faith::String &text); 00043 }; 00044 00045 00046 } 00047 00048 #endif
1.4.7