author | llornkcor <llornkcor> | 2002-12-20 01:35:01 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-12-20 01:35:01 (UTC) |
commit | 876e1a4724a7bd75dc642e295de354241096e028 (patch) (unidiff) | |
tree | a37c5dcc9d78e04bb6b859ab89d8cf81e6745087 /noncore/apps/opie-reader/cbkmkselector.h | |
parent | 5fd6636ba3d94b48dd543887316c47c5388a43c2 (diff) | |
download | opie-876e1a4724a7bd75dc642e295de354241096e028.zip opie-876e1a4724a7bd75dc642e295de354241096e028.tar.gz opie-876e1a4724a7bd75dc642e295de354241096e028.tar.bz2 |
update - sorry it took so long. hope this works correctly
Diffstat (limited to 'noncore/apps/opie-reader/cbkmkselector.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/cbkmkselector.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/apps/opie-reader/cbkmkselector.h b/noncore/apps/opie-reader/cbkmkselector.h index 1a49c5a..1a70048 100644 --- a/noncore/apps/opie-reader/cbkmkselector.h +++ b/noncore/apps/opie-reader/cbkmkselector.h | |||
@@ -1,41 +1,43 @@ | |||
1 | #include <qwidget.h> | 1 | #include <qwidget.h> |
2 | #include <qlistbox.h> | 2 | #include <qlistbox.h> |
3 | #include <qpushbutton.h> | 3 | #include <qpushbutton.h> |
4 | #include <qlayout.h> | 4 | #include <qlayout.h> |
5 | 5 | ||
6 | class CBkmkSelector : public QWidget | 6 | class CBkmkSelector : public QWidget |
7 | { | 7 | { |
8 | 8 | ||
9 | Q_OBJECT | 9 | Q_OBJECT |
10 | 10 | ||
11 | QListBox* bkmkselector; | 11 | QListBox* bkmkselector; |
12 | QPushButton* exitButton; | ||
12 | 13 | ||
13 | signals: | 14 | signals: |
14 | void selected(int i); | 15 | void selected(int i); |
15 | void cancelled(); | 16 | void cancelled(); |
16 | private slots: | 17 | private slots: |
17 | void slotSelected(QListBoxItem* t) { emit selected(bkmkselector->index(t)); } | 18 | void slotSelected(QListBoxItem* t) { emit selected(bkmkselector->index(t)); } |
18 | void slotSelected(int t) { emit selected(t); } | 19 | void slotSelected(int t) { emit selected(t); } |
19 | void slotCancel() { emit cancelled(); } | 20 | void slotCancel() { emit cancelled(); } |
20 | public: | 21 | public: |
21 | CBkmkSelector( QWidget *parent=0, const char *name=0, WFlags f = 0) : | 22 | CBkmkSelector( QWidget *parent=0, const char *name=0, WFlags f = 0) : |
22 | QWidget(parent, name, f) | 23 | QWidget(parent, name, f) |
23 | { | 24 | { |
24 | 25 | ||
25 | // QFont f("unifont", 16); | 26 | // QFont f("unifont", 16); |
26 | // setFont( f ); | 27 | // setFont( f ); |
27 | 28 | ||
28 | QVBoxLayout* grid = new QVBoxLayout(this); | 29 | QVBoxLayout* grid = new QVBoxLayout(this); |
29 | bkmkselector = new QListBox(this, "Bookmarks"); | 30 | bkmkselector = new QListBox(this, "Bookmarks"); |
30 | QPushButton* exitButton = new QPushButton("Cancel", this); | 31 | exitButton = new QPushButton("Cancel", this); |
31 | connect(bkmkselector, SIGNAL( selected(int) ), this, SLOT( slotSelected(int) ) ); | 32 | connect(bkmkselector, SIGNAL( selected(int) ), this, SLOT( slotSelected(int) ) ); |
32 | connect(bkmkselector, SIGNAL( clicked(QListBoxItem*) ), this, SLOT( slotSelected(QListBoxItem*) ) ); | 33 | connect(bkmkselector, SIGNAL( clicked(QListBoxItem*) ), this, SLOT( slotSelected(QListBoxItem*) ) ); |
33 | connect(exitButton, SIGNAL( released() ), this, SLOT( slotCancel() ) ); | 34 | connect(exitButton, SIGNAL( released() ), this, SLOT( slotCancel() ) ); |
34 | grid->addWidget(bkmkselector,1); | 35 | grid->addWidget(bkmkselector,1); |
35 | grid->addWidget(exitButton); | 36 | grid->addWidget(exitButton); |
36 | } | 37 | } |
37 | void clear() { bkmkselector->clear(); } | 38 | void clear() { bkmkselector->clear(); } |
38 | void insertItem(const QString& item) { bkmkselector->insertItem(item); } | 39 | void insertItem(const QString& item) { bkmkselector->insertItem(item); } |
39 | QString text(int index) const { return bkmkselector->text(index); } | 40 | QString text(int index) const { return bkmkselector->text(index); } |
41 | void setText(const QString& _l) { exitButton->setText(_l); } | ||
40 | }; | 42 | }; |
41 | 43 | ||