diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 00:15:53 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 00:15:53 +0000 |
commit | 0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch) | |
tree | b95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/common/gui/editlistbox.h | |
parent | b79a2c28534cf09987eeeba3077fff9236df182a (diff) | |
download | piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.tar.gz piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.zip |
TQt4 port piklab
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/common/gui/editlistbox.h')
-rw-r--r-- | src/common/gui/editlistbox.h | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/src/common/gui/editlistbox.h b/src/common/gui/editlistbox.h index c259278..3e7a26d 100644 --- a/src/common/gui/editlistbox.h +++ b/src/common/gui/editlistbox.h @@ -19,7 +19,7 @@ #ifndef EDITLISTBOX_H #define EDITLISTBOX_H -#include <qlayout.h> +#include <tqlayout.h> #include <klineedit.h> #include <kpushbutton.h> #include <klistview.h> @@ -32,33 +32,34 @@ // * use KStdGuiItem for buttons // * support for New, Clear, Reset buttons // * use KListView -class EditListBox : public QFrame +class EditListBox : public TQFrame { Q_OBJECT + TQ_OBJECT public: enum Mode { DuplicatesDisallowed, DuplicatesAllowed, DuplicatesCheckedAtEntering }; enum Button { Add = 1, Remove = 2, UpDown = 4, RemoveAll = 8, Reset = 16 }; - Q_DECLARE_FLAGS(Buttons, Button) + TQ_DECLARE_FLAGS(Buttons, Button) - EditListBox(uint nbColumns, QWidget *parent = 0, const char *name = 0, Mode mode = DuplicatesDisallowed, + EditListBox(uint nbColumns, TQWidget *tqparent = 0, const char *name = 0, Mode mode = DuplicatesDisallowed, Buttons buttons = Buttons(Add|Remove|RemoveAll|UpDown) ); - EditListBox(uint nbColumns, QWidget *view, KLineEdit *lineEdit, QWidget *parent = 0, const char *name = 0, + EditListBox(uint nbColumns, TQWidget *view, KLineEdit *lineEdit, TQWidget *tqparent = 0, const char *name = 0, Mode mode = DuplicatesDisallowed, Buttons buttons = Buttons(Add|Remove|RemoveAll|UpDown) ); - void setTexts(const QStringList& items); - QStringList texts() const; + void setTexts(const TQStringList& items); + TQStringList texts() const; uint count() const; - QString text(uint i) const { return item(i)->text(textColumn()); } - const QListViewItem *item(uint i) const; + TQString text(uint i) const { return item(i)->text(textColumn()); } + const TQListViewItem *item(uint i) const; Buttons buttons() const { return _buttons; } void setButtons(Buttons buttons); - void setEditText(const QString &text); - void addItem(const QString &text); + void setEditText(const TQString &text); + void addItem(const TQString &text); signals: void reset(); void changed(); - void added( const QString & text ); - void removed( const QString & text ); + void added( const TQString & text ); + void removed( const TQString & text ); public slots: void clear(); @@ -70,26 +71,26 @@ Q_OBJECT virtual void addItem(); virtual void removeItem(); void selectionChanged(); - void typedSomething(const QString& text); + void typedSomething(const TQString& text); protected: KListView *_listView; - virtual QListViewItem *createItem(); + virtual TQListViewItem *createItem(); virtual uint textColumn() const { return 0; } - QString selectedText() const; + TQString selectedText() const; private: Mode _mode; Buttons _buttons; - QVBoxLayout *_buttonsLayout; + TQVBoxLayout *_buttonsLayout; KLineEdit *m_lineEdit; KPushButton *_addButton, *_removeButton, *_moveUpButton, *_moveDownButton, *_removeAllButton, *_resetButton; - void init(uint nbColumns, QWidget *view); + void init(uint nbColumns, TQWidget *view); void updateButtons(); }; -Q_DECLARE_OPERATORS_FOR_FLAGS(EditListBox::Buttons) +TQ_DECLARE_OPERATORS_FOR_FLAGS(EditListBox::Buttons) #endif |