diff options
Diffstat (limited to 'kdevdesigner/designer/styledbutton.cpp')
-rw-r--r-- | kdevdesigner/designer/styledbutton.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/kdevdesigner/designer/styledbutton.cpp b/kdevdesigner/designer/styledbutton.cpp index d84ee135..d2aea25f 100644 --- a/kdevdesigner/designer/styledbutton.cpp +++ b/kdevdesigner/designer/styledbutton.cpp @@ -29,7 +29,7 @@ #include "formwindow.h" #include "pixmapchooser.h" #include <tqcolordialog.h> -#include <palette.h> +#include <tqpalette.h> #include <tqlabel.h> #include <tqpainter.h> #include <tqimage.h> @@ -41,7 +41,7 @@ StyledButton::StyledButton(TQWidget* parent, const char* name) : TQButton( parent, name ), pix( 0 ), spix( 0 ), s( 0 ), formWindow( 0 ), mousePressed( FALSE ) { - setMinimumSize( minimumSizeHint() ); + setMinimumSize( tqminimumSizeHint() ); setAcceptDrops( TRUE ); connect( this, TQT_SIGNAL(clicked()), TQT_SLOT(onEditor())); @@ -54,7 +54,7 @@ StyledButton::StyledButton( const TQBrush& b, TQWidget* parent, const char* name { col = b.color(); pix = b.pixmap(); - setMinimumSize( minimumSizeHint() ); + setMinimumSize( tqminimumSizeHint() ); } StyledButton::~StyledButton() @@ -117,12 +117,12 @@ void StyledButton::setScale( bool on ) scalePixmap(); } -TQSize StyledButton::sizeHint() const +TQSize StyledButton::tqsizeHint() const { return TQSize( 50, 25 ); } -TQSize StyledButton::minimumSizeHint() const +TQSize StyledButton::tqminimumSizeHint() const { return TQSize( 50, 25 ); } @@ -151,25 +151,25 @@ void StyledButton::resizeEvent( TQResizeEvent* e ) void StyledButton::drawButton( TQPainter *paint ) { - tqstyle().tqdrawPrimitive(TQStyle::PE_ButtonBevel, paint, rect(), colorGroup(), + tqstyle().tqdrawPrimitive(TQStyle::PE_ButtonBevel, paint, rect(), tqcolorGroup(), isDown() ? TQStyle::Style_Sunken : TQStyle::Style_Raised); drawButtonLabel(paint); if (hasFocus()) tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, paint, tqstyle().subRect(TQStyle::SR_PushButtonFocusRect, this), - colorGroup(), TQStyle::Style_Default); + tqcolorGroup(), TQStyle::Style_Default); } void StyledButton::drawButtonLabel( TQPainter *paint ) { TQColor pen = isEnabled() ? - hasFocus() ? palette().active().buttonText() : palette().inactive().buttonText() - : palette().disabled().buttonText(); + hasFocus() ? tqpalette().active().buttonText() : tqpalette().inactive().buttonText() + : tqpalette().disabled().buttonText(); paint->setPen( pen ); if(!isEnabled()) { - paint->setBrush( TQBrush( colorGroup().button() ) ); + paint->setBrush( TQBrush( tqcolorGroup().button() ) ); } else if ( edit == PixmapEditor && spix ) { paint->setBrush( TQBrush( col, *spix ) ); @@ -184,7 +184,7 @@ void StyledButton::onEditor() { switch (edit) { case ColorEditor: { - TQColor c = TQColorDialog::getColor( palette().active().background(), this ); + TQColor c = TQColorDialog::getColor( tqpalette().active().background(), this ); if ( c.isValid() ) { setColor( c ); emit changed(); |