Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
KolourPaint
Commits
ddf2c4fd
Commit
ddf2c4fd
authored
Dec 09, 2020
by
Laurent Montel
😁
Browse files
operator+/- is disabled for QFlags in qt6
parent
0ae8f439
Changes
4
Hide whitespace changes
Inline
Side-by-side
mainWindow/kpMainWindow_Edit.cpp
View file @
ddf2c4fd
...
...
@@ -96,7 +96,7 @@ void kpMainWindow::setupEditMenuActions ()
d
->
actionPasteInNewWindow
->
setText
(
i18n
(
"Paste in &New Window"
));
connect
(
d
->
actionPasteInNewWindow
,
&
QAction
::
triggered
,
this
,
&
kpMainWindow
::
slotPasteInNewWindow
);
ac
->
setDefaultShortcut
(
d
->
actionPasteInNewWindow
,
Qt
::
CTRL
+
Qt
::
SHIFT
+
Qt
::
Key_V
);
ac
->
setDefaultShortcut
(
d
->
actionPasteInNewWindow
,
Qt
::
CTRL
|
Qt
::
SHIFT
|
Qt
::
Key_V
);
//d->actionDelete = KStandardAction::clear (this, SLOT (slotDelete()), ac);
d
->
actionDelete
=
ac
->
addAction
(
QStringLiteral
(
"edit_clear"
));
...
...
mainWindow/kpMainWindow_Image.cpp
View file @
ddf2c4fd
...
...
@@ -117,50 +117,50 @@ void kpMainWindow::setupImageMenuActions ()
d
->
actionResizeScale
->
setText
(
i18n
(
"R&esize / Scale..."
));
connect
(
d
->
actionResizeScale
,
&
QAction
::
triggered
,
this
,
&
kpMainWindow
::
slotResizeScale
);
ac
->
setDefaultShortcut
(
d
->
actionResizeScale
,
Qt
::
CTRL
+
Qt
::
Key_E
);
ac
->
setDefaultShortcut
(
d
->
actionResizeScale
,
Qt
::
CTRL
|
Qt
::
Key_E
);
d
->
actionCrop
=
ac
->
addAction
(
QStringLiteral
(
"image_crop"
));
d
->
actionCrop
->
setText
(
i18n
(
"Se&t as Image (Crop)"
));
connect
(
d
->
actionCrop
,
&
QAction
::
triggered
,
this
,
&
kpMainWindow
::
slotCrop
);
ac
->
setDefaultShortcut
(
d
->
actionCrop
,
Qt
::
CTRL
+
Qt
::
Key_T
);
ac
->
setDefaultShortcut
(
d
->
actionCrop
,
Qt
::
CTRL
|
Qt
::
Key_T
);
d
->
actionAutoCrop
=
ac
->
addAction
(
QStringLiteral
(
"image_auto_crop"
));
d
->
actionAutoCrop
->
setText
(
autoCropText
());
connect
(
d
->
actionAutoCrop
,
&
QAction
::
triggered
,
this
,
&
kpMainWindow
::
slotAutoCrop
);
ac
->
setDefaultShortcut
(
d
->
actionAutoCrop
,
Qt
::
CTRL
+
Qt
::
Key_U
);
ac
->
setDefaultShortcut
(
d
->
actionAutoCrop
,
Qt
::
CTRL
|
Qt
::
Key_U
);
d
->
actionFlip
=
ac
->
addAction
(
QStringLiteral
(
"image_flip"
));
d
->
actionFlip
->
setText
(
i18n
(
"&Flip (upside down)"
));
connect
(
d
->
actionFlip
,
&
QAction
::
triggered
,
this
,
&
kpMainWindow
::
slotFlip
);
ac
->
setDefaultShortcut
(
d
->
actionFlip
,
Qt
::
CTRL
+
Qt
::
Key_F
);
ac
->
setDefaultShortcut
(
d
->
actionFlip
,
Qt
::
CTRL
|
Qt
::
Key_F
);
d
->
actionMirror
=
ac
->
addAction
(
QStringLiteral
(
"image_mirror"
));
d
->
actionMirror
->
setText
(
i18n
(
"Mirror (horizontally)"
));
connect
(
d
->
actionMirror
,
&
QAction
::
triggered
,
this
,
&
kpMainWindow
::
slotMirror
);
//ac->setDefaultShortcut (d->actionMirror, Qt::CTRL
+
Qt::Key_M);
//ac->setDefaultShortcut (d->actionMirror, Qt::CTRL
|
Qt::Key_M);
d
->
actionRotate
=
ac
->
addAction
(
QStringLiteral
(
"image_rotate"
));
d
->
actionRotate
->
setText
(
i18n
(
"&Rotate..."
));
d
->
actionRotate
->
setIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"transform-rotate"
)));
connect
(
d
->
actionRotate
,
&
QAction
::
triggered
,
this
,
&
kpMainWindow
::
slotRotate
);
ac
->
setDefaultShortcut
(
d
->
actionRotate
,
Qt
::
CTRL
+
Qt
::
Key_R
);
ac
->
setDefaultShortcut
(
d
->
actionRotate
,
Qt
::
CTRL
|
Qt
::
Key_R
);
d
->
actionRotateLeft
=
ac
->
addAction
(
QStringLiteral
(
"image_rotate_270deg"
));
d
->
actionRotateLeft
->
setText
(
i18n
(
"Rotate &Left"
));
d
->
actionRotateLeft
->
setIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"object-rotate-left"
)));
connect
(
d
->
actionRotateLeft
,
&
QAction
::
triggered
,
this
,
&
kpMainWindow
::
slotRotate270
);
ac
->
setDefaultShortcut
(
d
->
actionRotateLeft
,
Qt
::
CTRL
+
Qt
::
SHIFT
+
Qt
::
Key_Left
);
ac
->
setDefaultShortcut
(
d
->
actionRotateLeft
,
Qt
::
CTRL
|
Qt
::
SHIFT
|
Qt
::
Key_Left
);
d
->
actionRotateRight
=
ac
->
addAction
(
QStringLiteral
(
"image_rotate_90deg"
));
d
->
actionRotateRight
->
setText
(
i18n
(
"Rotate Righ&t"
));
d
->
actionRotateRight
->
setIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"object-rotate-right"
)));
connect
(
d
->
actionRotateRight
,
&
QAction
::
triggered
,
this
,
&
kpMainWindow
::
slotRotate90
);
ac
->
setDefaultShortcut
(
d
->
actionRotateRight
,
Qt
::
CTRL
+
Qt
::
SHIFT
+
Qt
::
Key_Right
);
ac
->
setDefaultShortcut
(
d
->
actionRotateRight
,
Qt
::
CTRL
|
Qt
::
SHIFT
|
Qt
::
Key_Right
);
d
->
actionSkew
=
ac
->
addAction
(
QStringLiteral
(
"image_skew"
));
d
->
actionSkew
->
setText
(
i18n
(
"S&kew..."
));
connect
(
d
->
actionSkew
,
&
QAction
::
triggered
,
this
,
&
kpMainWindow
::
slotSkew
);
ac
->
setDefaultShortcut
(
d
->
actionSkew
,
Qt
::
CTRL
+
Qt
::
Key_K
);
ac
->
setDefaultShortcut
(
d
->
actionSkew
,
Qt
::
CTRL
|
Qt
::
Key_K
);
d
->
actionConvertToBlackAndWhite
=
ac
->
addAction
(
QStringLiteral
(
"image_convert_to_black_and_white"
));
d
->
actionConvertToBlackAndWhite
->
setText
(
i18n
(
"Reduce to Mo&nochrome (Dithered)"
));
...
...
@@ -174,12 +174,12 @@ void kpMainWindow::setupImageMenuActions ()
d
->
actionInvertColors
=
ac
->
addAction
(
QStringLiteral
(
"image_invert_colors"
));
d
->
actionInvertColors
->
setText
(
i18n
(
"&Invert Colors"
));
connect
(
d
->
actionInvertColors
,
&
QAction
::
triggered
,
this
,
&
kpMainWindow
::
slotInvertColors
);
ac
->
setDefaultShortcut
(
d
->
actionInvertColors
,
Qt
::
CTRL
+
Qt
::
Key_I
);
ac
->
setDefaultShortcut
(
d
->
actionInvertColors
,
Qt
::
CTRL
|
Qt
::
Key_I
);
d
->
actionClear
=
ac
->
addAction
(
QStringLiteral
(
"image_clear"
));
d
->
actionClear
->
setText
(
i18n
(
"C&lear"
));
connect
(
d
->
actionClear
,
&
QAction
::
triggered
,
this
,
&
kpMainWindow
::
slotClear
);
ac
->
setDefaultShortcut
(
d
->
actionClear
,
Qt
::
CTRL
+
Qt
::
SHIFT
+
Qt
::
Key_N
);
ac
->
setDefaultShortcut
(
d
->
actionClear
,
Qt
::
CTRL
|
Qt
::
SHIFT
|
Qt
::
Key_N
);
d
->
actionBlur
=
ac
->
addAction
(
QStringLiteral
(
"image_make_confidential"
));
d
->
actionBlur
->
setText
(
i18n
(
"Make Confidential"
));
...
...
@@ -188,7 +188,7 @@ void kpMainWindow::setupImageMenuActions ()
d
->
actionMoreEffects
=
ac
->
addAction
(
QStringLiteral
(
"image_more_effects"
));
d
->
actionMoreEffects
->
setText
(
i18n
(
"&More Effects..."
));
connect
(
d
->
actionMoreEffects
,
&
QAction
::
triggered
,
this
,
&
kpMainWindow
::
slotMoreEffects
);
ac
->
setDefaultShortcut
(
d
->
actionMoreEffects
,
Qt
::
CTRL
+
Qt
::
Key_M
);
ac
->
setDefaultShortcut
(
d
->
actionMoreEffects
,
Qt
::
CTRL
|
Qt
::
Key_M
);
enableImageMenuDocumentActions
(
false
);
...
...
mainWindow/kpMainWindow_View.cpp
View file @
ddf2c4fd
...
...
@@ -63,7 +63,7 @@ void kpMainWindow::setupViewMenuActions ()
d
->
actionShowGrid
=
ac
->
add
<
KToggleAction
>
(
QStringLiteral
(
"view_show_grid"
));
d
->
actionShowGrid
->
setText
(
i18n
(
"Show &Grid"
));
ac
->
setDefaultShortcut
(
d
->
actionShowGrid
,
Qt
::
CTRL
+
Qt
::
Key_G
);
ac
->
setDefaultShortcut
(
d
->
actionShowGrid
,
Qt
::
CTRL
|
Qt
::
Key_G
);
//d->actionShowGrid->setCheckedState (KGuiItem(i18n ("Hide &Grid")));
connect
(
d
->
actionShowGrid
,
&
KToggleAction
::
triggered
,
this
,
&
kpMainWindow
::
slotShowGridToggled
);
...
...
mainWindow/kpMainWindow_View_Thumbnail.cpp
View file @
ddf2c4fd
...
...
@@ -64,7 +64,7 @@ void kpMainWindow::setupViewMenuThumbnailActions ()
// TODO: This doesn't work when the thumbnail has focus.
// Testcase: Press CTRL+H twice on a fresh KolourPaint.
// The second CTRL+H doesn't close the thumbnail.
ac
->
setDefaultShortcut
(
d
->
actionShowThumbnail
,
Qt
::
CTRL
+
Qt
::
Key_H
);
ac
->
setDefaultShortcut
(
d
->
actionShowThumbnail
,
Qt
::
CTRL
|
Qt
::
Key_H
);
//d->actionShowThumbnail->setCheckedState (KGuiItem(i18n ("Hide T&humbnail")));
connect
(
d
->
actionShowThumbnail
,
&
KToggleAction
::
triggered
,
this
,
&
kpMainWindow
::
slotShowThumbnailToggled
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment