[vlmc-devel] commit: Use forward declarations. (Hugo Beauzee-Luyssen )
git at videolan.org
git at videolan.org
Tue Mar 16 02:56:36 CET 2010
vlmc | branch: master | Hugo Beauzee-Luyssen <beauze.h at gmail.com> | Tue Mar 16 02:56:30 2010 +0100| [985c9baaa89c5f9c4de4ec48a086345f7c8578f7] | committer: Hugo Beauzee-Luyssen
Use forward declarations.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=985c9baaa89c5f9c4de4ec48a086345f7c8578f7
---
src/Commands/Commands.h | 3 ++-
src/Gui/ClipProperty.cpp | 1 +
src/Gui/ClipProperty.h | 3 ++-
src/Gui/import/ImportController.cpp | 7 ++++++-
src/Gui/import/ImportController.h | 14 ++++++++------
src/Gui/import/TagWidget.cpp | 1 +
src/Gui/import/TagWidget.h | 3 ++-
src/Gui/library/MediaCellView.cpp | 3 ++-
src/Gui/library/StackViewController.h | 1 -
src/Gui/timeline/GraphicsMovieItem.cpp | 7 +++++++
src/Gui/timeline/GraphicsMovieItem.h | 5 +++--
11 files changed, 34 insertions(+), 14 deletions(-)
diff --git a/src/Commands/Commands.h b/src/Commands/Commands.h
index b9a169b..684d6eb 100644
--- a/src/Commands/Commands.h
+++ b/src/Commands/Commands.h
@@ -29,7 +29,8 @@
#include <QVector>
#include "UndoStack.h"
#include "MainWorkflow.h"
-#include "Clip.h"
+
+class Clip;
#define NEW_COMMAND(x) class x : public QUndoCommand
diff --git a/src/Gui/ClipProperty.cpp b/src/Gui/ClipProperty.cpp
index 1dd8423..5696d3d 100644
--- a/src/Gui/ClipProperty.cpp
+++ b/src/Gui/ClipProperty.cpp
@@ -24,6 +24,7 @@
#include "ClipProperty.h"
#include "ui_ClipProperty.h"
#include "Media.h"
+#include "Clip.h"
#include <QTime>
#include <QPushButton>
diff --git a/src/Gui/ClipProperty.h b/src/Gui/ClipProperty.h
index 5a8b28a..7022640 100644
--- a/src/Gui/ClipProperty.h
+++ b/src/Gui/ClipProperty.h
@@ -26,9 +26,10 @@
#include <QDialog>
#include <QStringListModel>
-#include "Clip.h"
#include <QAbstractButton>
+class Clip;
+
namespace Ui {
class ClipProperty;
}
diff --git a/src/Gui/import/ImportController.cpp b/src/Gui/import/ImportController.cpp
index fd44918..6a6884d 100644
--- a/src/Gui/import/ImportController.cpp
+++ b/src/Gui/import/ImportController.cpp
@@ -24,13 +24,18 @@
#include "ui_ImportController.h"
+#include "Clip.h"
#include "ClipRenderer.h"
#include "ImportController.h"
#include "Library.h"
-#include "MetaDataManager.h"
+#include "Media.h"
#include "MediaCellView.h"
#include "MediaListView.h"
+#include "MetaDataManager.h"
+#include "PreviewWidget.h"
+#include "TagWidget.h"
+#include <QFileSystemModel>
#include <QPalette>
#include <QSettings>
#include <QTime>
diff --git a/src/Gui/import/ImportController.h b/src/Gui/import/ImportController.h
index 271903a..64a41c3 100644
--- a/src/Gui/import/ImportController.h
+++ b/src/Gui/import/ImportController.h
@@ -30,19 +30,21 @@
#ifndef IMPORTCONTROLLER_H
#define IMPORTCONTROLLER_H
-#include "Clip.h"
-#include "Media.h"
-#include "PreviewWidget.h"
#include "StackViewController.h"
-#include "TagWidget.h"
#include <QDialog>
-#include <QFileSystemModel>
-#include <QProgressDialog>
+#include <QUuid>
+class Clip;
+class Media;
class ClipRenderer;
class MediaContainer;
class MediaListView;
+class PreviewWidget;
+class TagWidget;
+
+class QFileSystemModel;
+class QModelIndex;
namespace Ui
{
diff --git a/src/Gui/import/TagWidget.cpp b/src/Gui/import/TagWidget.cpp
index 2f2554e..0b6c05b 100644
--- a/src/Gui/import/TagWidget.cpp
+++ b/src/Gui/import/TagWidget.cpp
@@ -25,6 +25,7 @@
#include "ui_TagWidget.h"
#include "Media.h"
+#include "Clip.h"
#include <QPushButton>
diff --git a/src/Gui/import/TagWidget.h b/src/Gui/import/TagWidget.h
index da4bb1d..a7e241f 100644
--- a/src/Gui/import/TagWidget.h
+++ b/src/Gui/import/TagWidget.h
@@ -28,7 +28,8 @@
#include <QStringList>
#include <QFileInfo>
#include <QCompleter>
-#include "Clip.h"
+
+class Clip;
namespace Ui
{
diff --git a/src/Gui/library/MediaCellView.cpp b/src/Gui/library/MediaCellView.cpp
index 20ab2b6..435a327 100644
--- a/src/Gui/library/MediaCellView.cpp
+++ b/src/Gui/library/MediaCellView.cpp
@@ -24,9 +24,10 @@
#include "MediaCellView.h"
#include "ui_MediaCellView.h"
+#include "Clip.h"
+#include "ClipProperty.h"
#include "Media.h"
#include "Library.h"
-#include "ClipProperty.h"
#include <QTime>
diff --git a/src/Gui/library/StackViewController.h b/src/Gui/library/StackViewController.h
index 2f1154d..34721d4 100644
--- a/src/Gui/library/StackViewController.h
+++ b/src/Gui/library/StackViewController.h
@@ -27,7 +27,6 @@
#include <QPushButton>
#include <QHBoxLayout>
#include <QLabel>
-#include <QDebug>
#include <QStack>
#include "StackViewNavController.h"
diff --git a/src/Gui/timeline/GraphicsMovieItem.cpp b/src/Gui/timeline/GraphicsMovieItem.cpp
index 499c36d..cdcde29 100644
--- a/src/Gui/timeline/GraphicsMovieItem.cpp
+++ b/src/Gui/timeline/GraphicsMovieItem.cpp
@@ -26,6 +26,7 @@
#include <QTime>
#include <QFontMetrics>
+#include "Clip.h"
#include "GraphicsMovieItem.h"
#include "Media.h"
#include "TracksView.h"
@@ -233,3 +234,9 @@ void GraphicsMovieItem::mouseReleaseEvent( QGraphicsSceneMouseEvent* event )
setCursor( Qt::OpenHandCursor );
}
+
+const QUuid&
+GraphicsMovieItem::uuid() const
+{
+ return m_clip->uuid();
+}
diff --git a/src/Gui/timeline/GraphicsMovieItem.h b/src/Gui/timeline/GraphicsMovieItem.h
index 8b197a3..ca01c69 100644
--- a/src/Gui/timeline/GraphicsMovieItem.h
+++ b/src/Gui/timeline/GraphicsMovieItem.h
@@ -24,9 +24,10 @@
#define GRAPHICSMOVIEITEM_H
#include "AbstractGraphicsMediaItem.h"
-#include "Clip.h"
#include "TracksView.h"
+class Clip;
+
#define Z_SELECTED 4
#define Z_NOT_SELECTED 3
@@ -49,7 +50,7 @@ public:
virtual int type() const { return Type; }
virtual bool expandable() const { return false; }
virtual bool moveable() const { return true; }
- virtual const QUuid& uuid() const { return m_clip->uuid(); }
+ virtual const QUuid& uuid() const;
virtual MainWorkflow::TrackType mediaType() const;
virtual void paint( QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0 );
More information about the Vlmc-devel
mailing list