12#include <config-hdr.h>
31#include <QRadioButton>
34#include <QStandardPaths>
36#include <QStyleFactory>
38#include <QFontComboBox>
40#include <QSurfaceFormat>
59#include <KTitleWidget>
62#include <klocalizedstring.h>
63#include <kstandardguiitem.h>
101#include <config-qt-patches-present.h>
104#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
106# include "config_qt5_has_wintab_switch.h"
108# include <QtGui/private/qguiapplication_p.h>
109# include <QtGui/qpa/qplatformintegration.h>
111#include "config-high-dpi-scale-factor-rounding-policy.h"
124 if (QGuiApplication::screens().
length() <= index) {
127 QScreen* screen = QGuiApplication::screens()[index];
128 QString resolution = QString::number(screen->geometry().width()).append(
"x").append(QString::number(screen->geometry().height()));
129 QString name = screen->name();
144 State
validate(QString &line,
int &)
const override
147 if (!fi.isWritable()) {
158 <<
"0" <<
"1" <<
"2" <<
"3" <<
"4" <<
"5" <<
"6" <<
"7" <<
"8" <<
"9"
159 <<
"/" <<
"\\" <<
":" <<
";" <<
" ")
166 State
validate(QString &line,
int &)
const override
169 if (line.contains(invalidChar)) {
192 if (event->type() == QEvent::Wheel) {
209 scrollAreaWidgetContents->setAutoFillBackground(
false);
210 scrollAreaWidgetContents->parentWidget()->setAutoFillBackground(
false);
221 << i18n(
"Small Circle")
223 << i18n(
"Triangle Righthanded")
224 << i18n(
"Triangle Lefthanded")
225 << i18n(
"Black Pixel")
226 << i18n(
"White Pixel");
229 << i18nc(
"Display options label to not DISPLAY brush outline",
"No Outline")
230 << i18n(
"Circle Outline")
231 << i18n(
"Preview Outline")
232 << i18n(
"Tilt Outline");
236 m_cmbCursorShape->addItems(cursorItems);
240 m_cmbOutlineShape->addItems(outlineItems);
249 cursorColorButton->setColor(cursorColor);
255 m_cmbEraserCursorShape->addItems(cursorItems);
256 m_cmbEraserCursorShape->addItem(i18n(
"Eraser"));
260 m_cmbEraserOutlineShape->addItems(outlineItems);
269 eraserCursorColorButton->setColor(eraserCursorColor);
274 chkUseCustomFont->setChecked(cfg.
readEntry<
bool>(
"use_custom_system_font",
false));
275 cmbCustomFont->findChild <QComboBox*>(
"stylesComboBox")->setVisible(
false);
277 QString fontName = cfg.
readEntry<QString>(
"custom_system_font",
"");
278 if (fontName.isEmpty()) {
279 cmbCustomFont->setCurrentFont(qApp->font());
283 int pointSize = qApp->font().pointSize();
284 cmbCustomFont->setCurrentFont(QFont(fontName, pointSize));
286 int fontSize = cfg.
readEntry<
int>(
"custom_font_size", -1);
288 intFontSize->setValue(qApp->font().pointSize());
291 intFontSize->setValue(fontSize);
294 m_cmbMDIType->setCurrentIndex(cfg.
readEntry<
int>(
"mdi_viewmode", (
int)QMdiArea::TabbedView));
304 m_mdiColor->setColor(mdiColor);
310 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
311 QSettings kritarc(configPath + QStringLiteral(
"/kritadisplayrc"), QSettings::IniFormat);
312 m_chkHiDPI->setChecked(kritarc.value(
"EnableHiDPI",
true).toBool());
313#ifdef HAVE_HIGH_DPI_SCALE_FACTOR_ROUNDING_POLICY
314 m_chkHiDPIFractionalScaling->setChecked(kritarc.value(
"EnableHiDPIFractionalScaling",
false).toBool());
316 m_wdgHiDPIFractionalScaling->setEnabled(
false);
318 chkUsageLogging->setChecked(kritarc.value(
"LogUsage",
true).toBool());
325 cmbFlowMode->setCurrentIndex((
int)!cfg.
readEntry<
bool>(
"useCreamyAlphaDarken",
true));
326 cmbCmykBlendingMode->setCurrentIndex((
int)!cfg.
readEntry<
bool>(
"useSubtractiveBlendingForCmykColorSpaces",
true));
328 cmbTouchPainting->addItem(
330 : i18nc(
"touch painting",
"Auto (Enabled)"));
331 cmbTouchPainting->addItem(i18nc(
"touch painting",
"Enabled"));
332 cmbTouchPainting->addItem(i18nc(
"touch painting",
"Disabled"));
334 chkTouchPressureSensitivity->setChecked(cfg.
readEntry(
"useTouchPressureSensitivity",
true));
335 connect(cmbTouchPainting, SIGNAL(currentIndexChanged(
int)),
346 m_cmbKineticScrollingGesture->addItem(i18n(
"On Touch Drag"));
347 m_cmbKineticScrollingGesture->addItem(i18n(
"On Click Drag"));
348 m_cmbKineticScrollingGesture->addItem(i18n(
"On Middle-Click Drag"));
355 m_kineticScrollingSensitivitySlider->setRange(0, 100);
368 m_autosaveSpinBox->setValue(autosaveInterval / 60);
369 m_autosaveCheckBox->setChecked(autosaveInterval > 0);
370 chkHideAutosaveFiles->setChecked(cfg.
readEntry<
bool>(
"autosavefileshidden",
true));
373 chkZip64->setChecked(cfg.
useZip64());
374 m_chkTrimKra->setChecked(cfg.
trimKra());
377 m_backupFileCheckBox->setChecked(cfg.
backupFile());
378 cmbBackupFileLocation->setCurrentIndex(cfg.
readEntry<
int>(
"backupfilelocation", 0));
379 txtBackupFileSuffix->setText(cfg.
readEntry<QString>(
"backupfilesuffix",
"~"));
381 txtBackupFileSuffix->setValidator(validator);
382 intNumBackupFiles->setValue(cfg.
readEntry<
int>(
"numberofbackupfiles", 1));
384 cmbDefaultExportFileType->clear();
387 QMap<QString, QString> mimeTypeMap;
389 foreach (
const QString &mimeType, mimeFilter) {
391 mimeTypeMap.insert(description, mimeType);
395 QStringList sortedDescriptions = mimeTypeMap.keys();
396 sortedDescriptions.sort(Qt::CaseInsensitive);
398 cmbDefaultExportFileType->addItem(i18n(
"All Supported Files"),
"all/mime");
399 foreach (
const QString &description, sortedDescriptions) {
400 const QString &mimeType = mimeTypeMap.value(description);
401 cmbDefaultExportFileType->addItem(description, mimeType);
404 const QString mimeTypeToFind = cfg.
exportMimeType(
false).toUtf8();
405 const int index = cmbDefaultExportFileType->findData(mimeTypeToFind);
408 cmbDefaultExportFileType->setCurrentIndex(index);
411 const QString defaultMimeType =
"image/png";
412 const int defaultIndex = cmbDefaultExportFileType->findData(defaultMimeType);
413 if (defaultIndex >= 0) {
414 cmbDefaultExportFileType->setCurrentIndex(defaultIndex);
417 qDebug() <<
"Default mime type not found in the combo box.";
421 QString selectedMimeType = cmbDefaultExportFileType->currentData().toString();
433 cmbStartupSession->addItem(i18n(
"Open default window"));
434 cmbStartupSession->addItem(i18n(
"Load previous session"));
435 cmbStartupSession->addItem(i18n(
"Show session manager"));
444 connect(chkCumulativeUndo, SIGNAL(toggled(
bool)), btnAdvancedCumulativeUndo, SLOT(setEnabled(
bool)));
445 btnAdvancedCumulativeUndo->setEnabled(chkCumulativeUndo->isChecked());
455 KConfigGroup group = KSharedConfig::openConfig()->group(
"File Dialogs");
456 bool dontUseNative =
true;
458 dontUseNative =
false;
461 if (qgetenv(
"XDG_CURRENT_DESKTOP") ==
"KDE") {
462 dontUseNative =
false;
466 dontUseNative =
false;
469 dontUseNative =
false;
471 m_chkNativeFileDialog->setChecked(!group.readEntry(
"DontUseNativeFileDialog", dontUseNative));
473 if (!qEnvironmentVariable(
"APPIMAGE").isEmpty()) {
476 m_chkNativeFileDialog->setChecked(
false);
477 m_chkNativeFileDialog->setEnabled(
false);
485 chkIgnoreHighFunctionKeys->setVisible(
false);
492 m_urlResourceFolder->setConfigurationName(
"resource_directory");
494 if (QFileInfo(resourceLocation).isWritable()) {
495 m_urlResourceFolder->setFileName(resourceLocation);
498 m_urlResourceFolder->setFileName(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation));
501 txtBackupFileSuffix->setValidator(writableValidator);
505 grpRestartMessage->setPixmap(
506 grpRestartMessage->style()->standardIcon(QStyle::SP_MessageBoxWarning).pixmap(QSize(32, 32)));
507 grpRestartMessage->setText(i18n(
"You will need to Restart Krita for the changes to take an effect."));
509 grpAndroidWarningMessage->setVisible(
false);
510 grpAndroidWarningMessage->setPixmap(
511 grpAndroidWarningMessage->style()->standardIcon(QStyle::SP_MessageBoxWarning).pixmap(QSize(32, 32)));
512 grpAndroidWarningMessage->setText(
513 i18n(
"Saving at a Location picked from the File Picker may slow down the startup!"));
516 m_urlResourceFolder->setVisible(
false);
518 m_resourceFolderSelector->setVisible(
true);
526 const QStringList locations = QStandardPaths::standardLocations(QStandardPaths::AppDataLocation);
527 Q_FOREACH(
const QString &location, locations) {
528 if (!filteredLocations.contains(location)) {
529 filteredLocations.append(location);
532 return filteredLocations;
537 Q_FOREACH (QString location, locations) {
539 QFileInfo fileLocation(location);
542 text = i18n(
"Default");
544 }
else if (location.startsWith(
"/data")) {
545 text = i18n(
"Internal Storage");
547 text = i18n(
"SD-Card");
549 if (fileLocation.isWritable()) {
550 writableLocationsAndText.append({text, location});
553 return writableLocationsAndText;
556 for (
auto it = writableLocations.constBegin(); it != writableLocations.constEnd(); ++it) {
557 m_resourceFolderSelector->addItem(it->first +
" - " + it->second);
559 m_resourceFolderSelector->setItemData(m_resourceFolderSelector->count() - 1, it->second, Qt::UserRole);
563 if (resourceLocation.startsWith(
"content://")) {
564 m_resourceFolderSelector->addItem(resourceLocation);
565 int index = m_resourceFolderSelector->count() - 1;
566 m_resourceFolderSelector->setItemData(index, resourceLocation, Qt::UserRole);
567 m_resourceFolderSelector->setCurrentIndex(index);
568 grpAndroidWarningMessage->setVisible(
true);
571 auto iterator = std::find_if(writableLocations.constBegin(),
572 writableLocations.constEnd(),
573 [&resourceLocation](QPair<QString, QString> location) {
574 return location.second == resourceLocation;
577 if (iterator != writableLocations.constEnd()) {
578 int index = writableLocations.indexOf(*iterator);
580 m_resourceFolderSelector->setCurrentIndex(index);
585 m_resourceFolderSelector->addItem(i18n(
"Choose Manually"));
587 connect(m_resourceFolderSelector, qOverload<int>(&QComboBox::activated), [
this](
int index) {
588 const int previousIndex = m_resourceFolderSelector->currentIndex();
591 if (m_resourceFolderSelector->count() - 1 == index) {
592 KoFileDialog dialog(this, KoFileDialog::OpenDirectory,
"Select Directory");
593 const QString selectedDirectory = dialog.filename();
595 if (!selectedDirectory.isEmpty()) {
598 if (m_resourceFolderSelector->itemData(index - 1, Qt::DisplayRole)
600 .startsWith(
"content://")) {
601 m_resourceFolderSelector->setItemText(index - 1, selectedDirectory);
602 m_resourceFolderSelector->setItemData(index - 1, selectedDirectory, Qt::UserRole);
603 m_resourceFolderSelector->setCurrentIndex(index - 1);
606 m_resourceFolderSelector->insertItem(index, selectedDirectory);
607 m_resourceFolderSelector->setItemData(index, selectedDirectory, Qt::UserRole);
608 m_resourceFolderSelector->setCurrentIndex(index);
611 grpAndroidWarningMessage->setVisible(true);
613 m_resourceFolderSelector->setCurrentIndex(previousIndex);
618 grpAndroidWarningMessage->setVisible(
619 m_resourceFolderSelector->currentData(Qt::UserRole).value<QString>().startsWith(
"content://"));
623 m_resourceFolderSelector->setVisible(
false);
626 grpWindowsAppData->setVisible(
false);
628 QString folderInStandardAppData;
629 QString folderInPrivateAppData;
632 if (!folderInPrivateAppData.isEmpty()) {
633 const auto pathToDisplay = [](
const QString &path) {
641 return QDir::toNativeSeparators(path).replace(QChar(
'\\'), QStringLiteral(
u"\\\u200B"));
644 const QDir privateResourceDir(folderInPrivateAppData);
645 const QDir appDataDir(folderInStandardAppData);
646 grpWindowsAppData->setPixmap(
647 grpWindowsAppData->style()->standardIcon(QStyle::SP_MessageBoxInformation).pixmap(QSize(32, 32)));
649 grpWindowsAppData->setText(i18nc(
"@info resource folder",
650 "<p>You are using the Microsoft Store package version of Krita. "
651 "Even though Krita can be configured to place resources under the "
652 "user AppData location, Windows may actually store the files "
653 "inside a private app location.</p>\n"
654 "<p>You should check both locations to determine where "
655 "the files are located.</p>\n"
656 "<p><b>User AppData</b> (<a href=\"copyuser\">Copy</a>):<br/>\n"
658 "<p><b>Private app location</b> (<a href=\"copyprivate\">Copy</a>):<br/>\n"
660 pathToDisplay(appDataDir.absolutePath()),
661 pathToDisplay(privateResourceDir.absolutePath())));
662 grpWindowsAppData->setVisible(
true);
666 [userPath = appDataDir.absolutePath(),
667 privatePath = privateResourceDir.absolutePath()](
const QString &link) {
668 if (link == QStringLiteral(
"copyuser")) {
669 qApp->clipboard()->setText(QDir::toNativeSeparators(userPath));
670 }
else if (link == QStringLiteral(
"copyprivate")) {
671 qApp->clipboard()->
setText(QDir::toNativeSeparators(privatePath));
673 qWarning() <<
"Unexpected link activated in lblWindowsAppDataNote:" << link;
680 const int forcedFontDPI = cfg.readEntry(
"forcedDpiForQtFontBugWorkaround", -1);
681 chkForcedFontDPI->setChecked(forcedFontDPI > 0);
682 intForcedFontDPI->setValue(forcedFontDPI > 0 ? forcedFontDPI :
qt_defaultDpi());
683 intForcedFontDPI->setEnabled(forcedFontDPI > 0);
684 connect(chkForcedFontDPI, SIGNAL(toggled(
bool)), intForcedFontDPI, SLOT(setEnabled(
bool)));
691 QAbstractButton *
button = m_pasteFormatGroup.button(cfg.pasteFormat(
false));
706 m_chkSeparateEraserCursor->setChecked(cfg.
readEntry<
bool>(
"separateEraserCursor",
false));
714 chkHideAutosaveFiles->setChecked(
true);
720 m_backupFileCheckBox->setChecked(cfg.
backupFile(
true));
721 cmbBackupFileLocation->setCurrentIndex(0);
722 txtBackupFileSuffix->setText(
"~");
723 intNumBackupFiles->setValue(1);
730#if defined Q_OS_ANDROID || defined Q_OS_MACOS || defined Q_OS_WIN
731 m_chkNativeFileDialog->setChecked(
true);
733 m_chkNativeFileDialog->setChecked(
false);
736 intMaxBrushSize->setValue(1000);
741 chkUseCustomFont->setChecked(
false);
742 cmbCustomFont->setCurrentFont(qApp->font());
743 intFontSize->setValue(qApp->font().pointSize());
746 m_cmbMDIType->setCurrentIndex((
int)QMdiArea::TabbedView);
747 m_chkRubberBand->setChecked(cfg.
useOpenGL(
true));
753 m_chkCompressKra->setChecked(cfg.
compressKra(
true));
754 m_chkTrimKra->setChecked(cfg.
trimKra(
true));
756 chkZip64->setChecked(cfg.
useZip64(
true));
757 m_chkHiDPI->setChecked(
true);
758#ifdef HAVE_HIGH_DPI_SCALE_FACTOR_ROUNDING_POLICY
759 m_chkHiDPIFractionalScaling->setChecked(
true);
761 chkUsageLogging->setChecked(
true);
763 cmbFlowMode->setCurrentIndex(0);
767 spnZoomSteps->setValue(cfg.
zoomSteps(
true));
772 cmbTouchPainting->setCurrentIndex(
int(cfg.
touchPainting(
true)));
773 chkTouchPressureSensitivity->setChecked(
true);
780 cursorColorButton->setColor(cursorColor);
784 eraserCursorColorButton->setColor(eraserCursorColor);
792 chkForcedFontDPI->setChecked(
false);
794 intForcedFontDPI->setEnabled(
false);
811 if (dlg.exec() == KoDialog::Accepted) {
818 return (
CursorStyle)m_cmbCursorShape->currentIndex();
828 return (
CursorStyle)m_cmbEraserCursorShape->currentIndex();
833 return (
OutlineStyle)m_cmbEraserOutlineShape->currentIndex();
843 return chkSaveSessionOnQuit->isChecked();
848 return chkShowRootLayer->isChecked();
854 return m_autosaveCheckBox->isChecked() ? m_autosaveSpinBox->value() * 60 : 0;
859 return m_undoStackSize->value();
864 return m_showOutlinePainting->isChecked();
869 return m_showEraserOutlinePainting->isChecked();
874 return m_cmbMDIType->currentIndex();
879 return m_chkCanvasMessages->isChecked();
884 return m_chkCompressKra->isChecked();
889 return m_chkTrimKra->isChecked();
894 return m_chkTrimFramesImport->isChecked();
899 return cmbDefaultExportFileType->currentData().toString();
904 return chkZip64->isChecked();
909 return m_radioToolOptionsInDocker->isChecked();
914 return spnZoomSteps->value();
919 return chkEnableLongPress->isChecked();
924 return m_groupBoxKineticScrollingSettings->isChecked();
929 return m_cmbKineticScrollingGesture->currentIndex();
934 return m_kineticScrollingSensitivitySlider->value();
939 return m_chkKineticScrollingHideScrollbars->isChecked();
944 return intZoomMarginSize->value();
949 return m_chkSwitchSelectionCtrlAlt->isChecked();
954 return m_chkConvertOnImport->isChecked();
959 return m_chkAutoPin->isChecked();
964 return m_chkAdaptivePlaybackRange->isChecked();
969 return m_chkAutoZoom->isChecked();
974 return chkForcedFontDPI->isChecked() ? intForcedFontDPI->value() : -1;
979 return chkRenameMergedLayers->isChecked();
984 return chkRenamePastedLayers->isChecked();
989 return chkRenameDuplicatedLayers->isChecked();
995 dialog.setCaption(i18n(
"Select a Background Image"));
996 dialog.setDefaultDir(QStandardPaths::writableLocation(QStandardPaths::PicturesLocation));
997 dialog.setImageFilters();
999 QString fn = dialog.filename();
1006 if (image.isNull()) {
1007 QMessageBox::warning(
this, i18nc(
"@title:window",
"Krita"), i18n(
"%1 is not a valid image file!", fn));
1010 m_backgroundimage->setText(fn);
1017 m_backgroundimage->setText(
"");
1022 const QFileInfo fi(m_urlResourceFolder->fileName());
1023 if (!fi.isWritable()) {
1024 grpNonWritableLocation->setPixmap(
1025 grpNonWritableLocation->style()->standardIcon(QStyle::SP_MessageBoxWarning).pixmap(QSize(32, 32)));
1026 grpNonWritableLocation->setText(
1027 i18nc(
"@info resource folder",
"<b>Warning:</b> this location is not writable."));
1028 grpNonWritableLocation->setVisible(
true);
1030 grpNonWritableLocation->setVisible(
false);
1036 group_subWinMode->setEnabled(mdi_mode == QMdiArea::SubWindowView);
1051 setObjectName(name);
1053 QGridLayout * l =
new QGridLayout(
this);
1054 l->setContentsMargins(0, 0, 0, 0);
1056 l->addWidget(
m_page, 0, 0);
1064 Q_FOREACH (QAction *action, collection->
actions()) {
1068 QMap<QString, KisKActionCollection*> sortedCollections =
1071 for (
auto it = sortedCollections.constBegin(); it != sortedCollections.constEnd(); ++it) {
1100 setObjectName(name);
1105 QGridLayout * l =
new QGridLayout(
this);
1106 l->setContentsMargins(0, 0, 0, 0);
1108 l->addWidget(
m_page, 0, 0);
1125 id = colorSpaces.erase(
id);
1130 m_page->cmbWorkingColorSpace->setIDList(colorSpaces);
1135 m_page->bnAddColorProfile->setIcon(
koIcon(
"document-import-16"));
1142 QMap<QString, const KoColorProfile *> profileList;
1144 profileList[profile->
name()] = profile;
1145 profiles.append(profile->
name());
1148 std::sort(profiles.begin(), profiles.end());
1149 Q_FOREACH (
const QString profile, profiles) {
1150 m_page->cmbColorProfileForEXR->addSqueezedItem(profile);
1155 const QString userProfile = cfg.
readEntry(
"ExrDefaultColorProfile", defaultProfile);
1157 m_page->cmbColorProfileForEXR->setCurrent(profiles.contains(userProfile) ? userProfile : defaultProfile);
1162 QFormLayout *monitorProfileGrid =
new QFormLayout(
m_page->monitorprofileholder);
1163 monitorProfileGrid->setContentsMargins(0, 0, 0, 0);
1164 for(
int i = 0; i < QGuiApplication::screens().count(); ++i) {
1165 QLabel *lbl =
new QLabel(i18nc(
"The number of the screen (ordinal) and shortened 'name' of the screen (model + resolution)",
"Screen %1 (%2):", i + 1,
shortNameOfDisplay(i)));
1166 lbl->setWordWrap(
true);
1169 cmb->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
1170 monitorProfileGrid->addRow(lbl, cmb);
1176 m_page->chkUseSystemMonitorProfile->setChecked(
false);
1177 m_page->chkUseSystemMonitorProfile->setDisabled(
true);
1178 m_page->chkUseSystemMonitorProfile->setHidden(
true);
1183 for(
int i = 0; i < QApplication::screens().count(); ++i) {
1189 QVBoxLayout *vboxLayout =
new QVBoxLayout(
m_page->monitorprofileholder);
1190 vboxLayout->setContentsMargins(0, 0, 0, 0);
1191 vboxLayout->addItem(
new QSpacerItem(20,20));
1193 QGroupBox *groupBox =
new QGroupBox(i18n(
"Display's color space is managed by the operating system"));
1194 vboxLayout->addWidget(groupBox);
1196 QFormLayout *monitorProfileGrid =
new QFormLayout(groupBox);
1197 monitorProfileGrid->setContentsMargins(0, 0, 0, 0);
1200 new QCheckBox(i18n(
"Enable canvas color management"),
this);
1203 i18n(
"<p>Enabling canvas color management automatically creates "
1204 "a separate native surface for the canvas. It might cause "
1205 "performance issues on some systems.</p>"
1207 "<p>If color management is disabled, Krita will render "
1208 "the canvas into the surface of the main window, which "
1209 "is considered sRGB. It will cause two limitations:"
1212 " <li>the color gamut will be limited to sRGB</li>"
1213 " <li>color proofing mode will be limited to \"use global display settings\", "
1214 " i.e. paper white proofing will become impossible</li>"
1223 QLabel *canvasSurfaceColorSpaceLbl =
new QLabel(i18n(
"Canvas surface color space:"),
this);
1226 m_canvasSurfaceColorSpace->addSqueezedItem(i18n(
"Preferred by operating system"), QVariant::fromValue(CanvasSurfaceMode::Preferred));
1227 m_canvasSurfaceColorSpace->addSqueezedItem(i18n(
"Rec 709 Gamma 2.2"), QVariant::fromValue(CanvasSurfaceMode::Rec709g22));
1229 m_canvasSurfaceColorSpace->addSqueezedItem(i18n(
"Unmanaged (testing only)"), QVariant::fromValue(CanvasSurfaceMode::Unmanaged));
1232 i18n(
"<p>Color space of the pixels that are transferred to the "
1233 "window compositor. Use \"preferred\" space unless you know "
1234 "what you are doing</p>"));
1239 QLabel *canvasSurfaceBitDepthLbl =
new QLabel(i18n(
"Canvas surface bit depth (needs restart):"),
this);
1242 m_canvasSurfaceBitDepth->addSqueezedItem(i18n(
"Auto"), QVariant::fromValue(CanvasSurfaceBitDepthMode::DepthAuto));
1243 m_canvasSurfaceBitDepth->addSqueezedItem(i18n(
"8-bit"), QVariant::fromValue(CanvasSurfaceBitDepthMode::Depth8Bit));
1244 m_canvasSurfaceBitDepth->addSqueezedItem(i18n(
"10-bit"), QVariant::fromValue(CanvasSurfaceBitDepthMode::Depth10Bit));
1247 i18n(
"<p>The bit depth of the color that is passed to the window "
1248 "compositor. You should switch into 10-bit mode if you want to use "
1249 "HDR capabilities of your display</p>"));
1251 const QString currentBitBepthString = QSurfaceFormat::defaultFormat().redBufferSize() == 10 ? i18n(
"10-bit") : i18n(
"8-bit");
1252 QLabel *currentCanvasSurfaceBitDepthLbl =
new QLabel(i18n(
"Current canvas surface bit depth:"),
this);
1253 QLabel *currentCanvasSurfaceBitDepth =
new QLabel(currentBitBepthString,
this);
1254 monitorProfileGrid->addRow(currentCanvasSurfaceBitDepthLbl, currentCanvasSurfaceBitDepth);
1256 vboxLayout->addItem(
new QSpacerItem(20,20));
1260 vboxLayout->addWidget(preferredLbl);
1306 m_page->wdgProofingOptions->setProofingConfig(proofingConfig);
1322 button->setChecked(
true);
1335 dialog.setCaption(i18n(
"Install Color Profiles"));
1336 dialog.setDefaultDir(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
1337 dialog.setMimeTypeFilters(
QStringList() <<
"application/vnd.iccprofile",
"application/vnd.iccprofile");
1341 Q_ASSERT(iccEngine);
1345 Q_FOREACH (
const QString &profileName, profileNames) {
1346 if (!QFile::copy(profileName, saveLocation + QFileInfo(profileName).fileName())) {
1347 qWarning() <<
"Could not install profile!" << saveLocation + QFileInfo(profileName).fileName();
1350 iccEngine->
addProfile(saveLocation + QFileInfo(profileName).fileName());
1356 for(
int i = 0; i < QApplication::screens().count(); ++i) {
1370 if (useSystemProfile) {
1372 if (devices.size() == QApplication::screens().count()) {
1373 for(
int i = 0; i < QApplication::screens().count(); ++i) {
1376 Q_FOREACH (
const QString &device, devices) {
1379 if (devices[i] == monitorForScreen) {
1389 for(
int i = 0; i < QApplication::screens().count(); ++i) {
1399 m_page->cmbWorkingColorSpace->setEnabled(useDefColorSpace);
1404 m_page->cmbWorkingColorSpace->setCurrent(
"RGBA");
1408 m_page->cmbColorProfileForEXR->setCurrent(defaultProfile);
1438 m_page->wdgProofingOptions->setProofingConfig(proofingConfig);
1450 button->setChecked(
true);
1459 for (
int i = 0; i < QApplication::screens().count(); ++i) {
1463 QMap<QString, const KoColorProfile *> profileList;
1465 profileList[profile->
name()] = profile;
1468 Q_FOREACH (
const KoColorProfile *profile, profileList.values()) {
1471 for (
int i = 0; i < QApplication::screens().count(); ++i) {
1477 for (
int i = 0; i < QApplication::screens().count(); ++i) {
1488 m_page->wdgProofingOptions->setDisplayConfigOptions(options);
1497 m_page->pressureCurve->setCurve(curve);
1499 m_page->chkUseRightMiddleClickWorkaround->setChecked(
1500 KisConfig(
true).useRightMiddleTabletButtonWorkaround(
true));
1502#if defined Q_OS_WIN && (defined QT5_HAS_WINTAB_SWITCH || QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
1506 m_page->grpTabletApi->setVisible(
false);
1509 m_page->chkUseTimestampsForBrushSpeed->setChecked(
false);
1510 m_page->intMaxAllowedBrushSpeed->setValue(30);
1511 m_page->intBrushSpeedSmoothing->setValue(3);
1512 m_page->tiltDirectionOffsetAngle->setAngle(0);
1517 setObjectName(name);
1519 QGridLayout * l =
new QGridLayout(
this);
1520 l->setContentsMargins(0, 0, 0, 0);
1522 l->addWidget(
m_page, 0, 0);
1526 m_page->pressureCurve->setMaximumSize(QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX));
1527 m_page->pressureCurve->setCurve(curve);
1529 m_page->chkUseRightMiddleClickWorkaround->setChecked(
1532#if defined Q_OS_WIN && (defined QT5_HAS_WINTAB_SWITCH || QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
1533# if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
1534 QString actualTabletProtocol =
"<unknown>";
1535 using QWindowsApplication = QNativeInterface::Private::QWindowsApplication;
1536 if (
auto nativeWindowsApp =
dynamic_cast<QWindowsApplication *
>(QGuiApplicationPrivate::platformIntegration())) {
1537 actualTabletProtocol = nativeWindowsApp->isWinTabEnabled() ?
"WinTab" :
"Windows Ink";
1539 m_page->grpTabletApi->setTitle(i18n(
"Tablet Input API (currently active API: \"%1\")", actualTabletProtocol));
1545 connect(
m_page->radioWintab, SIGNAL(toggled(
bool)),
m_page->btnResolutionSettings, SLOT(setEnabled(
bool)));
1546 m_page->btnResolutionSettings->setEnabled(
m_page->radioWintab->isChecked());
1548 m_page->grpTabletApi->setVisible(
false);
1553 m_page->chkUseTimestampsForBrushSpeed->setText(i18n(
"Use tablet driver timestamps for brush speed (may cause severe artifacts when using WinTab tablet API)"));
1555 m_page->chkUseTimestampsForBrushSpeed->setText(i18n(
"Use tablet driver timestamps for brush speed"));
1557 m_page->chkUseTimestampsForBrushSpeed->setChecked(cfg.
readEntry(
"useTimestampsForBrushSpeed",
false));
1559 m_page->intMaxAllowedBrushSpeed->setRange(1, 100);
1560 m_page->intMaxAllowedBrushSpeed->setValue(cfg.
readEntry(
"maxAllowedSpeedValue", 30));
1565 return i18np(
"Maximum brush speed: {n} px/ms",
"Maximum brush speed: {n} px/ms", value);
1568 m_page->intBrushSpeedSmoothing->setRange(3, 100);
1569 m_page->intBrushSpeedSmoothing->setValue(cfg.
readEntry(
"speedValueSmoothing", 3));
1574 return i18np(
"Brush speed smoothing: {n} sample",
"Brush speed smoothing: {n} samples", value);
1577 m_page->tiltDirectionOffsetAngle->setDecimals(0);
1578 m_page->tiltDirectionOffsetAngle->setRange(-180, 180);
1580 m_page->tiltDirectionOffsetAngle->setAngle(-cfg.
readEntry(
"tiltDirectionOffset", 0.0));
1581 m_page->tiltDirectionOffsetAngle->setPrefix(i18n(
"Pen tilt direction offset: "));
1588 tabletTestDialog.exec();
1614 return intMemoryLimit->value() - intPoolLimit->value();
1622 const double totalRAM = cfg.
totalRAM();
1623 lblTotalMemory->setText(KFormat().formatByteSize(totalRAM * 1024 * 1024, 0, KFormat::IECBinaryDialect, KFormat::UnitMegaByte));
1626 sliderMemoryLimit->setRange(1, 100, 2);
1627 sliderMemoryLimit->setSingleStep(0.01);
1630 sliderPoolLimit->setRange(0, 20, 2);
1631 sliderPoolLimit->setSingleStep(0.01);
1634 sliderUndoLimit->setRange(0, 50, 2);
1635 sliderUndoLimit->setSingleStep(0.01);
1637 intMemoryLimit->setMinimumWidth(80);
1638 intPoolLimit->setMinimumWidth(80);
1639 intUndoLimit->setMinimumWidth(80);
1642 formLayout->takeRow(2);
1643 label_5->setVisible(
false);
1644 intPoolLimit->setVisible(
false);
1645 sliderPoolLimit->setVisible(
false);
1659 std::bind(&KisIntParseSpinBox::value,
1663 connect(intMemoryLimit, SIGNAL(valueChanged(
int)), sync2, SLOT(slotParentValueChanged()));
1674 connect(intPoolLimit, SIGNAL(valueChanged(
int)), sync3, SLOT(slotParentValueChanged()));
1675 connect(intMemoryLimit, SIGNAL(valueChanged(
int)), sync3, SLOT(slotParentValueChanged()));
1679 sliderSwapSize->setSuffix(i18n(
" GiB"));
1680 sliderSwapSize->setRange(1, 64);
1681 intSwapSize->setRange(1, 64);
1687 intSwapSize, SLOT(setValue(
int)));
1690 sliderSwapSize, SLOT(setValue(
int)));
1693 swapFileLocation->setConfigurationName(
"swapfile_location");
1694 swapFileLocation->setFileName(cfg.
swapDir());
1696 sliderThreadsLimit->setRange(1, QThread::idealThreadCount());
1697 sliderFrameClonesLimit->setRange(1, QThread::idealThreadCount());
1699 sliderFrameTimeout->setRange(5, 600);
1700 sliderFrameTimeout->setSuffix(i18nc(
"suffix for \"seconds\"",
" sec"));
1703 sliderFpsLimit->setSuffix(i18n(
" fps"));
1711 intCachedFramesSizeLimit->setRange(256, 10000);
1712 intCachedFramesSizeLimit->setSuffix(i18n(
" px"));
1713 intCachedFramesSizeLimit->setSingleStep(1);
1714 intCachedFramesSizeLimit->setPageStep(1000);
1716 intRegionOfInterestMargin->setRange(1, 100);
1718 i18nc(
"{n} is the number value, % is the percent sign",
"{n}%"));
1719 intRegionOfInterestMargin->setSingleStep(1);
1720 intRegionOfInterestMargin->setPageStep(10);
1722 connect(chkCachedFramesSizeLimit, SIGNAL(toggled(
bool)), intCachedFramesSizeLimit, SLOT(setEnabled(
bool)));
1723 connect(chkUseRegionOfInterest, SIGNAL(toggled(
bool)), intRegionOfInterestMargin, SLOT(setEnabled(
bool)));
1725 connect(chkTransformToolUseInStackPreview, SIGNAL(toggled(
bool)), chkTransformToolForceLodMode, SLOT(setEnabled(
bool)));
1729 chkDisableAVXOptimizations->setVisible(
false);
1748 chkPerformanceLogging->setChecked(cfg.
enablePerfLog(requestDefault));
1751 sliderSwapSize->setValue(cfg.
maxSwapSize(requestDefault) / 1024);
1752 swapFileLocation->setFileName(cfg.
swapDir(requestDefault));
1760#if KRITA_QT_HAS_UPDATE_COMPRESSION_PATCH
1764 chkDetectFps->setVisible(
false);
1778 optOnDisk->setChecked(
true);
1780 optInMemory->setChecked(
true);
1785 intCachedFramesSizeLimit->setEnabled(chkCachedFramesSizeLimit->isChecked());
1789 intRegionOfInterestMargin->setEnabled(chkUseRegionOfInterest->isChecked());
1792 KConfigGroup group = KSharedConfig::openConfig()->group(
"KisToolTransform");
1793 chkTransformToolUseInStackPreview->setChecked(!group.readEntry(
"useOverlayPreviewStyle",
false));
1794 chkTransformToolForceLodMode->setChecked(group.readEntry(
"forceLodMode",
true));
1795 chkTransformToolForceLodMode->setEnabled(chkTransformToolUseInStackPreview->isChecked());
1799 KConfigGroup group = KSharedConfig::openConfig()->group(
"KritaTransform/KisToolMove");
1800 chkMoveToolForceLodMode->setChecked(group.readEntry(
"forceLodMode",
false));
1804 KConfigGroup group( KSharedConfig::openConfig(),
"filterdialog");
1805 chkFiltersForceLodMode->setChecked(group.readEntry(
"forceLodMode",
true));
1822 cfg.
setSwapDir(swapFileLocation->fileName());
1828#if KRITA_QT_HAS_UPDATE_COMPRESSION_PATCH
1852 KConfigGroup group = KSharedConfig::openConfig()->group(
"KisToolTransform");
1853 group.writeEntry(
"useOverlayPreviewStyle", !chkTransformToolUseInStackPreview->isChecked());
1854 group.writeEntry(
"forceLodMode", chkTransformToolForceLodMode->isChecked());
1858 KConfigGroup group = KSharedConfig::openConfig()->group(
"KritaTransform/KisToolMove");
1859 group.writeEntry(
"forceLodMode", chkMoveToolForceLodMode->isChecked());
1863 KConfigGroup group( KSharedConfig::openConfig(),
"filterdialog");
1864 group.writeEntry(
"forceLodMode", chkFiltersForceLodMode->isChecked());
1888#include <QOpenGLContext>
1895 const QString csString =
1902 "Unknown Color Space";
1904 return QString(
"%1 (%2 bit)").arg(csString).arg(depth);
1942 const QString rendererOpenGLText = i18nc(
"canvas renderer",
"OpenGL");
1943 const QString rendererSoftwareText = i18nc(
"canvas renderer",
"Software Renderer (very slow)");
1945 const QString rendererOpenGLESText =
1946 qEnvironmentVariable(
"QT_ANGLE_PLATFORM") !=
"opengl"
1947 ? i18nc(
"canvas renderer",
"Direct3D 11 via ANGLE")
1948 : i18nc(
"canvas renderer",
"OpenGL via ANGLE");
1950 const QString rendererOpenGLESText = i18nc(
"canvas renderer",
"OpenGL ES");
1957 i18nc(
"canvas renderer",
"Unknown"));
1959 cmbPreferredRenderer->clear();
1962 const bool onlyOneRendererSupported =
1968 if (!onlyOneRendererSupported) {
1969 QString qtPreferredRendererText;
1971 qtPreferredRendererText = rendererOpenGLESText;
1973 qtPreferredRendererText = rendererSoftwareText;
1975 qtPreferredRendererText = rendererOpenGLText;
1977 cmbPreferredRenderer->addItem(i18nc(
"canvas renderer",
"Auto (%1)", qtPreferredRendererText),
KisOpenGL::RendererAuto);
1978 cmbPreferredRenderer->setCurrentIndex(0);
1980 cmbPreferredRenderer->setEnabled(
false);
1986 cmbPreferredRenderer->setCurrentIndex(cmbPreferredRenderer->count() - 1);
1993 cmbPreferredRenderer->setCurrentIndex(cmbPreferredRenderer->count() - 1);
2000 cmbPreferredRenderer->setCurrentIndex(cmbPreferredRenderer->count() - 1);
2004 if (!(supportedRenderers &
2009 grpOpenGL->setEnabled(
false);
2010 grpOpenGL->setChecked(
false);
2011 chkUseTextureBuffer->setEnabled(
false);
2012 cmbAssistantsDrawMode->setEnabled(
false);
2013 cmbFilterMode->setEnabled(
false);
2015 grpOpenGL->setEnabled(
true);
2017 chkUseTextureBuffer->setEnabled(cfg.
useOpenGL());
2019 cmbAssistantsDrawMode->setEnabled(cfg.
useOpenGL());
2020 cmbAssistantsDrawMode->setCurrentIndex(assistantDrawModeToIndex(cfg.
assistantsDrawMode()));
2021 cmbFilterMode->setEnabled(cfg.
useOpenGL());
2025 cmbFilterMode->removeItem(3);
2029 lblCurrentDisplayFormat->setText(
"");
2030 lblCurrentRootSurfaceFormat->setText(
"");
2031 grpHDRWarning->setVisible(
false);
2040 QOpenGLContext *context = QOpenGLContext::currentContext();
2043 context = QOpenGLContext::globalShareContext();
2049 if (screen && adapter.
isValid()) {
2054 toolTip << i18n(
"Display Id: %1", info.
screen->name());
2055 toolTip << i18n(
"Display Name: %1 %2", info.
screen->manufacturer(), info.
screen->model());
2056 toolTip << i18n(
"Min Luminance: %1", info.
minLuminance);
2057 toolTip << i18n(
"Max Luminance: %1", info.
maxLuminance);
2064 lblCurrentDisplayFormat->setToolTip(toolTip.join(
'\n'));
2067 lblCurrentDisplayFormat->setToolTip(
"");
2068 lblCurrentDisplayFormat->setText(i18n(
"Unknown"));
2071 lblCurrentDisplayFormat->setToolTip(
"");
2072 lblCurrentDisplayFormat->setText(i18n(
"Unknown"));
2073 qWarning() <<
"Failed to fetch display info:" << adapter.
errorString();
2078 lblCurrentRootSurfaceFormat->setText(colorSpaceString(colorSpace, currentFormat.redBufferSize()));
2079 cmbPreferedRootSurfaceFormat->setCurrentIndex(formatToIndex(cfg.
rootSurfaceFormat()));
2085 tabHDR->setEnabled(
false);
2093 const int hdrTabIndex = tabWidget->indexOf(tabHDR);
2095 if (hdrTabIndex >= 0) {
2096 tabWidget->setTabVisible(hdrTabIndex,
false);
2102 if (openglWarnings.isEmpty()) {
2103 grpOpenGLWarnings->setVisible(
false);
2105 QString text = QString(
"<p><b>%1</b>").arg(i18n(
"Warning(s):"));
2106 text.append(
"<ul>");
2107 Q_FOREACH (
const QString &warning, openglWarnings) {
2108 text.append(
"<li>");
2109 text.append(warning.toHtmlEscaped());
2110 text.append(
"</li>");
2112 text.append(
"</ul></p>");
2113 grpOpenGLWarnings->setText(text);
2114 grpOpenGLWarnings->setPixmap(
2115 grpOpenGLWarnings->style()->standardIcon(QStyle::SP_MessageBoxWarning).pixmap(QSize(32, 32)));
2116 grpOpenGLWarnings->setVisible(
true);
2124 btnSelectionOverlayColor->setColor(c);
2125 sldSelectionOverlayOpacity->setRange(0.0, 1.0, 2);
2126 sldSelectionOverlayOpacity->setSingleStep(0.05);
2129 sldSelectionOutlineOpacity->setRange(0.0, 1.0, 2);
2130 sldSelectionOutlineOpacity->setSingleStep(0.05);
2133 intCheckSize->setValue(cfg.
checkSize());
2137 colorChecks1->setColor(ck1);
2140 colorChecks2->setColor(ck2);
2143 canvasBorder->setColor(cb);
2154 pixelGridColorButton->setColor(gridColor);
2162 cmbPreferredRenderer->setCurrentIndex(0);
2165 grpOpenGL->setEnabled(
false);
2166 grpOpenGL->setChecked(
false);
2167 chkUseTextureBuffer->setEnabled(
false);
2168 cmbAssistantsDrawMode->setEnabled(
false);
2169 cmbFilterMode->setEnabled(
false);
2172 grpOpenGL->setEnabled(
true);
2173 grpOpenGL->setChecked(cfg.
useOpenGL(
true));
2175 chkUseTextureBuffer->setEnabled(
true);
2176 cmbAssistantsDrawMode->setEnabled(
true);
2177 cmbAssistantsDrawMode->setCurrentIndex(assistantDrawModeToIndex(cfg.
assistantsDrawMode(
true)));
2178 cmbFilterMode->setEnabled(
true);
2189 btnSelectionOverlayColor->setColor(c);
2194 intCheckSize->setValue(cfg.
checkSize(
true));
2197 colorChecks1->setColor(ck1);
2200 colorChecks2->setColor(ck2);
2203 canvasBorder->setColor(cvb);
2208 chkHidePopups->setChecked(cfg.
hidePopups(
true));
2212 pixelGridColorButton->setColor(gridColor);
2222 chkUseTextureBuffer->setEnabled(isChecked);
2223 cmbFilterMode->setEnabled(isChecked);
2224 cmbAssistantsDrawMode->setEnabled(isChecked);
2231 QOpenGLContext *context = QOpenGLContext::currentContext();
2240 grpHDRWarning->setVisible(
true);
2241 grpHDRWarning->setPixmap(
2242 grpHDRWarning->style()->standardIcon(QStyle::SP_MessageBoxWarning).pixmap(QSize(32, 32)));
2243 grpHDRWarning->setText(i18n(
"<b>Warning:</b> current display doesn't support HDR rendering"));
2245 grpHDRWarning->setVisible(
false);
2291 connect(chkShowColorHistory, SIGNAL(toggled(
bool)), cmbColorHistorySorting, SLOT(setEnabled(
bool)));
2292 connect(chkShowColorHistory, SIGNAL(toggled(
bool)), lblColorHistorySorting, SLOT(setEnabled(
bool)));
2302 sbPaletteSize->setValue(config.
readEntry(
"popuppalette/size", 385));
2303 sbSelectorSize->setValue(config.
readEntry(
"popuppalette/selectorSize", 140));
2304 cmbSelectorType->setCurrentIndex(config.
readEntry<
bool>(
"popuppalette/usevisualcolorselector",
false) ? 1 : 0);
2305 chkShowColorHistory->setChecked(config.
readEntry(
"popuppalette/showColorHistory",
true));
2306 chkShowRotationTrack->setChecked(config.
readEntry(
"popuppalette/showRotationTrack",
true));
2307 chkUseDynamicSlotCount->setChecked(config.
readEntry(
"popuppalette/useDynamicSlotCount",
true));
2309 QString currentSorting = config.
readEntry(
"popuppalette/colorHistorySorting", QString(
"hsv"));
2310 if (!allowedColorHistorySortingValues.contains(currentSorting)) {
2311 currentSorting =
"hsv";
2313 cmbColorHistorySorting->setCurrentIndex(allowedColorHistorySortingValues.indexOf(currentSorting));
2314 cmbColorHistorySorting->setEnabled(chkShowColorHistory->isChecked());
2315 lblColorHistorySorting->setEnabled(chkShowColorHistory->isChecked());
2324 config.
writeEntry(
"popuppalette/size", sbPaletteSize->value());
2325 config.
writeEntry(
"popuppalette/selectorSize", sbSelectorSize->value());
2326 config.
writeEntry<
bool>(
"popuppalette/usevisualcolorselector", cmbSelectorType->currentIndex() > 0);
2327 config.
writeEntry<
bool>(
"popuppalette/showColorHistory", chkShowColorHistory->isChecked());
2328 config.
writeEntry<
bool>(
"popuppalette/showRotationTrack", chkShowRotationTrack->isChecked());
2329 config.
writeEntry<
bool>(
"popuppalette/useDynamicSlotCount", chkUseDynamicSlotCount->isChecked());
2330 config.
writeEntry(
"popuppalette/colorHistorySorting",
2331 allowedColorHistorySortingValues[cmbColorHistorySorting->currentIndex()]);
2338 sbPaletteSize->setValue(385);
2339 sbSelectorSize->setValue(140);
2340 cmbSelectorType->setCurrentIndex(0);
2341 chkShowColorHistory->setChecked(
true);
2342 chkShowRotationTrack->setChecked(
true);
2343 chkUseDynamicSlotCount->setChecked(
true);
2344 cmbColorHistorySorting->setEnabled(chkShowColorHistory->isChecked());
2345 lblColorHistorySorting->setEnabled(chkShowColorHistory->isChecked());
2351 : KPageDialog(parent)
2354 setWindowTitle(i18n(
"Configure Krita"));
2355 setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::RestoreDefaults);
2357 setFaceType(KPageDialog::List);
2361 KPageWidgetItem *page =
new KPageWidgetItem(vbox, i18n(
"General"));
2362 page->setObjectName(
"general");
2363 page->setHeader(i18n(
"General"));
2371 page =
new KPageWidgetItem(vbox, i18n(
"Keyboard Shortcuts"));
2372 page->setObjectName(
"shortcuts");
2373 page->setHeader(i18n(
"Shortcuts"));
2384 page->setHeader(i18n(
"Canvas Input"));
2385 page->setObjectName(
"canvasinput");
2391 page =
new KPageWidgetItem(vbox, i18n(
"Display"));
2392 page->setObjectName(
"display");
2393 page->setHeader(i18n(
"Display"));
2401 page =
new KPageWidgetItem(vbox, i18n(
"Color Management"));
2402 page->setObjectName(
"colormanagement");
2403 page->setHeader(i18nc(
"Label of color as in Color Management",
"Color"));
2411 page =
new KPageWidgetItem(vbox, i18n(
"Performance"));
2412 page->setObjectName(
"performance");
2413 page->setHeader(i18n(
"Performance"));
2421 page =
new KPageWidgetItem(vbox, i18n(
"Tablet settings"));
2422 page->setObjectName(
"tablet");
2423 page->setHeader(i18n(
"Tablet"));
2431 page =
new KPageWidgetItem(vbox, i18n(
"Canvas-only settings"));
2432 page->setObjectName(
"canvasonly");
2433 page->setHeader(i18n(
"Canvas-only"));
2441 page =
new KPageWidgetItem(vbox, i18n(
"Pop-up Palette"));
2442 page->setObjectName(
"popuppalette");
2443 page->setHeader(i18n(
"Pop-up Palette"));
2451 page = addPage(
m_authorPage, i18nc(
"@title:tab Author page",
"Author" ));
2452 page->setObjectName(
"author");
2453 page->setHeader(i18n(
"Author"));
2457 KGuiItem::assign(
button(QDialogButtonBox::Ok), KStandardGuiItem::ok());
2458 KGuiItem::assign(
button(QDialogButtonBox::Cancel), KStandardGuiItem::cancel());
2459 QPushButton *restoreDefaultsButton =
button(QDialogButtonBox::RestoreDefaults);
2460 restoreDefaultsButton->setText(i18nc(
"@action:button",
"Restore Defaults"));
2468 Q_FOREACH(
const QString &key, keys) {
2472 page =
new KPageWidgetItem(vbox, preferenceSet->
name());
2473 page->setHeader(preferenceSet->
header());
2474 page->setIcon(preferenceSet->
icon());
2476 preferenceSet->setParent(vbox);
2479 connect(restoreDefaultsButton, SIGNAL(clicked(
bool)), preferenceSet, SLOT(loadDefaultPreferences()), Qt::UniqueConnection);
2480 connect(
this, SIGNAL(accepted()), preferenceSet, SLOT(savePreferences()), Qt::UniqueConnection);
2486 QString currentPageName = cfg.
readEntry<QString>(
"KisDlgPreferences/CurrentPage");
2487 Q_FOREACH(KPageWidgetItem *page,
m_pages) {
2488 if (page->objectName() == currentPageName) {
2489 setCurrentPage(page);
2495#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
2499 const auto *titleWidget = findChild<KTitleWidget*>();
2501 QLayoutItem *titleFrame = titleWidget->layout()->itemAt(0);
2503 titleFrame->widget()->setBackgroundRole(QPalette::Window);
2513 cfg.
writeEntry<QString>(
"KisDlgPreferences/CurrentPage", currentPage()->objectName());
2517 KPageDialog::showEvent(event);
2518 button(QDialogButtonBox::Cancel)->setAutoDefault(
false);
2519 button(QDialogButtonBox::Ok)->setAutoDefault(
false);
2520 button(QDialogButtonBox::RestoreDefaults)->setAutoDefault(
false);
2521 button(QDialogButtonBox::Cancel)->setDefault(
false);
2522 button(QDialogButtonBox::Ok)->setDefault(
false);
2523 button(QDialogButtonBox::RestoreDefaults)->setDefault(
false);
2528 if (buttonBox()->buttonRole(
button) == QDialogButtonBox::RejectRole) {
2535 if (currentPage()->objectName() ==
"general") {
2538 else if (currentPage()->objectName() ==
"shortcuts") {
2541 else if (currentPage()->objectName() ==
"display") {
2544 else if (currentPage()->objectName() ==
"colormanagement") {
2547 else if (currentPage()->objectName() ==
"performance") {
2550 else if (currentPage()->objectName() ==
"tablet") {
2553 else if (currentPage()->objectName() ==
"canvasonly") {
2556 else if (currentPage()->objectName() ==
"canvasinput") {
2559 else if (currentPage()->objectName() ==
"popuppalette") {
2568 int retval = exec();
2589 KConfigGroup group = KSharedConfig::openConfig()->group(
"File Dialogs");
2590 group.writeEntry(
"DontUseNativeFileDialog", !
m_general->m_chkNativeFileDialog->isChecked());
2596 if (
m_general->chkUseCustomFont->isChecked()) {
2597 cfg.
writeEntry<QString>(
"custom_system_font",
m_general->cmbCustomFont->currentFont().family());
2601 cfg.
writeEntry<QString>(
"custom_system_font",
"");
2626 const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
2627 QSettings kritarc(configPath + QStringLiteral(
"/kritadisplayrc"), QSettings::IniFormat);
2628 kritarc.setValue(
"EnableHiDPI",
m_general->m_chkHiDPI->isChecked());
2629#ifdef HAVE_HIGH_DPI_SCALE_FACTOR_ROUNDING_POLICY
2630 kritarc.setValue(
"EnableHiDPIFractionalScaling",
m_general->m_chkHiDPIFractionalScaling->isChecked());
2632 kritarc.setValue(
"LogUsage",
m_general->chkUsageLogging->isChecked());
2636 cfg.
writeEntry<
bool>(
"useCreamyAlphaDarken", (bool)!
m_general->cmbFlowMode->currentIndex());
2637 cfg.
writeEntry<
bool>(
"useSubtractiveBlendingForCmykColorSpaces", (bool)!
m_general->cmbCmykBlendingMode->currentIndex());
2650 cfg.
writeEntry(
"useTouchPressureSensitivity",
m_general->chkTouchPressureSensitivity->isChecked());
2665 QFileInfo fi(
m_general->m_resourceFolderSelector->currentData(Qt::UserRole).value<QString>());
2667 QFileInfo fi(
m_general->m_urlResourceFolder->fileName());
2669 if (fi.isWritable()) {
2680 for (
int i = 0; i < QApplication::screens().count(); ++i) {
2719#if defined Q_OS_WIN && (defined QT5_HAS_WINTAB_SWITCH || QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
2722# if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
2724 using QWindowsApplication = QNativeInterface::Private::QWindowsApplication;
2725 if (
auto nativeWindowsApp =
dynamic_cast<QWindowsApplication *
>(QGuiApplicationPrivate::platformIntegration())) {
qreal length(const QPointF &vec)
float value(const T *src, size_t ch)
QList< QString > QStringList
const KoID AlphaColorModelID("A", ki18n("Alpha mask"))
const KoID Float16BitsColorDepthID("F16", ki18n("16-bit float/channel"))
const KoID RGBAColorModelID("RGBA", ki18n("RGB/Alpha"))
Q_GUI_EXPORT int qt_defaultDpi()
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
void toggleUseDefaultColorSpace(bool useDefColorSpace)
QList< QLabel * > m_monitorProfileLabels
void toggleAllowMonitorProfileSelection(bool useSystemProfile)
QButtonGroup m_pasteBehaviourGroup
QPointer< QCheckBox > m_chkEnableCanvasColorSpaceManagement
QPointer< KisSqueezedComboBox > m_canvasSurfaceBitDepth
QScopedPointer< KisProofingConfigModel > m_proofModel
QPointer< KisSqueezedComboBox > m_canvasSurfaceColorSpace
QList< KisSqueezedComboBox * > m_monitorProfileWidgets
void refillMonitorProfiles(const KoID &s)
void updateProofingDisplayInfo()
ColorSettingsTab(QWidget *parent=0, const char *name=0)
WdgColorSettings * m_page
DisplaySettingsTab(QWidget *parent=0, const char *name=0)
void slotUseOpenGLToggled(bool isChecked)
void slotPreferredSurfaceFormatChanged(int index)
FullscreenSettingsTab(QWidget *parent)
KisConfig::SessionOnStartup sessionOnStartup() const
bool kineticScrollingHiddenScrollbars()
bool renameDuplicatedLayers()
bool showCanvasMessages()
bool saveSessionOnQuit() const
void showAdvancedCumulativeUndoSettings()
bool autoZoomTimelineToPlaybackRange()
bool renamePastedLayers()
bool kineticScrollingEnabled()
bool toolOptionsInDocker()
void clearBackgroundImage()
bool convertToImageColorspaceOnImport()
QButtonGroup m_pasteFormatGroup
OutlineStyle eraserOutlineStyle()
void getBackgroundImage()
bool switchSelectionCtrlAlt()
int kineticScrollingSensitivity()
KisCumulativeUndoData m_cumulativeUndoData
void updateTouchPressureSensitivityEnabled(int)
bool showOutlineWhilePainting()
CursorStyle eraserCursorStyle()
bool renameMergedLayers()
void enableSubWindowOptions(int)
bool adaptivePlaybackRange()
OutlineStyle outlineStyle()
bool autopinLayersToTimeline()
bool showEraserOutlineWhilePainting()
CursorStyle cursorStyle()
int kineticScrollingGesture()
GeneralTab(QWidget *parent=0, const char *name=0)
virtual KisPreferenceSet * createPreferenceSet()=0
static KisActionRegistry * instance()
The KisActionsSnapshot class.
void connectBackwardInt(QObject *sender, const char *signal, QObject *receiver, const char *method)
void connectForwardInt(QObject *sender, const char *signal, QObject *receiver, const char *method)
@ FlipOptionsMode_MenuButton
The flip options are shown as a menu accessible via a options button.
QStringList devices(DeviceType type=screen) const
Return a list of device id's for the specified type.
static KisColorManager * instance()
void setCumulativeUndoData(KisCumulativeUndoData value)
bool backupFile(bool defaultValue=false) const
void setAntialiasCurves(bool v) const
void setSwitchSelectionCtrlAlt(bool value)
bool antialiasSelectionOutline(bool defaultValue=false) const
void setZoomSteps(int steps)
@ ASSISTANTS_DRAW_MODE_PIXMAP_CACHE
@ ASSISTANTS_DRAW_MODE_DIRECT
@ ASSISTANTS_DRAW_MODE_LARGE_PIXMAP_CACHE
int zoomSteps(bool defaultValue=false) const
void setHideDockersFullscreen(const bool value) const
static CanvasSurfaceBitDepthMode canvasSurfaceBitDepthMode(QSettings *settings, bool defaultValue=false)
void setAdaptivePlaybackRange(bool value)
void setEnableCanvasSurfaceColorSpaceManagement(bool value)
void setPasteFormat(qint32 format)
QColor checkersColor2(bool defaultValue=false) const
void setUseRightMiddleTabletButtonWorkaround(bool value)
void setCheckersColor1(const QColor &v) const
void setHidePopups(bool hidePopups)
void setMDIBackgroundColor(const QString &v) const
QString pressureTabletCurve(bool defaultValue=false) const
void setUndoStackLimit(int limit) const
bool hideScrollbars(bool defaultValue=false) const
int openGLFilteringMode(bool defaultValue=false) const
void setUseZip64(bool value)
bool showSingleChannelAsColor(bool defaultValue=false) const
void setHideToolbarFullscreen(const bool value) const
void setCanvasState(const QString &state) const
int kineticScrollingSensitivity(bool defaultValue=false) const
bool convertToImageColorspaceOnImport(bool defaultValue=false) const
int zoomMarginSize(bool defaultValue=false) const
void setAutoZoomTimelineToPlaybackRange(bool value)
bool showRootLayer(bool defaultValue=false) const
qint32 pasteFormat(bool defaultValue) const
void setEnableBrushSpeedLogging(bool value) const
void setExportMimeType(const QString &defaultExportMimeType)
void setUseWin8PointerInput(bool value)
qreal getPixelGridDrawingThreshold(bool defaultValue=false) const
bool switchSelectionCtrlAlt(bool defaultValue=false) const
void writeEntry(const QString &name, const T &value)
void setRenamePastedLayers(bool value)
QColor checkersColor1(bool defaultValue=false) const
void setHideScrollbars(bool value) const
bool allowLCMSOptimization(bool defaultValue=false) const
static void setCanvasSurfaceBitDepthMode(QSettings *settings, CanvasSurfaceBitDepthMode value)
void setIgnoreHighFunctionKeys(bool value)
bool activateTransformToolAfterPaste(bool defaultValue=false) const
void setNewCursorStyle(CursorStyle style)
bool hideDockersFullscreen(bool defaultValue=false) const
void setEraserCursorStyle(CursorStyle style)
bool compressKra(bool defaultValue=false) const
bool disableVectorOptimizations(bool defaultValue=false) const
void setCursorMainColor(const QColor &v) const
void setCanvasSurfaceColorSpaceManagementMode(CanvasSurfaceMode value)
void setCumulativeUndoRedo(bool value)
void setConvertToImageColorspaceOnImport(bool value)
void setPixelGridColor(const QColor &v) const
void setToolOptionsInDocker(bool inDocker)
void setForceAlwaysFullSizedOutline(bool value) const
void setLongPressEnabled(bool value)
SessionOnStartup sessionOnStartup(bool defaultValue=false) const
void setForcePaletteColors(bool forcePaletteColors)
void setHideTitlebarFullscreen(const bool value) const
bool enableOpenGLFramerateLogging(bool defaultValue=false) const
QColor getPixelGridColor(bool defaultValue=false) const
bool useDefaultColorSpace(bool defaultvalue=false) const
bool hideMenuFullscreen(bool defaultValue=false) const
QString getMDIBackgroundColor(bool defaultValue=false) const
void setMonitorProfile(int screen, const QString &monitorProfile, bool override) const
void setUseDefaultColorSpace(bool value) const
void setDefaultColorDepth(const QString &depth) const
bool hideScrollbarsFullscreen(bool defaultValue=false) const
TouchPainting touchPainting(bool defaultValue=false) const
void setSeparateEraserCursor(bool value) const
qint32 monitorRenderIntent(bool defaultValue=false) const
void setActivateTransformToolAfterPaste(bool value)
int kineticScrollingGesture(bool defaultValue=false) const
bool useZip64(bool defaultValue=false) const
bool calculateAnimationCacheInBackground(bool defaultValue=false) const
int favoritePresets(bool defaultValue=false) const
bool zoomHorizontal(bool defaultValue=false) const
QString getMDIBackgroundImage(bool defaultValue=false) const
void setAssistantsDrawMode(AssistantsDrawMode value)
CanvasSurfaceMode canvasSurfaceColorSpaceManagementMode(bool defaultValue=false) const
bool hideToolbarFullscreen(bool defaultValue=false) const
bool showCanvasMessages(bool defaultValue=false) const
void setUseSystemMonitorProfile(bool _useSystemMonitorProfile) const
bool useWin8PointerInput(bool defaultValue=false) const
bool useOpenGLTextureBuffer(bool defaultValue=false) const
void setCalculateAnimationCacheInBackground(bool value)
void setAutoSaveInterval(int seconds) const
void setShowSingleChannelAsColor(bool asColor)
void setTrimFramesImport(bool trim)
bool forcePaletteColors(bool defaultValue=false) const
void setAllowLCMSOptimization(bool allowLCMSOptimization)
void setRenderIntent(qint32 monitorRenderIntent) const
void setFavoritePresets(const int value)
void setEraserOutlineStyle(OutlineStyle style)
void setShowOutlineWhilePainting(bool showOutlineWhilePainting) const
RootSurfaceFormat rootSurfaceFormat(bool defaultValue=false) const
QColor canvasBorderColor(bool defaultValue=false) const
QString exportMimeType(bool defaultValue) const
void setScrollingCheckers(bool scrollCheckers) const
const QString getScreenStringIdentfier(int screenNo) const
void setBackupFile(bool backupFile) const
void logImportantSettings() const
Log the most interesting settings to the usage log.
CursorStyle newCursorStyle(bool defaultValue=false) const
bool useCumulativeUndoRedo(bool defaultValue=false) const
void setCheckSize(qint32 checkSize) const
CursorStyle eraserCursorStyle(bool defaultValue=false) const
void setKineticScrollingGesture(int kineticScroll)
void setPixelGridDrawingThreshold(qreal v) const
void setMonitorForScreen(int screen, const QString &monitor)
void setCanvasBorderColor(const QColor &color) const
QString monitorProfile(int screen) const
get the profile the user has selected for the given screen
@ TOUCH_PAINTING_DISABLED
void setShowCanvasMessages(bool show)
qint32 checkSize(bool defaultValue=false) const
void setWorkingColorSpace(const QString &workingColorSpace) const
KisCumulativeUndoData cumulativeUndoData(bool defaultValue=false) const
OutlineStyle newOutlineStyle(bool defaultValue=false) const
bool forceAlwaysFullSizedOutline(bool defaultValue=false) const
void setPressureTabletCurve(const QString &curveString) const
QString workingColorSpace(bool defaultValue=false) const
void setEnableOpenGLFramerateLogging(bool value) const
bool renamePastedLayers(bool defaultValue=false) const
void setNewOutlineStyle(OutlineStyle style)
void setCheckersColor2(const QColor &v) const
void setShowRootLayer(bool showRootLayer) const
OutlineStyle eraserOutlineStyle(bool defaultValue=false) const
void setUseBlackPointCompensation(bool useBlackPointCompensation) const
bool kineticScrollingEnabled(bool defaultValue=false) const
void setUseOpenGLTextureBuffer(bool useBuffer)
void setTrimKra(bool trim)
bool hideTitlebarFullscreen(bool defaultValue=false) const
bool useRightMiddleTabletButtonWorkaround(bool defaultValue=false) const
bool longPressEnabled(bool defaultValue=false) const
bool hidePopups(bool defaultValue=false) const
bool enableCanvasSurfaceColorSpaceManagement(bool defaultValue=false) const
void setRootSurfaceFormat(RootSurfaceFormat value)
bool autoPinLayersToTimeline(bool defaultValue=false) const
bool toolOptionsInDocker(bool defaultValue=false) const
void setOpenGLFilteringMode(int filteringMode)
void setKineticScrollingHideScrollbars(bool scrollbar)
void setAntialiasSelectionOutline(bool v) const
bool trimKra(bool defaultValue=false) const
bool enableBrushSpeedLogging(bool defaultValue=false) const
bool forceAlwaysFullSizedEraserOutline(bool defaultValue=false) const
T readEntry(const QString &name, const T &defaultValue=T())
int autoSaveInterval(bool defaultValue=false) const
QString defColorModel(bool defaultValue=false) const
void setDisableVectorOptimizations(bool value)
void setHideStatusbarFullscreen(const bool value) const
void setCompressKra(bool compress)
void setTouchPainting(TouchPainting value) const
bool showOutlineWhilePainting(bool defaultValue=false) const
void setShowEraserOutlineWhilePainting(bool showEraserOutlineWhilePainting) const
void setHideMenuFullscreen(const bool value) const
bool useSystemMonitorProfile(bool defaultValue=false) const
bool autoZoomTimelineToPlaybackRange(bool defaultValue=false) const
bool scrollCheckers(bool defaultValue=false) const
CanvasSurfaceBitDepthMode
void setZoomMarginSize(int zoomMarginSize)
bool hideStatusbarFullscreen(bool defaultValue=false) const
void setZoomHorizontal(bool value)
bool kineticScrollingHiddenScrollbars(bool defaultValue=false) const
bool useOpenGL(bool defaultValue=false) const
bool trimFramesImport(bool defaultValue=false) const
void setForceAlwaysFullSizedEraserOutline(bool value) const
bool selectionActionBar(bool defaultValue=false) const
int undoStackLimit(bool defaultValue=false) const
bool useBlackPointCompensation(bool defaultValue=false) const
bool saveSessionOnQuit(bool defaultValue) const
void setMDIBackgroundImage(const QString &fileName) const
QColor getCursorMainColor(bool defaultValue=false) const
void setSelectionActionBar(bool value)
qint32 pasteBehaviour(bool defaultValue=false) const
AssistantsDrawMode assistantsDrawMode(bool defaultValue=false) const
bool separateEraserCursor(bool defaultValue=false) const
void setEraserCursorMainColor(const QColor &v) const
void setSaveSessionOnQuit(bool value)
bool disableAVXOptimizations(bool defaultValue=false) const
bool showEraserOutlineWhilePainting(bool defaultValue=false) const
void setPasteBehaviour(qint32 behaviour) const
void setSessionOnStartup(SessionOnStartup value)
void setHideScrollbarsFullscreen(const bool value) const
QString monitorForScreen(int screen, const QString &defaultMonitor, bool defaultValue=true) const
void setAutoPinLayersToTimeline(bool value)
QColor getEraserCursorMainColor(bool defaultValue=false) const
bool antialiasCurves(bool defaultValue=false) const
void setKineticScrollingSensitivity(int sensitivity)
bool ignoreHighFunctionKeys(bool defaultValue=false) const
void setDisableAVXOptimizations(bool value)
bool adaptivePlaybackRange(bool defaultValue=false) const
void setKineticScrollingEnabled(bool enabled)
std::pair< KoColorConversionTransformation::Intent, KoColorConversionTransformation::ConversionFlags > Options
KoConfigAuthorPage * m_authorPage
PerformanceTab * m_performanceSettings
ColorSettingsTab * m_colorSettings
PopupPaletteTab * m_popupPaletteSettings
KisInputConfigurationPage * m_inputConfiguration
~KisDlgPreferences() override
FullscreenSettingsTab * m_fullscreenSettings
ShortcutSettingsTab * m_shortcutSettings
TabletSettingsTab * m_tabletSettings
QList< KPageWidgetItem * > m_pages
DisplaySettingsTab * m_displaySettings
void slotButtonClicked(QAbstractButton *button)
KisDlgPreferences(QWidget *parent=0, const char *name=0)
void showEvent(QShowEvent *event) override
void setEnableProgressReporting(bool value)
void setUseAnimationCacheRegionOfInterest(bool value)
bool useAnimationCacheFrameSizeLimit(bool defaultValue=false) const
void setAnimationCacheFrameSizeLimit(int value)
void setFrameRenderingClones(int value)
int animationCacheFrameSizeLimit(bool defaultValue=false) const
KisProofingConfigurationSP defaultProofingconfiguration(bool requestDefault=false)
void setMaxNumberOfThreads(int value)
bool useAnimationCacheRegionOfInterest(bool defaultValue=false) const
int frameRenderingClones(bool defaultValue=false) const
void setDetectFpsLimit(bool value)
void setFpsLimit(int value)
QString swapDir(bool requestDefault=false)
int maxNumberOfThreads(bool defaultValue=false) const
qreal memoryPoolLimitPercent(bool requestDefault=false) const
void setEnablePerfLog(bool value)
bool detectFpsLimit(bool defaultValue=false) const
bool enableProgressReporting(bool requestDefault=false) const
void setUseAnimationCacheFrameSizeLimit(bool value)
int fpsLimit(bool defaultValue=false) const
void setSelectionOutlineOpacity(qreal value)
int maxSwapSize(bool requestDefault=false) const
void setUseOnDiskAnimationCacheSwapping(bool value)
qreal animationCacheRegionOfInterestMargin(bool defaultValue=false) const
void setFrameRenderingTimeout(int value)
void setMaxSwapSize(int value)
qreal memoryHardLimitPercent(bool requestDefault=false) const
void setMemorySoftLimitPercent(qreal value)
void setSwapDir(const QString &swapDir)
void setSelectionOverlayMaskColor(const QColor &color)
qreal selectionOutlineOpacity(bool defaultValue=false) const
void setRenameDuplicatedLayers(bool value)
int frameRenderingTimeout(bool defaultValue=false) const
bool enablePerfLog(bool requestDefault=false) const
void setMaxBrushSize(int value)
void setRenameMergedLayers(bool value)
void setDefaultProofingConfig(const KisProofingConfiguration &config)
QColor selectionOverlayMaskColor(bool defaultValue=false) const
qreal memorySoftLimitPercent(bool requestDefault=false) const
void setMemoryHardLimitPercent(qreal value)
bool useOnDiskAnimationCacheSwapping(bool defaultValue=false) const
void setMemoryPoolLimitPercent(qreal value)
void setAnimationCacheRegionOfInterestMargin(qreal value)
static QStringList supportedMimeTypes(Direction direction)
A Configuration Dialog Page to configure the canvas input.
A container for a set of QAction objects.
Q_INVOKABLE QAction * addAction(const QString &name, QAction *action)
QList< QAction * > actions() const
virtual KisKActionCollection * actionCollection() const
static QString descriptionForMimeType(const QString &mimeType)
Find the user-readable description for the given mimetype.
static KisOpenGLModeProber * instance()
QSurfaceFormat surfaceformatInUse() const
static OpenGLRenderer getCurrentOpenGLRenderer()
static OpenGLRenderers getSupportedOpenGLRenderers()
static QStringList getOpenGLWarnings()
static bool supportsLoD()
static OpenGLRenderer getUserPreferredOpenGLRendererConfig()
static OpenGLRenderer getQtPreferredOpenGLRenderer()
static void setUserPreferredOpenGLRendererConfig(OpenGLRenderer renderer)
static KisPart * instance()
KisMainWindow * currentMainwindow() const
static KisPreferenceSetRegistry * instance()
virtual QString header()=0
virtual void loadPreferences()=0
The KisProofingConfigModel class.
static const QString resourceLocationKey
void addCollection(KisKActionCollection *, const QString &title=QString())
static KisSurfaceColorSpaceWrapper fromQtColorSpace(const QColorSpace &colorSpace)
static KoColorSpaceEngineRegistry * instance()
static KoColor fromXML(const QDomElement &elt, const QString &channelDepthId)
void setColor(const quint8 *data, const KoColorSpace *colorSpace=0)
void setOpacity(quint8 alpha)
void fromQColor(const QColor &c)
Convenient function for converting from a QColor.
void toQColor(QColor *c) const
a convenience method for the above.
const T value(const QString &id) const
T get(const QString &id) const
QList< QString > keys() const
static bool tabletInputReceived()
static void getAllUserResourceFoldersLocationsForWindowsStore(QString &standardLocation, QString &privateLocation)
getAllAppDataLocationsForWindowsStore Use this to get both private and general appdata folders which ...
static QString getAppDataLocation()
static QString saveLocation(const QString &type, const QString &suffix=QString(), bool create=true)
~ShortcutSettingsTab() override
WdgShortcutSettings * m_page
QScopedPointer< KisActionsSnapshot > m_snapshot
ShortcutSettingsTab(QWidget *parent=0, const char *name=0)
void slotParentValueChanged()
void slotResolutionSettings()
WdgTabletSettings * m_page
TabletSettingsTab(QWidget *parent=0, const char *name=0)
#define KIS_SAFE_ASSERT_RECOVER(cond)
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
#define KIS_SAFE_ASSERT_RECOVER_NOOP(cond)
const QString DEFAULT_CURVE_STRING
QString shortNameOfDisplay(int index)
Q_GUI_EXPORT int qt_defaultDpi()
#define koIcon(name)
Use these macros for icons without any issues.
QString button(const QWheelEvent &ev)
QIcon loadIcon(const QString &name)
void setText(QSpinBox *spinBox, const QStringView textTemplate)
void install(QSpinBox *spinBox, std::function< QString(int)> messageFn)
~BackupSuffixValidator() override
State validate(QString &line, int &) const override
BackupSuffixValidator(QObject *parent)
const QStringList invalidCharacters
void linkActivated(const QString &link)
virtual bool isSuitableForDisplay() const =0
virtual const KoColorProfile * addProfile(const QString &filename)=0
QString colorSpaceId(const QString &colorModelId, const QString &colorDepthId) const
static KoColorSpaceRegistry * instance()
KoID colorSpaceColorDepthId(const QString &_colorSpaceId) const
QString defaultProfileForColorSpace(const QString &colorSpaceId) const
KoID colorSpaceColorModelId(const QString &_colorSpaceId) const
QList< KoID > listKeys() const
State validate(QString &line, int &) const override
WritableLocationValidator(QObject *parent)