summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/styledbutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/designer/styledbutton.cpp')
-rw-r--r--kdevdesigner/designer/styledbutton.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/kdevdesigner/designer/styledbutton.cpp b/kdevdesigner/designer/styledbutton.cpp
index d2aea25f..d84ee135 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 <tqpalette.h>
+#include <palette.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( tqminimumSizeHint() );
+ setMinimumSize( minimumSizeHint() );
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( tqminimumSizeHint() );
+ setMinimumSize( minimumSizeHint() );
}
StyledButton::~StyledButton()
@@ -117,12 +117,12 @@ void StyledButton::setScale( bool on )
scalePixmap();
}
-TQSize StyledButton::tqsizeHint() const
+TQSize StyledButton::sizeHint() const
{
return TQSize( 50, 25 );
}
-TQSize StyledButton::tqminimumSizeHint() const
+TQSize StyledButton::minimumSizeHint() 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(), tqcolorGroup(),
+ tqstyle().tqdrawPrimitive(TQStyle::PE_ButtonBevel, paint, rect(), colorGroup(),
isDown() ? TQStyle::Style_Sunken : TQStyle::Style_Raised);
drawButtonLabel(paint);
if (hasFocus())
tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, paint,
tqstyle().subRect(TQStyle::SR_PushButtonFocusRect, this),
- tqcolorGroup(), TQStyle::Style_Default);
+ colorGroup(), TQStyle::Style_Default);
}
void StyledButton::drawButtonLabel( TQPainter *paint )
{
TQColor pen = isEnabled() ?
- hasFocus() ? tqpalette().active().buttonText() : tqpalette().inactive().buttonText()
- : tqpalette().disabled().buttonText();
+ hasFocus() ? palette().active().buttonText() : palette().inactive().buttonText()
+ : palette().disabled().buttonText();
paint->setPen( pen );
if(!isEnabled()) {
- paint->setBrush( TQBrush( tqcolorGroup().button() ) );
+ paint->setBrush( TQBrush( colorGroup().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( tqpalette().active().background(), this );
+ TQColor c = TQColorDialog::getColor( palette().active().background(), this );
if ( c.isValid() ) {
setColor( c );
emit changed();