summaryrefslogtreecommitdiffstats
path: root/kcontrol/colors
diff options
context:
space:
mode:
Diffstat (limited to 'kcontrol/colors')
-rw-r--r--kcontrol/colors/colorscm.cpp64
-rw-r--r--kcontrol/colors/colorscm.h2
-rw-r--r--kcontrol/colors/widgetcanvas.cpp24
-rw-r--r--kcontrol/colors/widgetcanvas.h2
4 files changed, 45 insertions, 47 deletions
diff --git a/kcontrol/colors/colorscm.cpp b/kcontrol/colors/colorscm.cpp
index b1cc2616a..b91dabc06 100644
--- a/kcontrol/colors/colorscm.cpp
+++ b/kcontrol/colors/colorscm.cpp
@@ -31,11 +31,11 @@
#include <tdeio/netaccess.h>
#include <kipc.h>
#include <tdemessagebox.h>
-#include <kprocess.h>
-#include <kstandarddirs.h>
+#include <tdeprocess.h>
+#include <tdestandarddirs.h>
#include <tdeaboutdata.h>
-#if defined Q_WS_X11 && !defined K_WS_QTONLY
+#if defined TQ_WS_X11 && !defined K_WS_QTONLY
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#endif
@@ -136,10 +136,10 @@ KColorScheme::KColorScheme(TQWidget *parent, const char *name, const TQStringLis
" \"Widget color\" box will change to reflect the part of the preview"
" image you clicked.") );
- connect( cs, TQT_SIGNAL( widgetSelected( int ) ),
- TQT_SLOT( slotWidgetColor( int ) ) );
- connect( cs, TQT_SIGNAL( colorDropped( int, const TQColor&)),
- TQT_SLOT( slotColorForWidget( int, const TQColor&)));
+ connect( cs, TQ_SIGNAL( widgetSelected( int ) ),
+ TQ_SLOT( slotWidgetColor( int ) ) );
+ connect( cs, TQ_SIGNAL( colorDropped( int, const TQColor&)),
+ TQ_SLOT( slotColorForWidget( int, const TQColor&)));
topLayout->addMultiCellWidget( cs, 0, 0, 0, 1 );
TQGroupBox *group = new TQVGroupBox( i18n("Color Scheme"), this );
@@ -149,7 +149,7 @@ KColorScheme::KColorScheme(TQWidget *parent, const char *name, const TQStringLis
mSchemeList = new KColorSchemeList();
readSchemeNames();
sList->setCurrentItem( 0 );
- connect(sList, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slotPreviewScheme(int)));
+ connect(sList, TQ_SIGNAL(highlighted(int)), TQ_SLOT(slotPreviewScheme(int)));
TQWhatsThis::add( sList, i18n("This is a list of predefined color schemes,"
" including any that you may have created. You can preview an existing"
@@ -160,22 +160,22 @@ KColorScheme::KColorScheme(TQWidget *parent, const char *name, const TQStringLis
" another color scheme.") );
addBt = new TQPushButton(i18n("&Save Scheme..."), group);
- connect(addBt, TQT_SIGNAL(clicked()), TQT_SLOT(slotAdd()));
+ connect(addBt, TQ_SIGNAL(clicked()), TQ_SLOT(slotAdd()));
TQWhatsThis::add( addBt, i18n("Press this button if you want to save"
" the current color settings as a color scheme. You will be"
" prompted for a name.") );
removeBt = new TQPushButton(i18n("R&emove Scheme"), group);
- removeBt->setEnabled(FALSE);
- connect(removeBt, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemove()));
+ removeBt->setEnabled(false);
+ connect(removeBt, TQ_SIGNAL(clicked()), TQ_SLOT(slotRemove()));
TQWhatsThis::add( removeBt, i18n("Press this button to remove the selected"
" color scheme. Note that this button is disabled if you do not have"
" permission to delete the color scheme.") );
importBt = new TQPushButton(i18n("I&mport Scheme..."), group);
- connect(importBt, TQT_SIGNAL(clicked()),TQT_SLOT(slotImport()));
+ connect(importBt, TQ_SIGNAL(clicked()),TQ_SLOT(slotImport()));
TQWhatsThis::add( importBt, i18n("Press this button to import a new color"
" scheme. Note that the color scheme will only be available for the"
@@ -221,7 +221,7 @@ KColorScheme::KColorScheme(TQWidget *parent, const char *name, const TQStringLis
setColorName(i18n("Alternate Background in Lists"), CSM_Alternate_background);
wcCombo->adjustSize();
- connect(wcCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotWidgetColor(int)));
+ connect(wcCombo, TQ_SIGNAL(activated(int)), TQ_SLOT(slotWidgetColor(int)));
groupLayout->addWidget(wcCombo);
TQWhatsThis::add( wcCombo, i18n("Click here to select an element of"
@@ -230,8 +230,8 @@ KColorScheme::KColorScheme(TQWidget *parent, const char *name, const TQStringLis
" of the preview image above.") );
colorButton = new KColorButton( group );
- connect( colorButton, TQT_SIGNAL( changed(const TQColor &)),
- TQT_SLOT(slotSelectColor(const TQColor &)));
+ connect( colorButton, TQ_SIGNAL( changed(const TQColor &)),
+ TQ_SLOT(slotSelectColor(const TQColor &)));
groupLayout->addWidget( colorButton );
@@ -241,7 +241,7 @@ KColorScheme::KColorScheme(TQWidget *parent, const char *name, const TQStringLis
cbShadeList = new TQCheckBox(i18n("Shade sorted column in lists"), this);
stackLayout->addWidget(cbShadeList);
- connect(cbShadeList, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotShadeSortColumnChanged(bool)));
+ connect(cbShadeList, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(slotShadeSortColumnChanged(bool)));
TQWhatsThis::add(cbShadeList,
i18n("Check this box to show the sorted column in a list with a shaded background"));
@@ -254,10 +254,10 @@ KColorScheme::KColorScheme(TQWidget *parent, const char *name, const TQStringLis
groupLayout = new TQHBoxLayout;
groupLayout2->addLayout(groupLayout);
- sb = new TQSlider( Qt::Horizontal,group,"Slider" );
+ sb = new TQSlider( TQt::Horizontal,group,"Slider" );
sb->setRange( 0, 10 );
- sb->setFocusPolicy( TQ_StrongFocus );
- connect(sb, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(sliderValueChanged(int)));
+ sb->setFocusPolicy( TQWidget::StrongFocus );
+ connect(sb, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(sliderValueChanged(int)));
TQWhatsThis::add(sb, i18n("Use this slider to change the contrast level"
" of the current color scheme. Contrast does not affect all of the"
@@ -272,7 +272,7 @@ KColorScheme::KColorScheme(TQWidget *parent, const char *name, const TQStringLis
cbExportColors = new TQCheckBox(i18n("Apply colors to &non-TDE applications"), this);
topLayout->addMultiCellWidget( cbExportColors, 2, 2, 0, 1 );
- connect(cbExportColors, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(changed()));
+ connect(cbExportColors, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(changed()));
TQWhatsThis::add(cbExportColors, i18n("Check this box to apply the"
" current color scheme to non-TDE applications."));
@@ -371,8 +371,8 @@ void KColorScheme::save()
cfg->sync();
// KDE-1.x support
- KSimpleConfig *config =
- new KSimpleConfig( TQDir::homeDirPath() + "/.tderc" );
+ TDESimpleConfig *config =
+ new TDESimpleConfig( TQDir::homeDirPath() + "/.tderc" );
config->setGroup( "General" );
config->writeEntry("background", cs->back );
config->writeEntry("selectBackground", cs->select );
@@ -396,7 +396,7 @@ void KColorScheme::save()
flags |= KRdbExportColors;
else
{
-#if defined Q_WS_X11 && !defined K_WS_QTONLY
+#if defined TQ_WS_X11 && !defined K_WS_QTONLY
// Undo the property xrdb has placed on the root window (if any),
// i.e. remove all entries, including ours
XDeleteProperty( tqt_xdisplay(), tqt_xrootwin(), XA_RESOURCE_MANAGER );
@@ -443,7 +443,7 @@ void KColorScheme::slotSave( )
KColorSchemeEntry *entry = mSchemeList->at(sList->currentItem()-nSysSchemes);
if (!entry) return;
sCurrentScheme = entry->path;
- KSimpleConfig *config = new KSimpleConfig(sCurrentScheme );
+ TDESimpleConfig *config = new TDESimpleConfig(sCurrentScheme );
int i = sCurrentScheme.findRev('/');
if (i >= 0)
sCurrentScheme = sCurrentScheme.mid(i+1);
@@ -550,8 +550,8 @@ void KColorScheme::slotAdd()
valid = true;
}
- disconnect(sList, TQT_SIGNAL(highlighted(int)), this,
- TQT_SLOT(slotPreviewScheme(int)));
+ disconnect(sList, TQ_SIGNAL(highlighted(int)), this,
+ TQ_SLOT(slotPreviewScheme(int)));
if (exists != -1)
{
@@ -561,7 +561,7 @@ void KColorScheme::slotAdd()
else
{
sFile = TDEGlobal::dirs()->saveLocation("data", "tdedisplay/color-schemes/") + sFile + ".kcsrc";
- KSimpleConfig *config = new KSimpleConfig(sFile);
+ TDESimpleConfig *config = new TDESimpleConfig(sFile);
config->setGroup( "Color Scheme");
config->writeEntry("Name", sName);
delete config;
@@ -574,7 +574,7 @@ void KColorScheme::slotAdd()
TQPixmap preview = mkColorPreview(cs);
int current = sList->currentItem();
sList->changeItem(preview, sList->text(current), current);
- connect(sList, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slotPreviewScheme(int)));
+ connect(sList, TQ_SIGNAL(highlighted(int)), TQ_SLOT(slotPreviewScheme(int)));
slotPreviewScheme(current);
}
@@ -595,7 +595,7 @@ void KColorScheme::slotImport()
else
{
TQString sFile = location + file.fileName( false );
- KSimpleConfig *config = new KSimpleConfig(sFile);
+ TDESimpleConfig *config = new TDESimpleConfig(sFile);
config->setGroup( "Color Scheme");
TQString sName = config->readEntry("Name", i18n("Untitled Theme"));
delete config;
@@ -605,7 +605,7 @@ void KColorScheme::slotImport()
TQPixmap preview = mkColorPreview(cs);
int current = sList->currentItem();
sList->changeItem(preview, sList->text(current), current);
- connect(sList, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slotPreviewScheme(int)));
+ connect(sList, TQ_SIGNAL(highlighted(int)), TQ_SLOT(slotPreviewScheme(int)));
slotPreviewScheme(current);
}
}
@@ -798,7 +798,7 @@ void KColorScheme::readScheme( int index )
KColorSchemeEntry *entry = mSchemeList->at(sList->currentItem()-nSysSchemes);
if (!entry) return;
sCurrentScheme = entry->path;
- config = new KSimpleConfig(sCurrentScheme, true);
+ config = new TDESimpleConfig(sCurrentScheme, true);
config->setGroup("Color Scheme");
int i = sCurrentScheme.findRev('/');
if (i >= 0)
@@ -865,7 +865,7 @@ void KColorScheme::readSchemeNames()
// And add them
for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
- KSimpleConfig *config = new KSimpleConfig(*it);
+ TDESimpleConfig *config = new TDESimpleConfig(*it);
config->setGroup("Color Scheme");
TQString str = config->readEntry("Name");
if (str.isEmpty()) {
diff --git a/kcontrol/colors/colorscm.h b/kcontrol/colors/colorscm.h
index ca8718f74..228204556 100644
--- a/kcontrol/colors/colorscm.h
+++ b/kcontrol/colors/colorscm.h
@@ -36,7 +36,7 @@ class KColorSchemeList;
*/
class KColorScheme: public TDECModule
{
- Q_OBJECT
+ TQ_OBJECT
public:
KColorScheme(TQWidget *parent, const char *name, const TQStringList &);
diff --git a/kcontrol/colors/widgetcanvas.cpp b/kcontrol/colors/widgetcanvas.cpp
index b08ef6135..3ee662627 100644
--- a/kcontrol/colors/widgetcanvas.cpp
+++ b/kcontrol/colors/widgetcanvas.cpp
@@ -315,7 +315,7 @@ void WidgetCanvas::drawSampleWidgets()
// Create a scrollbar and redirect drawing into a temp. pixmap to save a
// lot of fiddly drawing later.
- TQScrollBar *vertScrollBar = new TQScrollBar( Qt::Vertical, this );
+ TQScrollBar *vertScrollBar = new TQScrollBar( TQt::Vertical, this );
// TODO: vertScrollBar->setStyle( new TQMotifStyle() );
vertScrollBar->setGeometry( 400, 400, SCROLLBAR_SIZE, height());
vertScrollBar->setRange( 0, 0 );
@@ -324,9 +324,7 @@ void WidgetCanvas::drawSampleWidgets()
TQPixmap pm( vertScrollBar->width(), vertScrollBar->height() );
pm.fill( back );
-#ifndef __osf__
TQPainter::redirect( vertScrollBar, &pm );
-#endif
vertScrollBar->repaint();
TQPainter::redirect( vertScrollBar, 0 );
vertScrollBar->hide();
@@ -346,7 +344,7 @@ void WidgetCanvas::drawSampleWidgets()
// Inactive window
- qDrawWinPanel ( &paint, 15, 5, width()-48, height(), cg, FALSE,
+ qDrawWinPanel ( &paint, 15, 5, width()-48, height(), cg, false,
&brush);
paint.setBrush( iaTitle );
@@ -394,7 +392,7 @@ void WidgetCanvas::drawSampleWidgets()
// Active window
- qDrawWinPanel ( &paint, 20, 25+5, width()-40, height(), cg, FALSE,
+ qDrawWinPanel ( &paint, 20, 25+5, width()-40, height(), cg, false,
&brush);
paint.setBrush( aTitle );paint.setPen( aTitle );
@@ -434,16 +432,16 @@ void WidgetCanvas::drawSampleWidgets()
// Menu bar
- //qDrawShadePanel ( &paint, 25, 55, width()-52, 28, cg, FALSE, 2, &brush);
- kapp->style().tqdrawPrimitive(TQStyle::PE_PanelMenuBar, &paint,
+ //qDrawShadePanel ( &paint, 25, 55, width()-52, 28, cg, false, 2, &brush);
+ tdeApp->style().drawPrimitive(TQStyle::PE_PanelMenuBar, &paint,
TQRect(TQPoint(25, 55), TQSize(width()-52, 28)), cg);
paint.setFont( menuFont );
paint.setPen(txt );
TQString file = i18n("File");
textLen = paint.fontMetrics().width( file );
- //qDrawShadePanel ( &paint, 30, 59, textLen + 10, 21, cg, FALSE, 2, &brush);
- kapp->style().tqdrawPrimitive(TQStyle::PE_Panel, &paint,
+ //qDrawShadePanel ( &paint, 30, 59, textLen + 10, 21, cg, false, 2, &brush);
+ tdeApp->style().drawPrimitive(TQStyle::PE_Panel, &paint,
TQRect(30, 59, textLen + 10, 21), cg);
paint.drawText( 35, 74, file );
@@ -465,7 +463,7 @@ void WidgetCanvas::drawSampleWidgets()
brush.setColor( window );
qDrawShadePanel ( &paint, 25, 80+5-4, width()-7-45-2,
- height(), cg, TRUE, 2, &brush);
+ height(), cg, true, 2, &brush);
// Standard text
TQFont fnt = TDEGlobalSettings::generalFont();
@@ -528,7 +526,7 @@ void WidgetCanvas::drawSampleWidgets()
cg2.setColor(TQColorGroup::Button, button);
cg2.setColor(TQColorGroup::Background, window);
//qDrawWinButton(&paint, xpos, ypos, textLen+32, 28, cg, false, &brush);
- kapp->style().tqdrawPrimitive(TQStyle::PE_ButtonCommand, &paint,
+ tdeApp->style().drawPrimitive(TQStyle::PE_ButtonCommand, &paint,
TQRect(xpos, ypos, textLen+32, 28), cg2, TQStyle::Style_Enabled | TQStyle::Style_Raised);
paint.setPen(buttonTxt);
paint.drawText(xpos, ypos, textLen+32, 28, AlignCenter,
@@ -585,12 +583,12 @@ void WidgetCanvas::drawSampleWidgets()
// Valance
qDrawWinPanel ( &paint, 0, 0, width(), height(),
- parentWidget()->colorGroup(), TRUE, 0);
+ parentWidget()->colorGroup(), true, 0);
// Stop the painting
hotspots[ spot++ ] =
HotSpot( TQRect( 0, 0, width(), height() ), CSM_Background ); // ?
- repaint( FALSE );
+ repaint( false );
}
diff --git a/kcontrol/colors/widgetcanvas.h b/kcontrol/colors/widgetcanvas.h
index 60898622b..220b244cc 100644
--- a/kcontrol/colors/widgetcanvas.h
+++ b/kcontrol/colors/widgetcanvas.h
@@ -61,7 +61,7 @@ public:
class WidgetCanvas : public TQWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
WidgetCanvas( TQWidget *parent=0, const char *name=0 );