author | zecke <zecke> | 2003-08-30 20:26:05 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-08-30 20:26:05 (UTC) |
commit | d34e9bd43cab9fa296ee24dff173e86d5cf9954a (patch) (unidiff) | |
tree | 9bc1d141018c27c1e2d5c9bcb3d2501e12d2aafd /libopie/otabwidget.cpp | |
parent | 4c3a1de5289631db05b86a07092f0a334608dcf6 (diff) | |
download | opie-d34e9bd43cab9fa296ee24dff173e86d5cf9954a.zip opie-d34e9bd43cab9fa296ee24dff173e86d5cf9954a.tar.gz opie-d34e9bd43cab9fa296ee24dff173e86d5cf9954a.tar.bz2 |
Add comments about API changes when possible again
Add currentWidget() method and mark it as since 1.2
-rw-r--r-- | libopie/otabwidget.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libopie/otabwidget.cpp b/libopie/otabwidget.cpp index fe2c60f..1b8c085 100644 --- a/libopie/otabwidget.cpp +++ b/libopie/otabwidget.cpp | |||
@@ -379,32 +379,41 @@ void OTabWidget::setUpLayout() | |||
379 | } | 379 | } |
380 | else | 380 | else |
381 | { | 381 | { |
382 | tabBarStack->setGeometry( QMAX(0, lw-2), 0, t.width(), t.height() ); | 382 | tabBarStack->setGeometry( QMAX(0, lw-2), 0, t.width(), t.height() ); |
383 | widgetStack->setGeometry( 0, t.height()-lw, width(), height()-t.height()+QMAX( 0, lw-2 ) ); | 383 | widgetStack->setGeometry( 0, t.height()-lw, width(), height()-t.height()+QMAX( 0, lw-2 ) ); |
384 | } | 384 | } |
385 | 385 | ||
386 | if ( autoMask() ) | 386 | if ( autoMask() ) |
387 | updateMask(); | 387 | updateMask(); |
388 | } | 388 | } |
389 | 389 | ||
390 | QSize OTabWidget::sizeHint() const | 390 | QSize OTabWidget::sizeHint() const |
391 | { | 391 | { |
392 | QSize s( widgetStack->sizeHint() ); | 392 | QSize s( widgetStack->sizeHint() ); |
393 | QSize t( tabBarStack->sizeHint() ); | 393 | QSize t( tabBarStack->sizeHint() ); |
394 | return QSize( QMAX( s.width(), t.width() ), s.height() + t.height() ); | 394 | return QSize( QMAX( s.width(), t.width() ), s.height() + t.height() ); |
395 | } | 395 | } |
396 | 396 | ||
397 | void OTabWidget::resizeEvent( QResizeEvent * ) | 397 | void OTabWidget::resizeEvent( QResizeEvent * ) |
398 | { | 398 | { |
399 | setUpLayout(); | 399 | setUpLayout(); |
400 | } | 400 | } |
401 | 401 | ||
402 | int OTabWidget::currentTab() | 402 | int OTabWidget::currentTab() |
403 | { | 403 | { |
404 | if ( currTab ) | 404 | if ( currTab ) |
405 | { | 405 | { |
406 | return currTab->id(); | 406 | return currTab->id(); |
407 | } | 407 | } |
408 | return -1; | 408 | return -1; |
409 | } | 409 | } |
410 | 410 | ||
411 | QWidget* OTabWidget::currentWidget()const | ||
412 | { | ||
413 | if ( currTab ) | ||
414 | { | ||
415 | return currTab->control(); | ||
416 | } | ||
417 | |||
418 | return 0; | ||
419 | } | ||