Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Tobias Hunger
qt-creator
Commits
76b33410
Commit
76b33410
authored
Jan 19, 2009
by
hjk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement "real" full screen mode
parent
cc5ff1ec
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
1 deletion
+29
-1
src/plugins/coreplugin/coreconstants.h
src/plugins/coreplugin/coreconstants.h
+2
-0
src/plugins/coreplugin/mainwindow.cpp
src/plugins/coreplugin/mainwindow.cpp
+25
-1
src/plugins/coreplugin/mainwindow.h
src/plugins/coreplugin/mainwindow.h
+2
-0
No files found.
src/plugins/coreplugin/coreconstants.h
View file @
76b33410
...
...
@@ -120,6 +120,7 @@ const char * const EXIT = "QtCreator.Exit";
const
char
*
const
OPTIONS
=
"QtCreator.Options"
;
const
char
*
const
TOGGLE_SIDEBAR
=
"QtCreator.ToggleSidebar"
;
const
char
*
const
TOGGLE_FULLSCREEN
=
"QtCreator.ToggleFullScreen"
;
const
char
*
const
MINIMIZE_WINDOW
=
"QtCreator.MinimizeWindow"
;
const
char
*
const
ZOOM_WINDOW
=
"QtCreator.ZoomWindow"
;
...
...
@@ -187,6 +188,7 @@ const char * const G_WINDOW_NAVIGATE = "QtCreator.Group.Window.Navigate";
const
char
*
const
G_WINDOW_NAVIGATE_GROUPS
=
"QtCreator.Group.Window.Navigate.Groups"
;
const
char
*
const
G_WINDOW_OTHER
=
"QtCreator.Group.Window.Other"
;
const
char
*
const
G_WINDOW_LIST
=
"QtCreator.Group.Window.List"
;
const
char
*
const
G_WINDOW_FULLSCREEN
=
"QtCreator.Group.Window.Fullscreen"
;
// help groups (global)
const
char
*
const
G_HELP_HELP
=
"QtCreator.Group.Help.Help"
;
...
...
src/plugins/coreplugin/mainwindow.cpp
View file @
76b33410
...
...
@@ -143,6 +143,7 @@ MainWindow::MainWindow() :
m_exitAction
(
0
),
m_optionsAction
(
0
),
m_toggleSideBarAction
(
0
),
m_toggleFullScreenAction
(
0
),
#ifdef Q_OS_MAC
m_minimizeAction
(
0
),
m_zoomAction
(
0
),
...
...
@@ -448,7 +449,6 @@ void MainWindow::registerDefaultActions()
ActionContainer
*
medit
=
am
->
actionContainer
(
Constants
::
M_EDIT
);
ActionContainer
*
mtools
=
am
->
actionContainer
(
Constants
::
M_TOOLS
);
ActionContainer
*
mwindow
=
am
->
actionContainer
(
Constants
::
M_WINDOW
);
Q_UNUSED
(
mwindow
)
ActionContainer
*
mhelp
=
am
->
actionContainer
(
Constants
::
M_HELP
);
// File menu separators
...
...
@@ -641,6 +641,17 @@ void MainWindow::registerDefaultActions()
mwindow
->
addAction
(
cmd
,
Constants
::
G_WINDOW_PANES
);
m_toggleSideBarAction
->
setEnabled
(
false
);
// Toggle Full Screen
m_toggleFullScreenAction
=
new
QAction
(
tr
(
"Toggle Fullscreen"
),
this
);
m_toggleFullScreenAction
->
setCheckable
(
true
);
m_toggleFullScreenAction
->
setChecked
(
true
);
cmd
=
am
->
registerAction
(
m_toggleFullScreenAction
,
Constants
::
TOGGLE_FULLSCREEN
,
m_globalContext
);
cmd
->
setDefaultKeySequence
(
QKeySequence
(
"Ctrl+Shift+F11"
));
mwindow
->
addAction
(
cmd
,
Constants
::
G_WINDOW_FULLSCREEN
);
connect
(
m_toggleFullScreenAction
,
SIGNAL
(
toggled
(
bool
)),
this
,
SLOT
(
setFullScreen
(
bool
)));
//About IDE Action
#ifdef Q_OS_MAC
tmpaction
=
new
QAction
(
tr
(
"About &Qt Creator"
),
this
);
// it's convention not to add dots to the about menu
...
...
@@ -1113,3 +1124,16 @@ QPrinter *MainWindow::printer() const
m_printer
=
new
QPrinter
(
QPrinter
::
HighResolution
);
return
m_printer
;
}
void
MainWindow
::
setFullScreen
(
bool
on
)
{
if
(
on
)
{
setWindowState
(
windowState
()
|
Qt
::
WindowFullScreen
);
//statusBar()->hide();
//menuBar()->hide();
}
else
{
setWindowState
(
windowState
()
&
~
Qt
::
WindowFullScreen
);
//menuBar()->show();
//statusBar()->show();
}
}
src/plugins/coreplugin/mainwindow.h
View file @
76b33410
...
...
@@ -137,6 +137,7 @@ public slots:
void
newFile
();
void
openFileWith
();
void
exit
();
void
setFullScreen
(
bool
on
);
QStringList
showNewItemDialog
(
const
QString
&
title
,
const
QList
<
IWizard
*>
&
wizards
,
...
...
@@ -213,6 +214,7 @@ private:
QAction
*
m_exitAction
;
QAction
*
m_optionsAction
;
QAction
*
m_toggleSideBarAction
;
QAction
*
m_toggleFullScreenAction
;
#ifdef Q_OS_MAC
QAction
*
m_minimizeAction
;
QAction
*
m_zoomAction
;
...
...
Write
Preview
Markdown
is supported
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