diff options
Diffstat (limited to 'src/sources/labelsource.cpp')
-rw-r--r-- | src/sources/labelsource.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/src/sources/labelsource.cpp b/src/sources/labelsource.cpp index a2e5026..d088cc7 100644 --- a/src/sources/labelsource.cpp +++ b/src/sources/labelsource.cpp @@ -19,16 +19,16 @@ ***************************************************************************/ #include "labelsource.h" -#include <qlabel.h> +#include <tqlabel.h> #include <kcolorbutton.h> #include <kfontrequester.h> -#include <qcombobox.h> -#include <qcheckbox.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> #include <klocale.h> //#include "kdebug.h" -LabelSource::LabelSource(QWidget* inParent): +LabelSource::LabelSource(TQWidget* inParent): TriggeredSource(inParent), mParent(inParent), mLabelSourcePrefs(NULL){ @@ -37,21 +37,21 @@ LabelSource::LabelSource(QWidget* inParent): LabelSource::~LabelSource(){ } -QWidget* LabelSource::getWidget(){ +TQWidget* LabelSource::getWidget(){ //kdDebug() << "LabelSource::getWidget called: " << mID << endl; return mLabel; } -void LabelSource::createSubPrefs(QWidget* inParent){ +void LabelSource::createSubPrefs(TQWidget* inParent){ if(!mLabelSourcePrefs){ mLabelSourcePrefs = new LabelSourcePrefs(inParent, "labelsourceprefsui"); // disable nameCheckBox if taskbarCheckBox is disabled - connect(mSourcePrefs->taskbarCheckBox, SIGNAL(toggled(bool)), mLabelSourcePrefs->colorLabel, SLOT(setEnabled(bool))); - connect(mSourcePrefs->taskbarCheckBox, SIGNAL(toggled(bool)), mLabelSourcePrefs->colorButton, SLOT(setEnabled(bool))); - connect(mSourcePrefs->taskbarCheckBox, SIGNAL(toggled(bool)), mLabelSourcePrefs->fontLabel, SLOT(setEnabled(bool))); - connect(mSourcePrefs->taskbarCheckBox, SIGNAL(toggled(bool)), mLabelSourcePrefs->fontRequester, SLOT(setEnabled(bool))); - connect(mSourcePrefs->taskbarCheckBox, SIGNAL(toggled(bool)), mLabelSourcePrefs->alignmentLabel, SLOT(setEnabled(bool))); - connect(mSourcePrefs->taskbarCheckBox, SIGNAL(toggled(bool)), mLabelSourcePrefs->alignmentComboBox, SLOT(setEnabled(bool))); + connect(mSourcePrefs->taskbarCheckBox, TQT_SIGNAL(toggled(bool)), mLabelSourcePrefs->colorLabel, TQT_SLOT(setEnabled(bool))); + connect(mSourcePrefs->taskbarCheckBox, TQT_SIGNAL(toggled(bool)), mLabelSourcePrefs->colorButton, TQT_SLOT(setEnabled(bool))); + connect(mSourcePrefs->taskbarCheckBox, TQT_SIGNAL(toggled(bool)), mLabelSourcePrefs->fontLabel, TQT_SLOT(setEnabled(bool))); + connect(mSourcePrefs->taskbarCheckBox, TQT_SIGNAL(toggled(bool)), mLabelSourcePrefs->fontRequester, TQT_SLOT(setEnabled(bool))); + connect(mSourcePrefs->taskbarCheckBox, TQT_SIGNAL(toggled(bool)), mLabelSourcePrefs->tqalignmentLabel, TQT_SLOT(setEnabled(bool))); + connect(mSourcePrefs->taskbarCheckBox, TQT_SIGNAL(toggled(bool)), mLabelSourcePrefs->tqalignmentComboBox, TQT_SLOT(setEnabled(bool))); addPrefs(mLabelSourcePrefs); } } @@ -60,16 +60,16 @@ void LabelSource::updatePrefsGUI(){ TriggeredSource::updatePrefsGUI(); // update prefs of the super class mLabelSourcePrefs->colorButton->setColor(mLabel->paletteForegroundColor()); mLabelSourcePrefs->fontRequester->setFont(mLabel->font()); - switch (mLabel->alignment()) { - case Qt::AlignCenter: - mLabelSourcePrefs->alignmentComboBox->setCurrentItem(1); + switch (mLabel->tqalignment()) { + case TQt::AlignCenter: + mLabelSourcePrefs->tqalignmentComboBox->setCurrentItem(1); break; - case Qt::AlignRight: - mLabelSourcePrefs->alignmentComboBox->setCurrentItem(2); + case TQt::AlignRight: + mLabelSourcePrefs->tqalignmentComboBox->setCurrentItem(2); break; - default: // Qt::AlignLeft + default: // TQt::AlignLeft break; - mLabelSourcePrefs->alignmentComboBox->setCurrentItem(0); + mLabelSourcePrefs->tqalignmentComboBox->setCurrentItem(0); } } @@ -80,22 +80,22 @@ void LabelSource::setPrefsWidgetsEnabled(bool isEnabled, bool isShownOnApplet){ mLabelSourcePrefs->colorButton->setEnabled(isEnabled && isShownOnApplet); mLabelSourcePrefs->fontLabel->setEnabled(isEnabled && isShownOnApplet); mLabelSourcePrefs->fontRequester->setEnabled(isEnabled && isShownOnApplet); - mLabelSourcePrefs->alignmentLabel->setEnabled(isEnabled && isShownOnApplet); - mLabelSourcePrefs->alignmentComboBox->setEnabled(isEnabled && isShownOnApplet); + mLabelSourcePrefs->tqalignmentLabel->setEnabled(isEnabled && isShownOnApplet); + mLabelSourcePrefs->tqalignmentComboBox->setEnabled(isEnabled && isShownOnApplet); } void LabelSource::applyPrefs(){ TriggeredSource::applyPrefs(); // call apply prefs of the super class mLabel->setPaletteForegroundColor(mLabelSourcePrefs->colorButton->color()); mLabel->setFont(mLabelSourcePrefs->fontRequester->font()); - int alignID = mLabelSourcePrefs->alignmentComboBox->currentItem(); - Qt::AlignmentFlags align = Qt::AlignCenter; + int alignID = mLabelSourcePrefs->tqalignmentComboBox->currentItem(); + TQt::AlignmentFlags align = TQt::AlignCenter; if(alignID == 0){ - align = Qt::AlignLeft; + align = TQt::AlignLeft; }else if(alignID == 2){ - align = Qt::AlignRight; + align = TQt::AlignRight; } - mLabel->setAlignment(align); + mLabel->tqsetAlignment(align); updateLabel(mValue); } @@ -103,22 +103,22 @@ void LabelSource::savePrefs(KConfig* inKConfig){ TriggeredSource::savePrefs(inKConfig); inKConfig->writeEntry(mID + "_color", mLabelSourcePrefs->colorButton->color()); inKConfig->writeEntry(mID + "_font", mLabelSourcePrefs->fontRequester->font()); - inKConfig->writeEntry(mID + "_align", mLabel->alignment()); + inKConfig->writeEntry(mID + "_align", mLabel->tqalignment()); } void LabelSource::loadPrefs(KConfig* inKConfig){ TriggeredSource::loadPrefs(inKConfig); - QColor color = inKConfig->readColorEntry(mID + "_color"); + TQColor color = inKConfig->readColorEntry(mID + "_color"); if(!color.isValid()) color.setRgb(0,0,0); mLabel->setPaletteForegroundColor(color); mLabel->setFont(inKConfig->readFontEntry(mID + "_font")); - mLabel->setAlignment(inKConfig->readNumEntry(mID + "_align")); + mLabel->tqsetAlignment(inKConfig->readNumEntry(mID + "_align")); } -void LabelSource::updateLabel(const QString& inValue){ +void LabelSource::updateLabel(const TQString& inValue){ // update the label text - QString text = (getName().isEmpty() || !showName()) ? inValue : getName() + ": " + inValue; + TQString text = (getName().isEmpty() || !showName()) ? inValue : getName() + ": " + inValue; //kdDebug() << "updateLabel " << getName() << ", value: " << text << endl; //if(mLabel->text() != text) mLabel->setText(text); @@ -127,7 +127,7 @@ void LabelSource::updateLabel(const QString& inValue){ void LabelSource::realizeWidget(){ Source::realizeWidget(); // the prefs dialog is created in the addPrefs method - mLabel = new QLabel(i18n("n/a"), mParent); - mLabel->setTextFormat(Qt::PlainText); - connect(this, SIGNAL(valueUpdated(const QString&)), this, SLOT(updateLabel(const QString&))); + mLabel = new TQLabel(i18n("n/a"), mParent); + mLabel->setTextFormat(TQt::PlainText); + connect(this, TQT_SIGNAL(valueUpdated(const TQString&)), this, TQT_SLOT(updateLabel(const TQString&))); } |