Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLMC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
21
Issues
21
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VideoLAN
VLMC
Commits
daf161ad
Commit
daf161ad
authored
Oct 15, 2009
by
Clement CHAVANCE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Settings are now functionnals
parent
8b1a5ea8
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
52 additions
and
24 deletions
+52
-24
src/Configuration/SettingsManager.cpp
src/Configuration/SettingsManager.cpp
+1
-0
src/GUI/AudioProjectPreferences.cpp
src/GUI/AudioProjectPreferences.cpp
+1
-0
src/GUI/MainWindow.cpp
src/GUI/MainWindow.cpp
+26
-15
src/GUI/MainWindow.h
src/GUI/MainWindow.h
+2
-1
src/GUI/ProjectPreferences.cpp
src/GUI/ProjectPreferences.cpp
+1
-0
src/GUI/Settings.cpp
src/GUI/Settings.cpp
+11
-6
src/GUI/Settings.h
src/GUI/Settings.h
+1
-1
src/GUI/VLMCPreferences.cpp
src/GUI/VLMCPreferences.cpp
+1
-0
src/GUI/VideoProjectPreferences.cpp
src/GUI/VideoProjectPreferences.cpp
+1
-0
src/GUI/ui/MainWindow.ui
src/GUI/ui/MainWindow.ui
+7
-1
No files found.
src/Configuration/SettingsManager.cpp
View file @
daf161ad
...
...
@@ -93,6 +93,7 @@ void SettingsManager::saveSettings( QDomDocument& xmlfile, QDomElement& root )
void
SettingsManager
::
loadSettings
(
const
QDomElement
&
settings
)
{
qDebug
()
<<
"Loading settings"
;
if
(
settings
.
isNull
()
==
true
||
settings
.
tagName
()
!=
"settings"
)
{
qWarning
()
<<
"Invalid settings node"
;
...
...
src/GUI/AudioProjectPreferences.cpp
View file @
daf161ad
...
...
@@ -35,6 +35,7 @@ AudioProjectPreferences::~AudioProjectPreferences() { }
void
AudioProjectPreferences
::
load
()
{
qDebug
()
<<
"Loading preferences : Audio"
;
int
sampleRate
=
SettingsManager
::
getInstance
()
->
getValue
(
"AudioSampleRate"
).
toInt
();
m_ui
.
SampleRate
->
setValue
(
sampleRate
);
...
...
src/GUI/MainWindow.cpp
View file @
daf161ad
...
...
@@ -60,6 +60,7 @@ MainWindow::MainWindow( QWidget *parent ) :
initializeDockWidgets
();
createStatusBar
();
createGlobalPreferences
();
createProjectPreferences
();
// Translations
connect
(
this
,
SIGNAL
(
translateDockWidgetTitle
()
),
...
...
@@ -293,6 +294,24 @@ void MainWindow::createGlobalPreferences()
m_globalPreferences
->
build
();
}
void
MainWindow
::
createProjectPreferences
()
{
m_projectPreferences
=
new
Settings
(
);
m_projectPreferences
->
addWidget
(
"Project"
,
new
ProjectPreferences
,
"../images/vlmc.png"
,
"Project settings"
);
m_projectPreferences
->
addWidget
(
"Video"
,
new
VideoProjectPreferences
,
"../images/scalable/video.svg"
,
"Video settings"
);
m_projectPreferences
->
addWidget
(
"Audio"
,
new
AudioProjectPreferences
,
"../images/scalable/audio.svg"
,
"Audio settings"
);
m_projectPreferences
->
build
();
}
//Private slots definition
void
MainWindow
::
on_actionQuit_triggered
()
...
...
@@ -342,21 +361,8 @@ void MainWindow::on_actionNew_Project_triggered()
{
//TODO : clear the library, the timeline, and show the configuration box
//of the newly created project
m_projectPreferences
=
new
Settings
(
);
m_projectPreferences
->
addWidget
(
"Project"
,
new
ProjectPreferences
,
"../images/vlmc.png"
,
"Project settings"
);
m_projectPreferences
->
addWidget
(
"Video"
,
new
VideoProjectPreferences
,
"../images/scalable/video.svg"
,
"Video settings"
);
m_projectPreferences
->
addWidget
(
"Audio"
,
new
AudioProjectPreferences
,
"../images/scalable/audio.svg"
,
"Audio settings"
);
m_projectPreferences
->
build
();
m_projectPreferences
->
exec
();
m_projectPreferences
->
show
();
}
void
MainWindow
::
on_actionHelp_triggered
()
...
...
@@ -398,3 +404,8 @@ void MainWindow::toolButtonClicked( int id )
{
emit
toolChanged
(
(
ToolButtons
)
id
);
}
void
MainWindow
::
on_actionProject_Preferences_triggered
()
{
m_projectPreferences
->
show
();
}
src/GUI/MainWindow.h
View file @
daf161ad
...
...
@@ -63,7 +63,7 @@ private:
void
setupLibrary
();
void
createStatusBar
();
void
createGlobalPreferences
();
void
createProjectPreferences
();
Ui
::
MainWindow
m_ui
;
MetaDataManager
*
m_metaDataManager
;
...
...
@@ -86,6 +86,7 @@ private slots:
void
on_actionLoad_Project_triggered
();
void
on_actionSave_triggered
();
void
on_actionHelp_triggered
();
void
on_actionProject_Preferences_triggered
();
void
mediaListItemDoubleClicked
(
QListWidgetItem
*
);
void
toolButtonClicked
(
int
id
);
...
...
src/GUI/ProjectPreferences.cpp
View file @
daf161ad
...
...
@@ -40,6 +40,7 @@ ProjectPreferences::~ProjectPreferences() { }
void
ProjectPreferences
::
load
()
{
qDebug
()
<<
"Loading preferences : Project"
;
QString
Name
=
SettingsManager
::
getInstance
()
->
getValue
(
"ProjectName"
).
toString
();
QString
Dir
=
SettingsManager
::
getInstance
()
->
getValue
(
"ProjectDirectory"
).
toString
();
...
...
src/GUI/Settings.cpp
View file @
daf161ad
...
...
@@ -43,13 +43,17 @@ Settings::Settings( QWidget* parent, Qt::WindowFlags f )
{
m_panel
=
new
Panel
(
this
);
m_stackedWidgets
=
new
QStackedWidget
(
this
);
connect
(
m_panel
,
QObject
::
connect
(
m_panel
,
SIGNAL
(
changePanel
(
int
)
),
SLOT
(
switchWidget
(
int
)
)
);
QObject
::
connect
(
this
,
SIGNAL
(
widgetSwitched
(
int
)
),
m_stackedWidgets
,
SLOT
(
setCurrentIndex
(
int
)
));
QObject
::
connect
(
SettingsManager
::
getInstance
(),
SIGNAL
(
settingsLoaded
()
),
this
,
SLOT
(
load
()
)
);
}
Settings
::~
Settings
()
...
...
@@ -64,11 +68,8 @@ void Settings::addWidget( const QString& name,
const
QString
&
icon
,
const
QString
&
label
)
{
qDebug
()
<<
"calling SettingsManager::addWidget()"
;
m_stackedWidgets
->
addWidget
(
pWidget
);
QObject
::
connect
(
SettingsManager
::
getInstance
(),
SIGNAL
(
settingsLoaded
()
),
this
,
SLOT
(
loadSettings
()
)
);
int
idx
=
m_stackedWidgets
->
indexOf
(
pWidget
);
m_widgets
.
insert
(
idx
,
name
);
...
...
@@ -175,6 +176,10 @@ void Settings::switchWidget( int widget )
emit
widgetSwitched
(
widget
);
}
void
Settings
::
load
Settings
()
void
Settings
::
load
()
{
qDebug
()
<<
"Pwid size :"
<<
m_pWidgets
.
size
();
PreferenceWidget
*
pwidg
;
foreach
(
pwidg
,
m_pWidgets
)
pwidg
->
load
();
}
src/GUI/Settings.h
View file @
daf161ad
...
...
@@ -67,7 +67,7 @@ class Settings : public QDialog
public
slots
:
void
switchWidget
(
int
widget
);
void
load
Settings
();
void
load
();
private
slots
:
void
buttonClicked
(
QAbstractButton
*
button
);
...
...
src/GUI/VLMCPreferences.cpp
View file @
daf161ad
...
...
@@ -35,6 +35,7 @@ VLMCPreferences::~VLMCPreferences() { }
void
VLMCPreferences
::
load
()
{
qDebug
()
<<
"Loading Prefs : VLMC"
;
QString
outputFPS
=
SettingsManager
::
getInstance
()
->
getValue
(
"VLMCOutPutFPS"
).
toString
();
QString
previewFPS
=
SettingsManager
::
getInstance
()
->
getValue
(
"VLMCPreviewFPS"
).
toString
();
QString
tracksNb
=
SettingsManager
::
getInstance
()
->
getValue
(
"VLMCTracksNb"
).
toString
();
...
...
src/GUI/VideoProjectPreferences.cpp
View file @
daf161ad
...
...
@@ -35,6 +35,7 @@ VideoProjectPreferences::~VideoProjectPreferences() { }
void
VideoProjectPreferences
::
load
()
{
qDebug
()
<<
"Loading Prefs : VideoProject"
;
int
projectFps
=
SettingsManager
::
getInstance
()
->
getValue
(
"VideoProjectFPS"
).
toInt
();
int
projectHeight
=
SettingsManager
::
getInstance
()
->
getValue
(
"VideoProjectHeight"
).
toInt
();
int
projectWidth
=
SettingsManager
::
getInstance
()
->
getValue
(
"VideoProjectWidth"
).
toInt
();
...
...
src/GUI/ui/MainWindow.ui
View file @
daf161ad
...
...
@@ -27,7 +27,7 @@
<x>
0
</x>
<y>
0
</y>
<width>
800
</width>
<height>
2
1
</height>
<height>
2
4
</height>
</rect>
</property>
<widget
class=
"QMenu"
name=
"menuFile"
>
...
...
@@ -45,6 +45,7 @@
<string>
Edit
</string>
</property>
<addaction
name=
"actionPreferences"
/>
<addaction
name=
"actionProject_Preferences"
/>
</widget>
<widget
class=
"QMenu"
name=
"menuView"
>
<property
name=
"title"
>
...
...
@@ -177,6 +178,11 @@
<string>
Save
</string>
</property>
</action>
<action
name=
"actionProject_Preferences"
>
<property
name=
"text"
>
<string>
Project Preferences
</string>
</property>
</action>
</widget>
<resources>
<include
location=
"../../../ressources.qrc"
/>
...
...
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