diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | e9ae80694875f869892f13f4fcaf1170a00dea41 (patch) | |
tree | aa2f8d8a217e2d376224c8d46b7397b68d35de2d /quanta/dialogs/tagdialogs/listdlg.cpp | |
download | tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.tar.gz tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.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/kdewebdev@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/dialogs/tagdialogs/listdlg.cpp')
-rw-r--r-- | quanta/dialogs/tagdialogs/listdlg.cpp | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/quanta/dialogs/tagdialogs/listdlg.cpp b/quanta/dialogs/tagdialogs/listdlg.cpp new file mode 100644 index 00000000..396143c2 --- /dev/null +++ b/quanta/dialogs/tagdialogs/listdlg.cpp @@ -0,0 +1,60 @@ +/*************************************************************************** + listdlg.cpp - description + ------------------- + begin : Mon Nov 26 2001 + copyright : (C) 2001 by Andras Mantia <amantia@kde.org> + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * (at your option) any later version. * + ***************************************************************************/ + +#include "listdlg.h" + +//kde include +#include <klistbox.h> +#include <klocale.h> + +//qt includes +#include <qpushbutton.h> +#include <qstring.h> +#include <qstringlist.h> + +ListDlg::ListDlg(QStringList &entryList,QWidget* parent, const char *name ) + :KDialogBase(parent,name), listbox(new KListBox(this)) +{ + Q_CHECK_PTR(listbox); + setMainWidget(listbox); + showButtonApply(false); + enableButtonSeparator(true); + + listbox->clear(); + listbox->insertStringList(entryList); + if(entryList.count()>0) + { + listbox->setCurrentItem(0); + } + listbox->setMinimumSize(350,150); + adjustSize(); + resize(sizeHint()); + + connect(listbox,SIGNAL(doubleClicked( QListBoxItem * )), SLOT(slotOk())); +} + +ListDlg::~ListDlg(){ +} + +QString ListDlg::getEntry() +{ + return listbox->currentText(); +} + +int ListDlg::getEntryNum() +{ + return listbox->currentItem(); +} +#include "listdlg.moc" |