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
8ea45a58
Commit
8ea45a58
authored
Mar 31, 2014
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MainWindow: Connect to projectLoaded event
parent
7c57a78c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
15 deletions
+22
-15
src/Gui/MainWindow.cpp
src/Gui/MainWindow.cpp
+19
-14
src/Gui/MainWindow.h
src/Gui/MainWindow.h
+3
-1
No files found.
src/Gui/MainWindow.cpp
View file @
8ea45a58
...
...
@@ -75,6 +75,7 @@ MainWindow::MainWindow( Backend::IBackend* backend, QWidget *parent )
:
QMainWindow
(
parent
)
,
m_backend
(
backend
)
,
m_fileRenderer
(
NULL
)
,
m_projectPreferences
(
NULL
)
,
m_wizard
(
NULL
)
{
m_ui
.
setupUi
(
this
);
...
...
@@ -88,7 +89,6 @@ MainWindow::MainWindow( Backend::IBackend* backend, QWidget *parent )
// GUI
DockWidgetManager
::
getInstance
(
this
)
->
setMainWindow
(
this
);
createGlobalPreferences
();
createProjectPreferences
();
initializeDockWidgets
();
initToolbar
();
createStatusBar
();
...
...
@@ -108,17 +108,6 @@ MainWindow::MainWindow( Backend::IBackend* backend, QWidget *parent )
connect
(
this
,
SIGNAL
(
toolChanged
(
ToolButtons
)
),
m_timeline
,
SLOT
(
setTool
(
ToolButtons
)
)
);
connect
(
Project
::
getInstance
(),
SIGNAL
(
projectUpdated
(
const
QString
&
,
bool
)
),
this
,
SLOT
(
projectUpdated
(
const
QString
&
,
bool
)
)
);
// Undo/Redo
connect
(
Project
::
getInstance
()
->
undoStack
(),
SIGNAL
(
canRedoChanged
(
bool
)
),
this
,
SLOT
(
canRedoChanged
(
bool
)
)
);
connect
(
Project
::
getInstance
()
->
undoStack
(),
SIGNAL
(
canUndoChanged
(
bool
)
),
this
,
SLOT
(
canUndoChanged
(
bool
)
)
);
canRedoChanged
(
Project
::
getInstance
()
->
undoStack
()
->
canRedo
()
);
canUndoChanged
(
Project
::
getInstance
()
->
undoStack
()
->
canUndo
()
);
//Connecting Library stuff:
const
ClipRenderer
*
clipRenderer
=
qobject_cast
<
const
ClipRenderer
*>
(
m_clipPreview
->
getGenericRenderer
()
);
Q_ASSERT
(
clipRenderer
!=
NULL
);
...
...
@@ -126,8 +115,7 @@ MainWindow::MainWindow( Backend::IBackend* backend, QWidget *parent )
clipRenderer
,
SLOT
(
setClip
(
Clip
*
)
)
);
connect
(
m_mediaLibrary
,
SIGNAL
(
importRequired
()
),
this
,
SLOT
(
on_actionImport_triggered
()
)
);
connect
(
Project
::
getInstance
()
->
library
(),
SIGNAL
(
clipRemoved
(
const
QUuid
&
)
),
clipRenderer
,
SLOT
(
clipUnloaded
(
const
QUuid
&
)
)
);
#ifdef WITH_CRASHHANDLER
if
(
restoreSession
()
==
true
)
...
...
@@ -530,6 +518,7 @@ MainWindow::loadGlobalProxySettings()
void
MainWindow
::
createProjectPreferences
()
{
delete
m_projectPreferences
;
m_projectPreferences
=
new
SettingsDialog
(
Project
::
getInstance
()
->
settings
(),
tr
(
"Project preferences"
),
this
);
m_projectPreferences
->
addCategory
(
"general"
,
QT_TRANSLATE_NOOP
(
"Settings"
,
"General"
),
QIcon
(
":/images/vlmc"
)
);
m_projectPreferences
->
addCategory
(
"video"
,
QT_TRANSLATE_NOOP
(
"Settings"
,
"Video"
),
QIcon
(
":/images/video"
)
);
...
...
@@ -846,6 +835,22 @@ MainWindow::canRedoChanged( bool canRedo )
m_ui
.
actionRedo
->
setEnabled
(
canRedo
);
}
void
MainWindow
::
onProjectLoaded
(
Project
*
project
)
{
createProjectPreferences
();
connect
(
project
,
SIGNAL
(
projectUpdated
(
const
QString
&
,
bool
)
),
this
,
SLOT
(
projectUpdated
(
const
QString
&
,
bool
)
)
);
// Undo/Redo
connect
(
project
->
undoStack
(),
SIGNAL
(
canUndoChanged
(
bool
)
),
this
,
SLOT
(
canUndoChanged
(
bool
)
)
);
connect
(
project
->
undoStack
(),
SIGNAL
(
canRedoChanged
(
bool
)
),
this
,
SLOT
(
canRedoChanged
(
bool
)
)
);
canUndoChanged
(
project
->
undoStack
()
->
canUndo
()
);
canRedoChanged
(
project
->
undoStack
()
->
canRedo
()
);
const
ClipRenderer
*
clipRenderer
=
qobject_cast
<
const
ClipRenderer
*>
(
m_clipPreview
->
getGenericRenderer
()
);
connect
(
project
->
library
(),
SIGNAL
(
clipRemoved
(
const
QUuid
&
)
),
clipRenderer
,
SLOT
(
clipUnloaded
(
const
QUuid
&
)
)
);
}
#ifdef WITH_CRASHBUTTON
void
MainWindow
::
setupCrashTester
()
...
...
src/Gui/MainWindow.h
View file @
8ea45a58
...
...
@@ -36,6 +36,7 @@ class EffectsListView;
class
ImportController
;
class
MediaLibrary
;
class
PreviewWidget
;
class
Project
;
class
ProjectWizard
;
class
SettingsDialog
;
class
Timeline
;
...
...
@@ -128,7 +129,7 @@ private:
PreviewWidget
*
m_clipPreview
;
PreviewWidget
*
m_projectPreview
;
WorkflowFileRenderer
*
m_fileRenderer
;
WorkflowRenderer
*
m_renderer
;
WorkflowRenderer
*
m_renderer
;
SettingsDialog
*
m_globalPreferences
;
SettingsDialog
*
m_DefaultProjectPreferences
;
SettingsDialog
*
m_projectPreferences
;
...
...
@@ -159,6 +160,7 @@ private slots:
void
cleanStateChanged
(
bool
isClean
);
void
canUndoChanged
(
bool
canUndo
);
void
canRedoChanged
(
bool
canRedo
);
void
onProjectLoaded
(
Project
*
project
);
signals:
void
toolChanged
(
ToolButtons
);
...
...
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