diff options
Diffstat (limited to 'quanta/dialogs/tagdialogs/colorcombo.cpp')
-rw-r--r-- | quanta/dialogs/tagdialogs/colorcombo.cpp | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/quanta/dialogs/tagdialogs/colorcombo.cpp b/quanta/dialogs/tagdialogs/colorcombo.cpp index 2dcb6aa2..878216e3 100644 --- a/quanta/dialogs/tagdialogs/colorcombo.cpp +++ b/quanta/dialogs/tagdialogs/colorcombo.cpp @@ -32,17 +32,17 @@ #include <stdio.h> #include <stdlib.h> -#include <qdrawutil.h> -#include <qevent.h> -#include <qfile.h> -#include <qimage.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqdrawutil.h> +#include <tqevent.h> +#include <tqfile.h> +#include <tqimage.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <klineedit.h> -#include <qvalidator.h> -#include <qpainter.h> -#include <qpushbutton.h> -#include <qtimer.h> +#include <tqvalidator.h> +#include <tqpainter.h> +#include <tqpushbutton.h> +#include <tqtimer.h> #include <kcolordialog.h> #include <kconfig.h> @@ -66,8 +66,8 @@ #define STANDARD_PAL_SIZE 17 -ColorCombo::ColorCombo( QWidget *parent, const char *name ) - : QComboBox( parent, name ) +ColorCombo::ColorCombo( TQWidget *parent, const char *name ) + : TQComboBox( parent, name ) { customColor.setRgb( 255, 255, 255 ); internalcolor.setRgb( 255, 255, 255 ); @@ -78,8 +78,8 @@ ColorCombo::ColorCombo( QWidget *parent, const char *name ) addColors(); - connect( this, SIGNAL( activated(int) ), SLOT( slotActivated(int) ) ); - connect( this, SIGNAL( highlighted(int) ), SLOT( slotHighlighted(int) ) ); + connect( this, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotActivated(int) ) ); + connect( this, TQT_SIGNAL( highlighted(int) ), TQT_SLOT( slotHighlighted(int) ) ); } ColorCombo::~ColorCombo() @@ -91,7 +91,7 @@ ColorCombo::~ColorCombo() /** Sets the current color */ -void ColorCombo::setColor( const QColor &col ) +void ColorCombo::setColor( const TQColor &col ) { internalcolor = col; hascolor = true; @@ -103,7 +103,7 @@ void ColorCombo::setColor( const QColor &col ) /** Returns the currently selected color */ -QColor ColorCombo::color() const { +TQColor ColorCombo::color() const { return internalcolor; } @@ -113,10 +113,10 @@ bool ColorCombo::hasColor() const{ } -void ColorCombo::setColorName( const QString &color ) +void ColorCombo::setColorName( const TQString &color ) { - QColor c(color); + TQColor c(color); if ( c.isValid() && !color.isEmpty() ) { setColor( c ); @@ -128,7 +128,7 @@ void ColorCombo::setColorName( const QString &color ) } -QString ColorCombo::colorName() +TQString ColorCombo::colorName() { if ( hascolor ) { int i; @@ -145,9 +145,9 @@ QString ColorCombo::colorName() } -void ColorCombo::resizeEvent( QResizeEvent *re ) +void ColorCombo::resizeEvent( TQResizeEvent *re ) { - QComboBox::resizeEvent( re ); + TQComboBox::resizeEvent( re ); addColors(); } @@ -158,12 +158,12 @@ void ColorCombo::slotActivated( int index ) if ( index == 1 ) { - if ( KColorDialog::getColor( customColor ) == QDialog::Accepted ) + if ( KColorDialog::getColor( customColor ) == TQDialog::Accepted ) { - QRect rect( 0, 0, width(), 20 ); - QPixmap pixmap( rect.width(), rect.height() ); - QPainter painter; - QPen pen; + TQRect rect( 0, 0, width(), 20 ); + TQPixmap pixmap( rect.width(), rect.height() ); + TQPainter painter; + TQPen pen; if ( qGray( customColor.rgb() ) < 128 ) pen.setColor( white ); @@ -171,7 +171,7 @@ void ColorCombo::slotActivated( int index ) pen.setColor( black ); painter.begin( &pixmap ); - QBrush brush( customColor ); + TQBrush brush( customColor ); painter.fillRect( rect, brush ); painter.setPen( pen ); painter.drawText( 2, painter.fontMetrics().height(), @@ -203,10 +203,10 @@ void ColorCombo::slotHighlighted( int index ) void ColorCombo::addColors() { - QRect rect( 0, 0, width(), 20 ); - QPixmap pixmap( rect.width(), rect.height() ); - QPainter painter; - QPen pen; + TQRect rect( 0, 0, width(), 20 ); + TQPixmap pixmap( rect.width(), rect.height() ); + TQPainter painter; + TQPen pen; int i; clear(); @@ -225,7 +225,7 @@ void ColorCombo::addColors() pen.setColor( black ); painter.begin( &pixmap ); - QBrush brush( customColor ); + TQBrush brush( customColor ); painter.fillRect( rect, brush ); painter.setPen( pen ); @@ -240,7 +240,7 @@ void ColorCombo::addColors() for ( i = 0; i < STANDARD_PAL_SIZE; i++ ) { painter.begin( &pixmap ); - QBrush brush( standardPalette[i] ); + TQBrush brush( standardPalette[i] ); painter.fillRect( rect, brush ); painter.end(); @@ -266,7 +266,7 @@ void ColorCombo::addColors() void ColorCombo::createStandardPalette() { - standardPalette = new QColor [STANDARD_PAL_SIZE]; + standardPalette = new TQColor [STANDARD_PAL_SIZE]; int i = 0; @@ -289,7 +289,7 @@ void ColorCombo::createStandardPalette() standardPalette[i++] = Qt::black; - standardPaletteNames = new QString [STANDARD_PAL_SIZE]; + standardPaletteNames = new TQString [STANDARD_PAL_SIZE]; i = 0; |