summaryrefslogtreecommitdiffstats
path: root/src/gui/colorcombo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/colorcombo.cpp')
-rw-r--r--src/gui/colorcombo.cpp90
1 files changed, 45 insertions, 45 deletions
diff --git a/src/gui/colorcombo.cpp b/src/gui/colorcombo.cpp
index aec39ae..786ef98 100644
--- a/src/gui/colorcombo.cpp
+++ b/src/gui/colorcombo.cpp
@@ -12,14 +12,14 @@
#include <kcolordialog.h>
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
bool ColorCombo::createdPalettes = false;
-QColor * ColorCombo::palette[ NumberOfSchemes ];
+TQColor * ColorCombo::palette[ NumberOfSchemes ];
int ColorCombo::paletteSize[ NumberOfSchemes ];
-ColorCombo::ColorCombo( ColorScheme colorScheme, QWidget *parent, const char *name )
- : QComboBox( parent, name )
+ColorCombo::ColorCombo( ColorScheme colorScheme, TQWidget *tqparent, const char *name )
+ : TQComboBox( tqparent, name )
{
m_colorScheme = colorScheme;
@@ -30,8 +30,8 @@ ColorCombo::ColorCombo( ColorScheme colorScheme, QWidget *parent, const char *na
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) ) );
}
@@ -46,32 +46,32 @@ void ColorCombo::createPalettes()
return;
createdPalettes = true;
- paletteSize[ QtStandard ] = 17;
- palette[ QtStandard ] = new QColor[ paletteSize[ QtStandard ] ];
+ paletteSize[ TQtStandard ] = 17;
+ palette[ TQtStandard ] = new TQColor[ paletteSize[ TQtStandard ] ];
int i = 0;
- palette[ QtStandard ][i++] = Qt::red;
- palette[ QtStandard ][i++] = Qt::green;
- palette[ QtStandard ][i++] = Qt::blue;
- palette[ QtStandard ][i++] = Qt::cyan;
- palette[ QtStandard ][i++] = Qt::magenta;
- palette[ QtStandard ][i++] = Qt::yellow;
- palette[ QtStandard ][i++] = Qt::darkRed;
- palette[ QtStandard ][i++] = Qt::darkGreen;
- palette[ QtStandard ][i++] = Qt::darkBlue;
- palette[ QtStandard ][i++] = Qt::darkCyan;
- palette[ QtStandard ][i++] = Qt::darkMagenta;
- palette[ QtStandard ][i++] = Qt::darkYellow;
- palette[ QtStandard ][i++] = Qt::white;
- palette[ QtStandard ][i++] = Qt::lightGray;
- palette[ QtStandard ][i++] = Qt::gray;
- palette[ QtStandard ][i++] = Qt::darkGray;
- palette[ QtStandard ][i++] = Qt::black;
+ palette[ TQtStandard ][i++] = TQt::red;
+ palette[ TQtStandard ][i++] = TQt::green;
+ palette[ TQtStandard ][i++] = TQt::blue;
+ palette[ TQtStandard ][i++] = TQt::cyan;
+ palette[ TQtStandard ][i++] = TQt::magenta;
+ palette[ TQtStandard ][i++] = TQt::yellow;
+ palette[ TQtStandard ][i++] = TQt::darkRed;
+ palette[ TQtStandard ][i++] = TQt::darkGreen;
+ palette[ TQtStandard ][i++] = TQt::darkBlue;
+ palette[ TQtStandard ][i++] = TQt::darkCyan;
+ palette[ TQtStandard ][i++] = TQt::darkMagenta;
+ palette[ TQtStandard ][i++] = TQt::darkYellow;
+ palette[ TQtStandard ][i++] = TQt::white;
+ palette[ TQtStandard ][i++] = TQt::lightGray;
+ palette[ TQtStandard ][i++] = TQt::gray;
+ palette[ TQtStandard ][i++] = TQt::darkGray;
+ palette[ TQtStandard ][i++] = TQt::black;
paletteSize[ LED ] = 6;
- palette[ LED ] = new QColor[ paletteSize[ LED ] ];
+ palette[ LED ] = new TQColor[ paletteSize[ LED ] ];
i = 0;
palette[ LED ][i++] = "#f62a2a";
@@ -83,16 +83,16 @@ void ColorCombo::createPalettes()
}
-void ColorCombo::setColor( const QColor &col )
+void ColorCombo::setColor( const TQColor &col )
{
internalColor = col;
addColors();
}
-void ColorCombo::resizeEvent( QResizeEvent *re )
+void ColorCombo::resizeEvent( TQResizeEvent *re )
{
- QComboBox::resizeEvent( re );
+ TQComboBox::resizeEvent( re );
addColors();
}
@@ -101,23 +101,23 @@ void ColorCombo::slotActivated( int index )
{
if ( index == 0 )
{
- if ( KColorDialog::getColor( customColor, this ) == QDialog::Accepted )
+ if ( KColorDialog::getColor( customColor, this ) == TQDialog::Accepted )
{
- QPainter painter;
- QPen pen;
- QRect rect( 0, 0, width(), QFontMetrics(painter.font()).height()+4);
- QPixmap pixmap( rect.width(), rect.height() );
+ TQPainter painter;
+ TQPen pen;
+ TQRect rect( 0, 0, width(), TQFontMetrics(painter.font()).height()+4);
+ TQPixmap pixmap( rect.width(), rect.height() );
- if ( qGray( customColor.rgb() ) < 128 )
+ if ( tqGray( customColor.rgb() ) < 128 )
pen.setColor( white );
else
pen.setColor( black );
painter.begin( &pixmap );
- QBrush brush( customColor );
+ TQBrush brush( customColor );
painter.fillRect( rect, brush );
painter.setPen( pen );
- painter.drawText( 2, QFontMetrics(painter.font()).ascent()+2, i18n("Custom...") );
+ painter.drawText( 2, TQFontMetrics(painter.font()).ascent()+2, i18n("Custom...") );
painter.end();
changeItem( pixmap, 0 );
@@ -144,10 +144,10 @@ void ColorCombo::slotHighlighted( int index )
void ColorCombo::addColors()
{
- QPainter painter;
- QPen pen;
- QRect rect( 0, 0, width(), QFontMetrics(painter.font()).height()+4 );
- QPixmap pixmap( rect.width(), rect.height() );
+ TQPainter painter;
+ TQPen pen;
+ TQRect rect( 0, 0, width(), TQFontMetrics(painter.font()).height()+4 );
+ TQPixmap pixmap( rect.width(), rect.height() );
int i;
clear();
@@ -160,16 +160,16 @@ void ColorCombo::addColors()
if ( i == paletteSize[ m_colorScheme ] )
customColor = internalColor;
- if ( qGray( customColor.rgb() ) < 128 )
+ if ( tqGray( customColor.rgb() ) < 128 )
pen.setColor( white );
else
pen.setColor( black );
painter.begin( &pixmap );
- QBrush brush( customColor );
+ TQBrush brush( customColor );
painter.fillRect( rect, brush );
painter.setPen( pen );
- painter.drawText( 2, QFontMetrics(painter.font()).ascent()+2, i18n("Custom...") );
+ painter.drawText( 2, TQFontMetrics(painter.font()).ascent()+2, i18n("Custom...") );
painter.end();
insertItem( pixmap );
@@ -178,7 +178,7 @@ void ColorCombo::addColors()
for ( i = 0; i < paletteSize[ m_colorScheme ]; i++ )
{
painter.begin( &pixmap );
- QBrush brush( palette[ m_colorScheme ][i] );
+ TQBrush brush( palette[ m_colorScheme ][i] );
painter.fillRect( rect, brush );
painter.end();