From d9338083192084613e5530b02710b796252d342b Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 12 Aug 2010 10:57:04 +0000 Subject: New scripting system part2. --- client/widgets/combobox.h | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) (limited to 'client/widgets/combobox.h') diff --git a/client/widgets/combobox.h b/client/widgets/combobox.h index 8059e81..a706075 100644 --- a/client/widgets/combobox.h +++ b/client/widgets/combobox.h @@ -27,47 +27,36 @@ #ifndef __PRACRO_COMBOBOX_H__ #define __PRACRO_COMBOBOX_H__ -#include "widget.h" #include -#include #include +#include "widget.h" + typedef enum { SELECT, EDIT, SEARCH } types_t; -class ComboBox : public QComboBox, public Widget +class QComboBox; +class QWheelEvent; +class ComboBox : public Widget { Q_OBJECT public: ComboBox(QDomNode &node, MacroWindow *macrowindow); + ~ComboBox(); - bool isValid(); - - QString getValue(); + QString value(); void setValue(QString value, QString source = ""); - void disable(); - void enable(); - bool isDisabled(); + bool preValid(); - void connectFrom(const char *signal, - const QObject *receiver, const char *method); - - void connectTo(const QObject *sender, const char *signal, - const char *method); - - bool setKeyboardFocus(); - void setVisibility(bool visible); + void setWdgValid(bool valid); public slots: void changed(); -signals: - void wasChanged(); - protected: bool eventFilter(QObject *obj, QEvent *event); void wheelEvent(QWheelEvent *); @@ -78,6 +67,8 @@ private: QString combo_value; types_t combotype; bool ischangingbyuser; + + QComboBox *combobox; }; #endif/*__PRACRO_COMBOBOX_H__*/ -- cgit v1.2.3