summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/listobjselectwnd.h
Unidiff
Diffstat (limited to 'pwmanager/pwmanager/listobjselectwnd.h') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/listobjselectwnd.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/pwmanager/pwmanager/listobjselectwnd.h b/pwmanager/pwmanager/listobjselectwnd.h
index 3b5f1eb..df3da93 100644
--- a/pwmanager/pwmanager/listobjselectwnd.h
+++ b/pwmanager/pwmanager/listobjselectwnd.h
@@ -12,70 +12,72 @@
12/*************************************************************************** 12/***************************************************************************
13 * copyright (C) 2004 by Ulf Schenk 13 * copyright (C) 2004 by Ulf Schenk
14 * This file is originaly based on version 1.0.1 of pwmanager 14 * This file is originaly based on version 1.0.1 of pwmanager
15 * and was modified to run on embedded devices that run microkde 15 * and was modified to run on embedded devices that run microkde
16 * 16 *
17 * $Id$ 17 * $Id$
18 **************************************************************************/ 18 **************************************************************************/
19 19
20#ifndef LISTOBJSELECTWND_H 20#ifndef LISTOBJSELECTWND_H
21#define LISTOBJSELECTWND_H 21#define LISTOBJSELECTWND_H
22 22
23#include <qdialog.h> 23#include <qdialog.h>
24#include <qvbox.h> 24#include <q3vbox.h>
25#include <qhbox.h> 25#include <q3hbox.h>
26#include <qlabel.h> 26#include <qlabel.h>
27#include <qlistbox.h> 27#include <q3listbox.h>
28#include <qpushbutton.h> 28#include <qpushbutton.h>
29#include <qstringlist.h> 29#include <qstringlist.h>
30//Added by qt3to4:
31#include <QResizeEvent>
30 32
31 33
32/** Display a list-window for selection of some objects */ 34/** Display a list-window for selection of some objects */
33class ListObjSelectWnd : public QDialog 35class ListObjSelectWnd : public QDialog
34{ 36{
35 Q_OBJECT 37 Q_OBJECT
36public: 38public:
37 ListObjSelectWnd(const QString &caption, const QString &titleText, 39 ListObjSelectWnd(const QString &caption, const QString &titleText,
38 QWidget *parent = 0, bool multiSel = false, 40 QWidget *parent = 0, bool multiSel = false,
39 const char *name = 0, 41 const char *name = 0,
40 bool modal = FALSE, WFlags f = 0); 42 bool modal = FALSE, Qt::WFlags f = 0);
41 ~ListObjSelectWnd(); 43 ~ListObjSelectWnd();
42 44
43 void setList(const QStringList &_list); 45 void setList(const QStringList &_list);
44 void addObj(const QString &name) 46 void addObj(const QString &name)
45 { list->insertItem(name); } 47 { list->insertItem(name); }
46 void selectObj(const QString &name) 48 void selectObj(const QString &name)
47#ifndef PWM_EMBEDDED 49#ifndef PWM_EMBEDDED
48 { list->setCurrentItem(list->findItem(name, Qt::ExactMatch)); } 50 { list->setCurrentItem(list->findItem(name, Qt::ExactMatch)); }
49#else 51#else
50 { list->setCurrentItem(list->findItem(name)); } 52 { list->setCurrentItem(list->findItem(name)); }
51#endif 53#endif
52 QString getSelected() 54 QString getSelected()
53 { return list->currentText(); } 55 { return list->currentText(); }
54 int getSelectedIndex() 56 int getSelectedIndex()
55#ifndef PWM_EMBEDDED 57#ifndef PWM_EMBEDDED
56 { return list->index(list->selectedItem()); } 58 { return list->index(list->selectedItem()); }
57#else 59#else
58 { return list->currentItem(); } 60 { return list->currentItem(); }
59#endif 61#endif
60 QStringList getSelectedList(); 62 QStringList getSelectedList();
61 void clearObjs() 63 void clearObjs()
62 { list->clear(); } 64 { list->clear(); }
63 65
64protected: 66protected:
65 QVBox *vbox1; 67 Q3VBox *vbox1;
66 QHBox *hbox1; 68 Q3HBox *hbox1;
67 QHBox *hbox2; 69 Q3HBox *hbox2;
68 QLabel *title; 70 QLabel *title;
69 QListBox *list; 71 Q3ListBox *list;
70 QPushButton *okButton; 72 QPushButton *okButton;
71 QPushButton *cancelButton; 73 QPushButton *cancelButton;
72 QPushButton *selAllButton; 74 QPushButton *selAllButton;
73 QPushButton *unselAllButton; 75 QPushButton *unselAllButton;
74 76
75protected: 77protected:
76 void resizeEvent(QResizeEvent *); 78 void resizeEvent(QResizeEvent *);
77 79
78protected slots: 80protected slots:
79 void okButton_slot(); 81 void okButton_slot();
80 void cancelButton_slot(); 82 void cancelButton_slot();
81 void selAllButton_slot(); 83 void selAllButton_slot();