summaryrefslogtreecommitdiffstats
path: root/khotkeys/shared/khlistbox.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /khotkeys/shared/khlistbox.h
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khotkeys/shared/khlistbox.h')
-rw-r--r--khotkeys/shared/khlistbox.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/khotkeys/shared/khlistbox.h b/khotkeys/shared/khlistbox.h
new file mode 100644
index 000000000..95bd32963
--- /dev/null
+++ b/khotkeys/shared/khlistbox.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+
+ KHotKeys
+
+ Copyright (C) 1999-2002 Lubos Lunak <l.lunak@kde.org>
+
+ Distributed under the terms of the GNU General Public License version 2.
+
+****************************************************************************/
+
+#ifndef _KHLISTBOX_H_
+#define _KHLISTBOX_H_
+
+#include <qtimer.h>
+
+#include <klistbox.h>
+
+namespace KHotKeys
+{
+
+class KHListBox
+ : public QListBox
+ {
+ Q_OBJECT
+ Q_PROPERTY( bool forceSelect READ forceSelect WRITE setForceSelect )
+ public:
+ KHListBox( QWidget* parent_P, const char* name_P = NULL );
+ virtual void clear();
+ virtual void insertItem( QListBoxItem* item_P );
+ bool forceSelect() const;
+ void setForceSelect( bool force_P );
+ signals:
+ void current_changed( QListBoxItem* item_P );
+ private slots:
+ void slot_selection_changed( QListBoxItem* item_P );
+ void slot_selection_changed();
+ void slot_current_changed( QListBoxItem* item_P );
+ void slot_insert_select();
+ private:
+ QListBoxItem* saved_current_item;
+ bool in_clear;
+ bool force_select;
+ QTimer insert_select_timer;
+ };
+
+//***************************************************************************
+// Inline
+//***************************************************************************
+
+inline
+void KHListBox::setForceSelect( bool force_P )
+ {
+ force_select = force_P;
+ }
+
+inline
+bool KHListBox::forceSelect() const
+ {
+ return force_select;
+ }
+
+} // namespace KHotKeys
+
+#endif