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 @@ -1,63 +1,69 @@ /********************************************************************** ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #ifndef MENUBUTTON_H #define MENUBUTTON_H #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 |