Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_dlg_preferences.h
Go to the documentation of this file.
1/*
2 * preferencesdlg.h - part of KImageShop^WKrita
3 *
4 * SPDX-FileCopyrightText: 1999 Michael Koch <koch@kde.org>
5 * SPDX-FileCopyrightText: 2003-2011 Boudewijn Rempt <boud@valdyas.org>
6 *
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
9
10#ifndef _KIS_DLG_PREFERENCES_H_
11#define _KIS_DLG_PREFERENCES_H_
12
13#include <QWidget>
14#include <QButtonGroup>
15#include <QMap>
16#include <QString>
17
18#include <kpagedialog.h>
19#include <kis_config.h>
20
21#include "kis_global.h"
22#include <KisSqueezedComboBox.h>
23
24#include "ui_wdggeneralsettings.h"
25#include "ui_wdgdisplaysettings.h"
26#include "ui_wdgcolorsettings.h"
27#include "ui_wdgtabletsettings.h"
28#include "ui_wdgperformancesettings.h"
29#include "ui_wdgfullscreensettings.h"
30#include "ui_WdgPopupPaletteSettings.h"
31#include "KisShortcutsDialog.h"
33
34class KoID;
39
44class WdgGeneralSettings : public QWidget, public Ui::WdgGeneralSettings
45{
46 Q_OBJECT
47
48public:
49 WdgGeneralSettings(QWidget *parent, const char *name) : QWidget(parent) {
50 setObjectName(name);
51 setupUi(this);
52 formLayout_13->takeRow(chkShowRootLayer);
53 chkShowRootLayer->setVisible(false);
54 }
55};
56
57class KRITAUI_EXPORT GeneralTab : public WdgGeneralSettings
58{
59 Q_OBJECT
60
61public:
62
63 GeneralTab(QWidget *parent = 0, const char *name = 0);
64
65 CursorStyle cursorStyle();
66 OutlineStyle outlineStyle();
67 CursorStyle eraserCursorStyle();
68 OutlineStyle eraserOutlineStyle();
69 KisConfig::ColorSamplerPreviewStyle colorSamplerPreviewStyle() const;
70 int colorSamplerPreviewCircleDiameter() const;
71 qreal colorSamplerPreviewCircleThickness() const;
72 bool colorSamplerPreviewCircleOutlineEnabled() const;
73 bool colorSamplerPreviewCircleExtraCirclesEnabled() const;
74
75 KisConfig::SessionOnStartup sessionOnStartup() const;
76 bool saveSessionOnQuit() const;
77
78 bool showRootLayer();
79 int autoSaveInterval();
80 void setDefault();
81 int undoStackSize();
82 bool showOutlineWhilePainting();
83 bool showEraserOutlineWhilePainting();
84
85 int mdiMode();
86 bool showCanvasMessages();
87 bool compressKra();
88 bool trimKra();
89 bool trimFramesImport();
90 bool useZip64();
91 bool toolOptionsInDocker();
92 int zoomSteps();
93 bool longPressEnabled();
94 bool kineticScrollingEnabled();
95 int kineticScrollingGesture();
96 int kineticScrollingSensitivity();
97 bool kineticScrollingHiddenScrollbars();
98 int zoomMarginSize();
99 bool switchSelectionCtrlAlt();
100 bool convertToImageColorspaceOnImport();
101
102 bool autopinLayersToTimeline();
103 bool adaptivePlaybackRange();
104 bool autoZoomTimelineToPlaybackRange();
105
106 bool renameMergedLayers();
107 bool renamePastedLayers();
108 bool renameDuplicatedLayers();
109 QString exportMimeType();
110 int forcedFontDpi();
111
112 static void setColorSamplerPreviewStyleItems(QComboBox *cmb);
113 static void setColorSamplerPreviewStyleIndexByValue(QComboBox *cmb, KisConfig::ColorSamplerPreviewStyle style);
114 static KisConfig::ColorSamplerPreviewStyle getColorSamplerPreviewStyleValue(const QComboBox *cmb);
115
116private Q_SLOTS:
117 void getBackgroundImage();
118 void clearBackgroundImage();
119 void checkResourcePath();
120 void enableSubWindowOptions(int);
121 void updateTouchPressureSensitivityEnabled(int);
122 void showAdvancedCumulativeUndoSettings();
123
124 void colorSamplePreviewStyleChanged(int index);
125 void colorSamplePreviewSizeChanged(int value);
126 void colorSamplePreviewThicknessChanged(qreal value);
127 void colorSamplePreviewOutlineEnabledChanged(int value);
128public:
129 QButtonGroup m_pasteFormatGroup;
131};
132
133
134
140{
141 Q_OBJECT
142
143public:
144 WdgShortcutSettings(QWidget *parent)
146 KisShortcutsEditor::LetterShortcutsAllowed,
147 parent)
148 { }
149};
150
152
153class ShortcutSettingsTab : public QWidget
154{
155 Q_OBJECT
156
157public:
158
159 ShortcutSettingsTab(QWidget *parent = 0, const char *name = 0);
160 ~ShortcutSettingsTab() override;
161
162public:
163 void setDefault();
165 QScopedPointer<KisActionsSnapshot> m_snapshot;
166
167public Q_SLOTS:
168 void saveChanges();
169 void cancelChanges();
170};
171
172
173
178class WdgColorSettings : public QWidget, public Ui::WdgColorSettings
179{
180 Q_OBJECT
181
182public:
183 WdgColorSettings(QWidget *parent) : QWidget(parent) {
184 setupUi(this);
185 }
186};
187
221
222//=======================
223
224class WdgTabletSettings : public QWidget, public Ui::WdgTabletSettings {
225
226 Q_OBJECT
227
228public:
229 WdgTabletSettings(QWidget *parent) : QWidget(parent) {
230 setupUi(this);
231 }
232
233};
234
235class TabletSettingsTab : public QWidget {
236 Q_OBJECT
237public:
238 TabletSettingsTab(QWidget *parent = 0, const char *name = 0);
239
240private Q_SLOTS:
241 void slotTabletTest();
243
244public:
245 void setDefault();
247
248
249};
250
251//=======================
252
258
259class WdgPerformanceSettings : public QWidget, public Ui::WdgPerformanceSettings
260{
261 Q_OBJECT
262
263public:
264 WdgPerformanceSettings(QWidget *parent, const char *name) : QWidget(parent) {
265 setObjectName(name); setupUi(this);
266 }
267};
268
270{
271 Q_OBJECT
272
273public:
274 PerformanceTab(QWidget *parent = 0, const char *name = 0);
275
276 ~PerformanceTab() override;
277
278 void load(bool requestDefault);
279 void save();
280
281private Q_SLOTS:
284
285private:
286 int realTilesRAM();
287
288private:
292 QScopedPointer<KisFrameRateLimitModel> m_frameRateModel;
293};
294
295//=======================
296
297class WdgDisplaySettings : public QWidget, public Ui::WdgDisplaySettings
298{
299 Q_OBJECT
300
301public:
302 WdgDisplaySettings(QWidget *parent, const char *name) : QWidget(parent) {
303 setObjectName(name); setupUi(this);
304 }
305};
306
313{
314 Q_OBJECT
315
316public:
317 DisplaySettingsTab(QWidget *parent = 0, const char *name = 0);
318
319public:
320 void setDefault();
321protected Q_SLOTS:
322 void slotUseOpenGLToggled(bool isChecked);
323 void slotPreferredSurfaceFormatChanged(int index);
324
325public:
326};
327
328//=======================
329
334class WdgFullscreenSettingsBase : public QWidget, public Ui::WdgFullscreenSettings
335{
336 Q_OBJECT
337
338public:
339 WdgFullscreenSettingsBase(QWidget *parent) : QWidget(parent) {
340 setupUi(this);
341 }
342};
343
345{
346 Q_OBJECT
347public:
348 FullscreenSettingsTab(QWidget *parent);
349public:
350 void setDefault();
351};
352
353//=======================
354
359class WdgPopupPaletteSettingsBase : public QWidget, public Ui::WdgPopupPaletteSettings
360{
361 Q_OBJECT
362
363public:
364 WdgPopupPaletteSettingsBase(QWidget *parent, const char *name) : QWidget(parent) {
365 setObjectName(name); setupUi(this);
366 }
367};
368
370{
371 Q_OBJECT
372
373public:
374 PopupPaletteTab(QWidget *parent = 0, const char *name = 0);
375
376 void load();
377 void save();
378 void setDefault();
379};
380
381//=======================
382
383
387class KisDlgPreferences : public KPageDialog
388{
389 Q_OBJECT
390
391public:
392
393 KisDlgPreferences(QWidget *parent = 0, const char *name = 0);
394 ~KisDlgPreferences() override;
395
396 bool editPreferences();
397
398 void showEvent(QShowEvent *event) override;
399
400private:
401
412
414
415private Q_SLOTS:
416
417 void slotButtonClicked(QAbstractButton *button);
418 void slotDefault();
419
420private:
421
422 bool m_cancelClicked {false};
423};
424
425#endif
float value(const T *src, size_t ch)
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)
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)
QButtonGroup m_pasteFormatGroup
KisCumulativeUndoData m_cumulativeUndoData
The KisActionsSnapshot class.
ColorSamplerPreviewStyle
Definition kis_config.h:138
CanvasSurfaceBitDepthMode
Definition kis_config.h:189
KoConfigAuthorPage * m_authorPage
PerformanceTab * m_performanceSettings
ColorSettingsTab * m_colorSettings
PopupPaletteTab * m_popupPaletteSettings
KisInputConfigurationPage * m_inputConfiguration
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
A Configuration Dialog Page to configure the canvas input.
The KisProofingConfigModel class.
Widget for configuration of KAccel and KGlobalAccel.
Definition KoID.h:30
void load(bool requestDefault)
PerformanceTab(QWidget *parent=0, const char *name=0)
QScopedPointer< KisFrameRateLimitModel > m_frameRateModel
void slotThreadsLimitChanged(int value)
QVector< SliderAndSpinBoxSync * > m_syncs
void slotFrameClonesLimitChanged(int value)
PopupPaletteTab(QWidget *parent=0, const char *name=0)
WdgShortcutSettings * m_page
QScopedPointer< KisActionsSnapshot > m_snapshot
ShortcutSettingsTab(QWidget *parent=0, const char *name=0)
WdgTabletSettings * m_page
TabletSettingsTab(QWidget *parent=0, const char *name=0)
WdgColorSettings(QWidget *parent)
WdgDisplaySettings(QWidget *parent, const char *name)
WdgFullscreenSettingsBase(QWidget *parent)
WdgGeneralSettings(QWidget *parent, const char *name)
WdgPerformanceSettings(QWidget *parent, const char *name)
WdgPopupPaletteSettingsBase(QWidget *parent, const char *name)
WdgShortcutSettings(QWidget *parent)
WdgTabletSettings(QWidget *parent)
OutlineStyle
Definition kis_global.h:53
CursorStyle
Definition kis_global.h:62
QString button(const QWheelEvent &ev)