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
4e97bdad
Commit
4e97bdad
authored
May 13, 2010
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MediaLibrary: Creating a new Widget to display the media library.
parent
16d29cd5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
136 additions
and
17 deletions
+136
-17
src/CMakeLists.txt
src/CMakeLists.txt
+3
-0
src/Gui/MainWindow.cpp
src/Gui/MainWindow.cpp
+8
-17
src/Gui/library/MediaLibrary.cpp
src/Gui/library/MediaLibrary.cpp
+41
-0
src/Gui/library/MediaLibrary.h
src/Gui/library/MediaLibrary.h
+47
-0
src/Gui/library/ui/MediaLibrary.ui
src/Gui/library/ui/MediaLibrary.ui
+37
-0
No files found.
src/CMakeLists.txt
View file @
4e97bdad
...
...
@@ -157,6 +157,7 @@ ELSE(NOT WITH_GUI)
Gui/import/ImportController.cpp
Gui/library/ListViewController.cpp
Gui/library/MediaCellView.cpp
Gui/library/MediaLibrary.cpp
Gui/library/MediaListView.cpp
Gui/library/StackViewController.cpp
Gui/library/StackViewNavController.cpp
...
...
@@ -205,6 +206,7 @@ ELSE(NOT WITH_GUI)
Gui/import/TagWidget.h
Gui/library/ListViewController.h
Gui/library/MediaCellView.h
Gui/library/MediaLibrary.h
Gui/library/MediaListView.h
Gui/library/StackViewController.h
Gui/library/StackViewNavController.h
...
...
@@ -252,6 +254,7 @@ ELSE(NOT WITH_GUI)
Gui/import/ui/ImportController.ui
Gui/library/StackViewNavController.ui
Gui/library/ui/MediaCellView.ui
Gui/library/ui/MediaLibrary.ui
Gui/library/ui/StackViewNavController.ui
Gui/ui/About.ui
Gui/ui/ClipProperty.ui
...
...
src/Gui/MainWindow.cpp
View file @
4e97bdad
...
...
@@ -4,7 +4,7 @@
* Copyright (C) 2008-2010 VideoLAN
*
* Authors: Ludovic Fauvet <etix@l0cal.com>
* Hugo Beauz
e
e-Luyssen <beauze.h@gmail.com>
* Hugo Beauz
é
e-Luyssen <beauze.h@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -46,7 +46,7 @@
/* Widgets */
#include "DockWidgetManager.h"
#include "ImportController.h"
#include "MediaLi
stView
.h"
#include "MediaLi
brary
.h"
#include "PreviewWidget.h"
#include "timeline/Timeline.h"
#include "timeline/TracksView.h"
...
...
@@ -272,29 +272,20 @@ MainWindow::loadVlmcPreferences( const QString &subPart )
void
MainWindow
::
setupLibrary
()
{
//GUI part :
QWidget
*
libraryWidget
=
new
QWidget
(
this
);
libraryWidget
->
setMinimumWidth
(
280
);
QPushButton
*
button
=
new
QPushButton
(
tr
(
"Import"
),
this
);
connect
(
button
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
on_actionImport_triggered
()
)
);
StackViewController
*
nav
=
new
StackViewController
(
libraryWidget
);
MediaListView
*
mediaView
=
new
MediaListView
(
nav
,
Library
::
getInstance
()
);
nav
->
pushViewController
(
mediaView
);
libraryWidget
->
layout
()
->
addWidget
(
button
);
m_importController
=
new
ImportController
();
const
ClipRenderer
*
clipRenderer
=
qobject_cast
<
const
ClipRenderer
*>
(
m_clipPreview
->
getGenericRenderer
()
);
Q_ASSERT
(
clipRenderer
!=
NULL
);
DockWidgetManager
::
getInstance
()
->
addDockedWidget
(
libraryWidget
,
QT_TRANSLATE_NOOP
(
"DockWidgetManager"
,
"Media Library"
),
MediaLibrary
*
mediaLibrary
=
new
MediaLibrary
();
DockWidgetManager
::
getInstance
()
->
addDockedWidget
(
mediaLibrary
,
QT_TRANSLATE_NOOP
(
"DockWidgetManager"
,
"Media Library"
),
Qt
::
AllDockWidgetAreas
,
QDockWidget
::
AllDockWidgetFeatures
,
Qt
::
LeftDockWidgetArea
);
connect
(
media
View
,
SIGNAL
(
clipSelected
(
Clip
*
)
),
connect
(
media
Library
,
SIGNAL
(
clipSelected
(
Clip
*
)
),
clipRenderer
,
SLOT
(
setClip
(
Clip
*
)
)
);
connect
(
mediaLibrary
,
SIGNAL
(
importRequired
()
),
this
,
SLOT
(
on_actionImport_triggered
()
)
);
connect
(
Library
::
getInstance
(),
SIGNAL
(
clipRemoved
(
const
QUuid
&
)
),
clipRenderer
,
SLOT
(
clipUnloaded
(
const
QUuid
&
)
)
);
}
...
...
src/Gui/library/MediaLibrary.cpp
0 → 100644
View file @
4e97bdad
/*****************************************************************************
* MediaLibrary.cpp: VLMC media library's ui
*****************************************************************************
* Copyright (C) 2008-2010 VideoLAN
*
* Authors: Hugo Beauzée-Luyssen <beauze.h@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "MediaLibrary.h"
#include "Library.h"
#include "MediaListView.h"
#include "StackViewController.h"
MediaLibrary
::
MediaLibrary
(
QWidget
*
parent
)
:
QWidget
(
parent
),
m_ui
(
new
Ui
::
MediaLibrary
()
)
{
m_ui
->
setupUi
(
this
);
StackViewController
*
nav
=
new
StackViewController
(
m_ui
->
mediaListContainer
);
MediaListView
*
mediaListView
=
new
MediaListView
(
nav
,
Library
::
getInstance
()
);
nav
->
pushViewController
(
mediaListView
);
connect
(
m_ui
->
importButton
,
SIGNAL
(
clicked
()
),
this
,
SIGNAL
(
importRequired
()
)
);
connect
(
mediaListView
,
SIGNAL
(
clipSelected
(
Clip
*
)
),
this
,
SIGNAL
(
clipSelected
(
Clip
*
)
)
);
}
src/Gui/library/MediaLibrary.h
0 → 100644
View file @
4e97bdad
/*****************************************************************************
* MediaLibrary.h: VLMC media library's ui
*****************************************************************************
* Copyright (C) 2008-2010 VideoLAN
*
* Authors: Hugo Beauzee-Luyssen <beauze.h@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef MEDIALIBRARY_H
#define MEDIALIBRARY_H
#include <QWidget>
#include "ui_MediaLibrary.h"
class
Clip
;
class
MediaLibrary
:
public
QWidget
{
Q_OBJECT
Q_DISABLE_COPY
(
MediaLibrary
);
public:
explicit
MediaLibrary
(
QWidget
*
parent
=
0
);
private:
Ui
::
MediaLibrary
*
m_ui
;
signals:
void
importRequired
();
void
clipSelected
(
Clip
*
);
};
#endif // MEDIALIBRARY_H
src/Gui/library/ui/MediaLibrary.ui
0 → 100644
View file @
4e97bdad
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
MediaLibrary
</class>
<widget
class=
"QWidget"
name=
"MediaLibrary"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
400
</width>
<height>
300
</height>
</rect>
</property>
<property
name=
"minimumSize"
>
<size>
<width>
280
</width>
<height>
0
</height>
</size>
</property>
<property
name=
"windowTitle"
>
<string>
Form
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item>
<widget
class=
"QWidget"
name=
"mediaListContainer"
native=
"true"
/>
</item>
<item>
<widget
class=
"QPushButton"
name=
"importButton"
>
<property
name=
"text"
>
<string>
Import
</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
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