summaryrefslogtreecommitdiff
path: root/library/menubutton.cpp
authorzecke <zecke>2002-10-06 09:53:54 (UTC)
committer zecke <zecke>2002-10-06 09:53:54 (UTC)
commit4209ade719759f4b079bdd40baa4d255ce1e9d3a (patch) (unidiff)
tree34ba8c99dd79f6b6f6c5b396e288f7de9493dda9 /library/menubutton.cpp
parent93432da5b2a73874b359d4a4468cdaffeaab960c (diff)
downloadopie-4209ade719759f4b079bdd40baa4d255ce1e9d3a.zip
opie-4209ade719759f4b079bdd40baa4d255ce1e9d3a.tar.gz
opie-4209ade719759f4b079bdd40baa4d255ce1e9d3a.tar.bz2
As spotted on the MailinList
no default arguments in the implementation!
Diffstat (limited to 'library/menubutton.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/menubutton.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/menubutton.cpp b/library/menubutton.cpp
index f5c832c..007761f 100644
--- a/library/menubutton.cpp
+++ b/library/menubutton.cpp
@@ -103,49 +103,49 @@ void MenuButton::clear()
103} 103}
104 104
105/*! 105/*!
106 A menu item is created (see insertItem()) for each string in the \a 106 A menu item is created (see insertItem()) for each string in the \a
107 items string list. If any string is "--" a separator (see 107 items string list. If any string is "--" a separator (see
108 insertSeparator()) is inserted in its place. 108 insertSeparator()) is inserted in its place.
109*/ 109*/
110void MenuButton::insertItems( const QStringList& items ) 110void MenuButton::insertItems( const QStringList& items )
111{ 111{
112 QStringList::ConstIterator it=items.begin(); 112 QStringList::ConstIterator it=items.begin();
113 for (; it!=items.end(); ++it) { 113 for (; it!=items.end(); ++it) {
114 if ( (*it) == "--" ) 114 if ( (*it) == "--" )
115 insertSeparator(); 115 insertSeparator();
116 else 116 else
117 insertItem(*it); 117 insertItem(*it);
118 } 118 }
119} 119}
120 120
121/*! 121/*!
122 Inserts a menu item with the icon \a icon and label \a text into 122 Inserts a menu item with the icon \a icon and label \a text into
123 the menu. 123 the menu.
124 124
125 \sa insertItems() 125 \sa insertItems()
126*/ 126*/
127void MenuButton::insertItem( const QIconSet& icon, const QString& text=QString::null ) 127void MenuButton::insertItem( const QIconSet& icon, const QString& text )
128{ 128{
129 pop->insertItem(icon, text, nitems++); 129 pop->insertItem(icon, text, nitems++);
130 if ( nitems==1 ) select(0); 130 if ( nitems==1 ) select(0);
131} 131}
132 132
133/*! 133/*!
134 \overload 134 \overload
135 Inserts a menu item with the label \a text into the menu. 135 Inserts a menu item with the label \a text into the menu.
136 136
137 \sa insertItems() 137 \sa insertItems()
138*/ 138*/
139void MenuButton::insertItem( const QString& text ) 139void MenuButton::insertItem( const QString& text )
140{ 140{
141 pop->insertItem(text, nitems++); 141 pop->insertItem(text, nitems++);
142 if ( nitems==1 ) select(0); 142 if ( nitems==1 ) select(0);
143} 143}
144 144
145/*! 145/*!
146 Inserts a separator into the menu. 146 Inserts a separator into the menu.
147 147
148 \sa insertItems() 148 \sa insertItems()
149*/ 149*/
150void MenuButton::insertSeparator() 150void MenuButton::insertSeparator()
151{ 151{