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
SDK
KCacheGrind
Commits
ca3d7a96
Commit
ca3d7a96
authored
Sep 16, 2020
by
Calvin Buckley
🤔
Browse files
on macOS, a window menu with zoom and minimize
This also needs a window list.
parent
f169763e
Changes
2
Hide whitespace changes
Inline
Side-by-side
qcachegrind/qcgtoplevel.cpp
View file @
ca3d7a96
...
...
@@ -556,6 +556,16 @@ void QCGTopLevel::createActions()
_configureAction
->
setStatusTip
(
tr
(
"Configure QCachegrind"
));
connect
(
_configureAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
configure
()));
// window menu actions
_minimizeAction
=
new
QAction
(
tr
(
"&Minimize"
),
this
);
_minimizeAction
->
setShortcut
(
Qt
::
CTRL
+
Qt
::
Key_M
);
connect
(
_minimizeAction
,
&
QAction
::
triggered
,
this
,
&
QWidget
::
showMinimized
);
_zoomAction
=
new
QAction
(
tr
(
"&Zoom"
),
this
);
// on macOS, zoom doesn't have exactly the same semantics as maximize
// (it creates the best fit), but maximize is the usual copout answer
connect
(
_zoomAction
,
&
QAction
::
triggered
,
this
,
&
QWidget
::
showMaximized
);
// help menu actions
_aboutAction
=
new
QAction
(
tr
(
"&About QCachegrind..."
),
this
);
_aboutAction
->
setMenuRole
(
QAction
::
AboutRole
);
...
...
@@ -624,6 +634,12 @@ void QCGTopLevel::createMenu()
goMenu
->
addAction
(
_upAction
);
fileMenu
->
addAction
(
_exitAction
);
#ifdef Q_OS_MAC
QMenu
*
windowMenu
=
mBar
->
addMenu
(
tr
(
"&Window"
));
windowMenu
->
addAction
(
_minimizeAction
);
windowMenu
->
addAction
(
_zoomAction
);
#endif
QMenu
*
helpMenu
=
mBar
->
addMenu
(
tr
(
"&Help"
));
helpMenu
->
addAction
(
QWhatsThis
::
createAction
(
this
));
helpMenu
->
addSeparator
();
...
...
qcachegrind/qcgtoplevel.h
View file @
ca3d7a96
...
...
@@ -230,6 +230,7 @@ private:
QAction
*
_layoutRestore
,
*
_layoutSave
;
QAction
*
_upAction
,
*
_forwardAction
,
*
_backAction
;
QAction
*
_configureAction
,
*
_aboutAction
,
*
_aboutQtAction
;
QAction
*
_minimizeAction
,
*
_zoomAction
;
QComboBox
*
_eventTypeBox
;
TraceFunction
*
_function
;
...
...
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