summaryrefslogtreecommitdiffstats
path: root/kalarm/fontcolour.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kalarm/fontcolour.cpp')
-rw-r--r--kalarm/fontcolour.cpp126
1 files changed, 63 insertions, 63 deletions
diff --git a/kalarm/fontcolour.cpp b/kalarm/fontcolour.cpp
index dae2e9856..4273125a3 100644
--- a/kalarm/fontcolour.cpp
+++ b/kalarm/fontcolour.cpp
@@ -18,14 +18,14 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qobjectlist.h>
-#include <qwidget.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqobjectlist.h>
+#include <tqwidget.h>
+#include <tqgroupbox.h>
+#include <tqpushbutton.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <kglobal.h>
#include <klocale.h>
@@ -38,88 +38,88 @@
#include "fontcolour.moc"
-FontColourChooser::FontColourChooser(QWidget *parent, const char *name,
- bool onlyFixed, const QStringList &fontList,
- const QString& frameLabel, bool editColours, bool fg, bool defaultFont,
+FontColourChooser::FontColourChooser(TQWidget *parent, const char *name,
+ bool onlyFixed, const TQStringList &fontList,
+ const TQString& frameLabel, bool editColours, bool fg, bool defaultFont,
int visibleListSize)
- : QWidget(parent, name),
+ : TQWidget(parent, name),
mFgColourButton(0),
mRemoveColourButton(0),
mColourList(Preferences::messageColours()),
mReadOnly(false)
{
- QVBoxLayout* topLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());
- QWidget* page = this;
+ TQVBoxLayout* topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
+ TQWidget* page = this;
if (!frameLabel.isNull())
{
- page = new QGroupBox(frameLabel, this);
+ page = new TQGroupBox(frameLabel, this);
topLayout->addWidget(page);
- topLayout = new QVBoxLayout(page, KDialog::marginHint(), KDialog::spacingHint());
+ topLayout = new TQVBoxLayout(page, KDialog::marginHint(), KDialog::spacingHint());
topLayout->addSpacing(fontMetrics().height() - KDialog::marginHint() + KDialog::spacingHint());
}
- QHBoxLayout* hlayout = new QHBoxLayout(topLayout);
- QVBoxLayout* colourLayout = new QVBoxLayout(hlayout);
+ TQHBoxLayout* hlayout = new TQHBoxLayout(topLayout);
+ TQVBoxLayout* colourLayout = new TQVBoxLayout(hlayout);
if (fg)
{
- QHBox* box = new QHBox(page); // to group widgets for QWhatsThis text
+ TQHBox* box = new TQHBox(page); // to group widgets for TQWhatsThis text
box->setSpacing(KDialog::spacingHint()/2);
colourLayout->addWidget(box);
- QLabel* label = new QLabel(i18n("&Foreground color:"), box);
- box->setStretchFactor(new QWidget(box), 0);
+ TQLabel* label = new TQLabel(i18n("&Foreground color:"), box);
+ box->setStretchFactor(new TQWidget(box), 0);
mFgColourButton = new ColourCombo(box);
- connect(mFgColourButton, SIGNAL(activated(const QString&)), SLOT(setSampleColour()));
+ connect(mFgColourButton, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(setSampleColour()));
label->setBuddy(mFgColourButton);
- QWhatsThis::add(box, i18n("Select the alarm message foreground color"));
+ TQWhatsThis::add(box, i18n("Select the alarm message foreground color"));
}
- QHBox* box = new QHBox(page); // to group widgets for QWhatsThis text
+ TQHBox* box = new TQHBox(page); // to group widgets for TQWhatsThis text
box->setSpacing(KDialog::spacingHint()/2);
colourLayout->addWidget(box);
- QLabel* label = new QLabel(i18n("&Background color:"), box);
- box->setStretchFactor(new QWidget(box), 0);
+ TQLabel* label = new TQLabel(i18n("&Background color:"), box);
+ box->setStretchFactor(new TQWidget(box), 0);
mBgColourButton = new ColourCombo(box);
- connect(mBgColourButton, SIGNAL(activated(const QString&)), SLOT(setSampleColour()));
+ connect(mBgColourButton, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(setSampleColour()));
label->setBuddy(mBgColourButton);
- QWhatsThis::add(box, i18n("Select the alarm message background color"));
+ TQWhatsThis::add(box, i18n("Select the alarm message background color"));
hlayout->addStretch();
if (editColours)
{
- QHBoxLayout* layout = new QHBoxLayout(topLayout);
- QPushButton* button = new QPushButton(i18n("Add Co&lor..."), page);
+ TQHBoxLayout* layout = new TQHBoxLayout(topLayout);
+ TQPushButton* button = new TQPushButton(i18n("Add Co&lor..."), page);
button->setFixedSize(button->sizeHint());
- connect(button, SIGNAL(clicked()), SLOT(slotAddColour()));
- QWhatsThis::add(button, i18n("Choose a new color to add to the color selection list."));
+ connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddColour()));
+ TQWhatsThis::add(button, i18n("Choose a new color to add to the color selection list."));
layout->addWidget(button);
- mRemoveColourButton = new QPushButton(i18n("&Remove Color"), page);
+ mRemoveColourButton = new TQPushButton(i18n("&Remove Color"), page);
mRemoveColourButton->setFixedSize(mRemoveColourButton->sizeHint());
- connect(mRemoveColourButton, SIGNAL(clicked()), SLOT(slotRemoveColour()));
- QWhatsThis::add(mRemoveColourButton,
+ connect(mRemoveColourButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveColour()));
+ TQWhatsThis::add(mRemoveColourButton,
i18n("Remove the color currently shown in the background color chooser, from the color selection list."));
layout->addWidget(mRemoveColourButton);
}
if (defaultFont)
{
- QHBoxLayout* layout = new QHBoxLayout(topLayout);
+ TQHBoxLayout* layout = new TQHBoxLayout(topLayout);
mDefaultFont = new CheckBox(i18n("Use &default font"), page);
mDefaultFont->setMinimumSize(mDefaultFont->sizeHint());
- connect(mDefaultFont, SIGNAL(toggled(bool)), SLOT(slotDefaultFontToggled(bool)));
- QWhatsThis::add(mDefaultFont,
+ connect(mDefaultFont, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotDefaultFontToggled(bool)));
+ TQWhatsThis::add(mDefaultFont,
i18n("Check to use the default font current at the time the alarm is displayed."));
layout->addWidget(mDefaultFont);
- layout->addWidget(new QWidget(page)); // left adjust the widget
+ layout->addWidget(new TQWidget(page)); // left adjust the widget
}
else
mDefaultFont = 0;
mFontChooser = new KFontChooser(page, name, onlyFixed, fontList, false, visibleListSize);
mFontChooser->installEventFilter(this); // for read-only mode
- const QObjectList* kids = mFontChooser->queryList();
- for (QObjectList::ConstIterator it = kids->constBegin(); it != kids->constEnd(); ++it)
+ const TQObjectList* kids = mFontChooser->queryList();
+ for (TQObjectList::ConstIterator it = kids->constBegin(); it != kids->constEnd(); ++it)
(*it)->installEventFilter(this);
topLayout->addWidget(mFontChooser);
@@ -132,7 +132,7 @@ void FontColourChooser::setDefaultFont()
mDefaultFont->setChecked(true);
}
-void FontColourChooser::setFont(const QFont& font, bool onlyFixed)
+void FontColourChooser::setFont(const TQFont& font, bool onlyFixed)
{
if (mDefaultFont)
mDefaultFont->setChecked(false);
@@ -144,12 +144,12 @@ bool FontColourChooser::defaultFont() const
return mDefaultFont ? mDefaultFont->isChecked() : false;
}
-QFont FontColourChooser::font() const
+TQFont FontColourChooser::font() const
{
- return (mDefaultFont && mDefaultFont->isChecked()) ? QFont() : mFontChooser->font();
+ return (mDefaultFont && mDefaultFont->isChecked()) ? TQFont() : mFontChooser->font();
}
-void FontColourChooser::setBgColour(const QColor& colour)
+void FontColourChooser::setBgColour(const TQColor& colour)
{
mBgColourButton->setColor(colour);
mFontChooser->setBackgroundColor(colour);
@@ -157,42 +157,42 @@ void FontColourChooser::setBgColour(const QColor& colour)
void FontColourChooser::setSampleColour()
{
- QColor bg = mBgColourButton->color();
+ TQColor bg = mBgColourButton->color();
mFontChooser->setBackgroundColor(bg);
- QColor fg = fgColour();
+ TQColor fg = fgColour();
mFontChooser->setColor(fg);
if (mRemoveColourButton)
mRemoveColourButton->setEnabled(!mBgColourButton->isCustomColour()); // no deletion of custom colour
}
-QColor FontColourChooser::bgColour() const
+TQColor FontColourChooser::bgColour() const
{
return mBgColourButton->color();
}
-QColor FontColourChooser::fgColour() const
+TQColor FontColourChooser::fgColour() const
{
if (mFgColourButton)
return mFgColourButton->color();
else
{
- QColor bg = mBgColourButton->color();
- QPalette pal(bg, bg);
- return pal.color(QPalette::Active, QColorGroup::Text);
+ TQColor bg = mBgColourButton->color();
+ TQPalette pal(bg, bg);
+ return pal.color(TQPalette::Active, TQColorGroup::Text);
}
}
-QString FontColourChooser::sampleText() const
+TQString FontColourChooser::sampleText() const
{
return mFontChooser->sampleText();
}
-void FontColourChooser::setSampleText(const QString& text)
+void FontColourChooser::setSampleText(const TQString& text)
{
mFontChooser->setSampleText(text);
}
-void FontColourChooser::setFgColour(const QColor& colour)
+void FontColourChooser::setFgColour(const TQColor& colour)
{
if (mFgColourButton)
{
@@ -213,17 +213,17 @@ void FontColourChooser::setReadOnly(bool ro)
}
}
-bool FontColourChooser::eventFilter(QObject*, QEvent* e)
+bool FontColourChooser::eventFilter(TQObject*, TQEvent* e)
{
if (mReadOnly)
{
switch (e->type())
{
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- case QEvent::MouseButtonDblClick:
- case QEvent::KeyPress:
- case QEvent::KeyRelease:
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonDblClick:
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease:
return true; // prevent the event being handled
default:
break;
@@ -246,8 +246,8 @@ void FontColourChooser::setColours(const ColourList& colours)
void FontColourChooser::slotAddColour()
{
- QColor colour;
- if (KColorDialog::getColor(colour, this) == QDialog::Accepted)
+ TQColor colour;
+ if (KColorDialog::getColor(colour, this) == TQDialog::Accepted)
{
mColourList.insert(colour);
mBgColourButton->setColours(mColourList);