summaryrefslogtreecommitdiff
path: root/libopie/otabwidget.h
Unidiff
Diffstat (limited to 'libopie/otabwidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/otabwidget.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/libopie/otabwidget.h b/libopie/otabwidget.h
index d61fe9e..74d683b 100644
--- a/libopie/otabwidget.h
+++ b/libopie/otabwidget.h
@@ -109,142 +109,157 @@ public:
109 109
110/** 110/**
111 * @fn addTab( QWidget *child, const QString &icon, const QString &label ) 111 * @fn addTab( QWidget *child, const QString &icon, const QString &label )
112 * @brief Add new widget to control. 112 * @brief Add new widget to control.
113 * 113 *
114 * @param child Widget control. 114 * @param child Widget control.
115 * @param icon Path to icon. 115 * @param icon Path to icon.
116 * @param label Text label. 116 * @param label Text label.
117 */ 117 */
118 void addTab( QWidget *, const QString &, const QString & ); 118 void addTab( QWidget *, const QString &, const QString & );
119 119
120/** 120/**
121 * @fn removePage( QWidget *widget ) 121 * @fn removePage( QWidget *widget )
122 * @brief Remove widget from control. Does not delete widget. 122 * @brief Remove widget from control. Does not delete widget.
123 * 123 *
124 * @param widget Widget control to be removed. 124 * @param widget Widget control to be removed.
125 */ 125 */
126 void removePage( QWidget * ); 126 void removePage( QWidget * );
127 127
128/** 128/**
129 * @fn tabStyle() 129 * @fn tabStyle()
130 * @brief Returns current widget selection control style. 130 * @brief Returns current widget selection control style.
131 */ 131 */
132 TabStyle tabStyle() const; 132 TabStyle tabStyle() const;
133 133
134/** 134/**
135 * @fn setTabStyle( TabStyle s ) 135 * @fn setTabStyle( TabStyle s )
136 * @brief Set the current widget selection control style. 136 * @brief Set the current widget selection control style.
137 * 137 *
138 * @param s New style to be used. 138 * @param s New style to be used.
139 */ 139 */
140 void setTabStyle( TabStyle ); 140 void setTabStyle( TabStyle );
141 141
142/** 142/**
143 * @fn tabPosition() 143 * @fn tabPosition()
144 * @brief Returns current widget selection control position. 144 * @brief Returns current widget selection control position.
145 */ 145 */
146 TabPosition tabPosition() const; 146 TabPosition tabPosition() const;
147 147
148/** 148/**
149 * @fn setTabPosition( TabPosition p ) 149 * @fn setTabPosition( TabPosition p )
150 * @brief Set the current widget selection control position. 150 * @brief Set the current widget selection control position.
151 * 151 *
152 * @param p New position of widget selection control. 152 * @param p New position of widget selection control.
153 */ 153 */
154 void setTabPosition( TabPosition ); 154 void setTabPosition( TabPosition );
155 155
156/** 156/**
157 * @fn setCurrentTab( QWidget *childwidget ) 157 * @fn setCurrentTab( QWidget *childwidget )
158 * @brief Selects and brings to top the desired widget by using widget pointer. 158 * @brief Selects and brings to top the desired widget by using widget pointer.
159 * 159 *
160 * @param childwidget Widget to select. 160 * @param childwidget Widget to select.
161 */ 161 */
162 void setCurrentTab( QWidget * ); 162 void setCurrentTab( QWidget * );
163 163
164/** 164/**
165 * @fn setCurrentTab( const QString &tabname ) 165 * @fn setCurrentTab( const QString &tabname )
166 * @brief Selects and brings to top the desired widget, by using label. 166 * @brief Selects and brings to top the desired widget, by using label.
167 * 167 *
168 * @param tabname Text label for widget to select. 168 * @param tabname Text label for widget to select.
169 */ 169 */
170 void setCurrentTab( const QString & ); 170 void setCurrentTab( const QString & );
171 171
172/** 172/**
173 * @fn setCurrentTab( int )
174 * @brief Selects and brings to top the desired widget, by using id.
175 *
176 * @param tab id for widget to select.
177 */
178 void setCurrentTab(int);
179
180/**
173 * @fn sizeHint() 181 * @fn sizeHint()
174 * @brief Reimplemented for internal purposes. 182 * @brief Reimplemented for internal purposes.
175 */ 183 */
176 QSize sizeHint() const; 184 QSize sizeHint() const;
177 185
186/**
187 * @fn getCurrentTab( )
188 * @brief returns current tab id.
189 */
190 int getCurrentTab();
191
178 192
179protected: 193protected:
180 194
181/** 195/**
182 * @fn resizeEvent( QResizeEvent * ) 196 * @fn resizeEvent( QResizeEvent * )
183 * @brief Reimplemented for internal purposes. 197 * @brief Reimplemented for internal purposes.
184 */ 198 */
185 void resizeEvent( QResizeEvent * ); 199 void resizeEvent( QResizeEvent * );
186 200
187private: 201private:
188 OTabInfoList tabs; 202 OTabInfoList tabs;
189 OTabInfo *currentTab; 203 OTabInfo *currentTab;
190 204
191 TabStyle tabBarStyle; 205 TabStyle tabBarStyle;
192 TabPosition tabBarPosition; 206 TabPosition tabBarPosition;
193 207
194 QWidgetStack *tabBarStack; 208 QWidgetStack *tabBarStack;
195 OTabBar *tabBar; 209 OTabBar *tabBar;
196 QComboBox *tabList; 210 QComboBox *tabList;
197 211
198 QWidgetStack *widgetStack; 212 QWidgetStack *widgetStack;
199 213
200/** 214/**
201 * @fn loadSmooth( const QString &name ) 215 * @fn loadSmooth( const QString &name )
202 * @brief Loads icon for widget. 216 * @brief Loads icon for widget.
203 * 217 *
204 * @param name Name of icon image file. 218 * @param name Name of icon image file.
205 */ 219 */
206 QPixmap loadSmooth( const QString & ); 220 QPixmap loadSmooth( const QString & );
207 221
208/** 222/**
209 * @fn selectTab( OTabInfo *tab ) 223 * @fn selectTab( OTabInfo *tab )
210 * @brief Internal function to select desired widget. 224 * @brief Internal function to select desired widget.
211 * 225 *
212 * @param tab Pointer to data for widget. 226 * @param tab Pointer to data for widget.
213 */ 227 */
214 void selectTab( OTabInfo * ); 228 void selectTab( OTabInfo * );
215 229
216/** 230/**
217 * @fn setUpLayout() 231 * @fn setUpLayout()
218 * @brief Internal function to adjust layout. 232 * @brief Internal function to adjust layout.
219 */ 233 */
220 void setUpLayout(); 234 void setUpLayout();
221 235
236
222signals: 237signals:
223/** 238/**
224 * @fn currentChanegd( QWidget *widget ) 239 * @fn currentChanegd( QWidget *widget )
225 * @brief This signal is emitted whenever the widget has changed. 240 * @brief This signal is emitted whenever the widget has changed.
226 * 241 *
227 * @param widget Pointer to new current widget. 242 * @param widget Pointer to new current widget.
228 */ 243 */
229 void currentChanged( QWidget * ); 244 void currentChanged( QWidget * );
230 245
231private slots: 246private slots:
232 247
233/** 248/**
234 * @fn slotTabBarSelected( int id ) 249 * @fn slotTabBarSelected( int id )
235 * @brief Slot which is called when a tab is selected. 250 * @brief Slot which is called when a tab is selected.
236 * 251 *
237 * @param id ID of widget selected. 252 * @param id ID of widget selected.
238 */ 253 */
239 void slotTabBarSelected( int ); 254 void slotTabBarSelected( int );
240 255
241/** 256/**
242 * @fn slotTabListSelected( int index ) 257 * @fn slotTabListSelected( int index )
243 * @brief Slot which is called when a drop down selection is made. 258 * @brief Slot which is called when a drop down selection is made.
244 * 259 *
245 * @param id Index of widget selected. 260 * @param id Index of widget selected.
246 */ 261 */
247 void slotTabListSelected( int ); 262 void slotTabListSelected( int );
248}; 263};
249 264
250#endif 265#endif