summaryrefslogtreecommitdiffstats
path: root/kcontrol/background
diff options
context:
space:
mode:
Diffstat (limited to 'kcontrol/background')
-rw-r--r--kcontrol/background/bgadvanced.cpp132
-rw-r--r--kcontrol/background/bgadvanced.h48
-rw-r--r--kcontrol/background/bgdefaults.h4
-rw-r--r--kcontrol/background/bgdialog.cpp198
-rw-r--r--kcontrol/background/bgdialog.h24
-rw-r--r--kcontrol/background/bghash.h6
-rw-r--r--kcontrol/background/bgmonitor.cpp82
-rw-r--r--kcontrol/background/bgmonitor.h46
-rw-r--r--kcontrol/background/bgrender.cpp178
-rw-r--r--kcontrol/background/bgrender.h52
-rw-r--r--kcontrol/background/bgsettings.cpp166
-rw-r--r--kcontrol/background/bgsettings.h128
-rw-r--r--kcontrol/background/bgwallpaper.cpp48
-rw-r--r--kcontrol/background/bgwallpaper.h14
-rw-r--r--kcontrol/background/main.cpp14
-rw-r--r--kcontrol/background/main.h2
16 files changed, 571 insertions, 571 deletions
diff --git a/kcontrol/background/bgadvanced.cpp b/kcontrol/background/bgadvanced.cpp
index 3218ec470..e1f9ece96 100644
--- a/kcontrol/background/bgadvanced.cpp
+++ b/kcontrol/background/bgadvanced.cpp
@@ -20,17 +20,17 @@
Boston, MA 02110-1301, USA.
*/
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qpushbutton.h>
-#include <qslider.h>
-#include <qspinbox.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqpushbutton.h>
+#include <tqslider.h>
+#include <tqspinbox.h>
+#include <tqwhatsthis.h>
#include <kconfig.h>
#include <kcolorbutton.h>
@@ -48,12 +48,12 @@
/**** BGAdvancedDialog ****/
-static QCString desktopConfigname()
+static TQCString desktopConfigname()
{
int desktop=0;
if (qt_xdisplay())
desktop = DefaultScreen(qt_xdisplay());
- QCString name;
+ TQCString name;
if (desktop == 0)
name = "kdesktoprc";
else
@@ -64,7 +64,7 @@ static QCString desktopConfigname()
BGAdvancedDialog::BGAdvancedDialog(KBackgroundRenderer *_r,
- QWidget *parent,
+ TQWidget *parent,
bool m_multidesktop)
: KDialogBase(parent, "BGAdvancedDialog",
true, i18n("Advanced Background Settings"),
@@ -77,12 +77,12 @@ BGAdvancedDialog::BGAdvancedDialog(KBackgroundRenderer *_r,
dlg->m_listPrograms->header()->setStretchEnabled ( true, 1 );
dlg->m_listPrograms->setAllColumnsShowFocus(true);
- connect(dlg->m_listPrograms, SIGNAL(clicked(QListViewItem *)),
- SLOT(slotProgramItemClicked(QListViewItem *)));
+ connect(dlg->m_listPrograms, TQT_SIGNAL(clicked(TQListViewItem *)),
+ TQT_SLOT(slotProgramItemClicked(TQListViewItem *)));
// Load programs
- QStringList lst = KBackgroundProgram::list();
- QStringList::Iterator it;
+ TQStringList lst = KBackgroundProgram::list();
+ TQStringList::Iterator it;
for (it=lst.begin(); it != lst.end(); ++it)
addProgram(*it);
@@ -100,15 +100,15 @@ BGAdvancedDialog::BGAdvancedDialog(KBackgroundRenderer *_r,
dlg->m_spinCache->setSpecialValueText(i18n("Unlimited"));
dlg->m_spinCache->setSuffix(i18n(" KB"));
- connect(dlg->m_buttonAdd, SIGNAL(clicked()),
- SLOT(slotAdd()));
- connect(dlg->m_buttonRemove, SIGNAL(clicked()),
- SLOT(slotRemove()));
- connect(dlg->m_buttonModify, SIGNAL(clicked()),
- SLOT(slotModify()));
+ connect(dlg->m_buttonAdd, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotAdd()));
+ connect(dlg->m_buttonRemove, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotRemove()));
+ connect(dlg->m_buttonModify, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotModify()));
- connect(dlg->m_listPrograms, SIGNAL(doubleClicked(QListViewItem *)),
- SLOT(slotProgramItemDoubleClicked(QListViewItem *)));
+ connect(dlg->m_listPrograms, TQT_SIGNAL(doubleClicked(TQListViewItem *)),
+ TQT_SLOT(slotProgramItemDoubleClicked(TQListViewItem *)));
}
else
{
@@ -119,8 +119,8 @@ BGAdvancedDialog::BGAdvancedDialog(KBackgroundRenderer *_r,
dlg->m_groupCache->hide();
}
- connect( dlg->m_cbProgram, SIGNAL(toggled(bool)),
- SLOT(slotEnableProgram(bool)));
+ connect( dlg->m_cbProgram, TQT_SIGNAL(toggled(bool)),
+ TQT_SLOT(slotEnableProgram(bool)));
m_backgroundMode = m_oldBackgroundMode = r->backgroundMode();
if (m_oldBackgroundMode == KBackgroundSettings::Program)
@@ -146,23 +146,23 @@ int BGAdvancedDialog::cacheSize()
return dlg->m_spinCache->value();
}
-QColor BGAdvancedDialog::textColor()
+TQColor BGAdvancedDialog::textColor()
{
return dlg->m_colorText->color();
}
-void BGAdvancedDialog::setTextColor(const QColor &color)
+void BGAdvancedDialog::setTextColor(const TQColor &color)
{
dlg->m_colorText->setColor(color);
}
-QColor BGAdvancedDialog::textBackgroundColor()
+TQColor BGAdvancedDialog::textBackgroundColor()
{
return dlg->m_cbSolidTextBackground->isChecked() ?
- dlg->m_colorTextBackground->color() : QColor();
+ dlg->m_colorTextBackground->color() : TQColor();
}
-void BGAdvancedDialog::setTextBackgroundColor(const QColor &color)
+void BGAdvancedDialog::setTextBackgroundColor(const TQColor &color)
{
dlg->m_colorTextBackground->blockSignals(true);
dlg->m_cbSolidTextBackground->blockSignals(true);
@@ -214,7 +214,7 @@ int BGAdvancedDialog::textWidth() const
void BGAdvancedDialog::updateUI()
{
- QString prog = r->KBackgroundProgram::name();
+ TQString prog = r->KBackgroundProgram::name();
dlg->m_cbProgram->blockSignals(true);
if ((r->backgroundMode() == KBackgroundSettings::Program)
@@ -238,7 +238,7 @@ void BGAdvancedDialog::updateUI()
dlg->m_cbProgram->blockSignals(false);
}
-void BGAdvancedDialog::removeProgram(const QString &name)
+void BGAdvancedDialog::removeProgram(const TQString &name)
{
if (m_programItems.find(name))
{
@@ -247,7 +247,7 @@ void BGAdvancedDialog::removeProgram(const QString &name)
}
}
-void BGAdvancedDialog::addProgram(const QString &name)
+void BGAdvancedDialog::addProgram(const TQString &name)
{
removeProgram(name);
@@ -255,7 +255,7 @@ void BGAdvancedDialog::addProgram(const QString &name)
if (prog.command().isEmpty() || (prog.isGlobal() && !prog.isAvailable()))
return;
- QListViewItem *item = new QListViewItem(dlg->m_listPrograms);
+ TQListViewItem *item = new TQListViewItem(dlg->m_listPrograms);
item->setText(0, prog.name());
item->setText(1, prog.comment());
item->setText(2, i18n("%1 min.").arg(prog.refresh()));
@@ -263,11 +263,11 @@ void BGAdvancedDialog::addProgram(const QString &name)
m_programItems.insert(name, item);
}
-void BGAdvancedDialog::selectProgram(const QString &name)
+void BGAdvancedDialog::selectProgram(const TQString &name)
{
if (m_programItems.find(name))
{
- QListViewItem *item = m_programItems[name];
+ TQListViewItem *item = m_programItems[name];
dlg->m_listPrograms->ensureItemVisible(item);
dlg->m_listPrograms->setSelected(item, true);
m_selectedProgram = name;
@@ -278,9 +278,9 @@ void BGAdvancedDialog::slotAdd()
{
KProgramEditDialog dlg;
dlg.exec();
- if (dlg.result() == QDialog::Accepted)
+ if (dlg.result() == TQDialog::Accepted)
{
- QString program = dlg.program();
+ TQString program = dlg.program();
addProgram(program);
selectProgram(program);
}
@@ -309,7 +309,7 @@ void BGAdvancedDialog::slotRemove()
prog.remove();
removeProgram(m_selectedProgram);
- m_selectedProgram = QString::null;
+ m_selectedProgram = TQString::null;
}
/*
@@ -322,9 +322,9 @@ void BGAdvancedDialog::slotModify()
KProgramEditDialog dlg(m_selectedProgram);
dlg.exec();
- if (dlg.result() == QDialog::Accepted)
+ if (dlg.result() == TQDialog::Accepted)
{
- QString program = dlg.program();
+ TQString program = dlg.program();
if (program != m_selectedProgram)
{
KBackgroundProgram prog(m_selectedProgram);
@@ -336,14 +336,14 @@ void BGAdvancedDialog::slotModify()
}
}
-void BGAdvancedDialog::slotProgramItemClicked(QListViewItem *item)
+void BGAdvancedDialog::slotProgramItemClicked(TQListViewItem *item)
{
if (item)
m_selectedProgram = item->text(0);
slotProgramChanged();
}
-void BGAdvancedDialog::slotProgramItemDoubleClicked(QListViewItem *item)
+void BGAdvancedDialog::slotProgramItemDoubleClicked(TQListViewItem *item)
{
slotProgramItemClicked(item);
slotModify();
@@ -363,7 +363,7 @@ void BGAdvancedDialog::slotEnableProgram(bool b)
if (b)
{
dlg->m_listPrograms->blockSignals(true);
- QListViewItem *cur = dlg->m_listPrograms->currentItem();
+ TQListViewItem *cur = dlg->m_listPrograms->currentItem();
dlg->m_listPrograms->setSelected(cur, true);
dlg->m_listPrograms->ensureItemVisible(cur);
dlg->m_listPrograms->blockSignals(false);
@@ -375,7 +375,7 @@ void BGAdvancedDialog::slotEnableProgram(bool b)
}
}
-QString BGAdvancedDialog::backgroundProgram() const
+TQString BGAdvancedDialog::backgroundProgram() const
{
return m_selectedProgram;
}
@@ -387,48 +387,48 @@ int BGAdvancedDialog::backgroundMode() const
/**** KProgramEditDialog ****/
-KProgramEditDialog::KProgramEditDialog(const QString &program, QWidget *parent, char *name)
+KProgramEditDialog::KProgramEditDialog(const TQString &program, TQWidget *parent, char *name)
: KDialogBase(parent, name, true, i18n("Configure Background Program"),
Ok | Cancel, Ok, true)
{
- QFrame *frame = makeMainWidget();
+ TQFrame *frame = makeMainWidget();
- QGridLayout *grid = new QGridLayout(frame, 6, 2, 0, spacingHint());
+ TQGridLayout *grid = new TQGridLayout(frame, 6, 2, 0, spacingHint());
grid->addColSpacing(1, 300);
- QLabel *lbl = new QLabel(i18n("&Name:"), frame);
+ TQLabel *lbl = new TQLabel(i18n("&Name:"), frame);
grid->addWidget(lbl, 0, 0);
- m_NameEdit = new QLineEdit(frame);
+ m_NameEdit = new TQLineEdit(frame);
lbl->setBuddy(m_NameEdit);
grid->addWidget(m_NameEdit, 0, 1);
- lbl = new QLabel(i18n("Co&mment:"), frame);
+ lbl = new TQLabel(i18n("Co&mment:"), frame);
grid->addWidget(lbl, 1, 0);
- m_CommentEdit = new QLineEdit(frame);
+ m_CommentEdit = new TQLineEdit(frame);
lbl->setBuddy(m_CommentEdit);
grid->addWidget(m_CommentEdit, 1, 1);
- lbl = new QLabel(i18n("Comman&d:"), frame);
+ lbl = new TQLabel(i18n("Comman&d:"), frame);
grid->addWidget(lbl, 2, 0);
- m_CommandEdit = new QLineEdit(frame);
+ m_CommandEdit = new TQLineEdit(frame);
lbl->setBuddy(m_CommandEdit);
grid->addWidget(m_CommandEdit, 2, 1);
- lbl = new QLabel(i18n("&Preview cmd:"), frame);
+ lbl = new TQLabel(i18n("&Preview cmd:"), frame);
grid->addWidget(lbl, 3, 0);
- m_PreviewEdit = new QLineEdit(frame);
+ m_PreviewEdit = new TQLineEdit(frame);
lbl->setBuddy(m_PreviewEdit);
grid->addWidget(m_PreviewEdit, 3, 1);
- lbl = new QLabel(i18n("&Executable:"), frame);
+ lbl = new TQLabel(i18n("&Executable:"), frame);
grid->addWidget(lbl, 4, 0);
- m_ExecEdit = new QLineEdit(frame);
+ m_ExecEdit = new TQLineEdit(frame);
lbl->setBuddy(m_ExecEdit);
grid->addWidget(m_ExecEdit, 4, 1);
- lbl = new QLabel(i18n("&Refresh time:"), frame);
+ lbl = new TQLabel(i18n("&Refresh time:"), frame);
grid->addWidget(lbl, 5, 0);
- m_RefreshEdit = new QSpinBox(frame);
+ m_RefreshEdit = new TQSpinBox(frame);
m_RefreshEdit->setRange(5, 60);
m_RefreshEdit->setSteps(5, 10);
m_RefreshEdit->setSuffix(i18n(" min"));
@@ -459,14 +459,14 @@ KProgramEditDialog::KProgramEditDialog(const QString &program, QWidget *parent,
}
-QString KProgramEditDialog::program()const
+TQString KProgramEditDialog::program()const
{
return m_NameEdit->text();
}
void KProgramEditDialog::slotOk()
{
- QString s = m_NameEdit->text();
+ TQString s = m_NameEdit->text();
if (s.isEmpty()) {
KMessageBox::sorry(this, i18n("You did not fill in the `Name' field.\n"
"This is a required field."));
@@ -477,7 +477,7 @@ void KProgramEditDialog::slotOk()
if ((s != m_Program) && !prog.command().isEmpty()) {
int ret = KMessageBox::warningContinueCancel(this,
i18n("There is already a program with the name `%1'.\n"
- "Do you want to overwrite it?").arg(s),QString::null,i18n("Overwrite"));
+ "Do you want to overwrite it?").arg(s),TQString::null,i18n("Overwrite"));
if (ret != KMessageBox::Continue)
return;
}
diff --git a/kcontrol/background/bgadvanced.h b/kcontrol/background/bgadvanced.h
index 6ede665a1..8c2a0b801 100644
--- a/kcontrol/background/bgadvanced.h
+++ b/kcontrol/background/bgadvanced.h
@@ -23,9 +23,9 @@
#ifndef BGADVANCED_H
#define BGADVANCED_H
-#include <qdict.h>
-#include <qlistview.h>
-#include <qstringlist.h>
+#include <tqdict.h>
+#include <tqlistview.h>
+#include <tqstringlist.h>
#include <kdialogbase.h>
@@ -40,14 +40,14 @@ class BGAdvancedDialog : public KDialogBase
{
Q_OBJECT
public:
- BGAdvancedDialog(KBackgroundRenderer *_r, QWidget *parent, bool m_multidesktop);
+ BGAdvancedDialog(KBackgroundRenderer *_r, TQWidget *parent, bool m_multidesktop);
void setCacheSize(int s);
int cacheSize();
- QColor textColor();
- void setTextColor(const QColor &color);
- QColor textBackgroundColor();
- void setTextBackgroundColor(const QColor &color);
+ TQColor textColor();
+ void setTextColor(const TQColor &color);
+ TQColor textBackgroundColor();
+ void setTextBackgroundColor(const TQColor &color);
bool shadowEnabled();
void setShadowEnabled(bool enabled);
void setTextLines(int lines);
@@ -59,7 +59,7 @@ public:
void makeReadOnly();
- QString backgroundProgram() const;
+ TQString backgroundProgram() const;
int backgroundMode() const;
public slots:
@@ -68,13 +68,13 @@ public slots:
void slotModify();
protected:
- void addProgram(const QString &name);
- void removeProgram(const QString &name);
- void selectProgram(const QString &name);
+ void addProgram(const TQString &name);
+ void removeProgram(const TQString &name);
+ void selectProgram(const TQString &name);
protected slots:
- void slotProgramItemClicked(QListViewItem *item);
- void slotProgramItemDoubleClicked(QListViewItem *item);
+ void slotProgramItemClicked(TQListViewItem *item);
+ void slotProgramItemDoubleClicked(TQListViewItem *item);
void slotProgramChanged();
void slotEnableProgram(bool b);
@@ -83,9 +83,9 @@ private:
BGAdvancedBase *dlg;
- QWidget *m_pMonitor;
- QDict<QListViewItem> m_programItems;
- QString m_selectedProgram;
+ TQWidget *m_pMonitor;
+ TQDict<TQListViewItem> m_programItems;
+ TQString m_selectedProgram;
int m_oldBackgroundMode;
int m_backgroundMode;
};
@@ -98,21 +98,21 @@ class KProgramEditDialog: public KDialogBase
Q_OBJECT
public:
- KProgramEditDialog(const QString &program=QString::null, QWidget *parent=0L,
+ KProgramEditDialog(const TQString &program=TQString::null, TQWidget *parent=0L,
char *name=0L);
/** The program name is here in case the user changed it */
- QString program()const;
+ TQString program()const;
public slots:
void slotOk();
private:
- QString m_Program;
- QLineEdit *m_NameEdit, *m_CommentEdit;
- QLineEdit *m_ExecEdit, *m_CommandEdit;
- QLineEdit *m_PreviewEdit;
- QSpinBox *m_RefreshEdit;
+ TQString m_Program;
+ TQLineEdit *m_NameEdit, *m_CommentEdit;
+ TQLineEdit *m_ExecEdit, *m_CommandEdit;
+ TQLineEdit *m_PreviewEdit;
+ TQSpinBox *m_RefreshEdit;
KBackgroundProgram *m_Prog;
};
diff --git a/kcontrol/background/bgdefaults.h b/kcontrol/background/bgdefaults.h
index 99846f0b0..b7de45bda 100644
--- a/kcontrol/background/bgdefaults.h
+++ b/kcontrol/background/bgdefaults.h
@@ -26,8 +26,8 @@
// Per desktop defaults
// Before you change this get in touch with me (torsten@kde.org)
// Thanks!!
-#define _defColorA QColor("#003082")
-#define _defColorB QColor("#C0C0C0")
+#define _defColorA TQColor("#003082")
+#define _defColorB TQColor("#C0C0C0")
#define _defBackgroundMode KBackgroundSettings::Flat
#define _defWallpaperMode KBackgroundSettings::NoWallpaper
#define _defMultiMode KBackgroundSettings::NoMulti
diff --git a/kcontrol/background/bgdialog.cpp b/kcontrol/background/bgdialog.cpp
index 6a7e44234..ae76b701a 100644
--- a/kcontrol/background/bgdialog.cpp
+++ b/kcontrol/background/bgdialog.cpp
@@ -29,16 +29,16 @@
#include <config.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qradiobutton.h>
-#include <qslider.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qapplication.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqradiobutton.h>
+#include <tqslider.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqapplication.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -66,7 +66,7 @@
#define NR_PREDEF_PATTERNS 6
-BGDialog::BGDialog(QWidget* parent, KConfig* _config, bool _multidesktop)
+BGDialog::BGDialog(TQWidget* parent, KConfig* _config, bool _multidesktop)
: BGDialog_UI(parent, "BGDialog")
{
m_pGlobals = new KGlobalBackgroundSettings(_config);
@@ -77,20 +77,20 @@ BGDialog::BGDialog(QWidget* parent, KConfig* _config, bool _multidesktop)
KWinModule *m_kwin;
m_kwin = new KWinModule(this);
m_curDesk = m_kwin->currentDesktop();
- QSize s(m_kwin->numberOfViewports(m_kwin->currentDesktop()));
+ TQSize s(m_kwin->numberOfViewports(m_kwin->currentDesktop()));
m_useViewports = s.width() * s.height() > 1;
m_numDesks = m_multidesktop ? KWin::numberOfDesktops() : 1;
m_numViewports = s.width() * s.height();
- m_numScreens = QApplication::desktop()->numScreens();
+ m_numScreens = TQApplication::desktop()->numScreens();
- QCString multiHead = getenv("KDE_MULTIHEAD");
+ TQCString multiHead = getenv("KDE_MULTIHEAD");
if (multiHead.lower() == "true")
{
m_numScreens = 1;
}
- QPoint vx(m_kwin->currentViewport(m_kwin->currentDesktop()));
+ TQPoint vx(m_kwin->currentViewport(m_kwin->currentDesktop()));
int t_eViewport = (vx.x() * vx.y());
if (t_eViewport < 1) {
t_eViewport = 1;
@@ -101,7 +101,7 @@ BGDialog::BGDialog(QWidget* parent, KConfig* _config, bool _multidesktop)
m_desk = m_multidesktop ? (m_useViewports ? (((m_desk - 1) * m_numViewports) + t_eViewport) : m_desk) : m_desk;
m_numDesks = m_multidesktop ? (m_useViewports ? (m_numDesks * m_numViewports) : m_numDesks) : m_numDesks;
- m_screen = QApplication::desktop()->screenNumber(this);
+ m_screen = TQApplication::desktop()->screenNumber(this);
if (m_screen >= (int)m_numScreens)
m_screen = m_numScreens-1;
@@ -124,62 +124,62 @@ BGDialog::BGDialog(QWidget* parent, KConfig* _config, bool _multidesktop)
m_eScreen = 0;
}
- connect(m_buttonIdentifyScreens, SIGNAL(clicked()), SLOT(slotIdentifyScreens()));
+ connect(m_buttonIdentifyScreens, TQT_SIGNAL(clicked()), TQT_SLOT(slotIdentifyScreens()));
// preview monitor
m_pMonitorArrangement = new BGMonitorArrangement(m_screenArrangement, "monitor arrangement");
- connect(m_pMonitorArrangement, SIGNAL(imageDropped(const QString &)), SLOT(slotImageDropped(const QString &)));
+ connect(m_pMonitorArrangement, TQT_SIGNAL(imageDropped(const TQString &)), TQT_SLOT(slotImageDropped(const TQString &)));
if( m_multidesktop)
{
// desktop
- connect(m_comboDesktop, SIGNAL(activated(int)),
- SLOT(slotSelectDesk(int)));
+ connect(m_comboDesktop, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(slotSelectDesk(int)));
}
if (m_numScreens > 1)
{
- connect(m_comboScreen, SIGNAL(activated(int)),
- SLOT(slotSelectScreen(int)));
+ connect(m_comboScreen, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(slotSelectScreen(int)));
}
// background image settings
- QIconSet iconSet = SmallIconSet(QString::fromLatin1("fileopen"));
- QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal );
+ TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("fileopen"));
+ TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal );
m_urlWallpaperButton->setIconSet( iconSet );
m_urlWallpaperButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
- QToolTip::add(m_urlWallpaperButton, i18n("Open file dialog"));
-
- connect(m_buttonGroupBackground, SIGNAL(clicked(int)),
- SLOT(slotWallpaperTypeChanged(int)));
- connect(m_urlWallpaperBox, SIGNAL(activated(int)),
- SLOT(slotWallpaper(int)));
- connect(m_urlWallpaperButton, SIGNAL(clicked()),
- SLOT(slotWallpaperSelection()));
- connect(m_comboWallpaperPos, SIGNAL(activated(int)),
- SLOT(slotWallpaperPos(int)));
- connect(m_buttonSetupWallpapers, SIGNAL(clicked()),
- SLOT(slotSetupMulti()));
+ TQToolTip::add(m_urlWallpaperButton, i18n("Open file dialog"));
+
+ connect(m_buttonGroupBackground, TQT_SIGNAL(clicked(int)),
+ TQT_SLOT(slotWallpaperTypeChanged(int)));
+ connect(m_urlWallpaperBox, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(slotWallpaper(int)));
+ connect(m_urlWallpaperButton, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotWallpaperSelection()));
+ connect(m_comboWallpaperPos, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(slotWallpaperPos(int)));
+ connect(m_buttonSetupWallpapers, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotSetupMulti()));
// set up the background colour stuff
- connect(m_colorPrimary, SIGNAL(changed(const QColor &)),
- SLOT(slotPrimaryColor(const QColor &)));
- connect(m_colorSecondary, SIGNAL(changed(const QColor &)),
- SLOT(slotSecondaryColor(const QColor &)));
- connect(m_comboPattern, SIGNAL(activated(int)),
- SLOT(slotPattern(int)));
+ connect(m_colorPrimary, TQT_SIGNAL(changed(const TQColor &)),
+ TQT_SLOT(slotPrimaryColor(const TQColor &)));
+ connect(m_colorSecondary, TQT_SIGNAL(changed(const TQColor &)),
+ TQT_SLOT(slotSecondaryColor(const TQColor &)));
+ connect(m_comboPattern, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(slotPattern(int)));
// blend
- connect(m_comboBlend, SIGNAL(activated(int)), SLOT(slotBlendMode(int)));
- connect(m_sliderBlend, SIGNAL(valueChanged(int)),
- SLOT(slotBlendBalance(int)));
- connect(m_cbBlendReverse, SIGNAL(toggled(bool)),
- SLOT(slotBlendReverse(bool)));
+ connect(m_comboBlend, TQT_SIGNAL(activated(int)), TQT_SLOT(slotBlendMode(int)));
+ connect(m_sliderBlend, TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(slotBlendBalance(int)));
+ connect(m_cbBlendReverse, TQT_SIGNAL(toggled(bool)),
+ TQT_SLOT(slotBlendReverse(bool)));
// advanced options
- connect(m_buttonAdvanced, SIGNAL(clicked()),
- SLOT(slotAdvanced()));
+ connect(m_buttonAdvanced, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotAdvanced()));
- connect(m_buttonGetNew, SIGNAL(clicked()),
- SLOT(slotGetNewStuff()));
+ connect(m_buttonGetNew, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotGetNewStuff()));
// renderers
m_renderer.resize(m_numDesks+1);
@@ -196,19 +196,19 @@ BGDialog::BGDialog(QWidget* parent, KConfig* _config, bool _multidesktop)
// Setup the merged-screen renderer
KBackgroundRenderer * r = new KBackgroundRenderer(eDesk, 0, false, _config);
m_renderer[i].insert( 0, r );
- connect( r, SIGNAL(imageDone(int,int)), SLOT(slotPreviewDone(int,int)) );
+ connect( r, TQT_SIGNAL(imageDone(int,int)), TQT_SLOT(slotPreviewDone(int,int)) );
// Setup the common-screen renderer
r = new KBackgroundRenderer(eDesk, 0, true, _config);
m_renderer[i].insert( 1, r );
- connect( r, SIGNAL(imageDone(int,int)), SLOT(slotPreviewDone(int,int)) );
+ connect( r, TQT_SIGNAL(imageDone(int,int)), TQT_SLOT(slotPreviewDone(int,int)) );
// Setup the remaining renderers for each screen
for (unsigned j=0; j < m_numScreens; ++j )
{
r = new KBackgroundRenderer(eDesk, j, true, _config);
m_renderer[i].insert( j+2, r );
- connect( r, SIGNAL(imageDone(int,int)), SLOT(slotPreviewDone(int,int)) );
+ connect( r, TQT_SIGNAL(imageDone(int,int)), TQT_SLOT(slotPreviewDone(int,int)) );
}
}
}
@@ -223,14 +223,14 @@ BGDialog::BGDialog(QWidget* parent, KConfig* _config, bool _multidesktop)
// set up the common desktop renderer
KBackgroundRenderer * r = new KBackgroundRenderer(0, 0, false, _config);
m_renderer[0].insert(0, r);
- connect(r, SIGNAL(imageDone(int,int)), SLOT(slotPreviewDone(int,int)));
+ connect(r, TQT_SIGNAL(imageDone(int,int)), TQT_SLOT(slotPreviewDone(int,int)));
// set up all the other desktop renderers
for (unsigned i = 0; i < m_numDesks; ++i)
{
r = new KBackgroundRenderer(i, 0, false, _config);
m_renderer[i+1].insert(0, r);
- connect(r, SIGNAL(imageDone(int,int)), SLOT(slotPreviewDone(int,int)));
+ connect(r, TQT_SIGNAL(imageDone(int,int)), TQT_SLOT(slotPreviewDone(int,int)));
}
}
@@ -257,7 +257,7 @@ BGDialog::BGDialog(QWidget* parent, KConfig* _config, bool _multidesktop)
updateUI();
#if (QT_VERSION-0 >= 0x030200)
- connect( qApp->desktop(), SIGNAL( resized( int )), SLOT( desktopResized())); // RANDR support
+ connect( qApp->desktop(), TQT_SIGNAL( resized( int )), TQT_SLOT( desktopResized())); // RANDR support
#endif
}
@@ -380,7 +380,7 @@ void BGDialog::defaults()
eRenderer()->setWallpaper( eRenderer()->wallpaper() );
}
-QString BGDialog::quickHelp() const
+TQString BGDialog::quickHelp() const
{
return i18n("<h1>Background</h1> This module allows you to control the"
" appearance of the virtual desktops. KDE offers a variety of options"
@@ -405,23 +405,23 @@ void BGDialog::slotIdentifyScreens()
// Taken from PositionTab::showIdentify in kdebase/kcontrol/kicker/positiontab_impl.cpp
for(unsigned s = 0; s < m_numScreens; s++)
{
- QLabel *screenLabel = new QLabel(0,"Screen Identify", WDestructiveClose | WStyle_Customize | WX11BypassWM);
+ TQLabel *screenLabel = new TQLabel(0,"Screen Identify", WDestructiveClose | WStyle_Customize | WX11BypassWM);
- QFont identifyFont(KGlobalSettings::generalFont());
+ TQFont identifyFont(KGlobalSettings::generalFont());
identifyFont.setPixelSize(100);
screenLabel->setFont(identifyFont);
- screenLabel->setFrameStyle(QFrame::Panel);
- screenLabel->setFrameShadow(QFrame::Plain);
+ screenLabel->setFrameStyle(TQFrame::Panel);
+ screenLabel->setFrameShadow(TQFrame::Plain);
screenLabel->setAlignment(Qt::AlignCenter);
screenLabel->setNum(int(s + 1));
// BUGLET: we should not allow the identification to be entered again
// until the timer fires.
- QTimer::singleShot(1500, screenLabel, SLOT(close()));
+ TQTimer::singleShot(1500, screenLabel, TQT_SLOT(close()));
- QPoint screenCenter(QApplication::desktop()->screenGeometry(s).center());
- QRect targetGeometry(QPoint(0,0),screenLabel->sizeHint());
+ TQPoint screenCenter(TQApplication::desktop()->screenGeometry(s).center());
+ TQRect targetGeometry(TQPoint(0,0),screenLabel->sizeHint());
targetGeometry.moveCenter(screenCenter);
screenLabel->setGeometry(targetGeometry);
@@ -448,7 +448,7 @@ void BGDialog::initUI()
// Screens
for (unsigned i = 0; i < m_numScreens; ++i)
- m_comboScreen->insertItem( i18n("Screen %1").arg(QString::number(i+1)) );
+ m_comboScreen->insertItem( i18n("Screen %1").arg(TQString::number(i+1)) );
// Patterns
m_comboPattern->insertItem(i18n("Single Color"));
@@ -460,7 +460,7 @@ void BGDialog::initUI()
m_patterns = KBackgroundPattern::list();
m_patterns.sort(); // Defined order
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for (it=m_patterns.begin(); it != m_patterns.end(); ++it)
{
KBackgroundPattern pat(*it);
@@ -497,20 +497,20 @@ void BGDialog::initUI()
void BGDialog::loadWallpaperFilesList() {
// Wallpapers
- // the following QMap is lower cased names mapped to cased names and URLs
+ // the following TQMap is lower cased names mapped to cased names and URLs
// this way we get case insensitive sorting
- QMap<QString, QPair<QString, QString> > papers;
+ TQMap<TQString, QPair<TQString, TQString> > papers;
//search for .desktop files before searching for images without .desktop files
- QStringList lst = m_pDirs->findAllResources("wallpaper", "*desktop", false, true);
- QStringList files;
- for (QStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it)
+ TQStringList lst = m_pDirs->findAllResources("wallpaper", "*desktop", false, true);
+ TQStringList files;
+ for (TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it)
{
KSimpleConfig fileConfig(*it);
fileConfig.setGroup("Wallpaper");
- QString imageCaption = fileConfig.readEntry("Name");
- QString fileName = fileConfig.readEntry("File");
+ TQString imageCaption = fileConfig.readEntry("Name");
+ TQString fileName = fileConfig.readEntry("File");
if (imageCaption.isEmpty())
{
@@ -520,15 +520,15 @@ void BGDialog::loadWallpaperFilesList() {
}
// avoid name collisions
- QString rs = imageCaption;
- QString lrs = rs.lower();
+ TQString rs = imageCaption;
+ TQString lrs = rs.lower();
for (int n = 1; papers.find(lrs) != papers.end(); ++n)
{
- rs = imageCaption + " (" + QString::number(n) + ')';
+ rs = imageCaption + " (" + TQString::number(n) + ')';
lrs = rs.lower();
}
int slash = (*it).findRev('/') + 1;
- QString directory = (*it).left(slash);
+ TQString directory = (*it).left(slash);
bool canLoadScaleable = false;
#ifdef HAVE_LIBART
canLoadScaleable = true;
@@ -541,13 +541,13 @@ void BGDialog::loadWallpaperFilesList() {
//now find any wallpapers that don't have a .desktop file
lst = m_pDirs->findAllResources("wallpaper", "*", false, true);
- for (QStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it)
+ for (TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it)
{
if ( !(*it).endsWith(".desktop") && files.grep(*it).empty() ) {
// First try to see if we have a comment describing the image. If we do
// just use the first line of said comment.
KFileMetaInfo metaInfo(*it);
- QString imageCaption;
+ TQString imageCaption;
if (metaInfo.isValid() && metaInfo.item("Comment").isValid())
imageCaption = metaInfo.item("Comment").string().section('\n', 0, 0);
@@ -568,11 +568,11 @@ void BGDialog::loadWallpaperFilesList() {
}
// avoid name collisions
- QString rs = imageCaption;
- QString lrs = rs.lower();
+ TQString rs = imageCaption;
+ TQString lrs = rs.lower();
for (int n = 1; papers.find(lrs) != papers.end(); ++n)
{
- rs = imageCaption + " (" + QString::number(n) + ')';
+ rs = imageCaption + " (" + TQString::number(n) + ')';
lrs = rs.lower();
}
papers[lrs] = qMakePair(rs, *it);
@@ -583,7 +583,7 @@ void BGDialog::loadWallpaperFilesList() {
comboWallpaper->clear();
m_wallpaper.clear();
int i = 0;
- for (QMap<QString, QPair<QString, QString> >::Iterator it = papers.begin();
+ for (TQMap<TQString, QPair<TQString, TQString> >::Iterator it = papers.begin();
it != papers.end();
++it)
{
@@ -593,7 +593,7 @@ void BGDialog::loadWallpaperFilesList() {
}
}
-void BGDialog::setWallpaper(const QString &s)
+void BGDialog::setWallpaper(const TQString &s)
{
KComboBox *comboWallpaper = m_urlWallpaperBox;
comboWallpaper->blockSignals(true);
@@ -601,7 +601,7 @@ void BGDialog::setWallpaper(const QString &s)
if (m_wallpaper.find(s) == m_wallpaper.end())
{
int i = comboWallpaper->count();
- QString imageCaption;
+ TQString imageCaption;
int slash = s.findRev('/') + 1;
int endDot = s.findRev('.');
@@ -628,13 +628,13 @@ void BGDialog::setWallpaper(const QString &s)
void BGDialog::slotWallpaperSelection()
{
- KFileDialog dlg( QString::null, QString::null, this,
+ KFileDialog dlg( TQString::null, TQString::null, this,
"file dialog", true );
KImageFilePreview* previewWidget = new KImageFilePreview(&dlg);
dlg.setPreviewWidget(previewWidget);
- QStringList mimeTypes = KImageIO::mimeTypes( KImageIO::Reading );
+ TQStringList mimeTypes = KImageIO::mimeTypes( KImageIO::Reading );
#ifdef HAVE_LIBART
mimeTypes += "image/svg+xml";
#endif
@@ -643,8 +643,8 @@ void BGDialog::slotWallpaperSelection()
dlg.setCaption( i18n("Select Wallpaper") );
int j = m_urlWallpaperBox->currentItem();
- QString uri;
- for(QMap<QString,int>::ConstIterator it = m_wallpaper.begin();
+ TQString uri;
+ for(TQMap<TQString,int>::ConstIterator it = m_wallpaper.begin();
it != m_wallpaper.end();
++it)
{
@@ -659,7 +659,7 @@ void BGDialog::slotWallpaperSelection()
dlg.setSelection( uri );
}
- if ( dlg.exec() == QDialog::Accepted )
+ if ( dlg.exec() == TQDialog::Accepted )
{
setWallpaper(dlg.selectedFile());
@@ -819,7 +819,7 @@ void BGDialog::slotPreviewDone(int desk_done, int screen_done)
r->saveCacheFile();
KPixmap pm;
- if (QPixmap::defaultDepth() < 15)
+ if (TQPixmap::defaultDepth() < 15)
pm.convertFromImage(r->image(), KPixmap::LowColor);
else
pm.convertFromImage(r->image());
@@ -839,7 +839,7 @@ void BGDialog::slotPreviewDone(int desk_done, int screen_done)
}
}
-void BGDialog::slotImageDropped(const QString &uri)
+void BGDialog::slotImageDropped(const TQString &uri)
{
setWallpaper(uri);
@@ -911,8 +911,8 @@ void BGDialog::slotWallpaperTypeChanged(int i)
r->setMultiWallpaperMode(KBackgroundSettings::NoMultiRandom);
int j = m_urlWallpaperBox->currentItem();
- QString path;
- for(QMap<QString,int>::ConstIterator it = m_wallpaper.begin();
+ TQString path;
+ for(TQMap<TQString,int>::ConstIterator it = m_wallpaper.begin();
it != m_wallpaper.end();
++it)
{
@@ -929,7 +929,7 @@ void BGDialog::slotWallpaperTypeChanged(int i)
// If the image is greater than 800x600 default to using scaled mode,
// otherwise default to tiled.
- QSize s = metaInfo.item("Dimensions").value().toSize();
+ TQSize s = metaInfo.item("Dimensions").value().toSize();
if (s.width() >= 800 && s.height() >= 600)
m_wallpaperPos = KBackgroundSettings::Scaled;
else
@@ -997,7 +997,7 @@ void BGDialog::slotSetupMulti()
KBackgroundRenderer *r = eRenderer();
BGMultiWallpaperDialog dlg(r, topLevelWidget());
- if (dlg.exec() == QDialog::Accepted) {
+ if (dlg.exec() == TQDialog::Accepted) {
r->stop();
m_slideShowRandom = r->multiWallpaperMode();
r->setWallpaperMode(m_wallpaperPos);
@@ -1008,7 +1008,7 @@ void BGDialog::slotSetupMulti()
}
}
-void BGDialog::slotPrimaryColor(const QColor &color)
+void BGDialog::slotPrimaryColor(const TQColor &color)
{
KBackgroundRenderer *r = eRenderer();
@@ -1023,7 +1023,7 @@ void BGDialog::slotPrimaryColor(const QColor &color)
emit changed(true);
}
-void BGDialog::slotSecondaryColor(const QColor &color)
+void BGDialog::slotSecondaryColor(const TQColor &color)
{
KBackgroundRenderer *r = eRenderer();
diff --git a/kcontrol/background/bgdialog.h b/kcontrol/background/bgdialog.h
index 8782b73f7..30bb0f004 100644
--- a/kcontrol/background/bgdialog.h
+++ b/kcontrol/background/bgdialog.h
@@ -20,9 +20,9 @@
#ifndef _BGDIALOG_H_
#define _BGDIALOG_H_
-#include <qptrvector.h>
-#include <qmap.h>
-#include <qvaluevector.h>
+#include <tqptrvector.h>
+#include <tqmap.h>
+#include <tqvaluevector.h>
#include "bgdialog_ui.h"
#include "bgrender.h"
@@ -36,7 +36,7 @@ class BGDialog : public BGDialog_UI
{
Q_OBJECT
public:
- BGDialog(QWidget* parent, KConfig* _config, bool _multidesktop = true);
+ BGDialog(TQWidget* parent, KConfig* _config, bool _multidesktop = true);
~BGDialog();
void load( bool useDefaults );
@@ -45,7 +45,7 @@ public:
void makeReadOnly();
- QString quickHelp() const;
+ TQString quickHelp() const;
signals:
void changed(bool);
@@ -55,7 +55,7 @@ protected:
void updateUI();
KBackgroundRenderer * eRenderer();
- void setWallpaper(const QString &);
+ void setWallpaper(const TQString &);
void loadWallpaperFilesList();
@@ -68,10 +68,10 @@ protected slots:
void slotWallpaperPos(int);
void slotWallpaperSelection();
void slotSetupMulti();
- void slotPrimaryColor(const QColor &color);
- void slotSecondaryColor(const QColor &color);
+ void slotPrimaryColor(const TQColor &color);
+ void slotSecondaryColor(const TQColor &color);
void slotPattern(int pattern);
- void slotImageDropped(const QString &uri);
+ void slotImageDropped(const TQString &uri);
void slotPreviewDone(int desk, int screen);
void slotAdvanced();
void slotGetNewStuff();
@@ -95,9 +95,9 @@ protected:
int m_screen;
int m_eDesk;
int m_eScreen;
- QValueVector< QPtrVector<KBackgroundRenderer> > m_renderer; // m_renderer[desk][screen]
- QMap<QString,int> m_wallpaper;
- QStringList m_patterns;
+ TQValueVector< TQPtrVector<KBackgroundRenderer> > m_renderer; // m_renderer[desk][screen]
+ TQMap<TQString,int> m_wallpaper;
+ TQStringList m_patterns;
int m_slideShowRandom; // Remembers last Slide Show setting
int m_wallpaperPos; // Remembers last wallpaper pos
diff --git a/kcontrol/background/bghash.h b/kcontrol/background/bghash.h
index 932c6ebab..ab13daf90 100644
--- a/kcontrol/background/bghash.h
+++ b/kcontrol/background/bghash.h
@@ -2,13 +2,13 @@
#define BGHASH_H
/*
- * QString -> int hash. From Qt's QGDict::hashKeyString().
+ * TQString -> int hash. From Qt's TQGDict::hashKeyString().
*/
-static int QHash(QString key)
+static int QHash(TQString key)
{
int g, h = 0;
- const QChar *p = key.unicode();
+ const TQChar *p = key.unicode();
for (unsigned i=0; i < key.length(); i++) {
h = (h << 4) + p[i].cell();
if ((g = (h & 0xf0000000)))
diff --git a/kcontrol/background/bgmonitor.cpp b/kcontrol/background/bgmonitor.cpp
index 6af2f7458..f78a7b616 100644
--- a/kcontrol/background/bgmonitor.cpp
+++ b/kcontrol/background/bgmonitor.cpp
@@ -27,9 +27,9 @@
#include <kpixmap.h>
#include <kstandarddirs.h>
#include <kurldrag.h>
-#include <qapplication.h>
-#include <qpixmap.h>
-#include <qwhatsthis.h>
+#include <tqapplication.h>
+#include <tqpixmap.h>
+#include <tqwhatsthis.h>
#include "bgmonitor.h"
@@ -38,17 +38,17 @@
// Geometry of "display" part of monitor image: (23,14)-[151x115]
//BEGIN class BGMonitorArrangement
-BGMonitorArrangement::BGMonitorArrangement(QWidget *parent, const char *name)
- : QWidget(parent, name)
+BGMonitorArrangement::BGMonitorArrangement(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
- m_pBGMonitor.resize( QApplication::desktop()->numScreens(), 0l );
+ m_pBGMonitor.resize( TQApplication::desktop()->numScreens(), 0l );
- for (int screen = 0; screen < QApplication::desktop()->numScreens(); ++screen)
+ for (int screen = 0; screen < TQApplication::desktop()->numScreens(); ++screen)
{
BGMonitorLabel * label = new BGMonitorLabel(this);
m_pBGMonitor[screen] = label;
- connect( label->monitor(), SIGNAL(imageDropped(const QString &)), this, SIGNAL(imageDropped(const QString &)) );
+ connect( label->monitor(), TQT_SIGNAL(imageDropped(const TQString &)), this, TQT_SIGNAL(imageDropped(const TQString &)) );
}
parent->setFixedSize(200, 186);
@@ -63,27 +63,27 @@ BGMonitor * BGMonitorArrangement::monitor( unsigned screen ) const
}
-QRect BGMonitorArrangement::expandToPreview( QRect r ) const
+TQRect BGMonitorArrangement::expandToPreview( TQRect r ) const
{
double scaleX = 200.0 / 151.0;
double scaleY = 186.0 / 115.0;
- return QRect( int(r.x()*scaleX), int(r.y()*scaleY), int(r.width()*scaleX), int(r.height()*scaleY) );
+ return TQRect( int(r.x()*scaleX), int(r.y()*scaleY), int(r.width()*scaleX), int(r.height()*scaleY) );
}
-QSize BGMonitorArrangement::expandToPreview( QSize s ) const
+TQSize BGMonitorArrangement::expandToPreview( TQSize s ) const
{
double scaleX = 200.0 / 151.0;
double scaleY = 186.0 / 115.0;
- return QSize( int(s.width()*scaleX), int(s.height()*scaleY) );
+ return TQSize( int(s.width()*scaleX), int(s.height()*scaleY) );
}
-QPoint BGMonitorArrangement::expandToPreview( QPoint p ) const
+TQPoint BGMonitorArrangement::expandToPreview( TQPoint p ) const
{
double scaleX = 200.0 / 151.0;
double scaleY = 186.0 / 115.0;
- return QPoint( int(p.x()*scaleX), int(p.y()*scaleY) );
+ return TQPoint( int(p.x()*scaleX), int(p.y()*scaleY) );
}
@@ -94,11 +94,11 @@ void BGMonitorArrangement::updateArrangement()
// image that contains the preview of the background. The monitor image
// will set the background preview back to the normal value.
- QRect overallGeometry;
- for (int screen = 0; screen < QApplication::desktop()->numScreens(); ++screen)
- overallGeometry |= QApplication::desktop()->screenGeometry(screen);
+ TQRect overallGeometry;
+ for (int screen = 0; screen < TQApplication::desktop()->numScreens(); ++screen)
+ overallGeometry |= TQApplication::desktop()->screenGeometry(screen);
- QRect expandedOverallGeometry = expandToPreview(overallGeometry);
+ TQRect expandedOverallGeometry = expandToPreview(overallGeometry);
double scale = QMIN(
double(width()) / double(expandedOverallGeometry.width()),
@@ -107,16 +107,16 @@ void BGMonitorArrangement::updateArrangement()
m_combinedPreviewSize = overallGeometry.size() * scale;
- m_maxPreviewSize = QSize(0,0);
+ m_maxPreviewSize = TQSize(0,0);
int previousMax = 0;
- for (int screen = 0; screen < QApplication::desktop()->numScreens(); ++screen)
+ for (int screen = 0; screen < TQApplication::desktop()->numScreens(); ++screen)
{
- QPoint topLeft = (QApplication::desktop()->screenGeometry(screen).topLeft() - overallGeometry.topLeft()) * scale;
- QPoint expandedTopLeft = expandToPreview(topLeft);
+ TQPoint topLeft = (TQApplication::desktop()->screenGeometry(screen).topLeft() - overallGeometry.topLeft()) * scale;
+ TQPoint expandedTopLeft = expandToPreview(topLeft);
- QSize previewSize = QApplication::desktop()->screenGeometry(screen).size() * scale;
- QSize expandedPreviewSize = expandToPreview(previewSize);
+ TQSize previewSize = TQApplication::desktop()->screenGeometry(screen).size() * scale;
+ TQSize expandedPreviewSize = expandToPreview(previewSize);
if ( (previewSize.width() * previewSize.height()) > previousMax )
{
@@ -124,16 +124,16 @@ void BGMonitorArrangement::updateArrangement()
m_maxPreviewSize = previewSize;
}
- m_pBGMonitor[screen]->setPreviewPosition( QRect( topLeft, previewSize ) );
- m_pBGMonitor[screen]->setGeometry( QRect( expandedTopLeft, expandedPreviewSize ) );
+ m_pBGMonitor[screen]->setPreviewPosition( TQRect( topLeft, previewSize ) );
+ m_pBGMonitor[screen]->setGeometry( TQRect( expandedTopLeft, expandedPreviewSize ) );
m_pBGMonitor[screen]->updateMonitorGeometry();
}
}
-void BGMonitorArrangement::resizeEvent( QResizeEvent * e )
+void BGMonitorArrangement::resizeEvent( TQResizeEvent * e )
{
- QWidget::resizeEvent(e);
+ TQWidget::resizeEvent(e);
updateArrangement();
}
@@ -142,9 +142,9 @@ void BGMonitorArrangement::setPixmap( const KPixmap & pm )
{
for (unsigned screen = 0; screen < m_pBGMonitor.size(); ++screen)
{
- QRect position = m_pBGMonitor[screen]->previewPosition();
+ TQRect position = m_pBGMonitor[screen]->previewPosition();
- QPixmap monitorPixmap( position.size(), pm.depth() );
+ TQPixmap monitorPixmap( position.size(), pm.depth() );
copyBlt( &monitorPixmap, 0, 0, &pm, position.x(), position.y(), position.width(), position.height() );
m_pBGMonitor[screen]->monitor()->setPixmap(monitorPixmap);
}
@@ -154,15 +154,15 @@ void BGMonitorArrangement::setPixmap( const KPixmap & pm )
//BEGIN class BGMonitorLabel
-BGMonitorLabel::BGMonitorLabel(QWidget *parent, const char *name)
- : QLabel(parent, name)
+BGMonitorLabel::BGMonitorLabel(TQWidget *parent, const char *name)
+ : TQLabel(parent, name)
{
setAlignment(AlignCenter);
setScaledContents(true);
- setPixmap( QPixmap( locate("data", "kcontrol/pics/monitor.png") ) );
+ setPixmap( TQPixmap( locate("data", "kcontrol/pics/monitor.png") ) );
m_pBGMonitor = new BGMonitor(this);
- QWhatsThis::add( this, i18n("This picture of a monitor contains a preview of what the current settings will look like on your desktop.") );
+ TQWhatsThis::add( this, i18n("This picture of a monitor contains a preview of what the current settings will look like on your desktop.") );
}
@@ -171,14 +171,14 @@ void BGMonitorLabel::updateMonitorGeometry()
double scaleX = double(width()) / double(sizeHint().width());
double scaleY = double(height()) / double(sizeHint().height());
- kdDebug() << k_funcinfo << " Setting geometry to " << QRect( int(23*scaleX), int(14*scaleY), int(151*scaleX), int(115*scaleY) ) << endl;
+ kdDebug() << k_funcinfo << " Setting geometry to " << TQRect( int(23*scaleX), int(14*scaleY), int(151*scaleX), int(115*scaleY) ) << endl;
m_pBGMonitor->setGeometry( int(23*scaleX), int(14*scaleY), int(151*scaleX), int(115*scaleY) );
}
-void BGMonitorLabel::resizeEvent( QResizeEvent * e )
+void BGMonitorLabel::resizeEvent( TQResizeEvent * e )
{
- QWidget::resizeEvent(e);
+ TQWidget::resizeEvent(e);
updateMonitorGeometry();
}
//END class BGMonitorLabel
@@ -186,8 +186,8 @@ void BGMonitorLabel::resizeEvent( QResizeEvent * e )
//BEGIN class BGMonitor
-BGMonitor::BGMonitor(QWidget *parent, const char *name)
- : QLabel(parent, name)
+BGMonitor::BGMonitor(TQWidget *parent, const char *name)
+ : TQLabel(parent, name)
{
setAlignment(AlignCenter);
setScaledContents(true);
@@ -195,7 +195,7 @@ BGMonitor::BGMonitor(QWidget *parent, const char *name)
}
-void BGMonitor::dropEvent(QDropEvent *e)
+void BGMonitor::dropEvent(TQDropEvent *e)
{
if (!KURLDrag::canDecode(e))
return;
@@ -208,7 +208,7 @@ void BGMonitor::dropEvent(QDropEvent *e)
}
}
-void BGMonitor::dragEnterEvent(QDragEnterEvent *e)
+void BGMonitor::dragEnterEvent(TQDragEnterEvent *e)
{
if (KURLDrag::canDecode(e))
e->accept(rect());
diff --git a/kcontrol/background/bgmonitor.h b/kcontrol/background/bgmonitor.h
index 1e714194e..92cf5eef4 100644
--- a/kcontrol/background/bgmonitor.h
+++ b/kcontrol/background/bgmonitor.h
@@ -25,9 +25,9 @@
#ifndef _BGMONITOR_H_
#define _BGMONITOR_H_
-#include <qlabel.h>
-#include <qvaluevector.h>
-#include <qwidget.h>
+#include <tqlabel.h>
+#include <tqvaluevector.h>
+#include <tqwidget.h>
class BGMonitor;
class BGMonitorLabel;
@@ -41,32 +41,32 @@ class BGMonitorArrangement : public QWidget
{
Q_OBJECT
public:
- BGMonitorArrangement(QWidget *parent, const char *name=0L);
+ BGMonitorArrangement(TQWidget *parent, const char *name=0L);
/**
* Splits up the pixmap according to monitor geometries and sets each
* BGMonitor pixmap accordingly.
*/
void setPixmap( const KPixmap & pm );
- QSize combinedPreviewSize() const { return m_combinedPreviewSize; }
- QSize maxPreviewSize() const { return m_maxPreviewSize; }
+ TQSize combinedPreviewSize() const { return m_combinedPreviewSize; }
+ TQSize maxPreviewSize() const { return m_maxPreviewSize; }
unsigned numMonitors() const { return m_pBGMonitor.size(); }
BGMonitor * monitor( unsigned screen ) const;
void updateArrangement();
signals:
- void imageDropped(const QString &);
+ void imageDropped(const TQString &);
protected:
- virtual void resizeEvent( QResizeEvent * );
- QRect expandToPreview( QRect r ) const;
- QSize expandToPreview( QSize s ) const;
- QPoint expandToPreview( QPoint p ) const;
+ virtual void resizeEvent( TQResizeEvent * );
+ TQRect expandToPreview( TQRect r ) const;
+ TQSize expandToPreview( TQSize s ) const;
+ TQPoint expandToPreview( TQPoint p ) const;
- QValueVector<BGMonitorLabel*> m_pBGMonitor;
- QSize m_combinedPreviewSize;
- QSize m_maxPreviewSize;
+ TQValueVector<BGMonitorLabel*> m_pBGMonitor;
+ TQSize m_combinedPreviewSize;
+ TQSize m_maxPreviewSize;
};
/**
@@ -75,18 +75,18 @@ protected:
class BGMonitorLabel : public QLabel
{
public:
- BGMonitorLabel(QWidget *parent, const char *name=0L);
+ BGMonitorLabel(TQWidget *parent, const char *name=0L);
BGMonitor * monitor() const { return m_pBGMonitor; }
void updateMonitorGeometry();
- void setPreviewPosition( QRect r ) { m_previewPosition = r; }
- QRect previewPosition() const { return m_previewPosition; }
+ void setPreviewPosition( TQRect r ) { m_previewPosition = r; }
+ TQRect previewPosition() const { return m_previewPosition; }
protected:
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
BGMonitor * m_pBGMonitor;
- QRect m_previewPosition;
+ TQRect m_previewPosition;
};
@@ -97,14 +97,14 @@ class BGMonitor : public QLabel
{
Q_OBJECT
public:
- BGMonitor(QWidget *parent, const char *name=0L);
+ BGMonitor(TQWidget *parent, const char *name=0L);
signals:
- void imageDropped(const QString &);
+ void imageDropped(const TQString &);
protected:
- virtual void dropEvent(QDropEvent *);
- virtual void dragEnterEvent(QDragEnterEvent *);
+ virtual void dropEvent(TQDropEvent *);
+ virtual void dragEnterEvent(TQDragEnterEvent *);
};
diff --git a/kcontrol/background/bgrender.cpp b/kcontrol/background/bgrender.cpp
index 47d52b193..4aca82145 100644
--- a/kcontrol/background/bgrender.cpp
+++ b/kcontrol/background/bgrender.cpp
@@ -14,11 +14,11 @@
#include <stdlib.h>
#include <utime.h>
-#include <qtimer.h>
-#include <qpainter.h>
-#include <qimage.h>
-#include <qfileinfo.h>
-#include <qdir.h>
+#include <tqtimer.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
#include <dcopclient.h>
#include <kapplication.h>
@@ -61,8 +61,8 @@ KBackgroundRenderer::KBackgroundRenderer(int desk, int screen, bool drawBackgrou
m_Cached = false;
m_TilingEnabled = false;
- m_pTimer = new QTimer(this);
- connect(m_pTimer, SIGNAL(timeout()), SLOT(render()));
+ m_pTimer = new TQTimer(this);
+ connect(m_pTimer, TQT_SIGNAL(timeout()), TQT_SLOT(render()));
}
@@ -74,7 +74,7 @@ KBackgroundRenderer::~KBackgroundRenderer()
}
-void KBackgroundRenderer::setSize(const QSize &size)
+void KBackgroundRenderer::setSize(const TQSize &size)
{
m_rSize = m_Size = size;
}
@@ -91,7 +91,7 @@ void KBackgroundRenderer::desktopResized()
}
-void KBackgroundRenderer::tile(QImage& dest, QRect rect, const QImage& src)
+void KBackgroundRenderer::tile(TQImage& dest, TQRect rect, const TQImage& src)
{
rect &= dest.rect();
@@ -110,19 +110,19 @@ void KBackgroundRenderer::tile(QImage& dest, QRect rect, const QImage& src)
* Build a command line to run the program.
*/
-QString KBackgroundRenderer::buildCommand()
+TQString KBackgroundRenderer::buildCommand()
{
- QString num;
+ TQString num;
int pos = 0;
- QString cmd;
+ TQString cmd;
if (m_bPreview)
cmd = previewCommand();
else
cmd = command();
if (cmd.isEmpty())
- return QString();
+ return TQString();
while ((pos = cmd.find('%', pos)) != -1) {
@@ -182,13 +182,13 @@ int KBackgroundRenderer::doBackground(bool quit)
}
int retval = Done;
- QString file;
+ TQString file;
static unsigned int tileWidth = 0;
static unsigned int tileHeight = 0;
if( tileWidth == 0 )
{
- int tile_val = QPixmap::defaultDepth() >= 24 ? 1 : 2;
+ int tile_val = TQPixmap::defaultDepth() >= 24 ? 1 : 2;
// some dithering may be needed even with bpb==15/16, so don't use tileWidth==1
// for them
// with tileWidth>2, repainting the desktop causes nasty effect (XFree86 4.1.0 )
@@ -238,15 +238,15 @@ int KBackgroundRenderer::doBackground(bool quit)
delete m_pProc;
m_pProc = new KShellProcess;
*m_pProc << file;
- connect(m_pProc, SIGNAL(processExited(KProcess *)),
- SLOT(slotBackgroundDone(KProcess *)));
+ connect(m_pProc, TQT_SIGNAL(processExited(KProcess *)),
+ TQT_SLOT(slotBackgroundDone(KProcess *)));
m_pProc->start(KShellProcess::NotifyOnExit);
retval = Wait;
break;
case HorizontalGradient:
{
- QSize size = m_Size;
+ TQSize size = m_Size;
// on <16bpp displays the gradient sucks when tiled because of dithering
if( canTile())
size.setHeight( tileHeight );
@@ -256,7 +256,7 @@ int KBackgroundRenderer::doBackground(bool quit)
}
case VerticalGradient:
{
- QSize size = m_Size;
+ TQSize size = m_Size;
// on <16bpp displays the gradient sucks when tiled because of dithering
if( canTile())
size.setWidth( tileWidth );
@@ -298,14 +298,14 @@ int KBackgroundRenderer::doWallpaper(bool quit)
int wpmode= enabled()?wallpaperMode():NoWallpaper;
- m_Wallpaper = QImage();
+ m_Wallpaper = TQImage();
if (wpmode != NoWallpaper) {
wp_load:
if (currentWallpaper().isEmpty()) {
wpmode = NoWallpaper;
goto wp_out;
}
- QString file = m_pDirs->findResource("wallpaper", currentWallpaper());
+ TQString file = m_pDirs->findResource("wallpaper", currentWallpaper());
if (file.isEmpty()) {
wpmode = NoWallpaper;
goto wp_out;
@@ -362,7 +362,7 @@ wp_load:
}
if (svgEngine->load(svgWidth, svgHeight, file )) {
- QImage *image = svgEngine->image();
+ TQImage *image = svgEngine->image();
m_Wallpaper = *image;
delete image;
} else {
@@ -394,7 +394,7 @@ wp_load:
{
xs = ys = 1;
}
- if( m_Wallpaper.size() != QSize( xs, ys ))
+ if( m_Wallpaper.size() != TQSize( xs, ys ))
m_Wallpaper = m_Wallpaper.smoothScale(xs, ys);
}
@@ -456,7 +456,7 @@ wp_out:
int ww = m_Wallpaper.width(); // wallpaper width/height
int wh = m_Wallpaper.height();
- m_WallpaperRect = QRect(); // to be filled destination rectangle; may exceed desktop!
+ m_WallpaperRect = TQRect(); // to be filled destination rectangle; may exceed desktop!
switch (wpmode)
{
@@ -474,7 +474,7 @@ wp_out:
case Scaled:
ww = w;
wh = h;
- if( m_WallpaperRect.size() != QSize( w, h ))
+ if( m_WallpaperRect.size() != TQSize( w, h ))
m_Wallpaper = m_Wallpaper.smoothScale( w, h );
m_WallpaperRect.setRect(0, 0, w, h);
break;
@@ -495,7 +495,7 @@ wp_out:
wh = (int)(sx * wh);
ww = w;
}
- if( m_WallpaperRect.size() != QSize( ww, wh ))
+ if( m_WallpaperRect.size() != TQSize( ww, wh ))
m_Wallpaper = m_Wallpaper.smoothScale(ww, wh);
m_WallpaperRect.setRect((w - ww) / 2, (h - wh) / 2, ww, wh);
break;
@@ -511,7 +511,7 @@ wp_out:
wh = (int)(sx * wh);
ww = w;
}
- if( m_WallpaperRect.size() != QSize( ww, wh ))
+ if( m_WallpaperRect.size() != TQSize( ww, wh ))
m_Wallpaper = m_Wallpaper.smoothScale(ww, wh);
m_WallpaperRect.setRect(0, 0, w, h);
break;
@@ -529,7 +529,7 @@ wp_out:
wh = h;
ww = (int)(sy*ww);
}
- if( m_WallpaperRect.size() != QSize( ww, wh ))
+ if( m_WallpaperRect.size() != TQSize( ww, wh ))
m_Wallpaper = m_Wallpaper.smoothScale(ww, wh);
m_WallpaperRect.setRect((w - ww) / 2, (h - wh) / 2,w, h);
break;
@@ -563,10 +563,10 @@ void KBackgroundRenderer::wallpaperBlend()
}
// works only for NoBlending and no alpha in wallpaper
-// but is much faster than QImage fidling
+// but is much faster than TQImage fidling
void KBackgroundRenderer::fastWallpaperBlend()
{
- m_Image = QImage();
+ m_Image = TQImage();
// copy background to m_pPixmap
if( !enabled() || (wallpaperMode() == NoWallpaper && canTile())) {
// if there's no wallpaper, no need to tile the pixmap to the size of desktop, as X does
@@ -584,22 +584,22 @@ void KBackgroundRenderer::fastWallpaperBlend()
m_Pixmap.convertFromImage( m_Wallpaper );
return;
}
- else if( m_WallpaperRect.contains( QRect( QPoint( 0, 0 ), m_Size ))
+ else if( m_WallpaperRect.contains( TQRect( TQPoint( 0, 0 ), m_Size ))
&& !m_Wallpaper.hasAlphaBuffer()) // wallpaper covers all and no blending
- m_Pixmap = QPixmap( m_Size );
+ m_Pixmap = TQPixmap( m_Size );
else if (m_Background.size() == m_Size)
m_Pixmap.convertFromImage( m_Background );
else {
- m_Pixmap = QPixmap( m_Size );
- QPainter p( &m_Pixmap );
- QPixmap pm;
+ m_Pixmap = TQPixmap( m_Size );
+ TQPainter p( &m_Pixmap );
+ TQPixmap pm;
pm.convertFromImage( m_Background );
p.drawTiledPixmap( 0, 0, m_Size.width(), m_Size.height(), pm );
}
// paint/alpha-blend wallpaper to destination rectangle of m_pPixmap
if (m_WallpaperRect.isValid()) {
- QPixmap wp_pixmap;
+ TQPixmap wp_pixmap;
if( useShm() && !m_Wallpaper.hasAlphaBuffer()) {
KPixmapIO io;
wp_pixmap = io.convertToPixmap( m_Wallpaper );
@@ -619,7 +619,7 @@ void KBackgroundRenderer::fastWallpaperBlend()
void KBackgroundRenderer::fullWallpaperBlend()
{
- m_Pixmap = QPixmap();
+ m_Pixmap = TQPixmap();
int w = m_Size.width(); // desktop width/height
int h = m_Size.height();
// copy background to m_pImage
@@ -631,7 +631,7 @@ void KBackgroundRenderer::fullWallpaperBlend()
} else {
m_Image.create(w, h, 32);
- tile(m_Image, QRect(0, 0, w, h), m_Background);
+ tile(m_Image, TQRect(0, 0, w, h), m_Background);
}
// blend wallpaper to destination rectangle of m_pImage
@@ -644,8 +644,8 @@ void KBackgroundRenderer::fullWallpaperBlend()
int wh = m_Wallpaper.height();
for (int y = m_WallpaperRect.top(); y < m_WallpaperRect.bottom(); y += wh) {
for (int x = m_WallpaperRect.left(); x < m_WallpaperRect.right(); x += ww) {
- blend(m_Image, QRect(x, y, ww, wh), m_Wallpaper,
- QPoint(-QMIN(x, 0), -QMIN(y, 0)), blendFactor);
+ blend(m_Image, TQRect(x, y, ww, wh), m_Wallpaper,
+ TQPoint(-QMIN(x, 0), -QMIN(y, 0)), blendFactor);
}
}
}
@@ -714,10 +714,10 @@ void KBackgroundRenderer::fullWallpaperBlend()
}
/* Alpha blend an area from <src> with offset <soffs> to rectangle <dr> of <dst>
- * Default offset is QPoint(0, 0).
+ * Default offset is TQPoint(0, 0).
* blendfactor = [0, 100%]
*/
-void KBackgroundRenderer::blend(QImage& dst, QRect dr, const QImage& src, QPoint soffs, int blendFactor)
+void KBackgroundRenderer::blend(TQImage& dst, TQRect dr, const TQImage& src, TQPoint soffs, int blendFactor)
{
int x, y, a;
dr &= dst.rect();
@@ -785,17 +785,17 @@ void KBackgroundRenderer::render()
return;
if( !(m_State & InitCheck)) {
- QString f = cacheFileName();
+ TQString f = cacheFileName();
if( useCacheFile()) {
- QString w = m_pDirs->findResource("wallpaper", currentWallpaper());
- QFileInfo wi( w );
- QFileInfo fi( f );
+ TQString w = m_pDirs->findResource("wallpaper", currentWallpaper());
+ TQFileInfo wi( w );
+ TQFileInfo fi( f );
if( wi.lastModified().isValid() && fi.lastModified().isValid()
&& wi.lastModified() < fi.lastModified()) {
- QImage im;
+ TQImage im;
if( im.load( f, "PNG" )) {
m_Image = im;
- m_Pixmap = QPixmap( m_Size );
+ m_Pixmap = TQPixmap( m_Size );
m_Pixmap.convertFromImage( m_Image );
m_Cached = true;
m_State |= InitCheck | BackgroundDone | WallpaperDone;
@@ -857,9 +857,9 @@ void KBackgroundRenderer::setBusyCursor(bool isBusy) {
return;
m_isBusyCursor = isBusy;
if(isBusy)
- QApplication::setOverrideCursor( KCursor::workingCursor() );
+ TQApplication::setOverrideCursor( KCursor::workingCursor() );
else
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
/*
@@ -882,18 +882,18 @@ void KBackgroundRenderer::stop()
void KBackgroundRenderer::cleanup()
{
setBusyCursor(false);
- m_Background = QImage();
- m_Image = QImage();
- m_Pixmap = QPixmap();
- m_Wallpaper = QImage();
+ m_Background = TQImage();
+ m_Image = TQImage();
+ m_Pixmap = TQPixmap();
+ m_Wallpaper = TQImage();
delete m_pProc; m_pProc = 0L;
m_State = 0;
- m_WallpaperRect = QRect();
+ m_WallpaperRect = TQRect();
m_Cached = false;
}
-void KBackgroundRenderer::setPreview(const QSize &size)
+void KBackgroundRenderer::setPreview(const TQSize &size)
{
if (size.isNull())
m_bPreview = false;
@@ -904,24 +904,24 @@ void KBackgroundRenderer::setPreview(const QSize &size)
}
-QPixmap KBackgroundRenderer::pixmap()
+TQPixmap KBackgroundRenderer::pixmap()
{
if (m_State & AllDone) {
if( m_Pixmap.isNull())
m_Pixmap.convertFromImage( m_Image );
return m_Pixmap;
}
- return QPixmap();
+ return TQPixmap();
}
-QImage KBackgroundRenderer::image()
+TQImage KBackgroundRenderer::image()
{
if (m_State & AllDone) {
if( m_Image.isNull())
fullWallpaperBlend(); // create from m_Pixmap
return m_Image;
}
- return QImage();
+ return TQImage();
}
@@ -943,12 +943,12 @@ void KBackgroundRenderer::createTempFile()
m_Tempfile = new KTempFile();
}
-QString KBackgroundRenderer::cacheFileName()
+TQString KBackgroundRenderer::cacheFileName()
{
- QString f = fingerprint();
+ TQString f = fingerprint();
f.replace ( ':', '_' ); // avoid characters that shouldn't be in filenames
f.replace ( '/', '#' );
- f = locateLocal( "cache", QString( "background/%1x%2_%3.png" )
+ f = locateLocal( "cache", TQString( "background/%1x%2_%3.png" )
.arg( m_Size.width()).arg( m_Size.height()).arg( f ));
return f;
}
@@ -961,7 +961,7 @@ bool KBackgroundRenderer::useCacheFile() const
return false; // don't cache these at all
if( wallpaperMode() == NoWallpaper )
return false; // generating only background patterns should be always faster
- QString file = currentWallpaper();
+ TQString file = currentWallpaper();
if( file.endsWith(".svg") || file.endsWith(".svgz"))
return true; // cache these, they can be bloody slow
switch( backgroundMode())
@@ -989,21 +989,21 @@ void KBackgroundRenderer::saveCacheFile()
return;
if( m_Image.isNull())
fullWallpaperBlend(); // generate from m_Pixmap
- QString f = cacheFileName();
+ TQString f = cacheFileName();
if( KStandardDirs::exists( f ) || m_Cached )
- utime( QFile::encodeName( f ), NULL );
+ utime( TQFile::encodeName( f ), NULL );
else {
m_Image.save( f, "PNG" );
// remove old entries from the cache
- QDir dir( locateLocal( "cache", "background/" ));
- if( const QFileInfoList* list = dir.entryInfoList( "*.png", QDir::Files, QDir::Time | QDir::Reversed )) {
+ TQDir dir( locateLocal( "cache", "background/" ));
+ if( const QFileInfoList* list = dir.entryInfoList( "*.png", TQDir::Files, TQDir::Time | TQDir::Reversed )) {
int size = 0;
for( QFileInfoListIterator it( *list );
- QFileInfo* info = it.current();
+ TQFileInfo* info = it.current();
++it )
size += info->size();
for( QFileInfoListIterator it( *list );
- QFileInfo* info = it.current();
+ TQFileInfo* info = it.current();
++it ) {
if( size < 8 * 1024 * 1024 )
break;
@@ -1012,7 +1012,7 @@ void KBackgroundRenderer::saveCacheFile()
&& ( time_t ) info->lastModified().toTime_t() >= time( NULL ) - 10 * 60 )
break;
size -= info->size();
- QFile::remove( info->absFilePath());
+ TQFile::remove( info->absFilePath());
}
}
}
@@ -1032,7 +1032,7 @@ KVirtualBGRenderer::KVirtualBGRenderer( int desk, KConfig *config )
int screen_number = 0;
if (qt_xdisplay())
screen_number = DefaultScreen(qt_xdisplay());
- QCString configname;
+ TQCString configname;
if (screen_number == 0)
configname = "kdesktoprc";
else
@@ -1067,7 +1067,7 @@ KBackgroundRenderer * KVirtualBGRenderer::renderer(unsigned screen)
}
-QPixmap KVirtualBGRenderer::pixmap()
+TQPixmap KVirtualBGRenderer::pixmap()
{
if (m_numRenderers == 1)
return m_renderer[0]->pixmap();
@@ -1123,7 +1123,7 @@ void KVirtualBGRenderer::changeWallpaper()
int KVirtualBGRenderer::hash()
{
- QString fp;
+ TQString fp;
for (unsigned i=0; i<m_numRenderers; ++i)
{
fp += m_renderer[i]->fingerprint();
@@ -1158,7 +1158,7 @@ void KVirtualBGRenderer::desktopResized()
if (m_pPixmap)
{
delete m_pPixmap;
- m_pPixmap = new QPixmap(m_size);
+ m_pPixmap = new TQPixmap(m_size);
m_pPixmap->fill(Qt::black);
}
@@ -1166,7 +1166,7 @@ void KVirtualBGRenderer::desktopResized()
}
-void KVirtualBGRenderer::setPreview(const QSize & size)
+void KVirtualBGRenderer::setPreview(const TQSize & size)
{
if (m_size == size)
return;
@@ -1177,22 +1177,22 @@ void KVirtualBGRenderer::setPreview(const QSize & size)
m_pPixmap->resize(m_size);
// Scaling factors
- m_scaleX = float(m_size.width()) / float(QApplication::desktop()->size().width());
- m_scaleY = float(m_size.height()) / float(QApplication::desktop()->size().height());
+ m_scaleX = float(m_size.width()) / float(TQApplication::desktop()->size().width());
+ m_scaleY = float(m_size.height()) / float(TQApplication::desktop()->size().height());
// Scale renderers appropriately
for (unsigned i=0; i<m_renderer.size(); ++i)
{
- QSize unscaledRendererSize = renderSize(i);
+ TQSize unscaledRendererSize = renderSize(i);
- m_renderer[i]->setPreview( QSize(
+ m_renderer[i]->setPreview( TQSize(
int(unscaledRendererSize.width() * m_scaleX),
int(unscaledRendererSize.height() * m_scaleY) ) );
}
}
-QSize KVirtualBGRenderer::renderSize(int screen)
+TQSize KVirtualBGRenderer::renderSize(int screen)
{
return m_bDrawBackgroundPerScreen ? KApplication::desktop()->screenGeometry(screen).size() : KApplication::desktop()->geometry().size();
}
@@ -1201,7 +1201,7 @@ QSize KVirtualBGRenderer::renderSize(int screen)
void KVirtualBGRenderer::initRenderers()
{
m_pConfig->setGroup("Background Common");
- m_bDrawBackgroundPerScreen = m_pConfig->readBoolEntry( QString("DrawBackgroundPerScreen_%1").arg(m_desk), _defDrawBackgroundPerScreen );
+ m_bDrawBackgroundPerScreen = m_pConfig->readBoolEntry( TQString("DrawBackgroundPerScreen_%1").arg(m_desk), _defDrawBackgroundPerScreen );
m_bCommonScreen = m_pConfig->readBoolEntry("CommonScreen", _defCommonScreen);
@@ -1223,7 +1223,7 @@ void KVirtualBGRenderer::initRenderers()
KBackgroundRenderer * r = new KBackgroundRenderer( m_desk, eScreen, m_bDrawBackgroundPerScreen, m_pConfig );
m_renderer.insert( i, r );
r->setSize(renderSize(i));
- connect( r, SIGNAL(imageDone(int,int)), this, SLOT(screenDone(int,int)) );
+ connect( r, TQT_SIGNAL(imageDone(int,int)), this, TQT_SLOT(screenDone(int,int)) );
}
}
@@ -1263,21 +1263,21 @@ void KVirtualBGRenderer::screenDone(int _desk, int _screen)
{
// There's more than one renderer, so we are drawing each output to our own pixmap
- QRect overallGeometry;
+ TQRect overallGeometry;
for (int i=0; i < KApplication::desktop()->numScreens(); ++i) {
overallGeometry |= KApplication::desktop()->screenGeometry(i);
}
- QPoint drawPos = KApplication::desktop()->screenGeometry(screen).topLeft() - overallGeometry.topLeft();
+ TQPoint drawPos = KApplication::desktop()->screenGeometry(screen).topLeft() - overallGeometry.topLeft();
drawPos.setX( int(drawPos.x() * m_scaleX) );
drawPos.setY( int(drawPos.y() * m_scaleY) );
- QPixmap source = m_renderer[screen]->pixmap();
- QSize renderSize = this->renderSize(screen);
+ TQPixmap source = m_renderer[screen]->pixmap();
+ TQSize renderSize = this->renderSize(screen);
renderSize.setWidth( int(renderSize.width() * m_scaleX) );
renderSize.setHeight( int(renderSize.height() * m_scaleY) );
- QPainter p(m_pPixmap);
+ TQPainter p(m_pPixmap);
if (renderSize == source.size())
p.drawPixmap( drawPos, source );
@@ -1308,7 +1308,7 @@ void KVirtualBGRenderer::start()
if (m_numRenderers > 1)
{
- m_pPixmap = new QPixmap(m_size);
+ m_pPixmap = new TQPixmap(m_size);
// If are screen sizes do not properly tile the overall virtual screen
// size, then we want the untiled parts to be black for use in desktop
// previews, etc
diff --git a/kcontrol/background/bgrender.h b/kcontrol/background/bgrender.h
index 39e00ff5d..055512618 100644
--- a/kcontrol/background/bgrender.h
+++ b/kcontrol/background/bgrender.h
@@ -11,10 +11,10 @@
#ifndef BGRender_h_Included
#define BGRender_h_Included
-#include <qobject.h>
-#include <qptrvector.h>
-#include <qimage.h>
-#include <qpixmap.h>
+#include <tqobject.h>
+#include <tqptrvector.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
#include "bgsettings.h"
@@ -30,13 +30,13 @@ class KShellProcess;
class KStandardDirs;
/**
- * This class renders a desktop background to a QImage. The operation is
+ * This class renders a desktop background to a TQImage. The operation is
* asynchronous: connect to the signal imageDone() to find out when the
* rendering is finished. It also has support for preview images, like
* the monitor in kcmdisplay.
*/
class KBackgroundRenderer:
- public QObject,
+ public TQObject,
public KBackgroundSettings
{
Q_OBJECT
@@ -47,11 +47,11 @@ public:
void load(int desk, int screen, bool drawBackgroundPerScreen, bool reparseConfig=true);
- void setPreview(const QSize &size);
- void setSize(const QSize &size);
+ void setPreview(const TQSize &size);
+ void setSize(const TQSize &size);
- QPixmap pixmap();
- QImage image();
+ TQPixmap pixmap();
+ TQImage image();
bool isActive() { return m_State & Rendering; }
void cleanup();
void saveCacheFile();
@@ -79,10 +79,10 @@ private:
WallpaperStarted = 0x10, WallpaperDone = 0x20,
AllDone = 0x40 };
- QString buildCommand();
+ TQString buildCommand();
void createTempFile();
- void tile(QImage& dst, QRect rect, const QImage& src);
- void blend(QImage& dst, QRect dr, const QImage& src, QPoint soffs = QPoint(0, 0), int blendFactor=100);
+ void tile(TQImage& dst, TQRect rect, const TQImage& src);
+ void blend(TQImage& dst, TQRect dr, const TQImage& src, TQPoint soffs = TQPoint(0, 0), int blendFactor=100);
void wallpaperBlend();
void fastWallpaperBlend();
@@ -91,7 +91,7 @@ private:
int doBackground(bool quit=false);
int doWallpaper(bool quit=false);
void setBusyCursor(bool isBusy);
- QString cacheFileName();
+ TQString cacheFileName();
bool useCacheFile() const;
bool canTile() const;
@@ -103,11 +103,11 @@ private:
bool m_TilingEnabled;
KTempFile* m_Tempfile;
- QSize m_Size, m_rSize;
- QRect m_WallpaperRect;
- QImage m_Image, m_Background, m_Wallpaper;
- QPixmap m_Pixmap;
- QTimer *m_pTimer;
+ TQSize m_Size, m_rSize;
+ TQRect m_WallpaperRect;
+ TQImage m_Image, m_Background, m_Wallpaper;
+ TQPixmap m_Pixmap;
+ TQTimer *m_pTimer;
KStandardDirs *m_pDirs;
KShellProcess *m_pProc;
@@ -130,9 +130,9 @@ public:
KBackgroundRenderer * renderer(unsigned screen);
unsigned numRenderers() const { return m_numRenderers; }
- QPixmap pixmap();
+ TQPixmap pixmap();
- void setPreview(const QSize & size);
+ void setPreview(const TQSize & size);
bool needProgramUpdate();
void programUpdate();
@@ -159,7 +159,7 @@ private slots:
void screenDone(int desk, int screen);
private:
- QSize renderSize(int screen); // the size the renderer should be
+ TQSize renderSize(int screen); // the size the renderer should be
void initRenderers();
KConfig *m_pConfig;
@@ -170,11 +170,11 @@ private:
bool m_bDrawBackgroundPerScreen;
bool m_bCommonScreen;
bool m_bDeleteConfig;
- QSize m_size;
+ TQSize m_size;
- QMemArray<bool> m_bFinished;
- QPtrVector<KBackgroundRenderer> m_renderer;
- QPixmap *m_pPixmap;
+ TQMemArray<bool> m_bFinished;
+ TQPtrVector<KBackgroundRenderer> m_renderer;
+ TQPixmap *m_pPixmap;
};
diff --git a/kcontrol/background/bgsettings.cpp b/kcontrol/background/bgsettings.cpp
index 9b657393f..8d3bdac0f 100644
--- a/kcontrol/background/bgsettings.cpp
+++ b/kcontrol/background/bgsettings.cpp
@@ -17,8 +17,8 @@
#undef Bool
#undef Unsorted
-#include <qdir.h>
-#include <qpixmap.h>
+#include <tqdir.h>
+#include <tqpixmap.h>
#include <dcopclient.h>
#include <kapplication.h>
@@ -37,7 +37,7 @@
/**** KBackgroundPattern ****/
-KBackgroundPattern::KBackgroundPattern(QString name)
+KBackgroundPattern::KBackgroundPattern(TQString name)
{
dirty = false;
hashdirty = true;
@@ -70,7 +70,7 @@ void KBackgroundPattern::copyConfig(const KBackgroundPattern *settings)
m_File = settings->m_File;
}
-void KBackgroundPattern::load(QString name)
+void KBackgroundPattern::load(TQString name)
{
m_Name = name;
init();
@@ -91,12 +91,12 @@ void KBackgroundPattern::init(bool force_rw)
m_pConfig->setGroup("KDE Desktop Pattern");
- QFileInfo fi(m_File);
+ TQFileInfo fi(m_File);
m_bReadOnly = !fi.isWritable();
}
-void KBackgroundPattern::setComment(const QString &comment)
+void KBackgroundPattern::setComment(const TQString &comment)
{
if (m_Comment == comment)
return;
@@ -105,7 +105,7 @@ void KBackgroundPattern::setComment(const QString &comment)
}
-void KBackgroundPattern::setPattern(QString pattern)
+void KBackgroundPattern::setPattern(TQString pattern)
{
if (m_Pattern == pattern)
return;
@@ -147,10 +147,10 @@ bool KBackgroundPattern::isAvailable()
{
if (m_Pattern.isEmpty())
return false;
- QString file = m_Pattern;
+ TQString file = m_Pattern;
if (file.at(0) != '/')
file = m_pDirs->findResource("dtop_pattern", file);
- QFileInfo fi(file);
+ TQFileInfo fi(file);
return (fi.exists());
}
@@ -159,11 +159,11 @@ bool KBackgroundPattern::remove()
{
if (m_bReadOnly)
return false;
- return !unlink(QFile::encodeName(m_File));
+ return !unlink(TQFile::encodeName(m_File));
}
-QString KBackgroundPattern::fingerprint()
+TQString KBackgroundPattern::fingerprint()
{
return m_File;
}
@@ -180,14 +180,14 @@ int KBackgroundPattern::hash()
/* static */
-QStringList KBackgroundPattern::list()
+TQStringList KBackgroundPattern::list()
{
KStandardDirs *dirs = KGlobal::dirs();
dirs->addResourceType("dtop_pattern", dirs->kde_default("data") +
"kdesktop/patterns");
- QStringList lst = dirs->findAllResources("dtop_pattern", "*.desktop",
+ TQStringList lst = dirs->findAllResources("dtop_pattern", "*.desktop",
false, true);
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for (it=lst.begin(); it!=lst.end(); ++it) {
// Strip path and suffix
int pos = (*it).findRev('/');
@@ -204,7 +204,7 @@ QStringList KBackgroundPattern::list()
/**** KBackgroundProgram ****/
-KBackgroundProgram::KBackgroundProgram(QString name)
+KBackgroundProgram::KBackgroundProgram(TQString name)
{
dirty = false;
hashdirty = true;
@@ -262,7 +262,7 @@ void KBackgroundProgram::init(bool force_rw)
}
-void KBackgroundProgram::load(const QString &name)
+void KBackgroundProgram::load(const TQString &name)
{
m_Name = name;
init();
@@ -270,7 +270,7 @@ void KBackgroundProgram::load(const QString &name)
}
-void KBackgroundProgram::setComment(const QString &comment)
+void KBackgroundProgram::setComment(const TQString &comment)
{
if (m_Comment == comment)
return;
@@ -279,7 +279,7 @@ void KBackgroundProgram::setComment(const QString &comment)
}
-void KBackgroundProgram::setExecutable(const QString &executable)
+void KBackgroundProgram::setExecutable(const TQString &executable)
{
if (m_Executable == executable)
return;
@@ -288,7 +288,7 @@ void KBackgroundProgram::setExecutable(const QString &executable)
}
-void KBackgroundProgram::setCommand(const QString &command)
+void KBackgroundProgram::setCommand(const TQString &command)
{
if (m_Command == command)
return;
@@ -297,7 +297,7 @@ void KBackgroundProgram::setCommand(const QString &command)
}
-void KBackgroundProgram::setPreviewCommand(const QString &command)
+void KBackgroundProgram::setPreviewCommand(const TQString &command)
{
if (m_PreviewCommand == command)
return;
@@ -358,7 +358,7 @@ bool KBackgroundProgram::remove()
{
if (m_bReadOnly)
return false;
- return !unlink(QFile::encodeName(m_File));
+ return !unlink(TQFile::encodeName(m_File));
}
@@ -374,9 +374,9 @@ void KBackgroundProgram::update()
}
-QString KBackgroundProgram::fingerprint()
+TQString KBackgroundProgram::fingerprint()
{
- return QString("co:%1;re:%2").arg(m_Command).arg(m_Refresh);
+ return TQString("co:%1;re:%2").arg(m_Command).arg(m_Refresh);
}
@@ -391,14 +391,14 @@ int KBackgroundProgram::hash()
/* static */
-QStringList KBackgroundProgram::list()
+TQStringList KBackgroundProgram::list()
{
KStandardDirs *dirs = KGlobal::dirs();
dirs->addResourceType("dtop_program", dirs->kde_default("data") +
"kdesktop/programs");
- QStringList lst = dirs->findAllResources("dtop_program", "*.desktop",
+ TQStringList lst = dirs->findAllResources("dtop_program", "*.desktop",
false, true);
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for (it=lst.begin(); it!=lst.end(); ++it) {
// Strip path and suffix
int pos = (*it).findRev('/');
@@ -428,7 +428,7 @@ KBackgroundSettings::KBackgroundSettings(int desk, int screen, bool drawBackgrou
// Default values.
defColorA = _defColorA;
defColorB = _defColorB;
- if (QPixmap::defaultDepth() > 8)
+ if (TQPixmap::defaultDepth() > 8)
defBackgroundMode = _defBackgroundMode;
else
defBackgroundMode = Flat;
@@ -495,7 +495,7 @@ KBackgroundSettings::KBackgroundSettings(int desk, int screen, bool drawBackgrou
int screen_number = 0;
if (qt_xdisplay())
screen_number = DefaultScreen(qt_xdisplay());
- QCString configname;
+ TQCString configname;
if (screen_number == 0)
configname = "kdesktoprc";
else
@@ -558,7 +558,7 @@ void KBackgroundSettings::load(int desk, int screen, bool drawBackgroundPerScree
}
-void KBackgroundSettings::setColorA(const QColor& color)
+void KBackgroundSettings::setColorA(const TQColor& color)
{
if (m_ColorA == color)
return;
@@ -567,7 +567,7 @@ void KBackgroundSettings::setColorA(const QColor& color)
}
-void KBackgroundSettings::setColorB(const QColor& color)
+void KBackgroundSettings::setColorB(const TQColor& color)
{
if (m_ColorB == color)
return;
@@ -576,7 +576,7 @@ void KBackgroundSettings::setColorB(const QColor& color)
}
-void KBackgroundSettings::setPatternName(QString name)
+void KBackgroundSettings::setPatternName(TQString name)
{
int ohash = KBackgroundPattern::hash();
KBackgroundPattern::load(name);
@@ -588,7 +588,7 @@ void KBackgroundSettings::setPatternName(QString name)
}
-void KBackgroundSettings::setProgram(QString name)
+void KBackgroundSettings::setProgram(TQString name)
{
int ohash = KBackgroundProgram::hash();
KBackgroundProgram::load(name);
@@ -633,7 +633,7 @@ void KBackgroundSettings::setReverseBlending(bool value)
}
-void KBackgroundSettings::setWallpaper(QString wallpaper)
+void KBackgroundSettings::setWallpaper(TQString wallpaper)
{
dirty = hashdirty = true;
m_Wallpaper = wallpaper;
@@ -649,7 +649,7 @@ void KBackgroundSettings::setWallpaperMode(int mode)
}
-void KBackgroundSettings::setWallpaperList(QStringList list)
+void KBackgroundSettings::setWallpaperList(TQStringList list)
{
KStandardDirs *d = KGlobal::dirs();
if (m_WallpaperList == list)
@@ -657,10 +657,10 @@ void KBackgroundSettings::setWallpaperList(QStringList list)
dirty = hashdirty = true;
m_WallpaperList.clear();
- for(QStringList::ConstIterator it = list.begin();
+ for(TQStringList::ConstIterator it = list.begin();
it != list.end(); ++it)
{
- QString rpath = d->relativeLocation("wallpaper", *it);
+ TQString rpath = d->relativeLocation("wallpaper", *it);
m_WallpaperList.append( !rpath.isEmpty() ? rpath : *it );
}
updateWallpaperFiles();
@@ -704,9 +704,9 @@ bool KBackgroundSettings::optimize() const
case AlwaysOpt :
return true;
case Opt16bpp :
- return QPixmap::defaultDepth() >= 16;
+ return TQPixmap::defaultDepth() >= 16;
case Opt15bpp :
- return QPixmap::defaultDepth() >= 15;
+ return TQPixmap::defaultDepth() >= 15;
case NeverOpt :
default :
return false;
@@ -721,12 +721,12 @@ void KBackgroundSettings::setUseShm(bool use)
m_bShm = use;
}
-QString KBackgroundSettings::configGroupName() const
+TQString KBackgroundSettings::configGroupName() const
{
- QString screenName;
+ TQString screenName;
if (m_bDrawBackgroundPerScreen)
- screenName = QString("Screen%1").arg(QString::number(m_Screen));
- return QString("Desktop%1%2").arg(m_Desk).arg(screenName);
+ screenName = TQString("Screen%1").arg(TQString::number(m_Screen));
+ return TQString("Desktop%1%2").arg(m_Desk).arg(screenName);
}
void KBackgroundSettings::readSettings(bool reparse)
@@ -740,7 +740,7 @@ void KBackgroundSettings::readSettings(bool reparse)
m_ColorA = m_pConfig->readColorEntry("Color1", &defColorA);
m_ColorB = m_pConfig->readColorEntry("Color2", &defColorB);
- QString s = m_pConfig->readPathEntry("Pattern");
+ TQString s = m_pConfig->readPathEntry("Pattern");
if (!s.isEmpty())
KBackgroundPattern::load(s);
@@ -853,25 +853,25 @@ void KBackgroundSettings::writeSettings()
*/
void KBackgroundSettings::updateWallpaperFiles()
{
- QStringList::Iterator it;
+ TQStringList::Iterator it;
m_WallpaperFiles.clear();
for (it=m_WallpaperList.begin(); it!=m_WallpaperList.end(); ++it) {
- QString file = locate("wallpaper", *it);
+ TQString file = locate("wallpaper", *it);
if (file.isEmpty())
continue;
- QFileInfo fi(file);
+ TQFileInfo fi(file);
if (!fi.exists())
continue;
if (fi.isFile() && fi.isReadable())
m_WallpaperFiles.append(file);
if (fi.isDir()) {
- QDir dir(file);
- QStringList lst = dir.entryList(QDir::Files | QDir::Readable);
- QStringList::Iterator it;
+ TQDir dir(file);
+ TQStringList lst = dir.entryList(TQDir::Files | TQDir::Readable);
+ TQStringList::Iterator it;
for (it=lst.begin(); it!=lst.end(); ++it)
{
file = dir.absFilePath(*it);
- QFileInfo fi(file);
+ TQFileInfo fi(file);
if (fi.isFile() && fi.isReadable())
m_WallpaperFiles.append(file);
}
@@ -889,8 +889,8 @@ void KBackgroundSettings::randomizeWallpaperFiles()
return;
KRandomSequence rseq;
- QStringList tmpList = m_WallpaperFiles;
- QStringList randomList;
+ TQStringList tmpList = m_WallpaperFiles;
+ TQStringList randomList;
randomList.append(tmpList.front());
tmpList.pop_front();
while(tmpList.count())
@@ -904,21 +904,21 @@ void KBackgroundSettings::randomizeWallpaperFiles()
m_WallpaperFiles = randomList;
}
-QStringList KBackgroundSettings::wallpaperList() const
+TQStringList KBackgroundSettings::wallpaperList() const
{
if ( m_WallpaperMode == NoWallpaper )
- return QStringList();
+ return TQStringList();
if ( m_MultiMode == NoMulti || m_MultiMode == NoMultiRandom )
- return QStringList(m_Wallpaper);
+ return TQStringList(m_Wallpaper);
return m_WallpaperList;
}
-QStringList KBackgroundSettings::wallpaperFiles() const
+TQStringList KBackgroundSettings::wallpaperFiles() const
{
if ( m_WallpaperMode == NoWallpaper )
- return QStringList();
+ return TQStringList();
if ( m_MultiMode == NoMulti || m_MultiMode == NoMultiRandom )
- return QStringList(m_Wallpaper);
+ return TQStringList(m_Wallpaper);
return m_WallpaperFiles;
}
@@ -930,7 +930,7 @@ void KBackgroundSettings::changeWallpaper(bool init)
if (m_WallpaperFiles.count() == 0) {
if( init ) {
m_CurrentWallpaper = 0;
- m_CurrentWallpaperName = QString();
+ m_CurrentWallpaperName = TQString();
}
return;
}
@@ -967,16 +967,16 @@ void KBackgroundSettings::changeWallpaper(bool init)
}
-QString KBackgroundSettings::currentWallpaper() const
+TQString KBackgroundSettings::currentWallpaper() const
{
if ( m_WallpaperMode == NoWallpaper )
- return QString::null;
+ return TQString::null;
if (m_MultiMode == NoMulti || m_MultiMode == NoMultiRandom)
return m_Wallpaper;
if (m_CurrentWallpaper >= 0 && m_CurrentWallpaper < (int) m_WallpaperFiles.count())
return m_WallpaperFiles[m_CurrentWallpaper];
- return QString::null;
+ return TQString::null;
}
bool KBackgroundSettings::discardCurrentWallpaper()
@@ -1007,39 +1007,39 @@ bool KBackgroundSettings::needWallpaperChange()
* that only a different final result will give a different fingerprint.
*/
-QString KBackgroundSettings::fingerprint()
+TQString KBackgroundSettings::fingerprint()
{
- QString s = QString("bm:%1;en:%2").arg(m_BackgroundMode).arg(m_bEnabled);
+ TQString s = TQString("bm:%1;en:%2").arg(m_BackgroundMode).arg(m_bEnabled);
switch (m_BackgroundMode) {
case Flat:
- s += QString("ca:%1;").arg(m_ColorA.rgb());
+ s += TQString("ca:%1;").arg(m_ColorA.rgb());
break;
case Program:
- s += QString("pr:%1;").arg(KBackgroundProgram::hash());
+ s += TQString("pr:%1;").arg(KBackgroundProgram::hash());
break;
case Pattern:
- s += QString("ca:%1;cb:%2;pt:%3;").arg(m_ColorA.rgb())
+ s += TQString("ca:%1;cb:%2;pt:%3;").arg(m_ColorA.rgb())
.arg(m_ColorB.rgb()).arg(KBackgroundPattern::hash());
break;
default:
- s += QString("ca:%1;cb:%2;").arg(m_ColorA.rgb()).arg(m_ColorB.rgb());
+ s += TQString("ca:%1;cb:%2;").arg(m_ColorA.rgb()).arg(m_ColorB.rgb());
break;
}
- s += QString("wm:%1;").arg(m_WallpaperMode);
+ s += TQString("wm:%1;").arg(m_WallpaperMode);
if (m_WallpaperMode != NoWallpaper)
{
Q_UINT32 rh = KGlobal::dirs()->calcResourceHash("wallpaper", currentWallpaper(), false);
- s += QString("wp:%2:%1;").arg(rh).arg(currentWallpaper());
+ s += TQString("wp:%2:%1;").arg(rh).arg(currentWallpaper());
}
- s += QString("blm:%1;").arg(m_BlendMode);
+ s += TQString("blm:%1;").arg(m_BlendMode);
if (m_BlendMode != NoBlending) {
- s += QString("blb:%1;").arg(m_BlendBalance);
- s += QString("rbl:%1;").arg(int(m_ReverseBlending));
+ s += TQString("blb:%1;").arg(m_BlendBalance);
+ s += TQString("rbl:%1;").arg(int(m_ReverseBlending));
}
- s += QString::number( m_bShm );
- s += QString::number( m_MinOptimizationDepth );
+ s += TQString::number( m_bShm );
+ s += TQString::number( m_MinOptimizationDepth );
return s;
}
@@ -1073,14 +1073,14 @@ KGlobalBackgroundSettings::KGlobalBackgroundSettings(KConfig *_config)
}
-QString KGlobalBackgroundSettings::deskName(int desk)
+TQString KGlobalBackgroundSettings::deskName(int desk)
{
return m_Names[desk];
}
/*
-void KGlobalBackgroundSettings::setDeskName(int desk, QString name)
+void KGlobalBackgroundSettings::setDeskName(int desk, TQString name)
{
if (name == m_Names[desk])
return;
@@ -1164,7 +1164,7 @@ void KGlobalBackgroundSettings::setExportBackground(bool _export)
m_bExport = _export;
}
-void KGlobalBackgroundSettings::setTextColor(QColor _color)
+void KGlobalBackgroundSettings::setTextColor(TQColor _color)
{
if (_color == m_TextColor)
return;
@@ -1172,7 +1172,7 @@ void KGlobalBackgroundSettings::setTextColor(QColor _color)
m_TextColor = _color;
}
-void KGlobalBackgroundSettings::setTextBackgroundColor(QColor _color)
+void KGlobalBackgroundSettings::setTextBackgroundColor(TQColor _color)
{
if (_color == m_TextBackgroundColor)
return;
@@ -1218,7 +1218,7 @@ void KGlobalBackgroundSettings::readSettings()
NETRootInfo info( qt_xdisplay(), NET::DesktopNames | NET::NumberOfDesktops );
m_bDrawBackgroundPerScreen.resize(info.numberOfDesktops());
for ( int i = 0 ; i < info.numberOfDesktops() ; ++i )
- m_bDrawBackgroundPerScreen[i] = m_pConfig->readBoolEntry( QString("DrawBackgroundPerScreen_%1").arg(i), _defDrawBackgroundPerScreen );
+ m_bDrawBackgroundPerScreen[i] = m_pConfig->readBoolEntry( TQString("DrawBackgroundPerScreen_%1").arg(i), _defDrawBackgroundPerScreen );
m_TextColor = KGlobalSettings::textColor();
m_pConfig->setGroup("FMSettings");
@@ -1229,7 +1229,7 @@ void KGlobalBackgroundSettings::readSettings()
m_textWidth = m_pConfig->readNumEntry("TextWidth", DEFAULT_TEXTWIDTH);
for ( int i = 0 ; i < info.numberOfDesktops() ; ++i )
- m_Names.append( QString::fromUtf8(info.desktopName(i+1)) );
+ m_Names.append( TQString::fromUtf8(info.desktopName(i+1)) );
dirty = false;
}
@@ -1248,7 +1248,7 @@ void KGlobalBackgroundSettings::writeSettings()
m_pConfig->writeEntry("CacheSize", m_CacheSize);
for ( unsigned i = 0 ; i < m_bDrawBackgroundPerScreen.size() ; ++i )
- m_pConfig->writeEntry(QString("DrawBackgroundPerScreen_%1").arg(i), m_bDrawBackgroundPerScreen[i] );
+ m_pConfig->writeEntry(TQString("DrawBackgroundPerScreen_%1").arg(i), m_bDrawBackgroundPerScreen[i] );
m_pConfig->setGroup("FMSettings");
m_pConfig->writeEntry("NormalTextColor", m_TextColor);
@@ -1261,7 +1261,7 @@ void KGlobalBackgroundSettings::writeSettings()
dirty = false;
// tell kdesktop to get it's butt in gear and pick up the new settings
- QByteArray data;
+ TQByteArray data;
kapp->dcopClient()->send("kdesktop", "KDesktopIface", "configure()", data);
}
diff --git a/kcontrol/background/bgsettings.h b/kcontrol/background/bgsettings.h
index 928f66360..bdf971c3c 100644
--- a/kcontrol/background/bgsettings.h
+++ b/kcontrol/background/bgsettings.h
@@ -12,11 +12,11 @@
#define __BGSettings_h_Included__
-#include <qstringlist.h>
-#include <qcolor.h>
-#include <qvaluevector.h>
+#include <tqstringlist.h>
+#include <tqcolor.h>
+#include <tqvaluevector.h>
-template <class QString, class T> class QMap;
+template <class TQString, class T> class QMap;
class KStandardDirs;
class KSimpleConfig;
class KConfig;
@@ -32,19 +32,19 @@ class QImage;
class KBackgroundPattern
{
public:
- KBackgroundPattern(QString name=QString::null);
+ KBackgroundPattern(TQString name=TQString::null);
~KBackgroundPattern();
void copyConfig(const KBackgroundPattern*);
- QString name() const { return m_Name; }
- void load(QString name);
+ TQString name() const { return m_Name; }
+ void load(TQString name);
- void setComment(const QString &comment);
- QString comment() const {return m_Comment; }
+ void setComment(const TQString &comment);
+ TQString comment() const {return m_Comment; }
- void setPattern(QString file);
- QString pattern() const { return m_Pattern; }
+ void setPattern(TQString file);
+ TQString pattern() const { return m_Pattern; }
void readSettings();
void writeSettings();
@@ -55,17 +55,17 @@ public:
int hash();
- static QStringList list();
+ static TQStringList list();
private:
void init(bool force_rw=false);
- QString fingerprint();
+ TQString fingerprint();
bool dirty, hashdirty;
bool m_bReadOnly;
int m_Hash;
- QString m_Name, m_Comment;
- QString m_Pattern, m_File;
+ TQString m_Name, m_Comment;
+ TQString m_Pattern, m_File;
KStandardDirs *m_pDirs;
KSimpleConfig *m_pConfig;
};
@@ -90,28 +90,28 @@ private:
class KBackgroundProgram
{
public:
- KBackgroundProgram(QString name=QString::null);
+ KBackgroundProgram(TQString name=TQString::null);
~KBackgroundProgram();
void copyConfig(const KBackgroundProgram*);
- QString name()const { return m_Name; }
- void load(const QString & name);
+ TQString name()const { return m_Name; }
+ void load(const TQString & name);
- void setComment(const QString &comment);
- QString comment()const { return m_Comment; }
+ void setComment(const TQString &comment);
+ TQString comment()const { return m_Comment; }
- void setCommand(const QString &command);
- QString command()const { return m_Command; }
+ void setCommand(const TQString &command);
+ TQString command()const { return m_Command; }
- void setPreviewCommand(const QString &command);
- QString previewCommand()const { return m_PreviewCommand; }
+ void setPreviewCommand(const TQString &command);
+ TQString previewCommand()const { return m_PreviewCommand; }
void setRefresh(int refresh);
int refresh()const { return m_Refresh; }
- void setExecutable(const QString &executable);
- QString executable()const { return m_Executable; }
+ void setExecutable(const TQString &executable);
+ TQString executable()const { return m_Executable; }
void readSettings();
void writeSettings();
@@ -125,18 +125,18 @@ public:
bool isGlobal()const { return m_bReadOnly; }
bool remove();
- static QStringList list();
+ static TQStringList list();
private:
void init(bool force_rw=false);
- QString fingerprint();
+ TQString fingerprint();
bool dirty, hashdirty;
bool m_bReadOnly;
int m_Refresh, m_Hash, m_LastChange;
- QString m_Name, m_Command;
- QString m_PreviewCommand, m_Comment;
- QString m_Executable, m_File;
+ TQString m_Name, m_Command;
+ TQString m_PreviewCommand, m_Comment;
+ TQString m_Executable, m_File;
KStandardDirs *m_pDirs;
KSimpleConfig *m_pConfig;
};
@@ -169,13 +169,13 @@ public:
// void load(int desk, int screen, bool drawBackgroundPerScreen, bool reparseConfig=true);
void load(int desk, int screen, bool drawBackgroundPerScreen, bool reparseConfig);
- void setColorA(const QColor &color);
- QColor colorA() const { return m_ColorA; }
- void setColorB(const QColor &color);
- QColor colorB() const { return m_ColorB; }
+ void setColorA(const TQColor &color);
+ TQColor colorA() const { return m_ColorA; }
+ void setColorB(const TQColor &color);
+ TQColor colorB() const { return m_ColorB; }
- void setProgram(QString program);
- void setPatternName(QString pattern);
+ void setProgram(TQString program);
+ void setPatternName(TQString pattern);
enum BackgroundMode {
Flat, Pattern, Program,
@@ -201,8 +201,8 @@ public:
void setBlendBalance(int value);
int blendBalance() const { return m_BlendBalance; }
- void setWallpaper(QString name);
- QString wallpaper() const { return m_Wallpaper; }
+ void setWallpaper(TQString name);
+ TQString wallpaper() const { return m_Wallpaper; }
enum WallpaperMode {
NoWallpaper, Centred, Tiled, CenterTiled, CentredMaxpect, TiledMaxpect,
@@ -211,9 +211,9 @@ public:
void setWallpaperMode(int mode);
int wallpaperMode() const { return m_WallpaperMode; }
- void setWallpaperList(QStringList);
- QStringList wallpaperList() const;
- QStringList wallpaperFiles() const;
+ void setWallpaperList(TQStringList);
+ TQStringList wallpaperList() const;
+ TQStringList wallpaperFiles() const;
void setWallpaperChangeInterval(int);
int wallpaperChangeInterval() const { return m_Interval; }
@@ -238,7 +238,7 @@ public:
void updateWallpaperFiles();
void randomizeWallpaperFiles();
- QString currentWallpaper() const;
+ TQString currentWallpaper() const;
/**
* @return true if the currentWallpaper has changed
*/
@@ -248,10 +248,10 @@ public:
void readSettings(bool reparse=false);
void writeSettings();
- QString configGroupName() const;
+ TQString configGroupName() const;
int hash();
- QString fingerprint();
+ TQString fingerprint();
void setEnabled( const bool enable );
bool enabled() const { return m_bEnabled; }
@@ -263,10 +263,10 @@ private:
bool hashdirty;
int m_Screen, m_Desk, m_Hash;
- QColor m_ColorA, defColorA;
- QColor m_ColorB, defColorB;
- QString m_Wallpaper;
- QStringList m_WallpaperList, m_WallpaperFiles;
+ TQColor m_ColorA, defColorA;
+ TQColor m_ColorB, defColorB;
+ TQString m_Wallpaper;
+ TQStringList m_WallpaperList, m_WallpaperFiles;
int m_BackgroundMode, defBackgroundMode;
int m_WallpaperMode, defWallpaperMode;
@@ -280,7 +280,7 @@ private:
int m_MultiMode, defMultiMode;
int m_Interval, m_LastChange;
int m_CurrentWallpaper;
- QString m_CurrentWallpaperName;
+ TQString m_CurrentWallpaperName;
KConfig *m_pConfig;
KStandardDirs *m_pDirs;
@@ -288,10 +288,10 @@ private:
bool m_bEnabled;
public:
- QMap<QString,int> m_BMMap;
- QMap<QString,int> m_WMMap;
- QMap<QString,int> m_MMMap;
- QMap<QString,int> m_BlMMap;
+ TQMap<TQString,int> m_BMMap;
+ TQMap<TQString,int> m_WMMap;
+ TQMap<TQString,int> m_MMMap;
+ TQMap<TQString,int> m_BlMMap;
char *m_BMRevMap[16];
char *m_WMRevMap[16];
char *m_MMRevMap[16];
@@ -307,8 +307,8 @@ class KGlobalBackgroundSettings
public:
KGlobalBackgroundSettings(KConfig *config);
- QString deskName(int desk);
- //void setDeskName(int desk, QString name);
+ TQString deskName(int desk);
+ //void setDeskName(int desk, TQString name);
int cacheSize() { return m_CacheSize; }
void setCacheSize(int size);
@@ -331,11 +331,11 @@ public:
bool exportBackground() {return m_bExport; }
void setExportBackground(bool _export);
- void setTextColor(QColor _color);
- QColor textColor() const { return m_TextColor; }
+ void setTextColor(TQColor _color);
+ TQColor textColor() const { return m_TextColor; }
- void setTextBackgroundColor(QColor _color);
- QColor textBackgroundColor() const { return m_TextBackgroundColor; }
+ void setTextBackgroundColor(TQColor _color);
+ TQColor textBackgroundColor() const { return m_TextBackgroundColor; }
void setShadowEnabled(bool enabled);
bool shadowEnabled() const { return m_shadowEnabled; }
@@ -356,16 +356,16 @@ private:
bool m_bDock;
bool m_bLimitCache, m_bExport;
int m_CacheSize;
- QStringList m_Names;
+ TQStringList m_Names;
- QColor m_TextColor;
- QColor m_TextBackgroundColor;
+ TQColor m_TextColor;
+ TQColor m_TextBackgroundColor;
bool m_shadowEnabled;
int m_textLines;
int m_textWidth;
KConfig *m_pConfig;
bool m_bDeleteConfig;
- QValueVector<bool> m_bDrawBackgroundPerScreen; // m_bDrawBackgroundPerScreen[desk]
+ TQValueVector<bool> m_bDrawBackgroundPerScreen; // m_bDrawBackgroundPerScreen[desk]
};
diff --git a/kcontrol/background/bgwallpaper.cpp b/kcontrol/background/bgwallpaper.cpp
index 9786059eb..82bb1d8af 100644
--- a/kcontrol/background/bgwallpaper.cpp
+++ b/kcontrol/background/bgwallpaper.cpp
@@ -22,10 +22,10 @@
#include <config.h>
-#include <qcheckbox.h>
-#include <qevent.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
+#include <tqcheckbox.h>
+#include <tqevent.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
#include <kfiledialog.h>
#include <kimageio.h>
@@ -39,23 +39,23 @@
/**** BGMultiWallpaperList ****/
-BGMultiWallpaperList::BGMultiWallpaperList(QWidget *parent, const char *name)
- : QListBox(parent, name)
+BGMultiWallpaperList::BGMultiWallpaperList(TQWidget *parent, const char *name)
+ : TQListBox(parent, name)
{
setAcceptDrops(true);
- setSelectionMode(QListBox::Extended);
+ setSelectionMode(TQListBox::Extended);
}
-void BGMultiWallpaperList::dragEnterEvent(QDragEnterEvent *ev)
+void BGMultiWallpaperList::dragEnterEvent(TQDragEnterEvent *ev)
{
ev->accept(KURLDrag::canDecode(ev));
}
-void BGMultiWallpaperList::dropEvent(QDropEvent *ev)
+void BGMultiWallpaperList::dropEvent(TQDropEvent *ev)
{
- QStringList files;
+ TQStringList files;
KURL::List urls;
KURLDrag::decode(ev, urls);
for(KURL::List::ConstIterator it = urls.begin();
@@ -95,7 +95,7 @@ void BGMultiWallpaperList::ensureSelectionVisible()
/**** BGMultiWallpaperDialog ****/
BGMultiWallpaperDialog::BGMultiWallpaperDialog(KBackgroundSettings *settings,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("Setup Slide Show"),
Ok | Cancel, Ok, true), m_pSettings(settings)
{
@@ -114,18 +114,18 @@ BGMultiWallpaperDialog::BGMultiWallpaperDialog(KBackgroundSettings *settings,
if (m_pSettings->multiWallpaperMode() == KBackgroundSettings::Random)
dlg->m_cbRandom->setChecked(true);
- connect(dlg->m_buttonAdd, SIGNAL(clicked()), SLOT(slotAdd()));
- connect(dlg->m_buttonRemove, SIGNAL(clicked()), SLOT(slotRemove()));
- connect(dlg->m_buttonMoveUp, SIGNAL(clicked()), SLOT(slotMoveUp()));
- connect(dlg->m_buttonMoveDown, SIGNAL(clicked()), SLOT(slotMoveDown()));
- connect(dlg->m_listImages, SIGNAL(clicked ( QListBoxItem * )), SLOT(slotItemSelected( QListBoxItem *)));
+ connect(dlg->m_buttonAdd, TQT_SIGNAL(clicked()), TQT_SLOT(slotAdd()));
+ connect(dlg->m_buttonRemove, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemove()));
+ connect(dlg->m_buttonMoveUp, TQT_SIGNAL(clicked()), TQT_SLOT(slotMoveUp()));
+ connect(dlg->m_buttonMoveDown, TQT_SIGNAL(clicked()), TQT_SLOT(slotMoveDown()));
+ connect(dlg->m_listImages, TQT_SIGNAL(clicked ( TQListBoxItem * )), TQT_SLOT(slotItemSelected( TQListBoxItem *)));
dlg->m_buttonRemove->setEnabled( false );
dlg->m_buttonMoveUp->setEnabled( false );
dlg->m_buttonMoveDown->setEnabled( false );
}
-void BGMultiWallpaperDialog::slotItemSelected( QListBoxItem * )
+void BGMultiWallpaperDialog::slotItemSelected( TQListBoxItem * )
{
dlg->m_buttonRemove->setEnabled( dlg->m_listImages->hasSelection() );
setEnabledMoveButtons();
@@ -134,7 +134,7 @@ void BGMultiWallpaperDialog::slotItemSelected( QListBoxItem * )
void BGMultiWallpaperDialog::setEnabledMoveButtons()
{
bool hasSelection = dlg->m_listImages->hasSelection();
- QListBoxItem * item;
+ TQListBoxItem * item;
item = dlg->m_listImages->firstItem();
dlg->m_buttonMoveUp->setEnabled( hasSelection && item && !item->isSelected() );
@@ -144,7 +144,7 @@ void BGMultiWallpaperDialog::setEnabledMoveButtons()
void BGMultiWallpaperDialog::slotAdd()
{
- QStringList mimeTypes = KImageIO::mimeTypes( KImageIO::Reading );
+ TQStringList mimeTypes = KImageIO::mimeTypes( KImageIO::Reading );
#ifdef HAVE_LIBART
mimeTypes += "image/svg+xml";
#endif
@@ -160,7 +160,7 @@ void BGMultiWallpaperDialog::slotAdd()
KFile::LocalOnly);
fileDialog.setMode(mode);
fileDialog.exec();
- QStringList files = fileDialog.selectedFiles();
+ TQStringList files = fileDialog.selectedFiles();
if (files.isEmpty())
return;
@@ -172,7 +172,7 @@ void BGMultiWallpaperDialog::slotRemove()
int current = -1;
for ( unsigned i = 0; i < dlg->m_listImages->count();)
{
- QListBoxItem * item = dlg->m_listImages->item( i );
+ TQListBoxItem * item = dlg->m_listImages->item( i );
if ( item && item->isSelected())
{
dlg->m_listImages->removeItem(i);
@@ -194,7 +194,7 @@ void BGMultiWallpaperDialog::slotMoveUp()
{
for ( unsigned i = 1; i < dlg->m_listImages->count(); i++)
{
- QListBoxItem * item = dlg->m_listImages->item( i );
+ TQListBoxItem * item = dlg->m_listImages->item( i );
if ( item && item->isSelected() )
{
dlg->m_listImages->takeItem( item );
@@ -209,7 +209,7 @@ void BGMultiWallpaperDialog::slotMoveDown()
{
for ( unsigned i = dlg->m_listImages->count() - 1; i > 0; i--)
{
- QListBoxItem * item = dlg->m_listImages->item( i - 1 );
+ TQListBoxItem * item = dlg->m_listImages->item( i - 1 );
if ( item && item->isSelected())
{
dlg->m_listImages->takeItem( item );
@@ -222,7 +222,7 @@ void BGMultiWallpaperDialog::slotMoveDown()
void BGMultiWallpaperDialog::slotOk()
{
- QStringList lst;
+ TQStringList lst;
for (unsigned i=0; i < dlg->m_listImages->count(); i++)
lst.append(dlg->m_listImages->text(i));
m_pSettings->setWallpaperList(lst);
diff --git a/kcontrol/background/bgwallpaper.h b/kcontrol/background/bgwallpaper.h
index 0ecc1e6a4..d2771c884 100644
--- a/kcontrol/background/bgwallpaper.h
+++ b/kcontrol/background/bgwallpaper.h
@@ -23,8 +23,8 @@
#ifndef _BGWALLPAPER_H_
#define _BGWALLPAPER_H_
-#include <qlistbox.h>
-#include <qstringlist.h>
+#include <tqlistbox.h>
+#include <tqstringlist.h>
#include <kdialogbase.h>
@@ -34,10 +34,10 @@ class KBackgroundSettings;
class BGMultiWallpaperList : public QListBox
{
public:
- BGMultiWallpaperList(QWidget *parent, const char *name);
+ BGMultiWallpaperList(TQWidget *parent, const char *name);
- void dragEnterEvent(QDragEnterEvent *ev);
- void dropEvent(QDropEvent *ev);
+ void dragEnterEvent(TQDragEnterEvent *ev);
+ void dropEvent(TQDropEvent *ev);
bool hasSelection();
void ensureSelectionVisible();
};
@@ -46,7 +46,7 @@ class BGMultiWallpaperDialog : public KDialogBase
{
Q_OBJECT
public:
- BGMultiWallpaperDialog(KBackgroundSettings *settings, QWidget *parent, const char *name=0);
+ BGMultiWallpaperDialog(KBackgroundSettings *settings, TQWidget *parent, const char *name=0);
public slots:
void slotAdd();
@@ -54,7 +54,7 @@ public slots:
void slotMoveUp();
void slotMoveDown();
void slotOk();
- void slotItemSelected( QListBoxItem * );
+ void slotItemSelected( TQListBoxItem * );
private:
void setEnabledMoveButtons();
diff --git a/kcontrol/background/main.cpp b/kcontrol/background/main.cpp
index 7bcd5649b..da77d7cda 100644
--- a/kcontrol/background/main.cpp
+++ b/kcontrol/background/main.cpp
@@ -15,7 +15,7 @@
* License. See the file "COPYING" for the exact licensing terms.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <kaboutdata.h>
#include <kconfig.h>
@@ -32,7 +32,7 @@
#include <X11/Xlib.h>
/**** DLL Interface ****/
-typedef KGenericFactory<KBackground, QWidget> KBackGndFactory;
+typedef KGenericFactory<KBackground, TQWidget> KBackGndFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_background, KBackGndFactory("kcmbackground"))
/**** KBackground ****/
@@ -41,20 +41,20 @@ KBackground::~KBackground( )
delete m_pConfig;
}
-KBackground::KBackground(QWidget *parent, const char *name, const QStringList &/* */)
+KBackground::KBackground(TQWidget *parent, const char *name, const TQStringList &/* */)
: KCModule(KBackGndFactory::instance(), parent, name)
{
int screen_number = 0;
if (qt_xdisplay())
screen_number = DefaultScreen(qt_xdisplay());
- QCString configname;
+ TQCString configname;
if (screen_number == 0)
configname = "kdesktoprc";
else
configname.sprintf("kdesktop-screen-%drc", screen_number);
m_pConfig = new KConfig(configname, false, false);
- QVBoxLayout *layout = new QVBoxLayout(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
m_base = new BGDialog(this, m_pConfig);
setQuickHelp( m_base->quickHelp());
layout->add(m_base);
@@ -65,7 +65,7 @@ KBackground::KBackground(QWidget *parent, const char *name, const QStringList &/
// reparenting that is done.
setAcceptDrops(true);
- connect(m_base, SIGNAL(changed(bool)), SIGNAL(changed(bool)));
+ connect(m_base, TQT_SIGNAL(changed(bool)), TQT_SIGNAL(changed(bool)));
KAboutData *about =
new KAboutData(I18N_NOOP("kcmbackground"), I18N_NOOP("KDE Background Control Module"),
@@ -107,7 +107,7 @@ void KBackground::save()
int screen_number = 0;
if (qt_xdisplay())
screen_number = DefaultScreen(qt_xdisplay());
- QCString appname;
+ TQCString appname;
if (screen_number == 0)
appname = "kdesktop";
else
diff --git a/kcontrol/background/main.h b/kcontrol/background/main.h
index a220b57b6..100d9c2b9 100644
--- a/kcontrol/background/main.h
+++ b/kcontrol/background/main.h
@@ -23,7 +23,7 @@ class KBackground: public KCModule
Q_OBJECT
public:
- KBackground(QWidget *parent, const char *name, const QStringList &);
+ KBackground(TQWidget *parent, const char *name, const TQStringList &);
~KBackground();
virtual void load();