author | llornkcor <llornkcor> | 2003-02-23 03:35:32 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-02-23 03:35:32 (UTC) |
commit | 98ed23c5281a57d08c6c18b464fc50b4638385f8 (patch) (side-by-side diff) | |
tree | 79e3ad38c6e96ce3d0bbabb00e601a45f41d7210 /library/menubutton.h | |
parent | 47fc358e914aecd13c4cb3d9cb4b3f2ca1a93b6c (diff) | |
download | opie-98ed23c5281a57d08c6c18b464fc50b4638385f8.zip opie-98ed23c5281a57d08c6c18b464fc50b4638385f8.tar.gz opie-98ed23c5281a57d08c6c18b464fc50b4638385f8.tar.bz2 |
added a couple public methods- remove(int) count() text(int) and setUseLabel. see header for notes
-rw-r--r-- | library/menubutton.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/library/menubutton.h b/library/menubutton.h index 6582b1e..ee5dcf1 100644 --- a/library/menubutton.h +++ b/library/menubutton.h @@ -22,42 +22,48 @@ #include <qpushbutton.h> #include <qstringlist.h> class MenuButton : public QPushButton { Q_OBJECT public: MenuButton( QWidget* parent, const char* name=0); MenuButton( const QStringList& items, QWidget* parent, const char* name=0); void clear(); + int currentItem() const; QString currentText() const; void insertItems( const QStringList& items ); void insertItem( const QIconSet& icon, const QString& text=QString::null ); void insertItem( const QString& text ); void insertSeparator(); void setLabel(const QString& label); + int count(); + void remove(int id); + QString text(int id); + void setUseLabel(bool b); signals: void selected(int); void selected(const QString&); public slots: void select(int); void select(const QString&); private: + bool useLabel; void init(); QStringList txts; QPopupMenu* pop; int nitems; int cur; QString lab; void updateLabel(); }; #endif |