diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-15 18:11:59 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-15 18:11:59 +0000 |
commit | f5a83a995930e07f31aa1dc057a1b0c2ee100e3d (patch) | |
tree | 3e6bd6c5c973b7a39153718433dd3849432ade1c /config | |
download | tde-style-qtcurve-f5a83a995930e07f31aa1dc057a1b0c2ee100e3d.tar.gz tde-style-qtcurve-f5a83a995930e07f31aa1dc057a1b0c2ee100e3d.zip |
Added qtcuve theme engine
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kde-style-qtcurve@1090657 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'config')
-rw-r--r-- | config/CMakeLists.txt | 7 | ||||
-rw-r--r-- | config/exportthemedialog.cpp | 94 | ||||
-rw-r--r-- | config/exportthemedialog.h | 53 | ||||
-rw-r--r-- | config/qtcurveconfig.cpp | 720 | ||||
-rw-r--r-- | config/qtcurveconfig.h | 89 | ||||
-rw-r--r-- | config/qtcurveconfigbase.ui | 996 |
6 files changed, 1959 insertions, 0 deletions
diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt new file mode 100644 index 0000000..b9b391f --- /dev/null +++ b/config/CMakeLists.txt @@ -0,0 +1,7 @@ +set(kstyle_qtcurve_config_PART_SRCS qtcurveconfig.cpp exportthemedialog.cpp) +include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/common ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} ${KDE3_INCLUDE_DIR} ${QT_INCLUDE_DIR}) +kde3_add_ui_files(kstyle_qtcurve_config_PART_SRCS qtcurveconfigbase.ui) +kde3_add_kpart(kstyle_qtcurve_config ${kstyle_qtcurve_config_PART_SRCS}) +kde3_automoc(${kstyle_qtcurve_config_PART_SRCS}) +target_link_libraries(kstyle_qtcurve_config ${KDE3_KDEUI_LIBS} ${KDE3_KIO_LIBS} ${KDE3_KDECORE_LIBS} ${QT_QTGUI_LIBRARY}) +install(TARGETS kstyle_qtcurve_config DESTINATION ${KDE3_LIB_DIR}/kde3) diff --git a/config/exportthemedialog.cpp b/config/exportthemedialog.cpp new file mode 100644 index 0000000..4d1eaf1 --- /dev/null +++ b/config/exportthemedialog.cpp @@ -0,0 +1,94 @@ +/* + QtCurve (C) Craig Drummond, 2003 - 2007 Craig.Drummond@lycos.co.uk + + ---- + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License version 2 as published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "exportthemedialog.h" +#include <klocale.h> +#include <kurlrequester.h> +#include <klineedit.h> +#include <kmessagebox.h> +#include <kconfig.h> +#include <qdir.h> +#include <qlabel.h> +#include <qlayout.h> +#define CONFIG_WRITE +#include "config_file.c" + +CExportThemeDialog::CExportThemeDialog(QWidget *parent) + : KDialogBase(parent, "ExportDialog", true, i18n("Export Theme"), + Ok|Cancel) +{ + QWidget *page = new QWidget(this); + QGridLayout *layout = new QGridLayout(page, 3, 2, 0, spacingHint()); + + layout->addWidget(new QLabel(i18n("Name:"), page), 0, 0); + layout->addWidget(new QLabel(i18n("Comment:"), page), 1, 0); + layout->addWidget(new QLabel(i18n("Destination folder:"), page), 2, 0); + layout->addWidget(themeName=new QLineEdit(page), 0, 1); + layout->addWidget(themeComment=new QLineEdit(i18n("QtCurve based theme"), page), 1, 1); + layout->addWidget(themeUrl=new KURLRequester(page), 2, 1); + + themeUrl->setMode(KFile::Directory|KFile::ExistingOnly|KFile::LocalOnly); + themeUrl->lineEdit()->setReadOnly(true); + themeUrl->setURL(QDir::homeDirPath()); + setMainWidget(page); +} + +void CExportThemeDialog::run(const Options &o) +{ + opts=o; + exec(); +} + +void CExportThemeDialog::slotOk() +{ + QString name(themeName->text().stripWhiteSpace().lower()); + + if(name.isEmpty()) + KMessageBox::error(this, i18n("Name is empty!")); + else + { + QString fileName(themeUrl->url()+"/"QTC_THEME_PREFIX+name+".themerc"); + + KConfig cfg(fileName, false, false); + bool rv(!cfg.isReadOnly()); + + if(rv) + { + cfg.setGroup("Misc"); + cfg.writeEntry("Name", themeName->text().stripWhiteSpace()); + cfg.writeEntry("Comment", themeComment->text()); + cfg.setGroup("KDE"); + cfg.writeEntry("WidgetStyle", QTC_THEME_PREFIX+name); + + rv=writeConfig(&cfg, opts, opts, true); + } + + if(rv) + { + QDialog::accept(); + KMessageBox::information(this, i18n("Succesfully created:\n%1").arg(fileName)); + } + else + KMessageBox::error(this, i18n("Failed to create file: %1").arg(fileName)); + } +} + +#include "exportthemedialog.moc" + diff --git a/config/exportthemedialog.h b/config/exportthemedialog.h new file mode 100644 index 0000000..0301b9e --- /dev/null +++ b/config/exportthemedialog.h @@ -0,0 +1,53 @@ +#ifndef __EXPORT_THEME_DIALOG_H__ +#define __EXPORT_THEME_DIALOG_H__ + +/* + QtCurve (C) Craig Drummond, 2007 Craig.Drummond@lycos.co.uk + + ---- + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License version 2 as published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include <kdialogbase.h> +#define QTC_CONFIG_DIALOG +#include "common.h" + +class KURLRequester; +class QLineEdit; + +class CExportThemeDialog : public KDialogBase +{ + Q_OBJECT + + public: + + CExportThemeDialog(QWidget *parent); + + void run(const Options &o); + + private slots: + + void slotOk(); + + private: + + QLineEdit *themeName, + *themeComment; + KURLRequester *themeUrl; + Options opts; +}; + +#endif diff --git a/config/qtcurveconfig.cpp b/config/qtcurveconfig.cpp new file mode 100644 index 0000000..b9b36a6 --- /dev/null +++ b/config/qtcurveconfig.cpp @@ -0,0 +1,720 @@ +/* + QtCurve (C) Craig Drummond, 2003 - 2007 Craig.Drummond@lycos.co.uk + + ---- + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License version 2 as published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "qtcurveconfig.h" +#include "exportthemedialog.h" +#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 <klocale.h> +#include <kcolorbutton.h> +#include <kconfig.h> +#include <kfiledialog.h> +#include <kmessagebox.h> +#include <kpushbutton.h> +#include <kcharselect.h> +#include <kdialogbase.h> +#include <knuminput.h> +#include <unistd.h> +#include "config.h" +#define CONFIG_READ +#define CONFIG_WRITE +#include "config_file.c" + +#define QTC_EXTENSION ".qtcurve" + +extern "C" +{ + QWidget * allocate_kstyle_config(QWidget *parent) + { + KGlobal::locale()->insertCatalogue("kstyle_qtcurve_config"); + return new QtCurveConfig(parent); + } +} + +class CharSelectDialog : public KDialogBase +{ + public: + + CharSelectDialog(QWidget *parent, int v) + : KDialogBase(Plain, i18n("Select Password Character"), Ok|Cancel, Cancel, parent) + { + QFrame *page=plainPage(); + + QVBoxLayout *layout=new QVBoxLayout(page, 0, KDialog::spacingHint()); + + itsSelector=new KCharSelect(page, 0L); + itsSelector->setChar(QChar(v)); + layout->addWidget(itsSelector); + } + + int currentChar() const { return itsSelector->chr().unicode(); } + + private: + + KCharSelect *itsSelector; +}; + +static int toInt(const QString &str) +{ + return str.length()>1 ? str[0].unicode() : 0; +} + +static void insertShadeEntries(QComboBox *combo, bool withDarken, bool checkRadio=false) +{ + combo->insertItem(checkRadio ? i18n("Text") + : withDarken ? i18n("Background") + : i18n("Button")); + combo->insertItem(i18n("Custom:")); + + if(checkRadio) // For check/radio, we dont blend, and dont allow darken + combo->insertItem(i18n("Selected background")); + else if(withDarken) + { + // For menubars we dont actually blend... + combo->insertItem(i18n("Selected background")); + combo->insertItem(i18n("Darken")); + } + else + { + combo->insertItem(i18n("Blended selected background")); + combo->insertItem(i18n("Selected background")); + } +} + +static void insertAppearanceEntries(QComboBox *combo, bool all=true) +{ + combo->insertItem(i18n("Flat")); + combo->insertItem(i18n("Raised")); + combo->insertItem(i18n("Dull glass")); + combo->insertItem(i18n("Shiny glass")); + combo->insertItem(i18n("Gradient")); + combo->insertItem(i18n("Inverted gradient")); + if(all) + { + combo->insertItem(i18n("Split gradient")); + combo->insertItem(i18n("Bevelled")); + } +} + +static void insertLineEntries(QComboBox *combo, bool none) +{ + combo->insertItem(i18n("Sunken lines")); + combo->insertItem(i18n("Flat lines")); + combo->insertItem(i18n("Dots")); + combo->insertItem(none ? i18n("None") : i18n("Dashes")); +} + +static void insertDefBtnEntries(QComboBox *combo) +{ + combo->insertItem(i18n("Corner indicator")); + combo->insertItem(i18n("Font color thin border")); + combo->insertItem(i18n("Selected background thick border")); + combo->insertItem(i18n("None")); +} + +static void insertScrollbarEntries(QComboBox *combo) +{ + combo->insertItem(i18n("KDE")); + combo->insertItem(i18n("Windows")); + combo->insertItem(i18n("Platinum")); + combo->insertItem(i18n("Next")); + combo->insertItem(i18n("No buttons")); +} + +static void insertRoundEntries(QComboBox *combo) +{ + combo->insertItem(i18n("Square")); + combo->insertItem(i18n("Slightly rounded")); + combo->insertItem(i18n("Fully rounded")); +} + +static void insertMouseOverEntries(QComboBox *combo) +{ + combo->insertItem(i18n("No coloration")); + combo->insertItem(i18n("Color border")); + combo->insertItem(i18n("Plastik style")); +} + +static void insertToolbarBorderEntries(QComboBox *combo) +{ + combo->insertItem(i18n("None")); + combo->insertItem(i18n("Light")); + combo->insertItem(i18n("Dark")); + combo->insertItem(i18n("Light (all sides)")); + combo->insertItem(i18n("Dark (all sides)")); +} + +static void insertEffectEntries(QComboBox *combo) +{ + combo->insertItem(i18n("Plain")); + combo->insertItem(i18n("Etched")); + combo->insertItem(i18n("Shadowed")); +} + +static void insertShadingEntries(QComboBox *combo) +{ + combo->insertItem(i18n("Simple")); + combo->insertItem(i18n("Use HSL color space")); + combo->insertItem(i18n("Use HSV color space")); +} + +static void insertStripeEntries(QComboBox *combo) +{ + combo->insertItem(i18n("Plain")); + combo->insertItem(i18n("Striped")); + combo->insertItem(i18n("Diagonal stripes")); +} + +static void insertSliderStyleEntries(QComboBox *combo) +{ + combo->insertItem(i18n("Plain")); + combo->insertItem(i18n("Round")); + combo->insertItem(i18n("Triangular")); +} + +QtCurveConfig::QtCurveConfig(QWidget *parent) + : QtCurveConfigBase(parent), + exportDialog(NULL) +{ + titleLabel->setText("QtCurve " VERSION " - (C) Craig Drummond, 2003-2007"); + insertShadeEntries(shadeSliders, false); + insertShadeEntries(shadeMenubars, true); + insertShadeEntries(shadeCheckRadio, false, true); + insertAppearanceEntries(appearance); + insertAppearanceEntries(menubarAppearance); + insertAppearanceEntries(toolbarAppearance); + insertAppearanceEntries(lvAppearance); + insertAppearanceEntries(sliderAppearance); + insertAppearanceEntries(tabAppearance, false); + insertAppearanceEntries(progressAppearance); + insertAppearanceEntries(menuitemAppearance); + insertLineEntries(handles, false); + insertLineEntries(sliderThumbs, true); + insertLineEntries(toolbarSeparators, true); + insertLineEntries(splitters, false); + insertDefBtnEntries(defBtnIndicator); + insertScrollbarEntries(scrollbarType); + insertRoundEntries(round); + insertMouseOverEntries(coloredMouseOver); + insertToolbarBorderEntries(toolbarBorders); + insertEffectEntries(buttonEffect); + insertShadingEntries(shading); + insertStripeEntries(stripedProgress); + insertSliderStyleEntries(sliderStyle); + + highlightFactor->setMinValue(MIN_HIGHLIGHT_FACTOR); + highlightFactor->setMaxValue(MAX_HIGHLIGHT_FACTOR); + highlightFactor->setValue(((int)(DEFAULT_HIGHLIGHT_FACTOR*100))-100); + + connect(lighterPopupMenuBgnd, SIGNAL(toggled(bool)), SLOT(updateChanged())); + connect(round, SIGNAL(activated(int)), SLOT(updateChanged())); + connect(toolbarBorders, SIGNAL(activated(int)), SLOT(updateChanged())); + connect(sliderThumbs, SIGNAL(activated(int)), SLOT(updateChanged())); + connect(handles, SIGNAL(activated(int)), SLOT(updateChanged())); + connect(appearance, SIGNAL(activated(int)), SLOT(updateChanged())); + connect(customMenuTextColor, SIGNAL(toggled(bool)), SLOT(customMenuTextColorChanged())); + connect(stripedProgress, SIGNAL(activated(int)), SLOT(stripedProgressChanged())); + connect(animatedProgress, SIGNAL(toggled(bool)), SLOT(updateChanged())); + connect(embolden, SIGNAL(toggled(bool)), SLOT(emboldenToggled())); + connect(defBtnIndicator, SIGNAL(activated(int)), SLOT(dbiChanged())); + connect(highlightTab, SIGNAL(toggled(bool)), SLOT(updateChanged())); + connect(menubarAppearance, SIGNAL(activated(int)), SLOT(updateChanged())); + connect(toolbarAppearance, SIGNAL(activated(int)), SLOT(updateChanged())); + connect(lvAppearance, SIGNAL(activated(int)), SLOT(updateChanged())); + connect(sliderAppearance, SIGNAL(activated(int)), SLOT(updateChanged())); + connect(tabAppearance, SIGNAL(activated(int)), SLOT(tabAppearanceChanged())); + connect(toolbarSeparators, SIGNAL(activated(int)), SLOT(updateChanged())); + connect(splitters, SIGNAL(activated(int)), SLOT(updateChanged())); + connect(fixParentlessDialogs, SIGNAL(toggled(bool)), SLOT(updateChanged())); + connect(fillSlider, SIGNAL(toggled(bool)), SLOT(updateChanged())); + connect(sliderStyle, SIGNAL(activated(int)), SLOT(updateChanged())); + connect(roundMbTopOnly, SIGNAL(toggled(bool)), SLOT(updateChanged())); + connect(gradientPbGroove, SIGNAL(toggled(bool)), SLOT(updateChanged())); + connect(darkerBorders, SIGNAL(toggled(bool)), SLOT(updateChanged())); + connect(vArrows, SIGNAL(toggled(bool)), SLOT(updateChanged())); + connect(xCheck, SIGNAL(toggled(bool)), SLOT(updateChanged())); + connect(colorSelTab, SIGNAL(toggled(bool)), SLOT(updateChanged())); + connect(stdSidebarButtons, SIGNAL(toggled(bool)), SLOT(updateChanged())); + connect(borderMenuitems, SIGNAL(toggled(bool)), SLOT(updateChanged())); + connect(progressAppearance, SIGNAL(activated(int)), SLOT(updateChanged())); + connect(menuitemAppearance, SIGNAL(activated(int)), SLOT(updateChanged())); + connect(shadeCheckRadio, SIGNAL(activated(int)), SLOT(shadeCheckRadioChanged())); + connect(customCheckRadioColor, SIGNAL(changed(const QColor &)), SLOT(updateChanged())); + +#ifdef QTC_PLAIN_FOCUS_ONLY + delete stdFocus; +#else + connect(stdFocus, SIGNAL(toggled(bool)), SLOT(updateChanged())); +#endif + connect(lvLines, SIGNAL(toggled(bool)), SLOT(updateChanged())); + connect(drawStatusBarFrames, SIGNAL(toggled(bool)), SLOT(updateChanged())); + connect(buttonEffect, SIGNAL(activated(int)), SLOT(updateChanged())); + connect(coloredMouseOver, SIGNAL(activated(int)), SLOT(updateChanged())); + connect(menubarMouseOver, SIGNAL(toggled(bool)), SLOT(updateChanged())); + connect(shadeMenubarOnlyWhenActive, SIGNAL(toggled(bool)), SLOT(updateChanged())); + connect(thinnerMenuItems, 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(shadeSliders, SIGNAL(activated(int)), SLOT(shadeSlidersChanged())); + connect(shadeMenubars, SIGNAL(activated(int)), SLOT(shadeMenubarsChanged())); + connect(highlightFactor, SIGNAL(valueChanged(int)), SLOT(updateChanged())); + connect(scrollbarType, SIGNAL(activated(int)), SLOT(updateChanged())); + connect(shading, SIGNAL(activated(int)), SLOT(updateChanged())); + connect(gtkScrollViews, SIGNAL(toggled(bool)), SLOT(updateChanged())); + connect(gtkComboMenus, SIGNAL(toggled(bool)), SLOT(updateChanged())); + connect(gtkButtonOrder, SIGNAL(toggled(bool)), SLOT(updateChanged())); + connect(mapKdeIcons, SIGNAL(toggled(bool)), SLOT(updateChanged())); + connect(passwordChar, SIGNAL(clicked()), SLOT(passwordCharClicked())); + connect(framelessGroupBoxes, SIGNAL(toggled(bool)), SLOT(updateChanged())); + connect(inactiveHighlight, SIGNAL(toggled(bool)), SLOT(updateChanged())); + + defaultSettings(&defaultStyle); + if(!readConfig(NULL, ¤tStyle, &defaultStyle)) + currentStyle=defaultStyle; + + setWidgetOptions(currentStyle); + + QPopupMenu *menu=new QPopupMenu(this), + *subMenu=new QPopupMenu(this); + + optionBtn->setPopup(menu); + + menu->insertItem(i18n("Predefined Style"), subMenu); + menu->insertSeparator(); + menu->insertItem(i18n("Import..."), this, SLOT(importStyle())); + menu->insertItem(i18n("Export..."), this, SLOT(exportStyle())); + menu->insertSeparator(); + menu->insertItem(i18n("Export Theme..."), this, SLOT(exportTheme())); + + loadStyles(subMenu); +} + +QtCurveConfig::~QtCurveConfig() +{ +} + +void QtCurveConfig::loadStyles(QPopupMenu *menu) +{ + QStringList files(KGlobal::dirs()->findAllResources("data", "QtCurve/*"QTC_EXTENSION, false, true)); + + files.sort(); + + QStringList::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(QTC_EXTENSION).replace('_', ' '), + this, SLOT(setStyle(int)))]=*it; +} + +void QtCurveConfig::save() +{ + Options opts=currentStyle; + + setOptions(opts); + writeConfig(NULL, opts, defaultStyle); + + KSharedConfig *cfg=KGlobal::sharedConfig(); + QString grp(cfg->group()); + bool useGlobals(cfg->forceGlobal()); + + cfg->setForceGlobal(true); + cfg->setGroup("KDE"); + + if(opts.gtkButtonOrder) + cfg->writeEntry("ButtonLayout", 2); + else + cfg->deleteEntry("ButtonLayout"); + cfg->setGroup(grp); + cfg->sync(); + cfg->setForceGlobal(useGlobals); +} + +void QtCurveConfig::defaults() +{ + setWidgetOptions(defaultStyle); + if (settingsChanged()) + emit changed(true); +} + +void QtCurveConfig::setStyle(int s) +{ + loadStyle(styles[s]); +} + +void QtCurveConfig::emboldenToggled() +{ + if(!embolden->isChecked() && IND_NONE==defBtnIndicator->currentItem()) + defBtnIndicator->setCurrentItem(IND_COLORED); + updateChanged(); +} + +void QtCurveConfig::dbiChanged() +{ + if(IND_NONE==defBtnIndicator->currentItem() && !embolden->isChecked()) + embolden->setChecked(true); + updateChanged(); +} + +void QtCurveConfig::shadeSlidersChanged() +{ + customSlidersColor->setEnabled(SHADE_CUSTOM==shadeSliders->currentItem()); + updateChanged(); +} + +void QtCurveConfig::shadeMenubarsChanged() +{ + customMenubarsColor->setEnabled(SHADE_CUSTOM==shadeMenubars->currentItem()); + updateChanged(); +} + +void QtCurveConfig::shadeCheckRadioChanged() +{ + customCheckRadioColor->setEnabled(SHADE_CUSTOM==shadeCheckRadio->currentItem()); + updateChanged(); +} + +void QtCurveConfig::customMenuTextColorChanged() +{ + customMenuNormTextColor->setEnabled(customMenuTextColor->isChecked()); + customMenuSelTextColor->setEnabled(customMenuTextColor->isChecked()); + updateChanged(); +} + +void QtCurveConfig::stripedProgressChanged() +{ + animatedProgress->setEnabled(STRIPE_NONE!=stripedProgress->currentItem()); + if(animatedProgress->isChecked() && STRIPE_NONE==stripedProgress->currentItem()) + animatedProgress->setChecked(false); + updateChanged(); +} + +void QtCurveConfig::tabAppearanceChanged() +{ + if(colorSelTab->isChecked() && APPEARANCE_GRADIENT!=tabAppearance->currentItem()) + colorSelTab->setChecked(false); + colorSelTab->setEnabled(APPEARANCE_GRADIENT==tabAppearance->currentItem()); + updateChanged(); +} + +void QtCurveConfig::passwordCharClicked() +{ + int cur(toInt(passwordChar->text())); + CharSelectDialog dlg(this, cur); + + if(QDialog::Accepted==dlg.exec() && dlg.currentChar()!=cur) + setPasswordChar(dlg.currentChar()); +} + +void QtCurveConfig::setPasswordChar(int ch) +{ + QString str; + QTextOStream s(&str); + + s.setf(QTextStream::hex); + s << QChar(ch) << " (" << ch << ')'; + passwordChar->setText(str); +} + +void QtCurveConfig::updateChanged() +{ + if (settingsChanged()) + emit changed(true); +} + +void QtCurveConfig::importStyle() +{ + QString file(KFileDialog::getOpenFileName(QString::null, + i18n("*"QTC_EXTENSION"|QtCurve Settings Files\n" + QTC_THEME_PREFIX"*"QTC_THEME_SUFFIX"|QtCurve KDE Theme Files"), + this)); + + if(!file.isEmpty()) + loadStyle(file); +} + +void QtCurveConfig::exportStyle() +{ + QString file(KFileDialog::getSaveFileName(QString::null, i18n("*"QTC_EXTENSION"|QtCurve Settings Files"), this)); + + if(!file.isEmpty()) + { + KConfig cfg(file, false, false); + bool rv(!cfg.isReadOnly()); + + if(rv) + { + Options opts; + + setOptions(opts); + rv=writeConfig(&cfg, opts, defaultStyle, true); + } + + if(!rv) + KMessageBox::error(this, i18n("Could not write to file:\n%1").arg(file)); + } +} + +void QtCurveConfig::exportTheme() +{ + if(!exportDialog) + exportDialog=new CExportThemeDialog(this); + + Options opts; + + setOptions(opts); + exportDialog->run(opts); +} + +void QtCurveConfig::loadStyle(const QString &file) +{ + Options opts; + + if(readConfig(file, &opts, &defaultStyle)) + { + setWidgetOptions(opts); + if (settingsChanged()) + emit changed(true); + } +} + +void QtCurveConfig::setOptions(Options &opts) +{ + opts.round=(ERound)round->currentItem(); + opts.toolbarBorders=(ETBarBorder)toolbarBorders->currentItem(); + opts.appearance=(EAppearance)appearance->currentItem(); +#ifndef QTC_PLAIN_FOCUS_ONLY + opts.stdFocus=stdFocus->isChecked(); +#endif + opts.lvLines=lvLines->isChecked(); + opts.drawStatusBarFrames=drawStatusBarFrames->isChecked(); + opts.buttonEffect=(EEffect)buttonEffect->currentItem(); + opts.coloredMouseOver=(EMouseOver)coloredMouseOver->currentItem(); + opts.menubarMouseOver=menubarMouseOver->isChecked(); + opts.shadeMenubarOnlyWhenActive=shadeMenubarOnlyWhenActive->isChecked(); + opts.thinnerMenuItems=thinnerMenuItems->isChecked(); + opts.fixParentlessDialogs=fixParentlessDialogs->isChecked(); + opts.animatedProgress=animatedProgress->isChecked(); + opts.stripedProgress=(EStripe)stripedProgress->currentItem(); + opts.lighterPopupMenuBgnd=lighterPopupMenuBgnd->isChecked(); + opts.embolden=embolden->isChecked(); + opts.scrollbarType=(EScrollbar)scrollbarType->currentItem(); + opts.defBtnIndicator=(EDefBtnIndicator)defBtnIndicator->currentItem(); + opts.sliderThumbs=(ELine)sliderThumbs->currentItem(); + opts.handles=(ELine)handles->currentItem(); + opts.highlightTab=highlightTab->isChecked(); + opts.shadeSliders=(EShade)shadeSliders->currentItem(); + opts.shadeMenubars=(EShade)shadeMenubars->currentItem(); + opts.menubarAppearance=(EAppearance)menubarAppearance->currentItem(); + opts.toolbarAppearance=(EAppearance)toolbarAppearance->currentItem(); + opts.lvAppearance=(EAppearance)lvAppearance->currentItem(); + opts.sliderAppearance=(EAppearance)sliderAppearance->currentItem(); + opts.tabAppearance=(EAppearance)tabAppearance->currentItem(); + opts.toolbarSeparators=(ELine)toolbarSeparators->currentItem(); + opts.splitters=(ELine)splitters->currentItem(); + opts.customSlidersColor=customSlidersColor->color(); + opts.customMenubarsColor=customMenubarsColor->color(); + opts.highlightFactor=((double)(highlightFactor->value()+100))/100.0; + opts.customMenuNormTextColor=customMenuNormTextColor->color(); + opts.customMenuSelTextColor=customMenuSelTextColor->color(); + opts.customMenuTextColor=customMenuTextColor->isChecked(); + opts.fillSlider=fillSlider->isChecked(); + opts.sliderStyle=(ESliderStyle)sliderStyle->currentItem(); + opts.roundMbTopOnly=roundMbTopOnly->isChecked(); + opts.gradientPbGroove=gradientPbGroove->isChecked(); + opts.darkerBorders=darkerBorders->isChecked(); + opts.vArrows=vArrows->isChecked(); + opts.xCheck=xCheck->isChecked(); + opts.colorSelTab=colorSelTab->isChecked(); + opts.stdSidebarButtons=stdSidebarButtons->isChecked(); + opts.borderMenuitems=borderMenuitems->isChecked(); + opts.progressAppearance=(EAppearance)progressAppearance->currentItem(); + opts.menuitemAppearance=(EAppearance)menuitemAppearance->currentItem(); + opts.shadeCheckRadio=(EShade)shadeCheckRadio->currentItem(); + opts.customCheckRadioColor=customCheckRadioColor->color(); + opts.shading=(EShading)shading->currentItem(); + opts.gtkScrollViews=gtkScrollViews->isChecked(); + opts.gtkComboMenus=gtkComboMenus->isChecked(); + opts.gtkButtonOrder=gtkButtonOrder->isChecked(); + opts.mapKdeIcons=mapKdeIcons->isChecked(); + opts.passwordChar=toInt(passwordChar->text()); + opts.framelessGroupBoxes=framelessGroupBoxes->isChecked(); + opts.inactiveHighlight=inactiveHighlight->isChecked(); +} + +void QtCurveConfig::setWidgetOptions(const Options &opts) +{ + round->setCurrentItem(opts.round); + scrollbarType->setCurrentItem(opts.scrollbarType); + lighterPopupMenuBgnd->setChecked(opts.lighterPopupMenuBgnd); + toolbarBorders->setCurrentItem(opts.toolbarBorders); + sliderThumbs->setCurrentItem(opts.sliderThumbs); + handles->setCurrentItem(opts.handles); + appearance->setCurrentItem(opts.appearance); +#ifndef QTC_PLAIN_FOCUS_ONLY + stdFocus->setChecked(opts.stdFocus); +#endif + lvLines->setChecked(opts.lvLines); + drawStatusBarFrames->setChecked(opts.drawStatusBarFrames); + buttonEffect->setCurrentItem(opts.buttonEffect); + coloredMouseOver->setCurrentItem(opts.coloredMouseOver); + menubarMouseOver->setChecked(opts.menubarMouseOver); + shadeMenubarOnlyWhenActive->setChecked(opts.shadeMenubarOnlyWhenActive); + thinnerMenuItems->setChecked(opts.thinnerMenuItems); + fixParentlessDialogs->setChecked(opts.fixParentlessDialogs); + animatedProgress->setChecked(opts.animatedProgress); + stripedProgress->setCurrentItem(opts.stripedProgress); + embolden->setChecked(opts.embolden); + defBtnIndicator->setCurrentItem(opts.defBtnIndicator); + highlightTab->setChecked(opts.highlightTab); + menubarAppearance->setCurrentItem(opts.menubarAppearance); + toolbarAppearance->setCurrentItem(opts.toolbarAppearance); + lvAppearance->setCurrentItem(opts.lvAppearance); + sliderAppearance->setCurrentItem(opts.sliderAppearance); + tabAppearance->setCurrentItem(opts.tabAppearance); + toolbarSeparators->setCurrentItem(opts.toolbarSeparators); + splitters->setCurrentItem(opts.splitters); + shadeSliders->setCurrentItem(opts.shadeSliders); + shadeMenubars->setCurrentItem(opts.shadeMenubars); + highlightFactor->setValue((int)(opts.highlightFactor*100)-100); + customSlidersColor->setColor(opts.customSlidersColor); + customMenubarsColor->setColor(opts.customMenubarsColor); + customMenuNormTextColor->setColor(opts.customMenuNormTextColor); + customMenuSelTextColor->setColor(opts.customMenuSelTextColor); + customMenuTextColor->setChecked(opts.customMenuTextColor); + + customSlidersColor->setEnabled(SHADE_CUSTOM==opts.shadeSliders); + customMenubarsColor->setEnabled(SHADE_CUSTOM==opts.shadeMenubars); + customMenuNormTextColor->setEnabled(customMenuTextColor->isChecked()); + customMenuSelTextColor->setEnabled(customMenuTextColor->isChecked()); + customCheckRadioColor->setEnabled(SHADE_CUSTOM==opts.shadeCheckRadio); + + animatedProgress->setEnabled(STRIPE_NONE!=stripedProgress->currentItem()); + + fillSlider->setChecked(opts.fillSlider); + sliderStyle->setCurrentItem(opts.sliderStyle); + roundMbTopOnly->setChecked(opts.roundMbTopOnly); + gradientPbGroove->setChecked(opts.gradientPbGroove); + darkerBorders->setChecked(opts.darkerBorders); + vArrows->setChecked(opts.vArrows); + xCheck->setChecked(opts.xCheck); + colorSelTab->setChecked(opts.colorSelTab); + stdSidebarButtons->setChecked(opts.stdSidebarButtons); + borderMenuitems->setChecked(opts.borderMenuitems); + progressAppearance->setCurrentItem(opts.progressAppearance); + menuitemAppearance->setCurrentItem(opts.menuitemAppearance); + shadeCheckRadio->setCurrentItem(opts.shadeCheckRadio); + customCheckRadioColor->setColor(opts.customCheckRadioColor); + + shading->setCurrentItem(opts.shading); + gtkScrollViews->setChecked(opts.gtkScrollViews); + gtkComboMenus->setChecked(opts.gtkComboMenus); + gtkButtonOrder->setChecked(opts.gtkButtonOrder); + mapKdeIcons->setChecked(opts.mapKdeIcons); + setPasswordChar(opts.passwordChar); + framelessGroupBoxes->setChecked(opts.framelessGroupBoxes); + inactiveHighlight->setChecked(opts.inactiveHighlight); +} + +bool QtCurveConfig::settingsChanged() +{ + return round->currentItem()!=currentStyle.round || + toolbarBorders->currentItem()!=currentStyle.toolbarBorders || + appearance->currentItem()!=(int)currentStyle.appearance || +#ifndef QTC_PLAIN_FOCUS_ONLY + stdFocus->isChecked()!=currentStyle.stdFocus || +#endif + lvLines->isChecked()!=currentStyle.lvLines || + drawStatusBarFrames->isChecked()!=currentStyle.drawStatusBarFrames || + buttonEffect->currentItem()!=(int)currentStyle.buttonEffect || + coloredMouseOver->currentItem()!=(int)currentStyle.coloredMouseOver || + menubarMouseOver->isChecked()!=currentStyle.menubarMouseOver || + shadeMenubarOnlyWhenActive->isChecked()!=currentStyle.shadeMenubarOnlyWhenActive || + thinnerMenuItems->isChecked()!=currentStyle.thinnerMenuItems || + fixParentlessDialogs->isChecked()!=currentStyle.fixParentlessDialogs || + animatedProgress->isChecked()!=currentStyle.animatedProgress || + stripedProgress->currentItem()!=currentStyle.stripedProgress || + lighterPopupMenuBgnd->isChecked()!=currentStyle.lighterPopupMenuBgnd || + embolden->isChecked()!=currentStyle.embolden || + fillSlider->isChecked()!=currentStyle.fillSlider || + sliderStyle->currentItem()!=currentStyle.sliderStyle || + roundMbTopOnly->isChecked()!=currentStyle.roundMbTopOnly || + gradientPbGroove->isChecked()!=currentStyle.gradientPbGroove || + darkerBorders->isChecked()!=currentStyle.darkerBorders || + vArrows->isChecked()!=currentStyle.vArrows || + xCheck->isChecked()!=currentStyle.xCheck || + colorSelTab->isChecked()!=currentStyle.colorSelTab || + stdSidebarButtons->isChecked()!=currentStyle.stdSidebarButtons || + borderMenuitems->isChecked()!=currentStyle.borderMenuitems || + defBtnIndicator->currentItem()!=(int)currentStyle.defBtnIndicator || + sliderThumbs->currentItem()!=(int)currentStyle.sliderThumbs || + handles->currentItem()!=(int)currentStyle.handles || + scrollbarType->currentItem()!=(int)currentStyle.scrollbarType || + highlightTab->isChecked()!=currentStyle.highlightTab || + shadeSliders->currentItem()!=(int)currentStyle.shadeSliders || + shadeMenubars->currentItem()!=(int)currentStyle.shadeMenubars || + shadeCheckRadio->currentItem()!=(int)currentStyle.shadeCheckRadio || + menubarAppearance->currentItem()!=currentStyle.menubarAppearance || + toolbarAppearance->currentItem()!=currentStyle.toolbarAppearance || + lvAppearance->currentItem()!=currentStyle.lvAppearance || + sliderAppearance->currentItem()!=currentStyle.sliderAppearance || + tabAppearance->currentItem()!=currentStyle.tabAppearance || + progressAppearance->currentItem()!=currentStyle.progressAppearance || + menuitemAppearance->currentItem()!=currentStyle.menuitemAppearance || + toolbarSeparators->currentItem()!=currentStyle.toolbarSeparators || + splitters->currentItem()!=currentStyle.splitters || + + shading->currentItem()!=(int)currentStyle.shading || + gtkScrollViews->isChecked()!=currentStyle.gtkScrollViews || + gtkComboMenus->isChecked()!=currentStyle.gtkComboMenus || + gtkButtonOrder->isChecked()!=currentStyle.gtkButtonOrder || + mapKdeIcons->isChecked()!=currentStyle.mapKdeIcons || + framelessGroupBoxes->isChecked()!=currentStyle.framelessGroupBoxes || + inactiveHighlight->isChecked()!=currentStyle.inactiveHighlight || + + toInt(passwordChar->text())!=currentStyle.passwordChar || + + (highlightFactor->value()+100)!=(int)(currentStyle.highlightFactor*100) || + customMenuTextColor->isChecked()!=currentStyle.customMenuTextColor || + (SHADE_CUSTOM==currentStyle.shadeSliders && + customSlidersColor->color()!=currentStyle.customSlidersColor) || + (SHADE_CUSTOM==currentStyle.shadeMenubars && + customMenubarsColor->color()!=currentStyle.customMenubarsColor) || + (SHADE_CUSTOM==currentStyle.shadeCheckRadio && + customCheckRadioColor->color()!=currentStyle.customCheckRadioColor) || + (customMenuTextColor->isChecked() && + customMenuNormTextColor->color()!=currentStyle.customMenuNormTextColor) || + (customMenuTextColor->isChecked() && + customMenuSelTextColor->color()!=currentStyle.customMenuSelTextColor); +} + +#include "qtcurveconfig.moc" diff --git a/config/qtcurveconfig.h b/config/qtcurveconfig.h new file mode 100644 index 0000000..8e69510 --- /dev/null +++ b/config/qtcurveconfig.h @@ -0,0 +1,89 @@ +#ifndef __QTCURVECONFIG_H__ +#define __QTCURVECONFIG_H__ + +/* + QtCurve (C) Craig Drummond, 2003 - 2007 Craig.Drummond@lycos.co.uk + + ---- + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License version 2 as published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#define QTC_COMMON_ONLY_COVERTERS +#define QTC_CONFIG_DIALOG + +#include <qtcurveconfigbase.h> +#include <qmap.h> +#include "common.h" + +class QPopupMenu; +class CExportThemeDialog; + +class QtCurveConfig : public QtCurveConfigBase +{ + Q_OBJECT + + public: + + QtCurveConfig(QWidget *parent); + virtual ~QtCurveConfig(); + + signals: + + void changed(bool); + + private: + + void loadStyles(QPopupMenu *menu); + + public slots: + + void save(); + void defaults(); + + private slots: + + void setStyle(int s); + void updateChanged(); + void importStyle(); + void exportStyle(); + void exportTheme(); + void emboldenToggled(); + void dbiChanged(); + void shadeSlidersChanged(); + void shadeMenubarsChanged(); + void shadeCheckRadioChanged(); + void customMenuTextColorChanged(); + void stripedProgressChanged(); + void tabAppearanceChanged(); + void passwordCharClicked(); + + private: + + void setPasswordChar(int ch); + void loadStyle(const QString &file); + void setOptions(Options &opts); + void setWidgetOptions(const Options &opts); + bool settingsChanged(); + + private: + + Options currentStyle, + defaultStyle; + QMap<int, QString> styles; + CExportThemeDialog *exportDialog; +}; + +#endif diff --git a/config/qtcurveconfigbase.ui b/config/qtcurveconfigbase.ui new file mode 100644 index 0000000..0e535ee --- /dev/null +++ b/config/qtcurveconfigbase.ui @@ -0,0 +1,996 @@ +<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> +<class>QtCurveConfigBase</class> +<widget class="QWidget"> + <property name="name"> + <cstring>QtCurveConfigBase</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>666</width> + <height>556</height> + </rect> + </property> + <property name="caption"> + <string>Form1</string> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>0</number> + </property> + <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2"> + <property name="name"> + <cstring>titleLabel</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>3</hsizetype> + <vsizetype>5</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>title</string> + </property> + <property name="alignment"> + <set>AlignCenter</set> + </property> + </widget> + <spacer row="1" column="0"> + <property name="name"> + <cstring>spacer2</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Fixed</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>16</height> + </size> + </property> + </spacer> + <widget class="QTabWidget" row="2" column="0" rowspan="1" colspan="2"> + <property name="name"> + <cstring>optionsTab</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>3</hsizetype> + <vsizetype>3</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <widget class="QWidget"> + <property name="name"> + <cstring>tab</cstring> + </property> + <attribute name="title"> + <string>General</string> + </attribute> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel" row="1" column="0"> + <property name="name"> + <cstring>textLabel1_6</cstring> + </property> + <property name="text"> + <string>Splitters:</string> + </property> + </widget> + <widget class="QLabel" row="3" column="0"> + <property name="name"> + <cstring>textLabel1_2_3</cstring> + </property> + <property name="text"> + <string>Scrollbars:</string> + </property> + </widget> + <widget class="QLabel" row="2" column="0"> + <property name="name"> + <cstring>textLabel1_2_3_2</cstring> + </property> + <property name="text"> + <string>Sliders:</string> + </property> + </widget> + <widget class="QLabel" row="0" column="0"> + <property name="name"> + <cstring>textLabel1_7</cstring> + </property> + <property name="text"> + <string>Appearance:</string> + </property> + </widget> + <widget class="QLabel" row="4" column="0"> + <property name="name"> + <cstring>textLabel1</cstring> + </property> + <property name="text"> + <string>Progress bars:</string> + </property> + </widget> + <widget class="QLabel" row="7" column="0"> + <property name="name"> + <cstring>textLabel1_8_2</cstring> + </property> + <property name="text"> + <string>Listviews:</string> + </property> + <property name="whatsThis" stdset="0"> + <string>This controls the % that widgets will be highlighted by when the mouse hovers over them</string> + </property> + </widget> + <widget class="QComboBox" row="7" column="1"> + <property name="name"> + <cstring>lvAppearance</cstring> + </property> + </widget> + <widget class="QCheckBox" row="5" column="1"> + <property name="name"> + <cstring>embolden</cstring> + </property> + <property name="text"> + <string>Bold text, and</string> + </property> + </widget> + <widget class="QComboBox" row="8" column="1"> + <property name="name"> + <cstring>tabAppearance</cstring> + </property> + </widget> + <widget class="QComboBox" row="4" column="1"> + <property name="name"> + <cstring>progressAppearance</cstring> + </property> + <property name="whatsThis" stdset="0"> + <string>The setting here affects the general appearance - and will be applied to buttons, scrollbars, sliders, combo boxes, and spin buttons.</string> + </property> + </widget> + <widget class="QComboBox" row="3" column="1"> + <property name="name"> + <cstring>scrollbarType</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>3</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + <widget class="QComboBox" row="4" column="4"> + <property name="name"> + <cstring>stripedProgress</cstring> + </property> + </widget> + <widget class="QCheckBox" row="4" column="2" rowspan="1" colspan="2"> + <property name="name"> + <cstring>gradientPbGroove</cstring> + </property> + <property name="text"> + <string>Gradient groove</string> + </property> + </widget> + <widget class="QComboBox" row="2" column="1"> + <property name="name"> + <cstring>sliderAppearance</cstring> + </property> + </widget> + <widget class="QCheckBox" row="4" column="5"> + <property name="name"> + <cstring>animatedProgress</cstring> + </property> + <property name="text"> + <string>Animated</string> + </property> + </widget> + <widget class="QCheckBox" row="7" column="2" rowspan="1" colspan="4"> + <property name="name"> + <cstring>lvLines</cstring> + </property> + <property name="text"> + <string>Lines</string> + </property> + </widget> + <widget class="QCheckBox" row="10" column="0" rowspan="1" colspan="2"> + <property name="name"> + <cstring>stdFocus</cstring> + </property> + <property name="text"> + <string>Dotted focus rectangle</string> + </property> + <property name="whatsThis" stdset="0"> + <string>Some applications, such as Qt Designer, and Krita, make use of 'dock windows' These have a handle strip along the top - enabling this option will draw the name of the window in the handle strip.</string> + </property> + </widget> + <widget class="QCheckBox" row="11" column="0" rowspan="1" colspan="2"> + <property name="name"> + <cstring>drawStatusBarFrames</cstring> + </property> + <property name="text"> + <string>Draw statusbar frames</string> + </property> + </widget> + <widget class="QCheckBox" row="12" column="0" rowspan="1" colspan="2"> + <property name="name"> + <cstring>framelessGroupBoxes</cstring> + </property> + <property name="text"> + <string>Frameless groupboxes</string> + </property> + </widget> + <widget class="QComboBox" row="2" column="2" rowspan="1" colspan="2"> + <property name="name"> + <cstring>shadeSliders</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>3</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + <widget class="QLabel" row="8" column="0"> + <property name="name"> + <cstring>textLabel1_8_2_2</cstring> + </property> + <property name="text"> + <string>Tabs:</string> + </property> + <property name="whatsThis" stdset="0"> + <string>This controls the % that widgets will be highlighted by when the mouse hovers over them</string> + </property> + </widget> + <widget class="QLabel" row="9" column="0"> + <property name="name"> + <cstring>textLabel1_8_2_2_2</cstring> + </property> + <property name="text"> + <string>Checks/radios:</string> + </property> + <property name="whatsThis" stdset="0"> + <string>This controls the % that widgets will be highlighted by when the mouse hovers over them</string> + </property> + </widget> + <widget class="QComboBox" row="9" column="1"> + <property name="name"> + <cstring>shadeCheckRadio</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>3</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + <widget class="KColorButton" row="9" column="2" rowspan="1" colspan="2"> + <property name="name"> + <cstring>customCheckRadioColor</cstring> + </property> + <property name="text"> + <string></string> + </property> + </widget> + <widget class="KColorButton" row="2" column="4"> + <property name="name"> + <cstring>customSlidersColor</cstring> + </property> + <property name="text"> + <string></string> + </property> + </widget> + <widget class="QLabel" row="5" column="0"> + <property name="name"> + <cstring>textLabel1_3</cstring> + </property> + <property name="text"> + <string>Default button:</string> + </property> + </widget> + <widget class="QLabel" row="6" column="0"> + <property name="name"> + <cstring>textLabel1_3_2</cstring> + </property> + <property name="text"> + <string>Mouse-over:</string> + </property> + </widget> + <widget class="QComboBox" row="0" column="1"> + <property name="name"> + <cstring>appearance</cstring> + </property> + <property name="whatsThis" stdset="0"> + <string>The setting here affects the general appearance - and will be applied to buttons, scrollbars, sliders, combo boxes, and spin buttons.</string> + </property> + </widget> + <widget class="QCheckBox" row="11" column="2" rowspan="1" colspan="4"> + <property name="name"> + <cstring>stdSidebarButtons</cstring> + </property> + <property name="text"> + <string>Standard buttons for sidebars</string> + </property> + </widget> + <widget class="QComboBox" row="6" column="1"> + <property name="name"> + <cstring>coloredMouseOver</cstring> + </property> + <property name="whatsThis" stdset="0"> + <string>The setting here affects the general appearance - and will be applied to buttons, scrollbars, sliders, combo boxes, and spin buttons.</string> + </property> + </widget> + <widget class="QLabel" row="6" column="2"> + <property name="name"> + <cstring>textLabel1_8</cstring> + </property> + <property name="text"> + <string>Highlight by:</string> + </property> + <property name="whatsThis" stdset="0"> + <string>This controls the % that widgets will be highlighted by when the mouse hovers over them</string> + </property> + </widget> + <widget class="QCheckBox" row="12" column="2" rowspan="1" colspan="3"> + <property name="name"> + <cstring>darkerBorders</cstring> + </property> + <property name="text"> + <string>Darker borders</string> + </property> + </widget> + <widget class="QComboBox" row="0" column="2" rowspan="1" colspan="2"> + <property name="name"> + <cstring>round</cstring> + </property> + </widget> + <widget class="QCheckBox" row="10" column="2" rowspan="1" colspan="4"> + <property name="name"> + <cstring>vArrows</cstring> + </property> + <property name="text"> + <string>'V' style arrows</string> + </property> + </widget> + <widget class="QComboBox" row="1" column="1"> + <property name="name"> + <cstring>splitters</cstring> + </property> + </widget> + <spacer row="13" column="0"> + <property name="name"> + <cstring>spacer6</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + <widget class="QCheckBox" row="9" column="4" rowspan="1" colspan="2"> + <property name="name"> + <cstring>xCheck</cstring> + </property> + <property name="text"> + <string>'X' style checkmarks</string> + </property> + </widget> + <widget class="QCheckBox" row="8" column="2" rowspan="1" colspan="2"> + <property name="name"> + <cstring>highlightTab</cstring> + </property> + <property name="text"> + <string>Highlight selected</string> + </property> + <property name="whatsThis" stdset="0"> + <string>This will cause a coloured stripe to be drawn over the current tab.</string> + </property> + </widget> + <widget class="QCheckBox" row="8" column="4" rowspan="1" colspan="2"> + <property name="name"> + <cstring>colorSelTab</cstring> + </property> + <property name="text"> + <string>Color selected</string> + </property> + </widget> + <widget class="QComboBox" row="3" column="2" rowspan="1" colspan="3"> + <property name="name"> + <cstring>sliderThumbs</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>3</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + <widget class="QComboBox" row="5" column="2" rowspan="1" colspan="3"> + <property name="name"> + <cstring>defBtnIndicator</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>3</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + <widget class="QCheckBox" row="2" column="6"> + <property name="name"> + <cstring>fillSlider</cstring> + </property> + <property name="text"> + <string>Fill used</string> + </property> + </widget> + <widget class="QComboBox" row="2" column="5"> + <property name="name"> + <cstring>sliderStyle</cstring> + </property> + </widget> + <widget class="QComboBox" row="0" column="4"> + <property name="name"> + <cstring>buttonEffect</cstring> + </property> + </widget> + <widget class="KIntNumInput" row="6" column="3" rowspan="1" colspan="2"> + <property name="name"> + <cstring>highlightFactor</cstring> + </property> + <property name="suffix"> + <string>%</string> + </property> + </widget> + </grid> + </widget> + <widget class="QWidget"> + <property name="name"> + <cstring>tab</cstring> + </property> + <attribute name="title"> + <string>Menus && Toolbars</string> + </attribute> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel" row="0" column="0"> + <property name="name"> + <cstring>textLabel1_4</cstring> + </property> + <property name="text"> + <string>Border:</string> + </property> + </widget> + <spacer row="3" column="2"> + <property name="name"> + <cstring>spacer5</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>54</height> + </size> + </property> + </spacer> + <widget class="QGroupBox" row="1" column="0" rowspan="1" colspan="5"> + <property name="name"> + <cstring>groupBox2_2</cstring> + </property> + <property name="title"> + <string>Menus</string> + </property> + <property name="flat"> + <bool>true</bool> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QCheckBox" row="6" column="0" rowspan="1" colspan="8"> + <property name="name"> + <cstring>lighterPopupMenuBgnd</cstring> + </property> + <property name="text"> + <string>Lighter popup-menu background</string> + </property> + </widget> + <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="8"> + <property name="name"> + <cstring>menubarMouseOver</cstring> + </property> + <property name="text"> + <string>Enable mouse-over for menubar items</string> + </property> + </widget> + <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="8"> + <property name="name"> + <cstring>roundMbTopOnly</cstring> + </property> + <property name="text"> + <string>Round selected menubar items on top only</string> + </property> + </widget> + <widget class="QLabel" row="1" column="0"> + <property name="name"> + <cstring>textLabel1_4_2_3</cstring> + </property> + <property name="text"> + <string>Coloration:</string> + </property> + </widget> + <widget class="QLabel" row="0" column="0"> + <property name="name"> + <cstring>textLabel1_4_2</cstring> + </property> + <property name="text"> + <string>Menubar appearance:</string> + </property> + </widget> + <widget class="QLabel" row="5" column="0"> + <property name="name"> + <cstring>textLabel1_4_2_4</cstring> + </property> + <property name="text"> + <string>Menuitem appearance:</string> + </property> + </widget> + <widget class="QCheckBox" row="7" column="0" rowspan="1" colspan="7"> + <property name="name"> + <cstring>thinnerMenuItems</cstring> + </property> + <property name="text"> + <string>Thinner menu items</string> + </property> + </widget> + <widget class="QCheckBox" row="1" column="7"> + <property name="name"> + <cstring>shadeMenubarOnlyWhenActive</cstring> + </property> + <property name="text"> + <string>Active window only</string> + </property> + </widget> + <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2"> + <property name="name"> + <cstring>customMenuTextColor</cstring> + </property> + <property name="text"> + <string>Custom text colors (normal/selected):</string> + </property> + </widget> + <widget class="QComboBox" row="5" column="1" rowspan="1" colspan="5"> + <property name="name"> + <cstring>menuitemAppearance</cstring> + </property> + </widget> + <widget class="QComboBox" row="1" column="1" rowspan="1" colspan="5"> + <property name="name"> + <cstring>shadeMenubars</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>3</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + <widget class="QComboBox" row="0" column="1" rowspan="1" colspan="5"> + <property name="name"> + <cstring>menubarAppearance</cstring> + </property> + </widget> + <widget class="KColorButton" row="1" column="6"> + <property name="name"> + <cstring>customMenubarsColor</cstring> + </property> + <property name="text"> + <string></string> + </property> + </widget> + <widget class="QCheckBox" row="5" column="6"> + <property name="name"> + <cstring>borderMenuitems</cstring> + </property> + <property name="text"> + <string>Border</string> + </property> + </widget> + <widget class="KColorButton" row="2" column="2"> + <property name="name"> + <cstring>customMenuNormTextColor</cstring> + </property> + <property name="text"> + <string></string> + </property> + </widget> + <widget class="KColorButton" row="2" column="4"> + <property name="name"> + <cstring>customMenuSelTextColor</cstring> + </property> + <property name="text"> + <string></string> + </property> + </widget> + </grid> + </widget> + <widget class="QLabel" row="0" column="2"> + <property name="name"> + <cstring>textLabel2</cstring> + </property> + <property name="text"> + <string>Handles:</string> + </property> + </widget> + <spacer row="0" column="4"> + <property name="name"> + <cstring>spacer4</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>MinimumExpanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + <widget class="QComboBox" row="0" column="3"> + <property name="name"> + <cstring>handles</cstring> + </property> + </widget> + <widget class="QComboBox" row="0" column="1"> + <property name="name"> + <cstring>toolbarBorders</cstring> + </property> + </widget> + <widget class="QGroupBox" row="2" column="0" rowspan="1" colspan="5"> + <property name="name"> + <cstring>groupBox2</cstring> + </property> + <property name="title"> + <string>Toolbars</string> + </property> + <property name="flat"> + <bool>true</bool> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel" row="0" column="0"> + <property name="name"> + <cstring>textLabel1_4_2_2</cstring> + </property> + <property name="text"> + <string>Appearance:</string> + </property> + </widget> + <widget class="QComboBox" row="0" column="1"> + <property name="name"> + <cstring>toolbarAppearance</cstring> + </property> + </widget> + <widget class="QLabel" row="0" column="2"> + <property name="name"> + <cstring>textLabel2_2</cstring> + </property> + <property name="text"> + <string>Separators:</string> + </property> + </widget> + <widget class="QComboBox" row="0" column="3"> + <property name="name"> + <cstring>toolbarSeparators</cstring> + </property> + </widget> + <spacer row="0" column="4"> + <property name="name"> + <cstring>spacer4_2</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>MinimumExpanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </grid> + </widget> + </grid> + </widget> + <widget class="QWidget"> + <property name="name"> + <cstring>TabPage</cstring> + </property> + <attribute name="title"> + <string>Advanced</string> + </attribute> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="3"> + <property name="name"> + <cstring>gtkComboMenus</cstring> + </property> + <property name="text"> + <string>Gtk style comboboxes (KDE4 only)</string> + </property> + </widget> + <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3"> + <property name="name"> + <cstring>gtkScrollViews</cstring> + </property> + <property name="text"> + <string>Gtk style scrollviews (KDE3 and KDE4 only)</string> + </property> + </widget> + <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="3"> + <property name="name"> + <cstring>gtkButtonOrder</cstring> + </property> + <property name="text"> + <string>Gtk button order</string> + </property> + </widget> + <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="3"> + <property name="name"> + <cstring>mapKdeIcons</cstring> + </property> + <property name="text"> + <string>Map KDE icons (Gtk2 only)</string> + </property> + </widget> + <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="3"> + <property name="name"> + <cstring>fixParentlessDialogs</cstring> + </property> + <property name="text"> + <string>'Fix' parentless dialogs</string> + </property> + <property name="whatsThis" stdset="0"> + <string><h2><font color="#ff0000">Warning: Experimental!</font></h1><p><p>Some applications - such as Kate, Kaffeine, and GIMP - produce dialogs that have no 'parent'. This causes the dialog to recieve an entry in the taskbar, and allows the dialog to be minimised independantly of the main application window.</p> + +<p>If you enable this option, QtCurve will try to 'fix' this by assigning the dialogs a parent.</p> + +<p><b>Note:</b> This may brake some applications, as it wiill alter the behaviour of dialogs in a way the application has not intended. Therefore, please use with care.</p></string> + </property> + </widget> + <widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="3"> + <property name="name"> + <cstring>inactiveHighlight</cstring> + </property> + <property name="text"> + <string>Use blended background/highlight colour for highlight of inactive elements</string> + </property> + <property name="whatsThis" stdset="0"> + <string><h2><font color="#ff0000">Warning: Experimental!</font></h1><p><p>Some applications - such as Kate, Kaffeine, and GIMP - produce dialogs that have no 'parent'. This causes the dialog to recieve an entry in the taskbar, and allows the dialog to be minimised independantly of the main application window.</p> + +<p>If you enable this option, QtCurve will try to 'fix' this by assigning the dialogs a parent.</p> + +<p><b>Note:</b> This may brake some applications, as it wiill alter the behaviour of dialogs in a way the application has not intended. Therefore, please use with care.</p></string> + </property> + </widget> + <widget class="QLabel" row="6" column="0"> + <property name="name"> + <cstring>textLabel1_2</cstring> + </property> + <property name="text"> + <string>Character to use for password entries:</string> + </property> + </widget> + <widget class="QPushButton" row="6" column="1"> + <property name="name"> + <cstring>passwordChar</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string></string> + </property> + </widget> + <spacer row="6" column="2"> + <property name="name"> + <cstring>spacer8</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>133</width> + <height>6</height> + </size> + </property> + </spacer> + <widget class="QLabel" row="7" column="0"> + <property name="name"> + <cstring>textLabel1_5</cstring> + </property> + <property name="text"> + <string>Shading routine:</string> + </property> + </widget> + <widget class="QComboBox" row="7" column="1" rowspan="1" colspan="2"> + <property name="name"> + <cstring>shading</cstring> + </property> + </widget> + <spacer row="8" column="2"> + <property name="name"> + <cstring>spacer7</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>203</height> + </size> + </property> + </spacer> + </grid> + </widget> + </widget> + <spacer row="3" column="0"> + <property name="name"> + <cstring>spacer6_2</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>321</width> + <height>20</height> + </size> + </property> + </spacer> + <widget class="KPushButton" row="3" column="1"> + <property name="name"> + <cstring>optionBtn</cstring> + </property> + <property name="text"> + <string>Options</string> + </property> + </widget> + </grid> +</widget> +<tabstops> + <tabstop>optionsTab</tabstop> + <tabstop>appearance</tabstop> + <tabstop>round</tabstop> + <tabstop>buttonEffect</tabstop> + <tabstop>splitters</tabstop> + <tabstop>sliderAppearance</tabstop> + <tabstop>shadeSliders</tabstop> + <tabstop>customSlidersColor</tabstop> + <tabstop>sliderStyle</tabstop> + <tabstop>fillSlider</tabstop> + <tabstop>scrollbarType</tabstop> + <tabstop>sliderThumbs</tabstop> + <tabstop>progressAppearance</tabstop> + <tabstop>gradientPbGroove</tabstop> + <tabstop>stripedProgress</tabstop> + <tabstop>animatedProgress</tabstop> + <tabstop>embolden</tabstop> + <tabstop>defBtnIndicator</tabstop> + <tabstop>coloredMouseOver</tabstop> + <tabstop>highlightFactor</tabstop> + <tabstop>lvAppearance</tabstop> + <tabstop>lvLines</tabstop> + <tabstop>tabAppearance</tabstop> + <tabstop>highlightTab</tabstop> + <tabstop>colorSelTab</tabstop> + <tabstop>shadeCheckRadio</tabstop> + <tabstop>customCheckRadioColor</tabstop> + <tabstop>xCheck</tabstop> + <tabstop>stdFocus</tabstop> + <tabstop>vArrows</tabstop> + <tabstop>drawStatusBarFrames</tabstop> + <tabstop>stdSidebarButtons</tabstop> + <tabstop>framelessGroupBoxes</tabstop> + <tabstop>darkerBorders</tabstop> + <tabstop>toolbarBorders</tabstop> + <tabstop>handles</tabstop> + <tabstop>menubarAppearance</tabstop> + <tabstop>shadeMenubars</tabstop> + <tabstop>customMenubarsColor</tabstop> + <tabstop>shadeMenubarOnlyWhenActive</tabstop> + <tabstop>customMenuTextColor</tabstop> + <tabstop>customMenuNormTextColor</tabstop> + <tabstop>customMenuSelTextColor</tabstop> + <tabstop>menubarMouseOver</tabstop> + <tabstop>roundMbTopOnly</tabstop> + <tabstop>menuitemAppearance</tabstop> + <tabstop>borderMenuitems</tabstop> + <tabstop>lighterPopupMenuBgnd</tabstop> + <tabstop>thinnerMenuItems</tabstop> + <tabstop>toolbarAppearance</tabstop> + <tabstop>toolbarSeparators</tabstop> + <tabstop>gtkComboMenus</tabstop> + <tabstop>gtkScrollViews</tabstop> + <tabstop>gtkButtonOrder</tabstop> + <tabstop>mapKdeIcons</tabstop> + <tabstop>fixParentlessDialogs</tabstop> + <tabstop>inactiveHighlight</tabstop> + <tabstop>passwordChar</tabstop> + <tabstop>shading</tabstop> + <tabstop>optionBtn</tabstop> +</tabstops> +<layoutdefaults spacing="6" margin="11"/> +<includehints> + <includehint>kcolorbutton.h</includehint> + <includehint>kcolorbutton.h</includehint> + <includehint>knuminput.h</includehint> + <includehint>knuminput.h</includehint> + <includehint>kcolorbutton.h</includehint> + <includehint>kcolorbutton.h</includehint> + <includehint>kcolorbutton.h</includehint> + <includehint>kpushbutton.h</includehint> +</includehints> +</UI> |