Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLMC
Commits
21d2a808
Commit
21d2a808
authored
Sep 14, 2009
by
Ludovic Fauvet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup
parent
72e9f57e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
20 deletions
+9
-20
src/GUI/MainWindow.cpp
src/GUI/MainWindow.cpp
+2
-13
src/GUI/Settings.cpp
src/GUI/Settings.cpp
+4
-4
src/GUI/Settings.h
src/GUI/Settings.h
+3
-3
No files found.
src/GUI/MainWindow.cpp
View file @
21d2a808
...
...
@@ -60,7 +60,7 @@ MainWindow::MainWindow( QWidget *parent ) :
createStatusBar
();
createGlobalPreferences
();
// Translation
// Translation
s
connect
(
this
,
SIGNAL
(
translateDockWidgetTitle
()
),
DockWidgetManager
::
instance
(),
SLOT
(
transLateWidgetTitle
()
)
);
...
...
@@ -73,12 +73,6 @@ MainWindow::MainWindow( QWidget *parent ) :
this
,
SLOT
(
zoomOut
()
)
);
connect
(
this
,
SIGNAL
(
toolChanged
(
ToolButtons
)
),
m_timeline
,
SLOT
(
setTool
(
ToolButtons
)
)
);
//Global Preferences
QObject
::
connect
(
qApp
,
SIGNAL
(
aboutToQuit
()
),
m_globalPreferences
,
SLOT
(
deleteLater
()
)
);
}
MainWindow
::~
MainWindow
()
...
...
@@ -276,16 +270,11 @@ void MainWindow::initializeDockWidgets( void )
void
MainWindow
::
createGlobalPreferences
()
{
m_globalPreferences
=
new
Settings
(
);
m_globalPreferences
=
new
Settings
(
this
);
m_globalPreferences
->
addWidget
(
"VLMC"
,
new
VLMCPreferences
,
"../images/vlmc.png"
,
"VLMC settings"
);
////For debugging purpose
//m_globalPreferences->addWidget("Test",
// new QLabel("This is a test"),
// "images/vlmc.png",
// "Test");
m_globalPreferences
->
build
();
}
...
...
src/GUI/Settings.cpp
View file @
21d2a808
...
...
@@ -37,8 +37,8 @@
#include "Panel.h"
Settings
::
Settings
(
QWidget
*
parent
)
:
Q
Widget
(
parent
),
Settings
::
Settings
(
QWidget
*
parent
,
Qt
::
WindowFlags
f
)
:
Q
Dialog
(
parent
,
f
),
m_currentWidget
(
NULL
),
m_panel
(
NULL
),
m_title
(
NULL
),
...
...
@@ -120,7 +120,7 @@ QVBoxLayout* Settings::buildRightHLayout()
layout
->
addWidget
(
m_stackedWidgets
);
layout
->
addWidget
(
m_buttons
);
return
(
layout
);
}
}
void
Settings
::
save
(
void
)
{
...
...
@@ -149,7 +149,7 @@ void Settings::switchWidget( int widget )
{
//TODO : Change the title of the preferences shown
//Hide the current widget and show the new one.
if
(
!
m_widgets
.
contains
(
widget
)
)
return
;
m_title
->
setText
(
m_widgets
.
value
(
widget
)
);
...
...
src/GUI/Settings.h
View file @
21d2a808
...
...
@@ -23,7 +23,7 @@
#ifndef SIMPLEPREFERENCES_H
#define SIMPLEPREFERENCES_H
#include <Q
Widget
>
#include <Q
Dialog
>
#include <QString>
#include <QHash>
#include <QLabel>
...
...
@@ -37,13 +37,13 @@
#include "Panel.h"
#include "PreferenceWidget.h"
class
Settings
:
public
Q
Widget
class
Settings
:
public
Q
Dialog
{
Q_OBJECT
Q_DISABLE_COPY
(
Settings
)
public:
Settings
(
QWidget
*
parent
=
0
);
Settings
(
QWidget
*
parent
=
0
,
Qt
::
WindowFlags
f
=
0
);
~
Settings
();
void
addWidget
(
const
QString
&
name
,
PreferenceWidget
*
pWidget
,
...
...
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