author | llornkcor <llornkcor> | 2002-07-01 23:24:08 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-07-01 23:24:08 (UTC) |
commit | 59222a752fa4c8a1e8c2a00ee2f9e22855f12bb2 (patch) (side-by-side diff) | |
tree | f148d4858859dac3b413e675c760acfdab24b8e6 /noncore/apps/opie-reader/cbkmkselector.h | |
parent | c08be8ae22dcc1bfb83cfdec807149b161d770f5 (diff) | |
download | opie-59222a752fa4c8a1e8c2a00ee2f9e22855f12bb2.zip opie-59222a752fa4c8a1e8c2a00ee2f9e22855f12bb2.tar.gz opie-59222a752fa4c8a1e8c2a00ee2f9e22855f12bb2.tar.bz2 |
initial
Diffstat (limited to 'noncore/apps/opie-reader/cbkmkselector.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/cbkmkselector.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/noncore/apps/opie-reader/cbkmkselector.h b/noncore/apps/opie-reader/cbkmkselector.h new file mode 100644 index 0000000..1a49c5a --- a/dev/null +++ b/noncore/apps/opie-reader/cbkmkselector.h @@ -0,0 +1,41 @@ +#include <qwidget.h> +#include <qlistbox.h> +#include <qpushbutton.h> +#include <qlayout.h> + +class CBkmkSelector : public QWidget +{ + + Q_OBJECT + + QListBox* bkmkselector; + +signals: + void selected(int i); + void cancelled(); +private slots: + void slotSelected(QListBoxItem* t) { emit selected(bkmkselector->index(t)); } + void slotSelected(int t) { emit selected(t); } + void slotCancel() { emit cancelled(); } +public: + CBkmkSelector( QWidget *parent=0, const char *name=0, WFlags f = 0) : + QWidget(parent, name, f) + { + +// QFont f("unifont", 16); +// setFont( f ); + + QVBoxLayout* grid = new QVBoxLayout(this); + bkmkselector = new QListBox(this, "Bookmarks"); + QPushButton* exitButton = new QPushButton("Cancel", this); + connect(bkmkselector, SIGNAL( selected(int) ), this, SLOT( slotSelected(int) ) ); + connect(bkmkselector, SIGNAL( clicked(QListBoxItem*) ), this, SLOT( slotSelected(QListBoxItem*) ) ); + connect(exitButton, SIGNAL( released() ), this, SLOT( slotCancel() ) ); + grid->addWidget(bkmkselector,1); + grid->addWidget(exitButton); + } + void clear() { bkmkselector->clear(); } + void insertItem(const QString& item) { bkmkselector->insertItem(item); } + QString text(int index) const { return bkmkselector->text(index); } +}; + |