Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLMC
Manage
Activity
Members
Labels
Plan
Issues
26
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLMC
Commits
b2a97323
Commit
b2a97323
authored
8 years ago
by
luyikei
Browse files
Options
Downloads
Patches
Plain Diff
MainWindow: QActions for the toolbar and the statusbar to show or hide
parent
161f10a7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Gui/MainWindow.cpp
+22
-2
22 additions, 2 deletions
src/Gui/MainWindow.cpp
src/Gui/ui/MainWindow.ui
+19
-7
19 additions, 7 deletions
src/Gui/ui/MainWindow.ui
with
41 additions
and
9 deletions
src/Gui/MainWindow.cpp
+
22
−
2
View file @
b2a97323
...
...
@@ -84,9 +84,9 @@ MainWindow::MainWindow( Backend::IBackend* backend, QWidget *parent )
// GUI
createGlobalPreferences
();
initializeDockWidgets
();
initToolbar
();
createStatusBar
();
initializeDockWidgets
();
checkFolders
();
loadGlobalProxySettings
();
createProjectPreferences
();
...
...
@@ -323,6 +323,26 @@ MainWindow::initVlmcPreferences()
VLMC_CREATE_PRIVATE_PREFERENCE_STRING
(
"private/ImportPreviouslySelectPath"
,
QDir
::
homePath
()
);
VLMC_CREATE_PRIVATE_PREFERENCE_BYTEARRAY
(
"private/MainWindowGeometry"
,
""
);
VLMC_CREATE_PRIVATE_PREFERENCE_BYTEARRAY
(
"private/MainWindowState"
,
""
);
// Toolbar
auto
toolbarSetting
=
VLMC_CREATE_PRIVATE_PREFERENCE_BOOL
(
"private/ShowToolbar"
,
false
);
connect
(
toolbarSetting
,
&
SettingValue
::
changed
,
this
,
[
this
](
const
QVariant
&
var
)
{
bool
v
=
var
.
toBool
();
m_ui
.
toolBar
->
setVisible
(
v
);
m_ui
.
actionToolbar
->
setChecked
(
v
);
}
);
connect
(
m_ui
.
actionToolbar
,
&
QAction
::
toggled
,
toolbarSetting
,
&
SettingValue
::
set
);
// Statusbar
auto
statusbarSetting
=
VLMC_CREATE_PRIVATE_PREFERENCE_BOOL
(
"private/ShowStatusbar"
,
false
);
connect
(
statusbarSetting
,
&
SettingValue
::
changed
,
this
,
[
this
](
const
QVariant
&
var
)
{
bool
v
=
var
.
toBool
();
m_ui
.
statusbar
->
setVisible
(
v
);
m_ui
.
actionStatusbar
->
setChecked
(
v
);
}
);
connect
(
m_ui
.
actionStatusbar
,
&
QAction
::
toggled
,
statusbarSetting
,
&
SettingValue
::
set
);
}
#undef CREATE_MENU_SHORTCUT
...
...
@@ -721,7 +741,7 @@ MainWindow::on_actionFullscreen_triggered( bool checked )
void
MainWindow
::
registerWidgetInWindowMenu
(
QDockWidget
*
widget
)
{
m_ui
.
menu
Window
->
addAction
(
widget
->
toggleViewAction
()
);
m_ui
.
menu
View
->
insertAction
(
m_ui
.
actionFullscreen
,
widget
->
toggleViewAction
()
);
}
void
...
...
This diff is collapsed.
Click to expand it.
src/Gui/ui/MainWindow.ui
+
19
−
7
View file @
b2a97323
...
...
@@ -71,15 +71,12 @@
<addaction
name=
"separator"
/>
<addaction
name=
"actionQuit"
/>
</widget>
<widget
class=
"QMenu"
name=
"menuWindow"
>
<property
name=
"title"
>
<string>
&
Window
</string>
</property>
</widget>
<widget
class=
"QMenu"
name=
"menuView"
>
<property
name=
"title"
>
<string>
&
View
</string>
</property>
<addaction
name=
"actionToolbar"
/>
<addaction
name=
"actionStatusbar"
/>
<addaction
name=
"actionFullscreen"
/>
</widget>
<widget
class=
"QMenu"
name=
"menuTools"
>
...
...
@@ -91,7 +88,6 @@
<addaction
name=
"menuEdit"
/>
<addaction
name=
"menuTools"
/>
<addaction
name=
"menuView"
/>
<addaction
name=
"menuWindow"
/>
<addaction
name=
"menuHelp"
/>
</widget>
<widget
class=
"QStatusBar"
name=
"statusbar"
/>
...
...
@@ -362,7 +358,23 @@
</property>
<property
name=
"statusTip"
>
<string>
Use the Scissor Tool to cut regions in the timeline
</string>
</property>
</property>
</action>
<action
name=
"actionStatusbar"
>
<property
name=
"checkable"
>
<bool>
true
</bool>
</property>
<property
name=
"text"
>
<string>
Statusbar
</string>
</property>
</action>
<action
name=
"actionToolbar"
>
<property
name=
"checkable"
>
<bool>
true
</bool>
</property>
<property
name=
"text"
>
<string>
Toolbar
</string>
</property>
</action>
</widget>
<resources>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment