summaryrefslogtreecommitdiffstats
path: root/config/qtcurveconfig.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-24 20:24:04 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-24 20:24:04 -0600
commitf21c6e30665e28ac55ae6895aad83e177585ce01 (patch)
tree4fb1494d42d48c9c0107cfefbd694ae3060697fc /config/qtcurveconfig.cpp
parente9d913d6017e67dd60f27d704c470e21425cd362 (diff)
downloadtde-style-qtcurve-f21c6e30665e28ac55ae6895aad83e177585ce01.tar.gz
tde-style-qtcurve-f21c6e30665e28ac55ae6895aad83e177585ce01.zip
TQt conversion of config module
Diffstat (limited to 'config/qtcurveconfig.cpp')
-rw-r--r--config/qtcurveconfig.cpp248
1 files changed, 124 insertions, 124 deletions
diff --git a/config/qtcurveconfig.cpp b/config/qtcurveconfig.cpp
index b08fa2d..6de7801 100644
--- a/config/qtcurveconfig.cpp
+++ b/config/qtcurveconfig.cpp
@@ -1,5 +1,5 @@
/*
- QtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com
+ TQtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com
----
@@ -19,7 +19,7 @@
*/
#include "qtcurveconfig.h"
-#ifdef QTC_STYLE_SUPPORT
+#ifdef TQTC_STYLE_SUPPORT
#include "exportthemedialog.h"
#endif
#include <qcheckbox.h>
@@ -62,15 +62,15 @@
extern "C"
{
- QWidget * allocate_kstyle_config(QWidget *parent)
+ TQWidget * allocate_kstyle_config(QWidget *parent)
{
KGlobal::locale()->insertCatalogue("qtcurve");
- return new QtCurveConfig(parent);
+ return new TQtCurveConfig(parent);
}
}
-static void drawGradient(const QColor &top, const QColor &bot, bool increase,
- QPainter *p, QRect const &r, bool horiz)
+static void drawGradient(const TQColor &top, const TQColor &bot, bool increase,
+ TQPainter *p, TQRect const &r, bool horiz)
{
if(r.width()>0 && r.height()>0)
{
@@ -147,9 +147,9 @@ class CharSelectDialog : public KDialogBase
CharSelectDialog(QWidget *parent, int v)
: KDialogBase(Plain, i18n("Select Password Character"), Ok|Cancel, Cancel, parent)
{
- QFrame *page=plainPage();
+ TQFrame *page=plainPage();
- QVBoxLayout *layout=new QVBoxLayout(page, 0, KDialog::spacingHint());
+ TQVBoxLayout *layout=new TQVBoxLayout(page, 0, KDialog::spacingHint());
itsSelector=new KCharSelect(page, 0L);
itsSelector->setChar(QChar(v));
@@ -163,12 +163,12 @@ class CharSelectDialog : public KDialogBase
KCharSelect *itsSelector;
};
-class CStackItem : public QListViewItem
+class CStackItem : public TQListViewItem
{
public:
- CStackItem(QListView *p, const QString &text, int s)
- : QListViewItem(p, text),
+ CStackItem(QListView *p, const TQString &text, int s)
+ : TQListViewItem(p, text),
stackId(s)
{
}
@@ -192,12 +192,12 @@ class CStackItem : public QListViewItem
};
//
-// QString.toDouble returns ok=true for "xx" ???
-static double toDouble(const QString &str, bool *ok)
+// TQString.toDouble returns ok=true for "xx" ???
+static double toDouble(const TQString &str, bool *ok)
{
if(ok)
{
- QString stripped(str.stripWhiteSpace());
+ TQString stripped(str.stripWhiteSpace());
int size(stripped.length());
for(int i=0; i<size; ++i)
@@ -211,12 +211,12 @@ static double toDouble(const QString &str, bool *ok)
return str.toDouble(ok);
}
-class CGradItem : public QListViewItem
+class CGradItem : public TQListViewItem
{
public:
- CGradItem(QListView *p, const QString &a, const QString &b)
- : QListViewItem(p, a, b)
+ CGradItem(QListView *p, const TQString &a, const TQString &b)
+ : TQListViewItem(p, a, b)
{
setRenameEnabled(0, true);
setRenameEnabled(1, true);
@@ -226,10 +226,10 @@ class CGradItem : public QListViewItem
void okRename(int col)
{
- QString prevStr(text(col));
+ TQString prevStr(text(col));
prev=prevStr.toDouble();
- QListViewItem::okRename(col);
+ TQListViewItem::okRename(col);
bool ok(false);
double val=toDouble(text(col), &ok)/100.0;
@@ -260,16 +260,16 @@ class CGradItem : public QListViewItem
double prev;
};
-CGradientPreview::CGradientPreview(QtCurveConfig *c, QWidget *p)
- : QWidget(p),
+CGradientPreview::CGradientPreview(TQtCurveConfig *c, TQWidget *p)
+ : TQWidget(p),
cfg(c)
{
- setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred);
+ setSizePolicy(QSizePolicy::MinimumExpanding, TQSizePolicy::Preferred);
}
QSize CGradientPreview::sizeHint() const
{
- return QSize(64, 64);
+ return TQSize(64, 64);
}
QSize CGradientPreview::minimumSizeHint() const
@@ -279,22 +279,22 @@ QSize CGradientPreview::minimumSizeHint() const
void CGradientPreview::paintEvent(QPaintEvent *)
{
- QRect r(rect());
- QPainter p(this);
+ TQRect r(rect());
+ TQPainter p(this);
if(stops.size())
{
GradientStopCont st(stops.fix());
GradientStopCont::const_iterator it(st.begin()),
end(st.end());
- QColor bot;
+ TQColor bot;
bool horiz(true);
int lastPos(horiz ? r.y() : r.x()),
size(horiz ? r.height() : r.width());
Options opts;
-
+
opts.shading=cfg->currentShading();
-
+
for(int i=0; it!=end; ++it, ++i)
{
if(0==i)
@@ -304,14 +304,14 @@ void CGradientPreview::paintEvent(QPaintEvent *)
}
else
{
- QColor top(bot);
+ TQColor top(bot);
int pos((int)(((*it).pos*size)+0.5));
shade(&opts, color, &bot, (*it).val);
drawGradient(top, bot, true, &p,
horiz
- ? QRect(r.x(), lastPos, r.width(), pos-lastPos)
- : QRect(lastPos, r.y(), pos-lastPos, r.height()),
+ ? TQRect(r.x(), lastPos, r.width(), pos-lastPos)
+ : TQRect(lastPos, r.y(), pos-lastPos, r.height()),
horiz);
lastPos=pos;
}
@@ -328,7 +328,7 @@ void CGradientPreview::setGrad(const GradientStopCont &s)
repaint();
}
-void CGradientPreview::setColor(const QColor &col)
+void CGradientPreview::setColor(const TQColor &col)
{
if(col!=color)
{
@@ -337,7 +337,7 @@ void CGradientPreview::setColor(const QColor &col)
}
}
-static int toInt(const QString &str)
+static int toInt(const TQString &str)
{
return str.length()>1 ? str[0].unicode() : 0;
}
@@ -561,9 +561,9 @@ static void insertLvLinesEntries(QComboBox *combo)
combo->insertItem(i18n("Old style (KDE and Gtk2 different)"));
}
-QtCurveConfig::QtCurveConfig(QWidget *parent)
- : QtCurveConfigBase(parent),
-#ifdef QTC_STYLE_SUPPORT
+TQtCurveConfig::TQtCurveConfig(QWidget *parent)
+ : TQtCurveConfigBase(parent),
+#ifdef TQTC_STYLE_SUPPORT
exportDialog(NULL),
#endif
gradPreview(NULL),
@@ -632,7 +632,7 @@ QtCurveConfig::QtCurveConfig(QWidget *parent)
menuDelay->setRange(MIN_MENU_DELAY, MAX_MENU_DELAY, 1, false);
menuDelay->setValue(DEFAULT_MENU_DELAY);
-
+
sliderWidth->setRange(MIN_SLIDER_WIDTH, MAX_SLIDER_WIDTH, 2, false);
sliderWidth->setValue(DEFAULT_SLIDER_WIDTH);
sliderWidth->setSuffix(i18n(" pixels"));
@@ -648,7 +648,7 @@ QtCurveConfig::QtCurveConfig(QWidget *parent)
connect(menuDelay, SIGNAL(valueChanged(int)), SLOT(updateChanged()));
connect(sliderWidth, SIGNAL(valueChanged(int)), SLOT(sliderWidthChanged()));
connect(menuStripe, SIGNAL(activated(int)), SLOT(menuStripeChanged()));
- connect(customMenuStripeColor, SIGNAL(changed(const QColor &)), SLOT(updateChanged()));
+ connect(customMenuStripeColor, SIGNAL(changed(const TQColor &)), SLOT(updateChanged()));
connect(menuStripeAppearance, SIGNAL(activated(int)), SLOT(updateChanged()));
connect(menuBgndAppearance, SIGNAL(activated(int)), SLOT(updateChanged()));
connect(menuBgndGrad, SIGNAL(activated(int)), SLOT(updateChanged()));
@@ -680,8 +680,8 @@ QtCurveConfig::QtCurveConfig(QWidget *parent)
connect(comboSplitter, SIGNAL(toggled(bool)), SLOT(updateChanged()));
connect(comboBtn, SIGNAL(activated(int)), SLOT(comboBtnChanged()));
connect(sortedLv, SIGNAL(activated(int)), SLOT(sortedLvChanged()));
- connect(customComboBtnColor, SIGNAL(changed(const QColor &)), SLOT(updateChanged()));
- connect(customSortedLvColor, SIGNAL(changed(const QColor &)), SLOT(updateChanged()));
+ connect(customComboBtnColor, SIGNAL(changed(const TQColor &)), SLOT(updateChanged()));
+ connect(customSortedLvColor, SIGNAL(changed(const TQColor &)), SLOT(updateChanged()));
connect(unifySpinBtns, SIGNAL(toggled(bool)), SLOT(unifySpinBtnsToggled()));
connect(unifySpin, SIGNAL(toggled(bool)), SLOT(unifySpinToggled()));
connect(unifyCombo, SIGNAL(toggled(bool)), SLOT(updateChanged()));
@@ -711,7 +711,7 @@ QtCurveConfig::QtCurveConfig(QWidget *parent)
connect(colorTitlebarOnly, SIGNAL(toggled(bool)), SLOT(updateChanged()));
connect(selectionAppearance, SIGNAL(activated(int)), SLOT(updateChanged()));
connect(shadeCheckRadio, SIGNAL(activated(int)), SLOT(shadeCheckRadioChanged()));
- connect(customCheckRadioColor, SIGNAL(changed(const QColor &)), SLOT(updateChanged()));
+ connect(customCheckRadioColor, SIGNAL(changed(const TQColor &)), SLOT(updateChanged()));
connect(focus, SIGNAL(activated(int)), SLOT(focusChanged()));
connect(lvLines, SIGNAL(activated(int)), SLOT(updateChanged()));
connect(lvButton, SIGNAL(toggled(bool)), SLOT(updateChanged()));
@@ -722,10 +722,10 @@ QtCurveConfig::QtCurveConfig(QWidget *parent)
connect(shadeMenubarOnlyWhenActive, SIGNAL(toggled(bool)), SLOT(updateChanged()));
connect(thinnerMenuItems, SIGNAL(toggled(bool)), SLOT(updateChanged()));
connect(thinnerBtns, SIGNAL(toggled(bool)), SLOT(updateChanged()));
- connect(customSlidersColor, SIGNAL(changed(const QColor &)), SLOT(updateChanged()));
- connect(customMenubarsColor, SIGNAL(changed(const QColor &)), SLOT(updateChanged()));
- connect(customMenuSelTextColor, SIGNAL(changed(const QColor &)), SLOT(updateChanged()));
- connect(customMenuNormTextColor, SIGNAL(changed(const QColor &)), SLOT(updateChanged()));
+ connect(customSlidersColor, SIGNAL(changed(const TQColor &)), SLOT(updateChanged()));
+ connect(customMenubarsColor, SIGNAL(changed(const TQColor &)), SLOT(updateChanged()));
+ connect(customMenuSelTextColor, SIGNAL(changed(const TQColor &)), SLOT(updateChanged()));
+ connect(customMenuNormTextColor, SIGNAL(changed(const TQColor &)), SLOT(updateChanged()));
connect(shadeSliders, SIGNAL(activated(int)), SLOT(shadeSlidersChanged()));
connect(shadeMenubars, SIGNAL(activated(int)), SLOT(shadeMenubarsChanged()));
connect(highlightFactor, SIGNAL(valueChanged(int)), SLOT(updateChanged()));
@@ -767,8 +767,8 @@ QtCurveConfig::QtCurveConfig(QWidget *parent)
setupShadesTab();
setWidgetOptions(currentStyle);
- QPopupMenu *menu=new QPopupMenu(this),
- *subMenu=new QPopupMenu(this);
+ TQPopupMenu *menu=new TQPopupMenu(this),
+ *subMenu=new TQPopupMenu(this);
optionBtn->setPopup(menu);
@@ -776,7 +776,7 @@ QtCurveConfig::QtCurveConfig(QWidget *parent)
menu->insertSeparator();
menu->insertItem(i18n("Import..."), this, SLOT(importStyle()));
menu->insertItem(i18n("Export..."), this, SLOT(exportStyle()));
-#ifdef QTC_STYLE_SUPPORT
+#ifdef TQTC_STYLE_SUPPORT
menu->insertSeparator();
menu->insertItem(i18n("Export Theme..."), this, SLOT(exportTheme()));
#endif
@@ -787,17 +787,17 @@ QtCurveConfig::QtCurveConfig(QWidget *parent)
resize(600, 400);
}
-QtCurveConfig::~QtCurveConfig()
+TQtCurveConfig::~TQtCurveConfig()
{
}
-void QtCurveConfig::loadStyles(QPopupMenu *menu)
+void TQtCurveConfig::loadStyles(QPopupMenu *menu)
{
- QStringList files(KGlobal::dirs()->findAllResources("data", "QtCurve/*"EXTENSION, false, true));
+ TQStringList files(KGlobal::dirs()->findAllResources("data", "QtCurve/*"EXTENSION, false, true));
files.sort();
- QStringList::Iterator it(files.begin()),
+ TQStringList::Iterator it(files.begin()),
end(files.end());
Options opts;
@@ -807,7 +807,7 @@ void QtCurveConfig::loadStyles(QPopupMenu *menu)
this, SLOT(setStyle(int)))]=*it;
}
-void QtCurveConfig::save()
+void TQtCurveConfig::save()
{
Options opts=currentStyle;
@@ -815,7 +815,7 @@ void QtCurveConfig::save()
writeConfig(NULL, opts, defaultStyle);
KSharedConfig *cfg=KGlobal::sharedConfig();
- QString grp(cfg->group());
+ TQString grp(cfg->group());
bool useGlobals(cfg->forceGlobal());
cfg->setForceGlobal(true);
@@ -830,26 +830,26 @@ void QtCurveConfig::save()
cfg->setForceGlobal(useGlobals);
}
-void QtCurveConfig::defaults()
+void TQtCurveConfig::defaults()
{
setWidgetOptions(defaultStyle);
if (settingsChanged())
emit changed(true);
}
-void QtCurveConfig::setStyle(int s)
+void TQtCurveConfig::setStyle(int s)
{
loadStyle(styles[s]);
}
-void QtCurveConfig::emboldenToggled()
+void TQtCurveConfig::emboldenToggled()
{
if(!embolden->isChecked() && IND_NONE==defBtnIndicator->currentItem())
defBtnIndicator->setCurrentItem(IND_TINT);
updateChanged();
}
-void QtCurveConfig::defBtnIndicatorChanged()
+void TQtCurveConfig::defBtnIndicatorChanged()
{
if(IND_NONE==defBtnIndicator->currentItem() && !embolden->isChecked())
embolden->setChecked(true);
@@ -862,7 +862,7 @@ void QtCurveConfig::defBtnIndicatorChanged()
updateChanged();
}
-void QtCurveConfig::buttonEffectChanged()
+void TQtCurveConfig::buttonEffectChanged()
{
if(EFFECT_NONE==buttonEffect->currentItem())
{
@@ -875,7 +875,7 @@ void QtCurveConfig::buttonEffectChanged()
updateChanged();
}
-void QtCurveConfig::coloredMouseOverChanged()
+void TQtCurveConfig::coloredMouseOverChanged()
{
if(MO_GLOW==coloredMouseOver->currentItem() &&
EFFECT_NONE==buttonEffect->currentItem())
@@ -884,51 +884,51 @@ void QtCurveConfig::coloredMouseOverChanged()
updateChanged();
}
-void QtCurveConfig::shadeSlidersChanged()
+void TQtCurveConfig::shadeSlidersChanged()
{
customSlidersColor->setEnabled(SHADE_CUSTOM==shadeSliders->currentItem());
updateChanged();
}
-void QtCurveConfig::shadeMenubarsChanged()
+void TQtCurveConfig::shadeMenubarsChanged()
{
customMenubarsColor->setEnabled(SHADE_CUSTOM==shadeMenubars->currentItem());
updateChanged();
}
-void QtCurveConfig::shadeCheckRadioChanged()
+void TQtCurveConfig::shadeCheckRadioChanged()
{
customCheckRadioColor->setEnabled(SHADE_CUSTOM==shadeCheckRadio->currentItem());
updateChanged();
}
-void QtCurveConfig::customMenuTextColorChanged()
+void TQtCurveConfig::customMenuTextColorChanged()
{
customMenuNormTextColor->setEnabled(customMenuTextColor->isChecked());
customMenuSelTextColor->setEnabled(customMenuTextColor->isChecked());
updateChanged();
}
-void QtCurveConfig::menuStripeChanged()
+void TQtCurveConfig::menuStripeChanged()
{
customMenuStripeColor->setEnabled(SHADE_CUSTOM==menuStripe->currentItem());
menuStripeAppearance->setEnabled(SHADE_NONE!=menuStripe->currentItem());
updateChanged();
}
-void QtCurveConfig::comboBtnChanged()
+void TQtCurveConfig::comboBtnChanged()
{
customComboBtnColor->setEnabled(SHADE_CUSTOM==comboBtn->currentItem());
updateChanged();
}
-void QtCurveConfig::sortedLvChanged()
+void TQtCurveConfig::sortedLvChanged()
{
customSortedLvColor->setEnabled(SHADE_CUSTOM==sortedLv->currentItem());
updateChanged();
}
-void QtCurveConfig::stripedProgressChanged()
+void TQtCurveConfig::stripedProgressChanged()
{
bool allowAnimation=STRIPE_NONE!=stripedProgress->currentItem() &&
STRIPE_FADE!=stripedProgress->currentItem();
@@ -939,7 +939,7 @@ void QtCurveConfig::stripedProgressChanged()
updateChanged();
}
-void QtCurveConfig::activeTabAppearanceChanged()
+void TQtCurveConfig::activeTabAppearanceChanged()
{
int current(activeTabAppearance->currentItem());
bool disableCol(APPEARANCE_FLAT==current && APPEARANCE_RAISED==current);
@@ -950,7 +950,7 @@ void QtCurveConfig::activeTabAppearanceChanged()
updateChanged();
}
-void QtCurveConfig::tabMoChanged()
+void TQtCurveConfig::tabMoChanged()
{
if(TAB_MO_GLOW==tabMouseOver->currentItem())
roundAllTabs->setChecked(true);
@@ -958,14 +958,14 @@ void QtCurveConfig::tabMoChanged()
updateChanged();
}
-void QtCurveConfig::shadingChanged()
+void TQtCurveConfig::shadingChanged()
{
updateChanged();
if(gradPreview)
gradPreview->repaint();
}
-void QtCurveConfig::passwordCharClicked()
+void TQtCurveConfig::passwordCharClicked()
{
int cur(toInt(passwordChar->text()));
CharSelectDialog dlg(this, cur);
@@ -977,7 +977,7 @@ void QtCurveConfig::passwordCharClicked()
}
}
-void QtCurveConfig::unifySpinBtnsToggled()
+void TQtCurveConfig::unifySpinBtnsToggled()
{
if(unifySpinBtns->isChecked())
unifySpin->setChecked(false);
@@ -985,7 +985,7 @@ void QtCurveConfig::unifySpinBtnsToggled()
updateChanged();
}
-void QtCurveConfig::unifySpinToggled()
+void TQtCurveConfig::unifySpinToggled()
{
if(unifySpin->isChecked())
unifySpinBtns->setChecked(false);
@@ -993,14 +993,14 @@ void QtCurveConfig::unifySpinToggled()
updateChanged();
}
-void QtCurveConfig::sliderThumbChanged()
+void TQtCurveConfig::sliderThumbChanged()
{
if(LINE_NONE!=sliderThumbs->currentItem() && sliderWidth->value()<DEFAULT_SLIDER_WIDTH)
sliderWidth->setValue(DEFAULT_SLIDER_WIDTH);
updateChanged();
}
-void QtCurveConfig::sliderWidthChanged()
+void TQtCurveConfig::sliderWidthChanged()
{
if(0==sliderWidth->value()%2)
sliderWidth->setValue(sliderWidth->value()+1);
@@ -1009,8 +1009,8 @@ void QtCurveConfig::sliderWidthChanged()
sliderThumbs->setCurrentItem(LINE_NONE);
updateChanged();
}
-
-void QtCurveConfig::setupStack()
+
+void TQtCurveConfig::setupStack()
{
int i=0;
lastCategory=new CStackItem(stackList, i18n("General"), i++);
@@ -1038,7 +1038,7 @@ void QtCurveConfig::setupStack()
connect(stackList, SIGNAL(selectionChanged()), SLOT(changeStack()));
}
-void QtCurveConfig::changeStack()
+void TQtCurveConfig::changeStack()
{
CStackItem *item=(CStackItem *)(stackList->selectedItem());
@@ -1058,7 +1058,7 @@ void QtCurveConfig::changeStack()
stack->raiseWidget(item->stack());
}
-void QtCurveConfig::gradChanged(int i)
+void TQtCurveConfig::gradChanged(int i)
{
GradientCont::const_iterator it(customGradient.find((EAppearance)i));
@@ -1073,8 +1073,8 @@ void QtCurveConfig::gradChanged(int i)
gend((*it).second.stops.end());
for(; git!=gend; ++git)
- new CGradItem(gradStops, QString().setNum((*git).pos*100.0),
- QString().setNum((*git).val*100.0));
+ new CGradItem(gradStops, TQString().setNum((*git).pos*100.0),
+ TQString().setNum((*git).val*100.0));
}
else
{
@@ -1085,7 +1085,7 @@ void QtCurveConfig::gradChanged(int i)
gradBorder->setEnabled(NUM_CUSTOM_GRAD!=i);
}
-void QtCurveConfig::itemChanged(QListViewItem *i, int col)
+void TQtCurveConfig::itemChanged(QListViewItem *i, int col)
{
GradientCont::iterator it=customGradient.find((EAppearance)gradCombo->currentItem());
@@ -1104,13 +1104,13 @@ void QtCurveConfig::itemChanged(QListViewItem *i, int col)
(*it).second.stops.erase(GradientStop(col ? pos : prev, col ? prev : val));
(*it).second.stops.insert(GradientStop(pos, val));
gradPreview->setGrad((*it).second.stops);
- i->setText(col, QString().setNum(val));
+ i->setText(col, TQString().setNum(val));
emit changed(true);
}
}
}
-void QtCurveConfig::addGradStop()
+void TQtCurveConfig::addGradStop()
{
GradientCont::iterator cg=customGradient.find((EAppearance)gradCombo->currentItem());
@@ -1148,13 +1148,13 @@ void QtCurveConfig::addGradStop()
{
gradPreview->setGrad((*cg).second.stops);
- QListViewItem *prev=gradStops->selectedItem();
+ TQListViewItem *prev=gradStops->selectedItem();
if(prev)
gradStops->setSelected(prev, false);
- CGradItem *i=new CGradItem(gradStops, QString().setNum(pos*100.0),
- QString().setNum(val*100.0));
+ CGradItem *i=new CGradItem(gradStops, TQString().setNum(pos*100.0),
+ TQString().setNum(val*100.0));
gradStops->setSelected(i, true);
emit changed(true);
@@ -1162,13 +1162,13 @@ void QtCurveConfig::addGradStop()
}
}
-void QtCurveConfig::removeGradStop()
+void TQtCurveConfig::removeGradStop()
{
- QListViewItem *cur=gradStops->selectedItem();
+ TQListViewItem *cur=gradStops->selectedItem();
if(cur)
{
- QListViewItem *next=cur->itemBelow();
+ TQListViewItem *next=cur->itemBelow();
if(!next)
next=cur->itemAbove();
@@ -1191,9 +1191,9 @@ void QtCurveConfig::removeGradStop()
}
}
-void QtCurveConfig::updateGradStop()
+void TQtCurveConfig::updateGradStop()
{
- QListViewItem *i=gradStops->selectedItem();
+ TQListViewItem *i=gradStops->selectedItem();
GradientCont::iterator cg=customGradient.find((EAppearance)gradCombo->currentItem());
@@ -1209,8 +1209,8 @@ void QtCurveConfig::updateGradStop()
(*cg).second.stops.erase(GradientStop(curPos, curVal));
(*cg).second.stops.insert(GradientStop(newPos, newVal));
- i->setText(0, QString().setNum(stopPosition->value()));
- i->setText(1, QString().setNum(stopValue->value()));
+ i->setText(0, TQString().setNum(stopPosition->value()));
+ i->setText(1, TQString().setNum(stopValue->value()));
gradPreview->setGrad((*cg).second.stops);
emit changed(true);
}
@@ -1219,9 +1219,9 @@ void QtCurveConfig::updateGradStop()
addGradStop();
}
-void QtCurveConfig::stopSelected()
+void TQtCurveConfig::stopSelected()
{
- QListViewItem *i=gradStops->selectedItem();
+ TQListViewItem *i=gradStops->selectedItem();
removeButton->setEnabled(i);
updateButton->setEnabled(i);
@@ -1238,7 +1238,7 @@ void QtCurveConfig::stopSelected()
}
}
-void QtCurveConfig::setupGradientsTab()
+void TQtCurveConfig::setupGradientsTab()
{
for(int i=APPEARANCE_CUSTOM1; i<(APPEARANCE_CUSTOM1+NUM_CUSTOM_GRAD); ++i)
gradCombo->insertItem(i18n("Custom gradient %1").arg((i-APPEARANCE_CUSTOM1)+1));
@@ -1246,11 +1246,11 @@ void QtCurveConfig::setupGradientsTab()
gradCombo->setCurrentItem(APPEARANCE_CUSTOM1);
gradPreview=new CGradientPreview(this, previewWidgetContainer);
- QVBoxLayout *layout=new QVBoxLayout(previewWidgetContainer);
+ TQVBoxLayout *layout=new TQVBoxLayout(previewWidgetContainer);
layout->addWidget(gradPreview);
layout->setMargin(0);
layout->setSpacing(0);
- QColor col(palette().color(QPalette::Active, QColorGroup::Button));
+ TQColor col(palette().color(QPalette::Active, TQColorGroup::Button));
previewColor->setColor(col);
gradPreview->setColor(col);
gradChanged(APPEARANCE_CUSTOM1);
@@ -1267,7 +1267,7 @@ void QtCurveConfig::setupGradientsTab()
updateButton->setEnabled(false);
gradStops->setResizeMode(QListView::AllColumns);
connect(gradCombo, SIGNAL(activated(int)), SLOT(gradChanged(int)));
- connect(previewColor, SIGNAL(changed(const QColor &)), gradPreview, SLOT(setColor(const QColor &)));
+ connect(previewColor, SIGNAL(changed(const TQColor &)), gradPreview, SLOT(setColor(const TQColor &)));
connect(gradStops, SIGNAL(itemRenamed(QListViewItem *, int)), SLOT(itemChanged(QListViewItem *, int)));
connect(addButton, SIGNAL(clicked()), SLOT(addGradStop()));
connect(removeButton, SIGNAL(clicked()), SLOT(removeGradStop()));
@@ -1275,7 +1275,7 @@ void QtCurveConfig::setupGradientsTab()
connect(gradStops, SIGNAL(selectionChanged()), SLOT(stopSelected()));
}
-void QtCurveConfig::setupShadesTab()
+void TQtCurveConfig::setupShadesTab()
{
int shade(0);
@@ -1288,14 +1288,14 @@ void QtCurveConfig::setupShadesTab()
connect(customShading, SIGNAL(toggled(bool)), SLOT(updateChanged()));
}
-void QtCurveConfig::setupShade(KDoubleNumInput *w, int shade)
+void TQtCurveConfig::setupShade(KDoubleNumInput *w, int shade)
{
w->setRange(0.0, 2.0, 0.05, false);
connect(w, SIGNAL(valueChanged(double)), SLOT(updateChanged()));
shadeVals[shade]=w;
}
-void QtCurveConfig::populateShades(const Options &opts)
+void TQtCurveConfig::populateShades(const Options &opts)
{
SHADES
int contrast=QSettings().readNumEntry("/Qt/KDE/contrast", 7);
@@ -1314,7 +1314,7 @@ void QtCurveConfig::populateShades(const Options &opts)
[i]);
}
-bool QtCurveConfig::diffShades(const Options &opts)
+bool TQtCurveConfig::diffShades(const Options &opts)
{
if( (!USE_CUSTOM_SHADES(opts) && customShading->isChecked()) ||
(USE_CUSTOM_SHADES(opts) && !customShading->isChecked()) )
@@ -1330,30 +1330,30 @@ bool QtCurveConfig::diffShades(const Options &opts)
return false;
}
-void QtCurveConfig::setPasswordChar(int ch)
+void TQtCurveConfig::setPasswordChar(int ch)
{
- QString str;
- QTextOStream s(&str);
+ TQString str;
+ TQTextOStream s(&str);
s.setf(QTextStream::hex);
- s << QChar(ch) << " (" << ch << ')';
+ s << TQChar(ch) << " (" << ch << ')';
passwordChar->setText(str);
}
-void QtCurveConfig::updateChanged()
+void TQtCurveConfig::updateChanged()
{
if (settingsChanged())
emit changed(true);
}
-void QtCurveConfig::focusChanged()
+void TQtCurveConfig::focusChanged()
{
if(ROUND_MAX==round->currentItem() && FOCUS_LINE!=focus->currentItem())
round->setCurrentItem(ROUND_EXTRA);
updateChanged();
}
-void QtCurveConfig::roundChanged()
+void TQtCurveConfig::roundChanged()
{
if(ROUND_MAX==round->currentItem() && FOCUS_LINE!=focus->currentItem())
focus->setCurrentItem(FOCUS_LINE);
@@ -1363,9 +1363,9 @@ void QtCurveConfig::roundChanged()
updateChanged();
}
-void QtCurveConfig::importStyle()
+void TQtCurveConfig::importStyle()
{
- QString file(KFileDialog::getOpenFileName(QString::null,
+ TQString file(KFileDialog::getOpenFileName(QString::null,
i18n("*"EXTENSION"|QtCurve Settings Files\n"
THEME_PREFIX"*"THEME_SUFFIX"|QtCurve KDE Theme Files"),
this));
@@ -1374,9 +1374,9 @@ void QtCurveConfig::importStyle()
loadStyle(file);
}
-void QtCurveConfig::exportStyle()
+void TQtCurveConfig::exportStyle()
{
- QString file(KFileDialog::getSaveFileName(QString::null, i18n("*"EXTENSION"|QtCurve Settings Files"), this));
+ TQString file(KFileDialog::getSaveFileName(QString::null, i18n("*"EXTENSION"|QtCurve Settings Files"), this));
if(!file.isEmpty())
{
@@ -1396,9 +1396,9 @@ void QtCurveConfig::exportStyle()
}
}
-void QtCurveConfig::exportTheme()
+void TQtCurveConfig::exportTheme()
{
-#ifdef QTC_STYLE_SUPPORT
+#ifdef TQTC_STYLE_SUPPORT
if(!exportDialog)
exportDialog=new CExportThemeDialog(this);
@@ -1409,7 +1409,7 @@ void QtCurveConfig::exportTheme()
#endif
}
-void QtCurveConfig::loadStyle(const QString &file)
+void TQtCurveConfig::loadStyle(const TQString &file)
{
Options opts;
@@ -1421,7 +1421,7 @@ void QtCurveConfig::loadStyle(const QString &file)
}
}
-void QtCurveConfig::setOptions(Options &opts)
+void TQtCurveConfig::setOptions(Options &opts)
{
opts.round=(ERound)round->currentItem();
opts.toolbarBorders=(ETBarBorder)toolbarBorders->currentItem();
@@ -1548,7 +1548,7 @@ void QtCurveConfig::setOptions(Options &opts)
opts.customShades[0]=0;
}
-void QtCurveConfig::setWidgetOptions(const Options &opts)
+void TQtCurveConfig::setWidgetOptions(const Options &opts)
{
round->setCurrentItem(opts.round);
scrollbarType->setCurrentItem(opts.scrollbarType);
@@ -1685,7 +1685,7 @@ void QtCurveConfig::setWidgetOptions(const Options &opts)
populateShades(opts);
}
-int QtCurveConfig::getSquareFlags()
+int TQtCurveConfig::getSquareFlags()
{
int square(0);
/*
@@ -1701,7 +1701,7 @@ int QtCurveConfig::getSquareFlags()
return square;
}
-int QtCurveConfig::getWindowBorderFlags()
+int TQtCurveConfig::getWindowBorderFlags()
{
int flags(0);
@@ -1716,7 +1716,7 @@ int QtCurveConfig::getWindowBorderFlags()
return flags;
}
-bool QtCurveConfig::settingsChanged()
+bool TQtCurveConfig::settingsChanged()
{
return round->currentItem()!=currentStyle.round ||
toolbarBorders->currentItem()!=currentStyle.toolbarBorders ||