|
|
|
@ -19,24 +19,24 @@
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "qtcurveconfig.h"
|
|
|
|
|
#ifdef QTC_STYLE_SUPPORT
|
|
|
|
|
#ifdef TQTC_STYLE_SUPPORT
|
|
|
|
|
#include "exportthemedialog.h"
|
|
|
|
|
#endif
|
|
|
|
|
#include <qcheckbox.h>
|
|
|
|
|
#include <qcombobox.h>
|
|
|
|
|
#include <qgroupbox.h>
|
|
|
|
|
#include <qradiobutton.h>
|
|
|
|
|
#include <qlabel.h>
|
|
|
|
|
#include <qlayout.h>
|
|
|
|
|
#include <qframe.h>
|
|
|
|
|
#include <qtabwidget.h>
|
|
|
|
|
#include <qpopupmenu.h>
|
|
|
|
|
#include <qfileinfo.h>
|
|
|
|
|
#include <qlistview.h>
|
|
|
|
|
#include <qpainter.h>
|
|
|
|
|
#include <qregexp.h>
|
|
|
|
|
#include <qsettings.h>
|
|
|
|
|
#include <qwidgetstack.h>
|
|
|
|
|
#include <tqcheckbox.h>
|
|
|
|
|
#include <tqcombobox.h>
|
|
|
|
|
#include <tqgroupbox.h>
|
|
|
|
|
#include <tqradiobutton.h>
|
|
|
|
|
#include <tqlabel.h>
|
|
|
|
|
#include <tqlayout.h>
|
|
|
|
|
#include <tqframe.h>
|
|
|
|
|
#include <tqtabwidget.h>
|
|
|
|
|
#include <tqpopupmenu.h>
|
|
|
|
|
#include <tqfileinfo.h>
|
|
|
|
|
#include <tqlistview.h>
|
|
|
|
|
#include <tqpainter.h>
|
|
|
|
|
#include <tqregexp.h>
|
|
|
|
|
#include <tqsettings.h>
|
|
|
|
|
#include <tqwidgetstack.h>
|
|
|
|
|
#include <klocale.h>
|
|
|
|
|
#include <kcolorbutton.h>
|
|
|
|
|
#include <kconfig.h>
|
|
|
|
@ -62,15 +62,15 @@
|
|
|
|
|
|
|
|
|
|
extern "C"
|
|
|
|
|
{
|
|
|
|
|
QWidget * allocate_kstyle_config(QWidget *parent)
|
|
|
|
|
TQWidget * allocate_kstyle_config(TQWidget *parent)
|
|
|
|
|
{
|
|
|
|
|
KGlobal::locale()->insertCatalogue("qtcurve");
|
|
|
|
|
return new QtCurveConfig(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)
|
|
|
|
|
{
|
|
|
|
@ -99,7 +99,7 @@ static void drawGradient(const QColor &top, const QColor &bot, bool increase,
|
|
|
|
|
{
|
|
|
|
|
for (i=0; i < size; i++)
|
|
|
|
|
{
|
|
|
|
|
p->setPen(QColor(rl>>16, gl>>16, bl>>16));
|
|
|
|
|
p->setPen(TQColor(rl>>16, gl>>16, bl>>16));
|
|
|
|
|
p->drawLine(rx, ry+i, rx2, ry+i);
|
|
|
|
|
rl += dr;
|
|
|
|
|
gl += dg;
|
|
|
|
@ -109,7 +109,7 @@ static void drawGradient(const QColor &top, const QColor &bot, bool increase,
|
|
|
|
|
else
|
|
|
|
|
for(i=0; i < size; i++)
|
|
|
|
|
{
|
|
|
|
|
p->setPen(QColor(rl>>16, gl>>16, bl>>16));
|
|
|
|
|
p->setPen(TQColor(rl>>16, gl>>16, bl>>16));
|
|
|
|
|
p->drawLine(rx+i, ry, rx+i, ry2);
|
|
|
|
|
rl += dr;
|
|
|
|
|
gl += dg;
|
|
|
|
@ -120,7 +120,7 @@ static void drawGradient(const QColor &top, const QColor &bot, bool increase,
|
|
|
|
|
{
|
|
|
|
|
for(i=size-1; i>=0; i--)
|
|
|
|
|
{
|
|
|
|
|
p->setPen(QColor(rl>>16, gl>>16, bl>>16));
|
|
|
|
|
p->setPen(TQColor(rl>>16, gl>>16, bl>>16));
|
|
|
|
|
p->drawLine(rx, ry+i, rx2, ry+i);
|
|
|
|
|
rl += dr;
|
|
|
|
|
gl += dg;
|
|
|
|
@ -130,7 +130,7 @@ static void drawGradient(const QColor &top, const QColor &bot, bool increase,
|
|
|
|
|
else
|
|
|
|
|
for(i=size-1; i>=0; i--)
|
|
|
|
|
{
|
|
|
|
|
p->setPen(QColor(rl>>16, gl>>16, bl>>16));
|
|
|
|
|
p->setPen(TQColor(rl>>16, gl>>16, bl>>16));
|
|
|
|
|
p->drawLine(rx+i, ry, rx+i, ry2);
|
|
|
|
|
rl += dr;
|
|
|
|
|
gl += dg;
|
|
|
|
@ -144,15 +144,15 @@ class CharSelectDialog : public KDialogBase
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
CharSelectDialog(QWidget *parent, int v)
|
|
|
|
|
CharSelectDialog(TQWidget *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));
|
|
|
|
|
itsSelector->setChar(TQChar(v));
|
|
|
|
|
layout->addWidget(itsSelector);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -163,17 +163,17 @@ 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(TQListView *p, const TQString &text, int s)
|
|
|
|
|
: TQListViewItem(p, text),
|
|
|
|
|
stackId(s)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int compare(QListViewItem *i, int, bool) const
|
|
|
|
|
int compare(TQListViewItem *i, int, bool) const
|
|
|
|
|
{
|
|
|
|
|
int b=((CStackItem *)i)->stackId;
|
|
|
|
|
|
|
|
|
@ -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(TQListView *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;
|
|
|
|
@ -241,7 +241,7 @@ class CGradItem : public QListViewItem
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int compare(QListViewItem *i, int col, bool) const
|
|
|
|
|
int compare(TQListViewItem *i, int col, bool) const
|
|
|
|
|
{
|
|
|
|
|
double a(text(col).toDouble()),
|
|
|
|
|
b(i->text(col).toDouble());
|
|
|
|
@ -260,41 +260,41 @@ class CGradItem : public QListViewItem
|
|
|
|
|
double prev;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
CGradientPreview::CGradientPreview(QtCurveConfig *c, QWidget *p)
|
|
|
|
|
: QWidget(p),
|
|
|
|
|
CGradientPreview::CGradientPreview(QtCurveConfig *c, TQWidget *p)
|
|
|
|
|
: TQWidget(p),
|
|
|
|
|
cfg(c)
|
|
|
|
|
{
|
|
|
|
|
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred);
|
|
|
|
|
setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QSize CGradientPreview::sizeHint() const
|
|
|
|
|
TQSize CGradientPreview::sizeHint() const
|
|
|
|
|
{
|
|
|
|
|
return QSize(64, 64);
|
|
|
|
|
return TQSize(64, 64);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QSize CGradientPreview::minimumSizeHint() const
|
|
|
|
|
TQSize CGradientPreview::minimumSizeHint() const
|
|
|
|
|
{
|
|
|
|
|
return sizeHint();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CGradientPreview::paintEvent(QPaintEvent *)
|
|
|
|
|
void CGradientPreview::paintEvent(TQPaintEvent *)
|
|
|
|
|
{
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
@ -352,7 +352,7 @@ enum ShadeWidget
|
|
|
|
|
SW_LV_HEADER
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static void insertShadeEntries(QComboBox *combo, ShadeWidget sw)
|
|
|
|
|
static void insertShadeEntries(TQComboBox *combo, ShadeWidget sw)
|
|
|
|
|
{
|
|
|
|
|
switch(sw)
|
|
|
|
|
{
|
|
|
|
@ -384,7 +384,7 @@ static void insertShadeEntries(QComboBox *combo, ShadeWidget sw)
|
|
|
|
|
combo->insertItem(i18n("Titlebar border"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void insertAppearanceEntries(QComboBox *combo, bool split=true, bool bev=true, bool fade=false, bool striped=false)
|
|
|
|
|
static void insertAppearanceEntries(TQComboBox *combo, bool split=true, bool bev=true, bool fade=false, bool striped=false)
|
|
|
|
|
{
|
|
|
|
|
for(int i=APPEARANCE_CUSTOM1; i<(APPEARANCE_CUSTOM1+NUM_CUSTOM_GRAD); ++i)
|
|
|
|
|
combo->insertItem(i18n("Custom gradient %1").arg((i-APPEARANCE_CUSTOM1)+1));
|
|
|
|
@ -413,7 +413,7 @@ static void insertAppearanceEntries(QComboBox *combo, bool split=true, bool bev=
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void insertLineEntries(QComboBox *combo, bool singleDot, bool dashes)
|
|
|
|
|
static void insertLineEntries(TQComboBox *combo, bool singleDot, bool dashes)
|
|
|
|
|
{
|
|
|
|
|
combo->insertItem(i18n("None"));
|
|
|
|
|
combo->insertItem(i18n("Sunken lines"));
|
|
|
|
@ -427,7 +427,7 @@ static void insertLineEntries(QComboBox *combo, bool singleDot, bool dashes)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void insertDefBtnEntries(QComboBox *combo)
|
|
|
|
|
static void insertDefBtnEntries(TQComboBox *combo)
|
|
|
|
|
{
|
|
|
|
|
combo->insertItem(i18n("Corner indicator"));
|
|
|
|
|
combo->insertItem(i18n("Font color thin border"));
|
|
|
|
@ -439,7 +439,7 @@ static void insertDefBtnEntries(QComboBox *combo)
|
|
|
|
|
combo->insertItem(i18n("No indicator"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void insertScrollbarEntries(QComboBox *combo)
|
|
|
|
|
static void insertScrollbarEntries(TQComboBox *combo)
|
|
|
|
|
{
|
|
|
|
|
combo->insertItem(i18n("KDE"));
|
|
|
|
|
combo->insertItem(i18n("MS Windows"));
|
|
|
|
@ -448,7 +448,7 @@ static void insertScrollbarEntries(QComboBox *combo)
|
|
|
|
|
combo->insertItem(i18n("No buttons"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void insertRoundEntries(QComboBox *combo)
|
|
|
|
|
static void insertRoundEntries(TQComboBox *combo)
|
|
|
|
|
{
|
|
|
|
|
combo->insertItem(i18n("Square"));
|
|
|
|
|
combo->insertItem(i18n("Slightly rounded"));
|
|
|
|
@ -457,7 +457,7 @@ static void insertRoundEntries(QComboBox *combo)
|
|
|
|
|
combo->insertItem(i18n("Max rounded (KDE4 & Gtk2)"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void insertMouseOverEntries(QComboBox *combo)
|
|
|
|
|
static void insertMouseOverEntries(TQComboBox *combo)
|
|
|
|
|
{
|
|
|
|
|
combo->insertItem(i18n("No coloration"));
|
|
|
|
|
combo->insertItem(i18n("Color border"));
|
|
|
|
@ -466,7 +466,7 @@ static void insertMouseOverEntries(QComboBox *combo)
|
|
|
|
|
combo->insertItem(i18n("Glow"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void insertToolbarBorderEntries(QComboBox *combo)
|
|
|
|
|
static void insertToolbarBorderEntries(TQComboBox *combo)
|
|
|
|
|
{
|
|
|
|
|
combo->insertItem(i18n("None"));
|
|
|
|
|
combo->insertItem(i18n("Light"));
|
|
|
|
@ -475,14 +475,14 @@ static void insertToolbarBorderEntries(QComboBox *combo)
|
|
|
|
|
combo->insertItem(i18n("Dark (all sides)"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void insertEffectEntries(QComboBox *combo)
|
|
|
|
|
static void insertEffectEntries(TQComboBox *combo)
|
|
|
|
|
{
|
|
|
|
|
combo->insertItem(i18n("Plain"));
|
|
|
|
|
combo->insertItem(i18n("Etched"));
|
|
|
|
|
combo->insertItem(i18n("Shadowed"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void insertShadingEntries(QComboBox *combo)
|
|
|
|
|
static void insertShadingEntries(TQComboBox *combo)
|
|
|
|
|
{
|
|
|
|
|
combo->insertItem(i18n("Simple"));
|
|
|
|
|
combo->insertItem(i18n("Use HSL color space"));
|
|
|
|
@ -490,7 +490,7 @@ static void insertShadingEntries(QComboBox *combo)
|
|
|
|
|
combo->insertItem(i18n("Use HCY color space"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void insertStripeEntries(QComboBox *combo)
|
|
|
|
|
static void insertStripeEntries(TQComboBox *combo)
|
|
|
|
|
{
|
|
|
|
|
combo->insertItem(i18n("Plain"));
|
|
|
|
|
combo->insertItem(i18n("Stripes"));
|
|
|
|
@ -498,7 +498,7 @@ static void insertStripeEntries(QComboBox *combo)
|
|
|
|
|
combo->insertItem(i18n("Faded stripes"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void insertSliderStyleEntries(QComboBox *combo)
|
|
|
|
|
static void insertSliderStyleEntries(TQComboBox *combo)
|
|
|
|
|
{
|
|
|
|
|
combo->insertItem(i18n("Plain"));
|
|
|
|
|
combo->insertItem(i18n("Round"));
|
|
|
|
@ -508,14 +508,14 @@ static void insertSliderStyleEntries(QComboBox *combo)
|
|
|
|
|
combo->insertItem(i18n("Circular"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void insertEColorEntries(QComboBox *combo)
|
|
|
|
|
static void insertEColorEntries(TQComboBox *combo)
|
|
|
|
|
{
|
|
|
|
|
combo->insertItem(i18n("Base color"));
|
|
|
|
|
combo->insertItem(i18n("Background color"));
|
|
|
|
|
combo->insertItem(i18n("Darkened background color"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void insertFocusEntries(QComboBox *combo)
|
|
|
|
|
static void insertFocusEntries(TQComboBox *combo)
|
|
|
|
|
{
|
|
|
|
|
combo->insertItem(i18n("Standard (dotted)"));
|
|
|
|
|
combo->insertItem(i18n("Highlight color"));
|
|
|
|
@ -524,7 +524,7 @@ static void insertFocusEntries(QComboBox *combo)
|
|
|
|
|
combo->insertItem(i18n("Line drawn with highlight color"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void insertGradBorderEntries(QComboBox *combo)
|
|
|
|
|
static void insertGradBorderEntries(TQComboBox *combo)
|
|
|
|
|
{
|
|
|
|
|
combo->insertItem(i18n("No border"));
|
|
|
|
|
combo->insertItem(i18n("Light border"));
|
|
|
|
@ -533,7 +533,7 @@ static void insertGradBorderEntries(QComboBox *combo)
|
|
|
|
|
combo->insertItem(i18n("Shine"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void insertAlignEntries(QComboBox *combo)
|
|
|
|
|
static void insertAlignEntries(TQComboBox *combo)
|
|
|
|
|
{
|
|
|
|
|
combo->insertItem(i18n("Left"));
|
|
|
|
|
combo->insertItem(i18n("Center (between controls)"));
|
|
|
|
@ -541,29 +541,29 @@ static void insertAlignEntries(QComboBox *combo)
|
|
|
|
|
combo->insertItem(i18n("Right"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void insertTabMoEntriess(QComboBox *combo)
|
|
|
|
|
static void insertTabMoEntriess(TQComboBox *combo)
|
|
|
|
|
{
|
|
|
|
|
combo->insertItem(i18n("Highlight on top"));
|
|
|
|
|
combo->insertItem(i18n("Highlight on bottom"));
|
|
|
|
|
combo->insertItem(i18n("Add a slight glow"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void insertGradTypeEntries(QComboBox *combo)
|
|
|
|
|
static void insertGradTypeEntries(TQComboBox *combo)
|
|
|
|
|
{
|
|
|
|
|
combo->insertItem(i18n("Top to bottom"));
|
|
|
|
|
combo->insertItem(i18n("Left to right"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void insertLvLinesEntries(QComboBox *combo)
|
|
|
|
|
static void insertLvLinesEntries(TQComboBox *combo)
|
|
|
|
|
{
|
|
|
|
|
combo->insertItem(i18n("None"));
|
|
|
|
|
combo->insertItem(i18n("New style (KDE and Gtk2 similar)"));
|
|
|
|
|
combo->insertItem(i18n("Old style (KDE and Gtk2 different)"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QtCurveConfig::QtCurveConfig(QWidget *parent)
|
|
|
|
|
QtCurveConfig::QtCurveConfig(TQWidget *parent)
|
|
|
|
|
: QtCurveConfigBase(parent),
|
|
|
|
|
#ifdef QTC_STYLE_SUPPORT
|
|
|
|
|
#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()));
|
|
|
|
@ -671,7 +671,9 @@ QtCurveConfig::QtCurveConfig(QWidget *parent)
|
|
|
|
|
connect(activeTabAppearance, SIGNAL(activated(int)), SLOT(activeTabAppearanceChanged()));
|
|
|
|
|
connect(toolbarSeparators, SIGNAL(activated(int)), SLOT(updateChanged()));
|
|
|
|
|
connect(splitters, SIGNAL(activated(int)), SLOT(updateChanged()));
|
|
|
|
|
#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
|
|
|
|
|
connect(fixParentlessDialogs, SIGNAL(toggled(bool)), SLOT(updateChanged()));
|
|
|
|
|
#endif
|
|
|
|
|
connect(fillSlider, SIGNAL(toggled(bool)), SLOT(updateChanged()));
|
|
|
|
|
connect(sliderStyle, SIGNAL(activated(int)), SLOT(updateChanged()));
|
|
|
|
|
connect(roundMbTopOnly, SIGNAL(toggled(bool)), SLOT(updateChanged()));
|
|
|
|
@ -680,8 +682,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 +713,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 +724,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()));
|
|
|
|
@ -749,10 +751,14 @@ QtCurveConfig::QtCurveConfig(QWidget *parent)
|
|
|
|
|
connect(gtkButtonOrder, SIGNAL(toggled(bool)), SLOT(updateChanged()));
|
|
|
|
|
connect(mapKdeIcons, SIGNAL(toggled(bool)), SLOT(updateChanged()));
|
|
|
|
|
connect(passwordChar, SIGNAL(clicked()), SLOT(passwordCharClicked()));
|
|
|
|
|
#if 0
|
|
|
|
|
connect(framelessGroupBoxes, SIGNAL(toggled(bool)), SLOT(updateChanged()));
|
|
|
|
|
#endif
|
|
|
|
|
connect(colorMenubarMouseOver, SIGNAL(toggled(bool)), SLOT(updateChanged()));
|
|
|
|
|
connect(useHighlightForMenu, SIGNAL(toggled(bool)), SLOT(updateChanged()));
|
|
|
|
|
#if 0
|
|
|
|
|
connect(groupBoxLine, SIGNAL(toggled(bool)), SLOT(updateChanged()));
|
|
|
|
|
#endif
|
|
|
|
|
connect(fadeLines, SIGNAL(toggled(bool)), SLOT(updateChanged()));
|
|
|
|
|
connect(menuIcons, SIGNAL(toggled(bool)), SLOT(updateChanged()));
|
|
|
|
|
connect(stdBtnSizes, SIGNAL(toggled(bool)), SLOT(updateChanged()));
|
|
|
|
@ -767,8 +773,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 +782,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
|
|
|
|
@ -791,19 +797,19 @@ QtCurveConfig::~QtCurveConfig()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void QtCurveConfig::loadStyles(QPopupMenu *menu)
|
|
|
|
|
void QtCurveConfig::loadStyles(TQPopupMenu *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;
|
|
|
|
|
|
|
|
|
|
for(; it!=end; ++it)
|
|
|
|
|
if(readConfig(*it, &opts, &defaultStyle))
|
|
|
|
|
styles[menu->insertItem(QFileInfo(*it).fileName().remove(EXTENSION).replace('_', ' '),
|
|
|
|
|
styles[menu->insertItem(TQFileInfo(*it).fileName().remove(EXTENSION).replace('_', ' '),
|
|
|
|
|
this, SLOT(setStyle(int)))]=*it;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -815,7 +821,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);
|
|
|
|
@ -970,7 +976,7 @@ void QtCurveConfig::passwordCharClicked()
|
|
|
|
|
int cur(toInt(passwordChar->text()));
|
|
|
|
|
CharSelectDialog dlg(this, cur);
|
|
|
|
|
|
|
|
|
|
if(QDialog::Accepted==dlg.exec() && dlg.currentChar()!=cur)
|
|
|
|
|
if(TQDialog::Accepted==dlg.exec() && dlg.currentChar()!=cur)
|
|
|
|
|
{
|
|
|
|
|
setPasswordChar(dlg.currentChar());
|
|
|
|
|
updateChanged();
|
|
|
|
@ -1009,7 +1015,7 @@ void QtCurveConfig::sliderWidthChanged()
|
|
|
|
|
sliderThumbs->setCurrentItem(LINE_NONE);
|
|
|
|
|
updateChanged();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void QtCurveConfig::setupStack()
|
|
|
|
|
{
|
|
|
|
|
int i=0;
|
|
|
|
@ -1034,7 +1040,7 @@ void QtCurveConfig::setupStack()
|
|
|
|
|
|
|
|
|
|
stackList->setSelected(lastCategory, true);
|
|
|
|
|
stackList->setCurrentItem(lastCategory);
|
|
|
|
|
stackList->setResizeMode(QListView::LastColumn);
|
|
|
|
|
stackList->setResizeMode(TQListView::LastColumn);
|
|
|
|
|
connect(stackList, SIGNAL(selectionChanged()), SLOT(changeStack()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1073,8 +1079,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 +1091,7 @@ void QtCurveConfig::gradChanged(int i)
|
|
|
|
|
gradBorder->setEnabled(NUM_CUSTOM_GRAD!=i);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void QtCurveConfig::itemChanged(QListViewItem *i, int col)
|
|
|
|
|
void QtCurveConfig::itemChanged(TQListViewItem *i, int col)
|
|
|
|
|
{
|
|
|
|
|
GradientCont::iterator it=customGradient.find((EAppearance)gradCombo->currentItem());
|
|
|
|
|
|
|
|
|
@ -1104,7 +1110,7 @@ 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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1148,13 +1154,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);
|
|
|
|
@ -1164,11 +1170,11 @@ void QtCurveConfig::addGradStop()
|
|
|
|
|
|
|
|
|
|
void QtCurveConfig::removeGradStop()
|
|
|
|
|
{
|
|
|
|
|
QListViewItem *cur=gradStops->selectedItem();
|
|
|
|
|
TQListViewItem *cur=gradStops->selectedItem();
|
|
|
|
|
|
|
|
|
|
if(cur)
|
|
|
|
|
{
|
|
|
|
|
QListViewItem *next=cur->itemBelow();
|
|
|
|
|
TQListViewItem *next=cur->itemBelow();
|
|
|
|
|
|
|
|
|
|
if(!next)
|
|
|
|
|
next=cur->itemAbove();
|
|
|
|
@ -1193,7 +1199,7 @@ void QtCurveConfig::removeGradStop()
|
|
|
|
|
|
|
|
|
|
void QtCurveConfig::updateGradStop()
|
|
|
|
|
{
|
|
|
|
|
QListViewItem *i=gradStops->selectedItem();
|
|
|
|
|
TQListViewItem *i=gradStops->selectedItem();
|
|
|
|
|
|
|
|
|
|
GradientCont::iterator cg=customGradient.find((EAppearance)gradCombo->currentItem());
|
|
|
|
|
|
|
|
|
@ -1209,8 +1215,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);
|
|
|
|
|
}
|
|
|
|
@ -1221,7 +1227,7 @@ void QtCurveConfig::updateGradStop()
|
|
|
|
|
|
|
|
|
|
void QtCurveConfig::stopSelected()
|
|
|
|
|
{
|
|
|
|
|
QListViewItem *i=gradStops->selectedItem();
|
|
|
|
|
TQListViewItem *i=gradStops->selectedItem();
|
|
|
|
|
|
|
|
|
|
removeButton->setEnabled(i);
|
|
|
|
|
updateButton->setEnabled(i);
|
|
|
|
@ -1246,11 +1252,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(TQPalette::Active, TQColorGroup::Button));
|
|
|
|
|
previewColor->setColor(col);
|
|
|
|
|
gradPreview->setColor(col);
|
|
|
|
|
gradChanged(APPEARANCE_CUSTOM1);
|
|
|
|
@ -1258,17 +1264,17 @@ void QtCurveConfig::setupGradientsTab()
|
|
|
|
|
removeButton->setGuiItem(KGuiItem(i18n("Remove"), "remove"));
|
|
|
|
|
updateButton->setGuiItem(KGuiItem(i18n("Update"), "button_ok"));
|
|
|
|
|
|
|
|
|
|
gradStops->setDefaultRenameAction(QListView::Reject);
|
|
|
|
|
gradStops->setDefaultRenameAction(TQListView::Reject);
|
|
|
|
|
gradStops->setAllColumnsShowFocus(true);
|
|
|
|
|
gradStops->setSortColumn(0);
|
|
|
|
|
stopPosition->setRange(0, 100, 5);
|
|
|
|
|
stopValue->setRange(0, 200, 5);
|
|
|
|
|
removeButton->setEnabled(false);
|
|
|
|
|
updateButton->setEnabled(false);
|
|
|
|
|
gradStops->setResizeMode(QListView::AllColumns);
|
|
|
|
|
gradStops->setResizeMode(TQListView::AllColumns);
|
|
|
|
|
connect(gradCombo, SIGNAL(activated(int)), SLOT(gradChanged(int)));
|
|
|
|
|
connect(previewColor, SIGNAL(changed(const QColor &)), gradPreview, SLOT(setColor(const QColor &)));
|
|
|
|
|
connect(gradStops, SIGNAL(itemRenamed(QListViewItem *, int)), SLOT(itemChanged(QListViewItem *, int)));
|
|
|
|
|
connect(previewColor, SIGNAL(changed(const TQColor &)), gradPreview, SLOT(setColor(const TQColor &)));
|
|
|
|
|
connect(gradStops, SIGNAL(itemRenamed(TQListViewItem *, int)), SLOT(itemChanged(TQListViewItem *, int)));
|
|
|
|
|
connect(addButton, SIGNAL(clicked()), SLOT(addGradStop()));
|
|
|
|
|
connect(removeButton, SIGNAL(clicked()), SLOT(removeGradStop()));
|
|
|
|
|
connect(updateButton, SIGNAL(clicked()), SLOT(updateGradStop()));
|
|
|
|
@ -1298,7 +1304,7 @@ void QtCurveConfig::setupShade(KDoubleNumInput *w, int shade)
|
|
|
|
|
void QtCurveConfig::populateShades(const Options &opts)
|
|
|
|
|
{
|
|
|
|
|
SHADES
|
|
|
|
|
int contrast=QSettings().readNumEntry("/Qt/KDE/contrast", 7);
|
|
|
|
|
int contrast=TQSettings().readNumEntry("/Qt/KDE/contrast", 7);
|
|
|
|
|
|
|
|
|
|
if(contrast<0 || contrast>10)
|
|
|
|
|
contrast=7;
|
|
|
|
@ -1332,11 +1338,11 @@ bool QtCurveConfig::diffShades(const Options &opts)
|
|
|
|
|
|
|
|
|
|
void QtCurveConfig::setPasswordChar(int ch)
|
|
|
|
|
{
|
|
|
|
|
QString str;
|
|
|
|
|
QTextOStream s(&str);
|
|
|
|
|
TQString str;
|
|
|
|
|
TQTextOStream s(&str);
|
|
|
|
|
|
|
|
|
|
s.setf(QTextStream::hex);
|
|
|
|
|
s << QChar(ch) << " (" << ch << ')';
|
|
|
|
|
s.setf(TQTextStream::hex);
|
|
|
|
|
s << TQChar(ch) << " (" << ch << ')';
|
|
|
|
|
passwordChar->setText(str);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1365,7 +1371,7 @@ void QtCurveConfig::roundChanged()
|
|
|
|
|
|
|
|
|
|
void QtCurveConfig::importStyle()
|
|
|
|
|
{
|
|
|
|
|
QString file(KFileDialog::getOpenFileName(QString::null,
|
|
|
|
|
TQString file(KFileDialog::getOpenFileName(TQString::null,
|
|
|
|
|
i18n("*"EXTENSION"|QtCurve Settings Files\n"
|
|
|
|
|
THEME_PREFIX"*"THEME_SUFFIX"|QtCurve KDE Theme Files"),
|
|
|
|
|
this));
|
|
|
|
@ -1376,7 +1382,7 @@ void QtCurveConfig::importStyle()
|
|
|
|
|
|
|
|
|
|
void QtCurveConfig::exportStyle()
|
|
|
|
|
{
|
|
|
|
|
QString file(KFileDialog::getSaveFileName(QString::null, i18n("*"EXTENSION"|QtCurve Settings Files"), this));
|
|
|
|
|
TQString file(KFileDialog::getSaveFileName(TQString::null, i18n("*"EXTENSION"|QtCurve Settings Files"), this));
|
|
|
|
|
|
|
|
|
|
if(!file.isEmpty())
|
|
|
|
|
{
|
|
|
|
@ -1398,7 +1404,7 @@ void QtCurveConfig::exportStyle()
|
|
|
|
|
|
|
|
|
|
void QtCurveConfig::exportTheme()
|
|
|
|
|
{
|
|
|
|
|
#ifdef QTC_STYLE_SUPPORT
|
|
|
|
|
#ifdef TQTC_STYLE_SUPPORT
|
|
|
|
|
if(!exportDialog)
|
|
|
|
|
exportDialog=new CExportThemeDialog(this);
|
|
|
|
|
|
|
|
|
@ -1409,7 +1415,7 @@ void QtCurveConfig::exportTheme()
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void QtCurveConfig::loadStyle(const QString &file)
|
|
|
|
|
void QtCurveConfig::loadStyle(const TQString &file)
|
|
|
|
|
{
|
|
|
|
|
Options opts;
|
|
|
|
|
|
|
|
|
@ -1436,7 +1442,9 @@ void QtCurveConfig::setOptions(Options &opts)
|
|
|
|
|
opts.shadeMenubarOnlyWhenActive=shadeMenubarOnlyWhenActive->isChecked();
|
|
|
|
|
opts.thinnerMenuItems=thinnerMenuItems->isChecked();
|
|
|
|
|
opts.thinnerBtns=thinnerBtns->isChecked();
|
|
|
|
|
#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
|
|
|
|
|
opts.fixParentlessDialogs=fixParentlessDialogs->isChecked();
|
|
|
|
|
#endif
|
|
|
|
|
opts.animatedProgress=animatedProgress->isChecked();
|
|
|
|
|
opts.stripedProgress=(EStripe)stripedProgress->currentItem();
|
|
|
|
|
opts.lighterPopupMenuBgnd=lighterPopupMenuBgnd->value();
|
|
|
|
@ -1526,11 +1534,15 @@ void QtCurveConfig::setOptions(Options &opts)
|
|
|
|
|
opts.gtkButtonOrder=gtkButtonOrder->isChecked();
|
|
|
|
|
opts.mapKdeIcons=mapKdeIcons->isChecked();
|
|
|
|
|
opts.passwordChar=toInt(passwordChar->text());
|
|
|
|
|
#if 0
|
|
|
|
|
opts.framelessGroupBoxes=framelessGroupBoxes->isChecked();
|
|
|
|
|
#endif
|
|
|
|
|
opts.customGradient=customGradient;
|
|
|
|
|
opts.colorMenubarMouseOver=colorMenubarMouseOver->isChecked();
|
|
|
|
|
opts.useHighlightForMenu=useHighlightForMenu->isChecked();
|
|
|
|
|
#if 0
|
|
|
|
|
opts.groupBoxLine=groupBoxLine->isChecked();
|
|
|
|
|
#endif
|
|
|
|
|
opts.fadeLines=fadeLines->isChecked();
|
|
|
|
|
opts.menuIcons=menuIcons->isChecked();
|
|
|
|
|
opts.stdBtnSizes=stdBtnSizes->isChecked();
|
|
|
|
@ -1575,7 +1587,9 @@ void QtCurveConfig::setWidgetOptions(const Options &opts)
|
|
|
|
|
shadeMenubarOnlyWhenActive->setChecked(opts.shadeMenubarOnlyWhenActive);
|
|
|
|
|
thinnerMenuItems->setChecked(opts.thinnerMenuItems);
|
|
|
|
|
thinnerBtns->setChecked(opts.thinnerBtns);
|
|
|
|
|
#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
|
|
|
|
|
fixParentlessDialogs->setChecked(opts.fixParentlessDialogs);
|
|
|
|
|
#endif
|
|
|
|
|
animatedProgress->setChecked(opts.animatedProgress);
|
|
|
|
|
stripedProgress->setCurrentItem(opts.stripedProgress);
|
|
|
|
|
embolden->setChecked(opts.embolden);
|
|
|
|
@ -1651,7 +1665,9 @@ void QtCurveConfig::setWidgetOptions(const Options &opts)
|
|
|
|
|
customCheckRadioColor->setColor(opts.customCheckRadioColor);
|
|
|
|
|
colorMenubarMouseOver->setChecked(opts.colorMenubarMouseOver);
|
|
|
|
|
useHighlightForMenu->setChecked(opts.useHighlightForMenu);
|
|
|
|
|
#if 0
|
|
|
|
|
groupBoxLine->setChecked(opts.groupBoxLine);
|
|
|
|
|
#endif
|
|
|
|
|
fadeLines->setChecked(opts.fadeLines);
|
|
|
|
|
menuIcons->setChecked(opts.menuIcons);
|
|
|
|
|
stdBtnSizes->setChecked(opts.stdBtnSizes);
|
|
|
|
@ -1678,7 +1694,9 @@ void QtCurveConfig::setWidgetOptions(const Options &opts)
|
|
|
|
|
gtkButtonOrder->setChecked(opts.gtkButtonOrder);
|
|
|
|
|
mapKdeIcons->setChecked(opts.mapKdeIcons);
|
|
|
|
|
setPasswordChar(opts.passwordChar);
|
|
|
|
|
#if 0
|
|
|
|
|
framelessGroupBoxes->setChecked(opts.framelessGroupBoxes);
|
|
|
|
|
#endif
|
|
|
|
|
customGradient=opts.customGradient;
|
|
|
|
|
gradCombo->setCurrentItem(APPEARANCE_CUSTOM1);
|
|
|
|
|
|
|
|
|
@ -1731,7 +1749,9 @@ bool QtCurveConfig::settingsChanged()
|
|
|
|
|
shadeMenubarOnlyWhenActive->isChecked()!=currentStyle.shadeMenubarOnlyWhenActive ||
|
|
|
|
|
thinnerMenuItems->isChecked()!=currentStyle.thinnerMenuItems ||
|
|
|
|
|
thinnerBtns->isChecked()!=currentStyle.thinnerBtns ||
|
|
|
|
|
#ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT
|
|
|
|
|
fixParentlessDialogs->isChecked()!=currentStyle.fixParentlessDialogs ||
|
|
|
|
|
#endif
|
|
|
|
|
animatedProgress->isChecked()!=currentStyle.animatedProgress ||
|
|
|
|
|
stripedProgress->currentItem()!=currentStyle.stripedProgress ||
|
|
|
|
|
lighterPopupMenuBgnd->value()!=currentStyle.lighterPopupMenuBgnd ||
|
|
|
|
@ -1796,7 +1816,9 @@ bool QtCurveConfig::settingsChanged()
|
|
|
|
|
splitters->currentItem()!=currentStyle.splitters ||
|
|
|
|
|
colorMenubarMouseOver->isChecked()!=currentStyle.colorMenubarMouseOver ||
|
|
|
|
|
useHighlightForMenu->isChecked()!=currentStyle.useHighlightForMenu ||
|
|
|
|
|
#if 0
|
|
|
|
|
groupBoxLine->isChecked()!=currentStyle.groupBoxLine ||
|
|
|
|
|
#endif
|
|
|
|
|
fadeLines->isChecked()!=currentStyle.fadeLines ||
|
|
|
|
|
menuIcons->isChecked()!=currentStyle.menuIcons ||
|
|
|
|
|
stdBtnSizes->isChecked()!=currentStyle.stdBtnSizes ||
|
|
|
|
@ -1819,7 +1841,9 @@ bool QtCurveConfig::settingsChanged()
|
|
|
|
|
gtkComboMenus->isChecked()!=currentStyle.gtkComboMenus ||
|
|
|
|
|
gtkButtonOrder->isChecked()!=currentStyle.gtkButtonOrder ||
|
|
|
|
|
mapKdeIcons->isChecked()!=currentStyle.mapKdeIcons ||
|
|
|
|
|
#if 0
|
|
|
|
|
framelessGroupBoxes->isChecked()!=currentStyle.framelessGroupBoxes ||
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
getSquareFlags()!=currentStyle.square ||
|
|
|
|
|
getWindowBorderFlags()!=currentStyle.windowBorder||
|
|
|
|
|