summaryrefslogtreecommitdiffabout
path: root/microkde/keditlistbox.cpp
Side-by-side diff
Diffstat (limited to 'microkde/keditlistbox.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/keditlistbox.cpp33
1 files changed, 19 insertions, 14 deletions
diff --git a/microkde/keditlistbox.cpp b/microkde/keditlistbox.cpp
index 55b7784..257a44a 100644
--- a/microkde/keditlistbox.cpp
+++ b/microkde/keditlistbox.cpp
@@ -22,8 +22,11 @@
#include <qpushbutton.h>
#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qlistbox.h>
-#include <qwhatsthis.h>
+#include <q3groupbox.h>
+#include <q3listbox.h>
+#include <q3whatsthis.h>
#include <qlabel.h>
+//Added by qt3to4:
+#include <Q3GridLayout>
+#include <Q3StrList>
#include <kcombobox.h>
@@ -48,5 +51,5 @@ public:
KEditListBox::KEditListBox(QWidget *parent, const char *name,
bool checkAtEntering, int buttons )
- :QGroupBox(parent, name )
+ :Q3GroupBox(parent, name )
{
init( checkAtEntering, buttons );
@@ -55,5 +58,5 @@ KEditListBox::KEditListBox(QWidget *parent, const char *name,
KEditListBox::KEditListBox(const QString& title, QWidget *parent,
const char *name, bool checkAtEntering, int buttons)
- :QGroupBox(title, parent, name )
+ :Q3GroupBox(title, parent, name )
{
init( checkAtEntering, buttons );
@@ -63,5 +66,5 @@ KEditListBox::KEditListBox(const QString& title, const CustomEditor& custom,
QWidget *parent, const char *name,
bool checkAtEntering, int buttons)
- :QGroupBox(title, parent, name )
+ :Q3GroupBox(title, parent, name )
{
m_lineEdit = custom.lineEdit();
@@ -96,5 +99,5 @@ void KEditListBox::init( bool checkAtEntering, int buttons,
QWidget * gb = this;
- QGridLayout * grid = new QGridLayout(gb, 7 - lostButtons, 2,
+ Q3GridLayout * grid = new Q3GridLayout(gb, 7 - lostButtons, 2,
KDialog::marginHint(),
KDialog::spacingHint());
@@ -110,5 +113,5 @@ void KEditListBox::init( bool checkAtEntering, int buttons,
m_lineEdit=new KLineEdit(gb);
- m_listBox = new QListBox(gb);
+ m_listBox = new Q3ListBox(gb);
QWidget *editingWidget = representationWidget ?
@@ -205,5 +208,5 @@ void KEditListBox::moveItemUp()
}
- QListBoxItem *selItem = m_listBox->item(selIndex);
+ Q3ListBoxItem *selItem = m_listBox->item(selIndex);
m_listBox->takeItem(selItem);
m_listBox->insertItem(selItem, selIndex-1);
@@ -228,5 +231,5 @@ void KEditListBox::moveItemDown()
}
- QListBoxItem *selItem = m_listBox->item(selIndex);
+ Q3ListBoxItem *selItem = m_listBox->item(selIndex);
m_listBox->takeItem(selItem);
m_listBox->insertItem(selItem, selIndex+1);
@@ -350,12 +353,14 @@ void KEditListBox::insertStringList(const QStringList& list, int index)
}
-void KEditListBox::insertStrList(const QStrList* list, int index)
+void KEditListBox::insertStrList(const Q3StrList* list, int index)
{
- m_listBox->insertStrList(list,index);
+ for(Q3StrList::const_iterator i=list->begin();i!=list->end();++i)
+ m_listBox->insertItem(*i,index++);
}
-void KEditListBox::insertStrList(const QStrList& list, int index)
+void KEditListBox::insertStrList(const Q3StrList& list, int index)
{
- m_listBox->insertStrList(list,index);
+ for(Q3StrList::const_iterator i=list.begin();i!=list.end();++i)
+ m_listBox->insertItem(*i,index++);
}