summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/paletteeditorimpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/designer/paletteeditorimpl.cpp')
-rw-r--r--kdevdesigner/designer/paletteeditorimpl.cpp134
1 files changed, 67 insertions, 67 deletions
diff --git a/kdevdesigner/designer/paletteeditorimpl.cpp b/kdevdesigner/designer/paletteeditorimpl.cpp
index 56e6fd2f..a6489370 100644
--- a/kdevdesigner/designer/paletteeditorimpl.cpp
+++ b/kdevdesigner/designer/paletteeditorimpl.cpp
@@ -31,21 +31,21 @@
#include "mainwindow.h"
#include "formwindow.h"
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qapplication.h>
-#include <qpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqapplication.h>
+#include <tqpushbutton.h>
-PaletteEditor::PaletteEditor( FormWindow *fw, QWidget * parent, const char * name, bool modal, WFlags f )
+PaletteEditor::PaletteEditor( FormWindow *fw, TQWidget * parent, const char * name, bool modal, WFlags f )
: PaletteEditorBase( parent, name, modal, f ), formWindow( fw )
{
- connect( buttonHelp, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
+ connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
- editPalette = QApplication::palette();
+ editPalette = TQApplication::palette();
setPreviewPalette( editPalette );
- buttonMainColor->setColor( editPalette.active().color( QColorGroup::Button ) );
- buttonMainColor2->setColor( editPalette.active().color( QColorGroup::Background ) );
+ buttonMainColor->setColor( editPalette.active().color( TQColorGroup::Button ) );
+ buttonMainColor2->setColor( editPalette.active().color( TQColorGroup::Background ) );
}
PaletteEditor::~PaletteEditor()
@@ -55,7 +55,7 @@ PaletteEditor::~PaletteEditor()
void PaletteEditor::onTune()
{
bool ok;
- QPalette pal = PaletteEditorAdvanced::getPalette( &ok, editPalette, backgroundMode, this, "tune_palette", formWindow);
+ TQPalette pal = PaletteEditorAdvanced::getPalette( &ok, editPalette, backgroundMode, this, "tune_palette", formWindow);
if (!ok) return;
editPalette = pal;
@@ -77,59 +77,59 @@ void PaletteEditor::paletteSelected(int)
setPreviewPalette(editPalette);
}
-QColorGroup::ColorRole PaletteEditor::centralFromItem( int item )
+TQColorGroup::ColorRole PaletteEditor::centralFromItem( int item )
{
switch( item )
{
case 0:
- return QColorGroup::Background;
+ return TQColorGroup::Background;
case 1:
- return QColorGroup::Foreground;
+ return TQColorGroup::Foreground;
case 2:
- return QColorGroup::Button;
+ return TQColorGroup::Button;
case 3:
- return QColorGroup::Base;
+ return TQColorGroup::Base;
case 4:
- return QColorGroup::Text;
+ return TQColorGroup::Text;
case 5:
- return QColorGroup::BrightText;
+ return TQColorGroup::BrightText;
case 6:
- return QColorGroup::ButtonText;
+ return TQColorGroup::ButtonText;
case 7:
- return QColorGroup::Highlight;
+ return TQColorGroup::Highlight;
case 8:
- return QColorGroup::HighlightedText;
+ return TQColorGroup::HighlightedText;
default:
- return QColorGroup::NColorRoles;
+ return TQColorGroup::NColorRoles;
}
}
-QColorGroup::ColorRole PaletteEditor::effectFromItem( int item )
+TQColorGroup::ColorRole PaletteEditor::effectFromItem( int item )
{
switch( item )
{
case 0:
- return QColorGroup::Light;
+ return TQColorGroup::Light;
case 1:
- return QColorGroup::Midlight;
+ return TQColorGroup::Midlight;
case 2:
- return QColorGroup::Mid;
+ return TQColorGroup::Mid;
case 3:
- return QColorGroup::Dark;
+ return TQColorGroup::Dark;
case 4:
- return QColorGroup::Shadow;
+ return TQColorGroup::Shadow;
default:
- return QColorGroup::NColorRoles;
+ return TQColorGroup::NColorRoles;
}
}
void PaletteEditor::buildPalette()
{
int i;
- QColorGroup cg;
- QColor btn = buttonMainColor->color();
- QColor back = buttonMainColor2->color();
- QPalette automake( btn, back );
+ TQColorGroup cg;
+ TQColor btn = buttonMainColor->color();
+ TQColor back = buttonMainColor2->color();
+ TQPalette automake( btn, back );
for (i = 0; i<9; i++)
cg.setColor( centralFromItem(i), automake.active().color( centralFromItem(i) ) );
@@ -139,8 +139,8 @@ void PaletteEditor::buildPalette()
cg = editPalette.inactive();
- QPalette temp( editPalette.active().color( QColorGroup::Button ),
- editPalette.active().color( QColorGroup::Background ) );
+ TQPalette temp( editPalette.active().color( TQColorGroup::Button ),
+ editPalette.active().color( TQColorGroup::Background ) );
for (i = 0; i<9; i++)
cg.setColor( centralFromItem(i), temp.inactive().color( centralFromItem(i) ) );
@@ -161,10 +161,10 @@ void PaletteEditor::buildPalette()
void PaletteEditor::buildActiveEffect()
{
- QColorGroup cg = editPalette.active();
- QColor btn = cg.color( QColorGroup::Button );
+ TQColorGroup cg = editPalette.active();
+ TQColor btn = cg.color( TQColorGroup::Button );
- QPalette temp( btn, btn );
+ TQPalette temp( btn, btn );
for (int i = 0; i<5; i++)
cg.setColor( effectFromItem(i), temp.active().color( effectFromItem(i) ) );
@@ -183,10 +183,10 @@ void PaletteEditor::buildInactive()
void PaletteEditor::buildInactiveEffect()
{
- QColorGroup cg = editPalette.inactive();
+ TQColorGroup cg = editPalette.inactive();
- QColor light, midlight, mid, dark, shadow;
- QColor btn = cg.color( QColorGroup::Button );
+ TQColor light, midlight, mid, dark, shadow;
+ TQColor btn = cg.color( TQColorGroup::Button );
light = btn.light(150);
midlight = btn.light(115);
@@ -194,11 +194,11 @@ void PaletteEditor::buildInactiveEffect()
dark = btn.dark();
shadow = black;
- cg.setColor( QColorGroup::Light, light );
- cg.setColor( QColorGroup::Midlight, midlight );
- cg.setColor( QColorGroup::Mid, mid );
- cg.setColor( QColorGroup::Dark, dark );
- cg.setColor( QColorGroup::Shadow, shadow );
+ cg.setColor( TQColorGroup::Light, light );
+ cg.setColor( TQColorGroup::Midlight, midlight );
+ cg.setColor( TQColorGroup::Mid, mid );
+ cg.setColor( TQColorGroup::Dark, dark );
+ cg.setColor( TQColorGroup::Shadow, shadow );
editPalette.setInactive( cg );
setPreviewPalette( editPalette );
@@ -207,9 +207,9 @@ void PaletteEditor::buildInactiveEffect()
void PaletteEditor::buildDisabled()
{
- QColorGroup cg = editPalette.active();
- cg.setColor( QColorGroup::ButtonText, darkGray );
- cg.setColor( QColorGroup::Foreground, darkGray );
+ TQColorGroup cg = editPalette.active();
+ cg.setColor( TQColorGroup::ButtonText, darkGray );
+ cg.setColor( TQColorGroup::Foreground, darkGray );
editPalette.setDisabled( cg );
buildDisabledEffect();
@@ -217,10 +217,10 @@ void PaletteEditor::buildDisabled()
void PaletteEditor::buildDisabledEffect()
{
- QColorGroup cg = editPalette.disabled();
+ TQColorGroup cg = editPalette.disabled();
- QColor light, midlight, mid, dark, shadow;
- QColor btn = cg.color( QColorGroup::Button );
+ TQColor light, midlight, mid, dark, shadow;
+ TQColor btn = cg.color( TQColorGroup::Button );
light = btn.light(150);
midlight = btn.light(115);
@@ -228,20 +228,20 @@ void PaletteEditor::buildDisabledEffect()
dark = btn.dark();
shadow = black;
- cg.setColor( QColorGroup::Light, light );
- cg.setColor( QColorGroup::Midlight, midlight );
- cg.setColor( QColorGroup::Mid, mid );
- cg.setColor( QColorGroup::Dark, dark );
- cg.setColor( QColorGroup::Shadow, shadow );
+ cg.setColor( TQColorGroup::Light, light );
+ cg.setColor( TQColorGroup::Midlight, midlight );
+ cg.setColor( TQColorGroup::Mid, mid );
+ cg.setColor( TQColorGroup::Dark, dark );
+ cg.setColor( TQColorGroup::Shadow, shadow );
editPalette.setDisabled( cg );
setPreviewPalette( editPalette );
updateStyledButtons();
}
-void PaletteEditor::setPreviewPalette( const QPalette& pal )
+void PaletteEditor::setPreviewPalette( const TQPalette& pal )
{
- QColorGroup cg;
+ TQColorGroup cg;
switch (paletteCombo->currentItem()) {
case 0:
@@ -264,34 +264,34 @@ void PaletteEditor::setPreviewPalette( const QPalette& pal )
void PaletteEditor::updateStyledButtons()
{
- buttonMainColor->setColor( editPalette.active().color( QColorGroup::Button ));
- buttonMainColor2->setColor( editPalette.active().color( QColorGroup::Background ));
+ buttonMainColor->setColor( editPalette.active().color( TQColorGroup::Button ));
+ buttonMainColor2->setColor( editPalette.active().color( TQColorGroup::Background ));
}
-void PaletteEditor::setPal( const QPalette& pal )
+void PaletteEditor::setPal( const TQPalette& pal )
{
editPalette = pal;
setPreviewPalette( pal );
updateStyledButtons();
}
-QPalette PaletteEditor::pal() const
+TQPalette PaletteEditor::pal() const
{
return editPalette;
}
-QPalette PaletteEditor::getPalette( bool *ok, const QPalette &init, BackgroundMode mode,
- QWidget* parent, const char* name, FormWindow *fw )
+TQPalette PaletteEditor::getPalette( bool *ok, const TQPalette &init, BackgroundMode mode,
+ TQWidget* parent, const char* name, FormWindow *fw )
{
PaletteEditor* dlg = new PaletteEditor( fw, parent, name, TRUE );
dlg->setupBackgroundMode( mode );
- if ( init != QPalette() )
+ if ( init != TQPalette() )
dlg->setPal( init );
int resultCode = dlg->exec();
- QPalette result = init;
- if ( resultCode == QDialog::Accepted ) {
+ TQPalette result = init;
+ if ( resultCode == TQDialog::Accepted ) {
if ( ok )
*ok = TRUE;
result = dlg->pal();