|
|
|
@ -62,7 +62,7 @@
|
|
|
|
|
|
|
|
|
|
extern "C"
|
|
|
|
|
{
|
|
|
|
|
TQWidget * allocate_kstyle_config(QWidget *parent)
|
|
|
|
|
TQWidget * allocate_kstyle_config(TQWidget *parent)
|
|
|
|
|
{
|
|
|
|
|
KGlobal::locale()->insertCatalogue("qtcurve");
|
|
|
|
|
return new TQtCurveConfig(parent);
|
|
|
|
@ -99,7 +99,7 @@ static void drawGradient(const TQColor &top, const TQColor &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 TQColor &top, const TQColor &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 TQColor &top, const TQColor &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 TQColor &top, const TQColor &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,7 +144,7 @@ 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)
|
|
|
|
|
{
|
|
|
|
|
TQFrame *page=plainPage();
|
|
|
|
@ -152,7 +152,7 @@ class CharSelectDialog : public KDialogBase
|
|
|
|
|
TQVBoxLayout *layout=new TQVBoxLayout(page, 0, KDialog::spacingHint());
|
|
|
|
|
|
|
|
|
|
itsSelector=new KCharSelect(page, 0L);
|
|
|
|
|
itsSelector->setChar(QChar(v));
|
|
|
|
|
itsSelector->setChar(TQChar(v));
|
|
|
|
|
layout->addWidget(itsSelector);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -167,13 +167,13 @@ class CStackItem : public TQListViewItem
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
CStackItem(QListView *p, const TQString &text, int s)
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
@ -215,7 +215,7 @@ class CGradItem : public TQListViewItem
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
CGradItem(QListView *p, const TQString &a, const TQString &b)
|
|
|
|
|
CGradItem(TQListView *p, const TQString &a, const TQString &b)
|
|
|
|
|
: TQListViewItem(p, a, b)
|
|
|
|
|
{
|
|
|
|
|
setRenameEnabled(0, true);
|
|
|
|
@ -241,7 +241,7 @@ class CGradItem : public TQListViewItem
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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());
|
|
|
|
@ -264,20 +264,20 @@ CGradientPreview::CGradientPreview(TQtCurveConfig *c, TQWidget *p)
|
|
|
|
|
: TQWidget(p),
|
|
|
|
|
cfg(c)
|
|
|
|
|
{
|
|
|
|
|
setSizePolicy(QSizePolicy::MinimumExpanding, TQSizePolicy::Preferred);
|
|
|
|
|
setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QSize CGradientPreview::sizeHint() const
|
|
|
|
|
TQSize CGradientPreview::sizeHint() const
|
|
|
|
|
{
|
|
|
|
|
return TQSize(64, 64);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QSize CGradientPreview::minimumSizeHint() const
|
|
|
|
|
TQSize CGradientPreview::minimumSizeHint() const
|
|
|
|
|
{
|
|
|
|
|
return sizeHint();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CGradientPreview::paintEvent(QPaintEvent *)
|
|
|
|
|
void CGradientPreview::paintEvent(TQPaintEvent *)
|
|
|
|
|
{
|
|
|
|
|
TQRect r(rect());
|
|
|
|
|
TQPainter p(this);
|
|
|
|
@ -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,27 +541,27 @@ 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)"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TQtCurveConfig::TQtCurveConfig(QWidget *parent)
|
|
|
|
|
TQtCurveConfig::TQtCurveConfig(TQWidget *parent)
|
|
|
|
|
: TQtCurveConfigBase(parent),
|
|
|
|
|
#ifdef TQTC_STYLE_SUPPORT
|
|
|
|
|
exportDialog(NULL),
|
|
|
|
@ -671,7 +671,9 @@ TQtCurveConfig::TQtCurveConfig(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()));
|
|
|
|
@ -749,10 +751,14 @@ TQtCurveConfig::TQtCurveConfig(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()));
|
|
|
|
@ -791,7 +797,7 @@ TQtCurveConfig::~TQtCurveConfig()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveConfig::loadStyles(QPopupMenu *menu)
|
|
|
|
|
void TQtCurveConfig::loadStyles(TQPopupMenu *menu)
|
|
|
|
|
{
|
|
|
|
|
TQStringList files(KGlobal::dirs()->findAllResources("data", "QtCurve/*"EXTENSION, false, true));
|
|
|
|
|
|
|
|
|
@ -803,7 +809,7 @@ void TQtCurveConfig::loadStyles(QPopupMenu *menu)
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -970,7 +976,7 @@ void TQtCurveConfig::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();
|
|
|
|
@ -1034,7 +1040,7 @@ void TQtCurveConfig::setupStack()
|
|
|
|
|
|
|
|
|
|
stackList->setSelected(lastCategory, true);
|
|
|
|
|
stackList->setCurrentItem(lastCategory);
|
|
|
|
|
stackList->setResizeMode(QListView::LastColumn);
|
|
|
|
|
stackList->setResizeMode(TQListView::LastColumn);
|
|
|
|
|
connect(stackList, SIGNAL(selectionChanged()), SLOT(changeStack()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1085,7 +1091,7 @@ void TQtCurveConfig::gradChanged(int i)
|
|
|
|
|
gradBorder->setEnabled(NUM_CUSTOM_GRAD!=i);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveConfig::itemChanged(QListViewItem *i, int col)
|
|
|
|
|
void TQtCurveConfig::itemChanged(TQListViewItem *i, int col)
|
|
|
|
|
{
|
|
|
|
|
GradientCont::iterator it=customGradient.find((EAppearance)gradCombo->currentItem());
|
|
|
|
|
|
|
|
|
@ -1250,7 +1256,7 @@ void TQtCurveConfig::setupGradientsTab()
|
|
|
|
|
layout->addWidget(gradPreview);
|
|
|
|
|
layout->setMargin(0);
|
|
|
|
|
layout->setSpacing(0);
|
|
|
|
|
TQColor col(palette().color(QPalette::Active, TQColorGroup::Button));
|
|
|
|
|
TQColor col(palette().color(TQPalette::Active, TQColorGroup::Button));
|
|
|
|
|
previewColor->setColor(col);
|
|
|
|
|
gradPreview->setColor(col);
|
|
|
|
|
gradChanged(APPEARANCE_CUSTOM1);
|
|
|
|
@ -1258,17 +1264,17 @@ void TQtCurveConfig::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 TQColor &)), gradPreview, SLOT(setColor(const TQColor &)));
|
|
|
|
|
connect(gradStops, SIGNAL(itemRenamed(QListViewItem *, int)), SLOT(itemChanged(QListViewItem *, int)));
|
|
|
|
|
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 TQtCurveConfig::setupShade(KDoubleNumInput *w, int shade)
|
|
|
|
|
void TQtCurveConfig::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;
|
|
|
|
@ -1335,7 +1341,7 @@ void TQtCurveConfig::setPasswordChar(int ch)
|
|
|
|
|
TQString str;
|
|
|
|
|
TQTextOStream s(&str);
|
|
|
|
|
|
|
|
|
|
s.setf(QTextStream::hex);
|
|
|
|
|
s.setf(TQTextStream::hex);
|
|
|
|
|
s << TQChar(ch) << " (" << ch << ')';
|
|
|
|
|
passwordChar->setText(str);
|
|
|
|
|
}
|
|
|
|
@ -1365,7 +1371,7 @@ void TQtCurveConfig::roundChanged()
|
|
|
|
|
|
|
|
|
|
void TQtCurveConfig::importStyle()
|
|
|
|
|
{
|
|
|
|
|
TQString 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 TQtCurveConfig::importStyle()
|
|
|
|
|
|
|
|
|
|
void TQtCurveConfig::exportStyle()
|
|
|
|
|
{
|
|
|
|
|
TQString 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())
|
|
|
|
|
{
|
|
|
|
@ -1436,7 +1442,9 @@ void TQtCurveConfig::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 TQtCurveConfig::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 TQtCurveConfig::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 TQtCurveConfig::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 TQtCurveConfig::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 TQtCurveConfig::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 TQtCurveConfig::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 TQtCurveConfig::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||
|
|
|
|
|