CustomFilterSettings::CustomFilterSettings(QWidget *parent) : AbstractEffectSettings(parent) { mSpinBox_11 = createSpinBox(); mSpinBox_12 = createSpinBox(); mSpinBox_13 = createSpinBox(); mSpinBox_21 = createSpinBox(); mSpinBox_22 = createSpinBox(); mSpinBox_23 = createSpinBox(); mSpinBox_31 = createSpinBox(); mSpinBox_32 = createSpinBox(); mSpinBox_33 = createSpinBox(); QGridLayout *gLayout = new QGridLayout(); gLayout->addWidget(mSpinBox_11, 0, 0); gLayout->addWidget(mSpinBox_12, 0, 1); gLayout->addWidget(mSpinBox_13, 0, 2); gLayout->addWidget(mSpinBox_21, 1, 0); gLayout->addWidget(mSpinBox_22, 1, 1); gLayout->addWidget(mSpinBox_23, 1, 2); gLayout->addWidget(mSpinBox_31, 2, 0); gLayout->addWidget(mSpinBox_32, 2, 1); gLayout->addWidget(mSpinBox_33, 2, 2); setLayout(gLayout); }
DevSettings::DevSettings() { s = this; layout_ = new QGridLayout(); numWidgets_ = 0; addSection("Cutting"); createCheckBox("reverse cut", false); createCheckBox("mobius cut", false); addSection("Inbetweening"); createCheckBox("inverse direction", false); addSection("Rendering"); createCheckBox("draw edge orientation", false); createSpinBox("num sub", 0, 10, 2); createDoubleSpinBox("ds", 0, 10, 2); setLayout(layout_); }
void KgGeneral::createViewerTab() { QWidget *tab = createTab(i18n("Viewer/Editor")); QGridLayout *tabLayout = new QGridLayout(tab); tabLayout->setSpacing(6); tabLayout->setContentsMargins(11, 11, 11, 11); tabLayout->addWidget(createCheckBox("General", "View In Separate Window", _ViewInSeparateWindow, i18n("Internal editor and viewer opens each file in a separate window"), tab, false, i18n("If checked, each file will open in a separate window, otherwise, the viewer will work in a single, tabbed mode"), PAGE_VIEWER)); // ------------------------- viewer ---------------------------------- QGroupBox *viewerGrp = createFrame(i18n("Viewer"), tab); tabLayout->addWidget(viewerGrp, 1, 0); QGridLayout *viewerGrid = createGridLayout(viewerGrp); QWidget * hboxWidget2 = new QWidget(viewerGrp); QHBoxLayout * hbox2 = new QHBoxLayout(hboxWidget2); QWidget * vboxWidget = new QWidget(hboxWidget2); QVBoxLayout * vbox = new QVBoxLayout(vboxWidget); vbox->addWidget(new QLabel(i18n("Default viewer mode:"), vboxWidget)); KONFIGURATOR_NAME_VALUE_TIP viewMode[] = // name value tooltip {{ i18n("Generic mode"), "generic", i18n("Use the system's default viewer") }, { i18n("Text mode"), "text", i18n("View the file in text-only mode") }, { i18n("Hex mode"), "hex", i18n("View the file in hex-mode (better for binary files)") }, { i18n("Lister mode"), "lister", i18n("View the file with lister (for huge text files)") } }; vbox->addWidget(createRadioButtonGroup("General", "Default Viewer Mode", "generic", 0, 4, viewMode, 4, vboxWidget, false, PAGE_VIEWER)); vbox->addWidget( createCheckBox("General", "UseOktetaViewer", _UseOktetaViewer, i18n("Use Okteta as Hex viewer"), vboxWidget, false, i18n("If available, use Okteta as Hex viewer instead of the internal viewer"), PAGE_VIEWER) ); QWidget * hboxWidget4 = new QWidget(vboxWidget); QHBoxLayout * hbox4 = new QHBoxLayout(hboxWidget4); QLabel *label5 = new QLabel(i18n("Use lister if the text file is bigger than:"), hboxWidget4); hbox4->addWidget(label5); KonfiguratorSpinBox *spinBox = createSpinBox("General", "Lister Limit", _ListerLimit, 0, 0x7FFFFFFF, hboxWidget4, false, PAGE_VIEWER); hbox4->addWidget(spinBox); QLabel *label6 = new QLabel(i18n("MB"), hboxWidget4); hbox4->addWidget(label6); vbox->addWidget(hboxWidget4); hbox2->addWidget(vboxWidget); viewerGrid->addWidget(hboxWidget2, 0, 0); // ------------------------- editor ---------------------------------- QGroupBox *editorGrp = createFrame(i18n("Editor"), tab); tabLayout->addWidget(editorGrp, 2, 0); QGridLayout *editorGrid = createGridLayout(editorGrp); QLabel *label1 = new QLabel(i18n("Editor:"), editorGrp); editorGrid->addWidget(label1, 0, 0); KonfiguratorURLRequester *urlReq = createURLRequester("General", "Editor", "internal editor", editorGrp, false, PAGE_VIEWER, false); editorGrid->addWidget(urlReq, 0, 1); QLabel *label2 = new QLabel(i18n("Hint: use 'internal editor' if you want to use Krusader's fast built-in editor"), editorGrp); editorGrid->addWidget(label2, 1, 0, 1, 2); }
KgAdvanced::KgAdvanced(bool first, QWidget* parent) : KonfiguratorPage(first, parent) { QWidget *innerWidget = new QFrame(this); setWidget(innerWidget); setWidgetResizable(true); QGridLayout *kgAdvancedLayout = new QGridLayout(innerWidget); kgAdvancedLayout->setSpacing(6); // -------------------------- GENERAL GROUPBOX ---------------------------------- QGroupBox *generalGrp = createFrame(i18n("General"), innerWidget); QGridLayout *generalGrid = createGridLayout(generalGrp); KONFIGURATOR_CHECKBOX_PARAM generalSettings[] = // cfg_class cfg_name default text restart tooltip { // {"Advanced", "PreserveAttributes", _PreserveAttributes, i18n("Preserve attributes for local copy/move (slower)"), false, i18n("Krusader will try to preserve all attributes (time, owner, group) of the local files according to the source depending on your permissions:<ul><li>User preserving if you are root</li><li>Group preserving if you are root or member of the group</li><li>Preserving the timestamp</li></ul><b>Note</b>: This can slow down the copy process.") }, {"Advanced", "AutoMount", _AutoMount, i18n("Automount filesystems"), false, i18n("When stepping into a directory which is defined as a mount point in the <b>fstab</b>, try mounting it with the defined parameters.")} }; KonfiguratorCheckBoxGroup *generals = createCheckBoxGroup(1, 0, generalSettings, 1, generalGrp); generalGrid->addWidget(generals, 1, 0); addLabel(generalGrid, 2, 0, i18n("MountMan will not (un)mount the following mount-points:"), generalGrp); KonfiguratorEditBox *nonMountPoints = createEditBox("Advanced", "Nonmount Points", _NonMountPoints, generalGrp, false); generalGrid->addWidget(nonMountPoints, 2, 1); #ifdef BSD generals->find("AutoMount")->setEnabled(false); /* disable AutoMount on BSD */ #endif kgAdvancedLayout->addWidget(generalGrp, 0 , 0); // ----------------------- CONFIRMATIONS GROUPBOX ------------------------------- QGroupBox *confirmGrp = createFrame(i18n("Confirmations"), innerWidget); QGridLayout *confirmGrid = createGridLayout(confirmGrp); addLabel(confirmGrid, 0, 0, i18n("\nRequest user confirmation for the following operations:\n"), confirmGrp); KONFIGURATOR_CHECKBOX_PARAM confirmations[] = // cfg_class cfg_name default text restart ToolTip {{"Advanced", "Confirm Unempty Dir", _ConfirmUnemptyDir, i18n("Deleting non-empty directories"), false, ""}, {"Advanced", "Confirm Delete", _ConfirmDelete, i18n("Deleting files"), false, ""}, {"Advanced", "Confirm Copy", _ConfirmCopy, i18n("Copying files"), false, ""}, {"Advanced", "Confirm Move", _ConfirmMove, i18n("Moving files"), false, ""}, {"Advanced", "Confirm Feed to Listbox", _ConfirmFeedToListbox, i18n("Confirm feed to listbox"), false, i18n("Ask for a result name when feeding items to the listbox. By default the standard value is used.")}, {"Notification Messages", "Confirm Remove UserAction", true, i18n("Removing Useractions"), false, ""} }; KonfiguratorCheckBoxGroup *confWnd = createCheckBoxGroup(2, 0, confirmations, 6, confirmGrp); confirmGrid->addWidget(confWnd, 1, 0); kgAdvancedLayout->addWidget(confirmGrp, 1 , 0); // ------------------------ FINE-TUNING GROUPBOX -------------------------------- QGroupBox *fineTuneGrp = createFrame(i18n("Fine-Tuning"), innerWidget); QGridLayout *fineTuneGrid = createGridLayout(fineTuneGrp); fineTuneGrid->setAlignment(Qt::AlignLeft | Qt::AlignTop); QLabel *label = new QLabel(i18n("Icon cache size (KB):"), fineTuneGrp); label->setWhatsThis(i18n("The icon cache size influences how fast the contents of a panel can be displayed. However, too large a cache might consume your memory.")); fineTuneGrid->addWidget(label, 0, 0); KonfiguratorSpinBox *spinBox = createSpinBox("Advanced", "Icon Cache Size", _IconCacheSize, 1, 8192, fineTuneGrp, false); spinBox->setWhatsThis(i18n("The icon cache size influences how fast the contents of a panel can be displayed. However, too large a cache might consume your memory.")); spinBox->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); fineTuneGrid->addWidget(spinBox, 0, 1); addLabel(fineTuneGrid, 1, 0, i18n("Arguments of updatedb:"), fineTuneGrp); KonfiguratorEditBox *updatedbArgs = createEditBox("Locate", "UpdateDB Arguments", "", fineTuneGrp, false); fineTuneGrid->addWidget(updatedbArgs, 1, 1); kgAdvancedLayout->addWidget(fineTuneGrp, 2 , 0); }
KgColors::KgColors(bool first, QWidget* parent) : KonfiguratorPage(first, parent), offset(0), activeTabIdx(-1), inactiveTabIdx(-1), #ifdef SYNCHRONIZER_ENABLED synchronizerTabIdx(-1), #endif otherTabIdx(-1) { QWidget *innerWidget = new QFrame(this); setWidget(innerWidget); setWidgetResizable(true); QGridLayout *kgColorsLayout = new QGridLayout(innerWidget); kgColorsLayout->setSpacing(6); // -------------------------- GENERAL GROUPBOX ---------------------------------- QGroupBox *generalGrp = createFrame(i18n("General"), innerWidget); QGridLayout *generalGrid = createGridLayout(generalGrp); generalGrid->setSpacing(0); generalGrid->setContentsMargins(5, 5, 5, 5); KONFIGURATOR_CHECKBOX_PARAM generalSettings[] = // cfg_class cfg_name default text restart tooltip {{"Colors", "KDE Default", _KDEDefaultColors, i18n("Use the default KDE colors"), false, "<p><img src='toolbar|kcontrol'></p>" + i18n("<p>Use KDE's global color configuration.</p><p><i>KDE System Settings -> Application Appearance -> Colors</i></p>") }, {"Colors", "Enable Alternate Background", _AlternateBackground, i18n("Use alternate background color"), false, i18n("<p>The <b>background color</b> and the <b>alternate background</b> color alternates line by line.</p><p>When you don't use the <i>KDE default colors</i>, you can configure the alternate colors in the <i>colors</i> box.</p>") }, {"Colors", "Show Current Item Always", _ShowCurrentItemAlways, i18n("Show current item even if not focused"), false, i18n("<p>Shows the last cursor position in the non active list panel.</p><p>This option is only available when you don't use the <i>KDE default colors</i>.</p>") }, {"Colors", "Dim Inactive Colors", _DimInactiveColors, i18n("Dim the colors of the inactive panel"), false, i18n("<p>The colors of the inactive panel are calculated by a dim color and a dim factor.</p>") } }; generals = createCheckBoxGroup(0, 2, generalSettings, sizeof(generalSettings) / sizeof(generalSettings[0]), generalGrp); generalGrid->addWidget(generals, 1, 0); generals->layout()->setSpacing(5); connect(generals->find("KDE Default"), SIGNAL(stateChanged(int)), this, SLOT(slotDisable())); connect(generals->find("Show Current Item Always"), SIGNAL(stateChanged(int)), this, SLOT(slotDisable())); connect(generals->find("Dim Inactive Colors"), SIGNAL(stateChanged(int)), this, SLOT(slotDisable())); kgColorsLayout->addWidget(generalGrp, 0 , 0, 1, 3); QWidget *hboxWidget = new QWidget(innerWidget); QHBoxLayout *hbox = new QHBoxLayout(hboxWidget); // -------------------------- COLORS GROUPBOX ---------------------------------- QGroupBox *colorsFrameGrp = createFrame(i18n("Colors"), hboxWidget); QGridLayout *colorsFrameGrid = createGridLayout(colorsFrameGrp); colorsFrameGrid->setSpacing(0); colorsFrameGrid->setContentsMargins(3, 3, 3, 3); colorTabWidget = new QTabWidget(colorsFrameGrp); colorsGrp = new QWidget(colorTabWidget); activeTabIdx = colorTabWidget->addTab(colorsGrp, i18n("Active")); colorsGrid = new QGridLayout(colorsGrp); colorsGrid->setSpacing(0); colorsGrid->setContentsMargins(2, 2, 2, 2); ADDITIONAL_COLOR transparent = { i18n("Transparent"), Qt::white, "transparent" }; QPalette p = QGuiApplication::palette(); addColorSelector("Foreground", i18n("Foreground:"), p.color(QPalette::Active, QPalette::Text)); addColorSelector("Directory Foreground", i18n("Directory foreground:"), getColorSelector("Foreground")->getColor(), i18n("Same as foreground")); addColorSelector("Executable Foreground", i18n("Executable foreground:"), getColorSelector("Foreground")->getColor(), i18n("Same as foreground")); addColorSelector("Symlink Foreground", i18n("Symbolic link foreground:"), getColorSelector("Foreground")->getColor(), i18n("Same as foreground")); addColorSelector("Invalid Symlink Foreground", i18n("Invalid symlink foreground:"), getColorSelector("Foreground")->getColor(), i18n("Same as foreground")); addColorSelector("Background", i18n("Background:"), p.color(QPalette::Active, QPalette::Base)); ADDITIONAL_COLOR sameAsBckgnd = { i18n("Same as background"), getColorSelector("Background")->getColor(), "Background" }; addColorSelector("Alternate Background", i18n("Alternate background:"), p.color(QPalette::Active, QPalette::AlternateBase), "", &sameAsBckgnd, 1); addColorSelector("Marked Foreground", i18n("Selected foreground:"), p.color(QPalette::Active, QPalette::HighlightedText), "", &transparent, 1); addColorSelector("Marked Background", i18n("Selected background:"), p.color(QPalette::Active, QPalette::Highlight), "", &sameAsBckgnd, 1); ADDITIONAL_COLOR sameAsAltern = { i18n("Same as alt. background"), getColorSelector("Alternate Background")->getColor(), "Alternate Background" }; addColorSelector("Alternate Marked Background", i18n("Alternate selected background:"), getColorSelector("Marked Background")->getColor(), i18n("Same as selected background"), &sameAsAltern, 1); addColorSelector("Current Foreground", i18n("Current foreground:"), Qt::white, i18n("Not used")); ADDITIONAL_COLOR sameAsMarkedForegnd = { i18n("Same as selected foreground"), getColorSelector("Marked Foreground")->getColor(), "Marked Foreground" }; addColorSelector("Marked Current Foreground", i18n("Selected current foreground:"), Qt::white, i18n("Not used"), &sameAsMarkedForegnd, 1); addColorSelector("Current Background", i18n("Current background:"), Qt::white, i18n("Not used"), &sameAsBckgnd, 1); colorsGrid->addWidget(createSpacer(colorsGrp), itemList.count() - offset, 1); connect(getColorSelector("Foreground"), SIGNAL(colorChanged()), this, SLOT(slotForegroundChanged())); connect(getColorSelector("Background"), SIGNAL(colorChanged()), this, SLOT(slotBackgroundChanged())); connect(getColorSelector("Alternate Background"), SIGNAL(colorChanged()), this, SLOT(slotAltBackgroundChanged())); connect(getColorSelector("Marked Background"), SIGNAL(colorChanged()), this, SLOT(slotMarkedBackgroundChanged())); inactiveColorStack = new QStackedWidget(colorTabWidget); inactiveTabIdx = colorTabWidget->addTab(inactiveColorStack, i18n("Inactive")); colorsGrp = normalInactiveWidget = new QWidget(inactiveColorStack); colorsGrid = new QGridLayout(normalInactiveWidget); colorsGrid->setSpacing(0); colorsGrid->setContentsMargins(2, 2, 2, 2); offset = endOfActiveColors = itemList.count(); addColorSelector("Inactive Foreground", i18n("Foreground:"), getColorSelector("Foreground")->getColor(), i18n("Same as active")); ADDITIONAL_COLOR sameAsInactForegnd = { i18n("Same as foreground"), getColorSelector("Inactive Foreground")->getColor(), "Inactive Foreground" }; addColorSelector("Inactive Directory Foreground", i18n("Directory foreground:"), getColorSelector("Directory Foreground")->getColor(), i18n("Same as active"), &sameAsInactForegnd, 1); addColorSelector("Inactive Executable Foreground", i18n("Executable foreground:"), getColorSelector("Executable Foreground")->getColor(), i18n("Same as active"), &sameAsInactForegnd, 1); addColorSelector("Inactive Symlink Foreground", i18n("Symbolic link foreground:"), getColorSelector("Symlink Foreground")->getColor(), i18n("Same as active"), &sameAsInactForegnd, 1); addColorSelector("Inactive Invalid Symlink Foreground", i18n("Invalid symlink foreground:"), getColorSelector("Invalid Symlink Foreground")->getColor(), i18n("Same as active"), &sameAsInactForegnd, 1); addColorSelector("Inactive Background", i18n("Background:"), getColorSelector("Background")->getColor(), i18n("Same as active")); ADDITIONAL_COLOR sameAsInactBckgnd = { i18n("Same as background"), getColorSelector("Inactive Background")->getColor(), "Inactive Background" }; addColorSelector("Inactive Alternate Background", i18n("Alternate background:"), getColorSelector("Alternate Background")->getColor(), i18n("Same as active"), &sameAsInactBckgnd, 1); addColorSelector("Inactive Marked Foreground", i18n("Selected foreground:"), getColorSelector("Marked Foreground")->getColor(), i18n("Same as active"), &transparent, 1); addColorSelector("Inactive Marked Background", i18n("Selected background:"), getColorSelector("Marked Background")->getColor(), i18n("Same as active"), &sameAsInactBckgnd, 1); ADDITIONAL_COLOR sameAsInactAltern[] = {{ i18n("Same as alt. background"), getColorSelector("Inactive Alternate Background")->getColor(), "Inactive Alternate Background" }, { i18n("Same as selected background"), getColorSelector("Inactive Marked Background")->getColor(), "Inactive Marked Background" } }; addColorSelector("Inactive Alternate Marked Background", i18n("Alternate selected background:"), getColorSelector("Alternate Marked Background")->getColor(), i18n("Same as active"), sameAsInactAltern, 2); addColorSelector("Inactive Current Foreground", i18n("Current foreground:"), getColorSelector("Current Foreground")->getColor(), i18n("Same as active")); ADDITIONAL_COLOR sameAsInactMarkedForegnd = { i18n("Same as selected foreground"), getColorSelector("Inactive Marked Foreground")->getColor(), "Inactive Marked Foreground" }; addColorSelector("Inactive Marked Current Foreground", i18n("Selected current foreground:"), getColorSelector("Marked Current Foreground")->getColor(), i18n("Same as active"), &sameAsInactMarkedForegnd, 1); addColorSelector("Inactive Current Background", i18n("Current background:"), getColorSelector("Current Background")->getColor(), i18n("Same as active"), &sameAsInactBckgnd, 1); colorsGrid->addWidget(createSpacer(normalInactiveWidget), itemList.count() - offset, 1); connect(getColorSelector("Inactive Foreground"), SIGNAL(colorChanged()), this, SLOT(slotInactiveForegroundChanged())); connect(getColorSelector("Inactive Background"), SIGNAL(colorChanged()), this, SLOT(slotInactiveBackgroundChanged())); connect(getColorSelector("Inactive Alternate Background"), SIGNAL(colorChanged()), this, SLOT(slotInactiveAltBackgroundChanged())); connect(getColorSelector("Inactive Marked Background"), SIGNAL(colorChanged()), this, SLOT(slotInactiveMarkedBackgroundChanged())); offset = endOfPanelColors = itemList.count(); inactiveColorStack->addWidget(normalInactiveWidget); colorsGrp = dimmedInactiveWidget = new QWidget(inactiveColorStack); colorsGrid = new QGridLayout(dimmedInactiveWidget); colorsGrid->setSpacing(0); colorsGrid->setContentsMargins(2, 2, 2, 2); addColorSelector("Dim Target Color", i18n("Dim target color:"), Qt::black); int index = itemList.count() - offset; labelList.append(addLabel(colorsGrid, index, 0, i18n("Dim factor:"), colorsGrp)); dimFactor = createSpinBox("Colors", "Dim Factor", 80, 0, 100, colorsGrp); dimFactor->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); colorsGrid->addWidget(dimFactor, index++, 1); colorsGrid->addWidget(createSpacer(dimmedInactiveWidget), itemList.count() + 1 - offset, 1); inactiveColorStack->addWidget(dimmedInactiveWidget); inactiveColorStack->setCurrentWidget(normalInactiveWidget); ADDITIONAL_COLOR KDEDefaultBase = { i18n("KDE default"), p.color(QPalette::Active, QPalette::Base), "KDE default" }; ADDITIONAL_COLOR KDEDefaultFore = { i18n("KDE default"), p.color(QPalette::Active, QPalette::Text), "KDE default" }; #ifdef SYNCHRONIZER_ENABLED colorsGrp = new QWidget(colorTabWidget); synchronizerTabIdx = colorTabWidget->addTab(colorsGrp, i18n("Synchronizer")); colorsGrid = new QGridLayout(colorsGrp); colorsGrid->setSpacing(0); colorsGrid->setContentsMargins(2, 2, 2, 2); offset = endOfPanelColors = itemList.count(); addColorSelector("Synchronizer Equals Foreground", i18n("Equals foreground:"), Qt::black, QString(), &KDEDefaultFore, 1); addColorSelector("Synchronizer Equals Background", i18n("Equals background:"), p.color(QPalette::Active, QPalette::Base), QString(), &KDEDefaultBase, 1); addColorSelector("Synchronizer Differs Foreground", i18n("Differing foreground:"), Qt::red, QString(), &KDEDefaultFore, 1); addColorSelector("Synchronizer Differs Background", i18n("Differing background:"), p.color(QPalette::Active, QPalette::Base), QString(), &KDEDefaultBase, 1); addColorSelector("Synchronizer LeftCopy Foreground", i18n("Copy to left foreground:"), Qt::blue, QString(), &KDEDefaultFore, 1); addColorSelector("Synchronizer LeftCopy Background", i18n("Copy to left background:"), p.color(QPalette::Active, QPalette::Base), QString(), &KDEDefaultBase, 1); addColorSelector("Synchronizer RightCopy Foreground", i18n("Copy to right foreground:"), Qt::darkGreen, QString(), &KDEDefaultFore, 1); addColorSelector("Synchronizer RightCopy Background", i18n("Copy to right background:"), p.color(QPalette::Active, QPalette::Base), QString(), &KDEDefaultBase, 1); addColorSelector("Synchronizer Delete Foreground", i18n("Delete foreground:"), Qt::white, QString(), &KDEDefaultFore, 1); addColorSelector("Synchronizer Delete Background", i18n("Delete background:"), Qt::red, QString(), &KDEDefaultBase, 1); colorsGrid->addWidget(createSpacer(colorsGrp), itemList.count() - offset, 1); #endif colorsGrp = new QWidget(colorTabWidget); otherTabIdx = colorTabWidget->addTab(colorsGrp, i18n("Other")); colorsGrid = new QGridLayout(colorsGrp); colorsGrid->setSpacing(0); colorsGrid->setContentsMargins(2, 2, 2, 2); offset = endOfPanelColors = itemList.count(); addColorSelector("Quicksearch Match Foreground", i18n("Quicksearch, match foreground:"), Qt::black, QString(), &KDEDefaultFore, 1); addColorSelector("Quicksearch Match Background", i18n("Quicksearch, match background:"), QColor(192, 255, 192), QString(), &KDEDefaultBase, 1); addColorSelector("Quicksearch Non-match Foreground", i18n("Quicksearch, non-match foreground:"), Qt::black, QString(), &KDEDefaultFore, 1); addColorSelector("Quicksearch Non-match Background", i18n("Quicksearch, non-match background:"), QColor(255, 192, 192), QString(), &KDEDefaultBase, 1); ADDITIONAL_COLOR KDEDefaultWindowFore = { i18n("KDE default"), p.color(QPalette::Active, QPalette::WindowText), "KDE default" }; ADDITIONAL_COLOR KDEDefaultWindowBack = { i18n("KDE default"), p.color(QPalette::Active, QPalette::Window), "KDE default" }; addColorSelector("Statusbar Foreground Active", i18n("Statusbar, active foreground:"), p.color(QPalette::Active, QPalette::HighlightedText), QString(), &KDEDefaultWindowFore, 1); addColorSelector("Statusbar Background Active", i18n("Statusbar, active background:"), p.color(QPalette::Active, QPalette::Highlight), QString(), &KDEDefaultWindowBack, 1); addColorSelector("Statusbar Foreground Inactive", i18n("Statusbar, inactive foreground:"), p.color(QPalette::Inactive, QPalette::Text), QString(), &KDEDefaultWindowFore, 1); addColorSelector("Statusbar Background Inactive", i18n("Statusbar, inactive background:"), p.color(QPalette::Inactive, QPalette::Base), QString(), &KDEDefaultWindowBack, 1); colorsGrid->addWidget(createSpacer(colorsGrp), itemList.count() - offset, 1); colorsFrameGrid->addWidget(colorTabWidget, 0, 0); hbox->addWidget(colorsFrameGrp); // -------------------------- PREVIEW GROUPBOX ---------------------------------- previewGrp = createFrame(i18n("Preview"), hboxWidget); previewGrid = createGridLayout(previewGrp); preview = new KrTreeWidget(previewGrp); preview->setBackgroundRole(QPalette::Window); preview->setAutoFillBackground(true); QStringList labels; labels << i18n("Colors"); preview->setHeaderLabels(labels); preview->header()->setSortIndicatorShown(false); preview->setSortingEnabled(false); preview->setEnabled(false); previewGrid->addWidget(preview, 0 , 0); hbox->addWidget(previewGrp); connect(generals->find("Enable Alternate Background"), SIGNAL(stateChanged(int)), this, SLOT(generatePreview())); connect(colorTabWidget, SIGNAL(currentChanged(int)), this, SLOT(generatePreview())); connect(dimFactor, SIGNAL(valueChanged(int)), this, SLOT(generatePreview())); kgColorsLayout->addWidget(hboxWidget, 1 , 0, 1, 3); importBtn = new QPushButton(i18n("Import color-scheme"), innerWidget); kgColorsLayout->addWidget(importBtn, 2, 0); exportBtn = new QPushButton(i18n("Export color-scheme"), innerWidget); kgColorsLayout->addWidget(exportBtn, 2, 1); kgColorsLayout->addWidget(createSpacer(innerWidget), 2, 2); connect(importBtn, SIGNAL(clicked()), this, SLOT(slotImportColors())); connect(exportBtn, SIGNAL(clicked()), this, SLOT(slotExportColors())); slotDisable(); }