diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-08-05 01:01:34 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-08-05 01:01:34 -0500 |
commit | c73edd8f63289c619c20a8e5d031a24d870c62ee (patch) | |
tree | 08cbff3bdbb8c46213f6cf416d5f027f58d4c5f5 /src/widgets | |
parent | fe7969ef886d7287fa959929ddd33fbad8407884 (diff) | |
download | tqt3-c73edd8f63289c619c20a8e5d031a24d870c62ee.tar.gz tqt3-c73edd8f63289c619c20a8e5d031a24d870c62ee.zip |
Automated update from Qt3
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/qdialogbuttons.cpp | 6 | ||||
-rw-r--r-- | src/widgets/qdialogbuttons_p.h | 1 | ||||
-rw-r--r-- | src/widgets/qtabbar.cpp | 28 |
3 files changed, 26 insertions, 9 deletions
diff --git a/src/widgets/qdialogbuttons.cpp b/src/widgets/qdialogbuttons.cpp index 0762e6c79..4153fb597 100644 --- a/src/widgets/qdialogbuttons.cpp +++ b/src/widgets/qdialogbuttons.cpp @@ -150,6 +150,12 @@ TQDialogButtons::isButtonVisible(Button button) const return ((int)(d->visible & button)) == button; } +TQ_UINT32 +TQDialogButtons::visibleButtons() const +{ + return d->visible; +} + void TQDialogButtons::addWidget(TQWidget *w) { diff --git a/src/widgets/qdialogbuttons_p.h b/src/widgets/qdialogbuttons_p.h index d41c6bea5..85507ec18 100644 --- a/src/widgets/qdialogbuttons_p.h +++ b/src/widgets/qdialogbuttons_p.h @@ -72,6 +72,7 @@ public: inline void hideButton(Button b) { setButtonVisible(b, FALSE); } virtual void setButtonVisible(Button, bool visible); bool isButtonVisible(Button) const; + TQ_UINT32 visibleButtons() const; void addWidget(TQWidget *); diff --git a/src/widgets/qtabbar.cpp b/src/widgets/qtabbar.cpp index 697b28f5b..caa8e7d15 100644 --- a/src/widgets/qtabbar.cpp +++ b/src/widgets/qtabbar.cpp @@ -335,7 +335,7 @@ private: */ TQTabBar::TQTabBar( TQWidget * parent, const char *name ) - : TQWidget( parent, name, WNoAutoErase | WNoMousePropagation ) + : TQWidget( parent, name, WNoAutoErase | WNoMousePropagation ), l(NULL) { d = new TQTabPrivate; d->pressed = 0; @@ -839,7 +839,10 @@ void TQTabBar::show() int TQTabBar::currentTab() const { - const TQTab * t = l->getLast(); + const TQTab * t = 0; + if (l) { + t = l->getLast(); + } return t ? t->id : -1; } @@ -965,10 +968,12 @@ void TQTabBar::keyPressEvent( TQKeyEvent * e ) TQTab * TQTabBar::tab( int id ) const { - TQTab * t; - for( t = l->first(); t; t = l->next() ) - if ( t && t->id == id ) - return t; + if (l) { + TQTab * t; + for( t = l->first(); t; t = l->next() ) + if ( t && t->id == id ) + return t; + } return 0; } @@ -982,7 +987,8 @@ TQTab * TQTabBar::tab( int id ) const TQTab * TQTabBar::tabAt( int index ) const { TQTab * t; - t = lstatic->at( index ); + TQPtrList<TQTab> internalList = *lstatic; + t = internalList.at( index ); return t; } @@ -996,8 +1002,9 @@ TQTab * TQTabBar::tabAt( int index ) const int TQTabBar::indexOf( int id ) const { TQTab * t; + TQPtrList<TQTab> internalList = *lstatic; int idx = 0; - for( t = lstatic->first(); t; t = lstatic->next() ) { + for( t = internalList.first(); t; t = internalList.next() ) { if ( t && t->id == id ) return idx; idx++; @@ -1014,7 +1021,10 @@ int TQTabBar::indexOf( int id ) const */ int TQTabBar::count() const { - return l->count(); + if (l) { + return l->count(); + } + return 0; } |