summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorDarrell Anderson <humanreadable@yahoo.com>2012-08-08 15:38:47 -0500
committerDarrell Anderson <humanreadable@yahoo.com>2012-08-08 15:38:47 -0500
commit785106b36c47923c338b6d3d61584eea448863ca (patch)
tree6b2bbbde4a5ff5e43c1c9ec31ad0bd72ea43e0df /src/widgets
parent7d22e97622a6b963382b88aac6dfde06a2cd8f03 (diff)
parent43db215f601fd50f1fd8b502fae30c75c1bdee4a (diff)
downloadtqt3-785106b36c47923c338b6d3d61584eea448863ca.tar.gz
tqt3-785106b36c47923c338b6d3d61584eea448863ca.zip
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tqt3
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/qdialogbuttons.cpp6
-rw-r--r--src/widgets/qdialogbuttons_p.h1
-rw-r--r--src/widgets/qgroupbox.cpp3
-rw-r--r--src/widgets/qlabel.cpp3
-rw-r--r--src/widgets/qtabbar.cpp28
-rw-r--r--src/widgets/qtoolbox.cpp3
6 files changed, 32 insertions, 12 deletions
diff --git a/src/widgets/qdialogbuttons.cpp b/src/widgets/qdialogbuttons.cpp
index 0762e6c7..4153fb59 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 d41c6bea..85507ec1 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/qgroupbox.cpp b/src/widgets/qgroupbox.cpp
index d78ae735..39f43a47 100644
--- a/src/widgets/qgroupbox.cpp
+++ b/src/widgets/qgroupbox.cpp
@@ -364,8 +364,9 @@ void TQGroupBox::paintEvent( TQPaintEvent *event )
if(va & AlignTop)
r.moveBy(0, fm.descent());
TQColor pen( (TQRgb) style().styleHint(TQStyle::SH_GroupBox_TextLabelColor, this ) );
- if (!style().styleHint(TQStyle::SH_UnderlineAccelerator, this))
+ if ((!style().styleHint(TQStyle::SH_UnderlineAccelerator, this)) || ((style().styleHint(TQStyle::SH_HideUnderlineAcceleratorWhenAltUp, this)) && (!style().acceleratorsShown()))) {
va |= NoAccel;
+ }
style().drawItem( &paint, r, ShowPrefix | AlignHCenter | va, colorGroup(),
isEnabled(), 0, str, -1, ownPalette() ? 0 : &pen );
paint.setClipRegion( event->region().subtract( r ) ); // clip everything but title
diff --git a/src/widgets/qlabel.cpp b/src/widgets/qlabel.cpp
index c78b9910..314bfe21 100644
--- a/src/widgets/qlabel.cpp
+++ b/src/widgets/qlabel.cpp
@@ -838,8 +838,9 @@ void TQLabel::drawContents( TQPainter *p )
}
#endif
int alignment = align;
- if ((align & ShowPrefix) && !style().styleHint(TQStyle::SH_UnderlineAccelerator, this))
+ if ((align & ShowPrefix) && ((!style().styleHint(TQStyle::SH_UnderlineAccelerator, this)) || ((style().styleHint(TQStyle::SH_HideUnderlineAcceleratorWhenAltUp, this)) && (!style().acceleratorsShown())))) {
alignment |= NoAccel;
+ }
// ordinary text or pixmap label
style().drawItem( p, cr, alignment, colorGroup(), isEnabled(),
pix, ltext );
diff --git a/src/widgets/qtabbar.cpp b/src/widgets/qtabbar.cpp
index 697b28f5..caa8e7d1 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;
}
diff --git a/src/widgets/qtoolbox.cpp b/src/widgets/qtoolbox.cpp
index 74f1e604..d1c30012 100644
--- a/src/widgets/qtoolbox.cpp
+++ b/src/widgets/qtoolbox.cpp
@@ -240,8 +240,9 @@ void TQToolBoxButton::drawButton( TQPainter *p )
fill = &cg.color( TQPalette::foregroundRoleFromMode( tb->backgroundMode() ) );
int alignment = AlignLeft | AlignVCenter | ShowPrefix;
- if (!style().styleHint(TQStyle::SH_UnderlineAccelerator, this))
+ if ((!style().styleHint(TQStyle::SH_UnderlineAccelerator, this)) || ((style().styleHint(TQStyle::SH_HideUnderlineAcceleratorWhenAltUp, this)) && (!style().acceleratorsShown()))) {
alignment |= NoAccel;
+ }
style().drawItem( p, tr, alignment, cg,
isEnabled(), 0, txt, -1, fill );