Commit 44f86a67 authored by Ludovic Fauvet's avatar Ludovic Fauvet

Initializing instances of the main QGraphics objects

parent 32af3736
......@@ -21,11 +21,15 @@
*****************************************************************************/
#include "Timeline.h"
#include "TracksView.h"
#include "TracksScene.h"
Timeline::Timeline( QWidget *parent ) :
QWidget( parent )
{
m_ui.setupUi( this );
m_tracksScene = new TracksScene( this );
m_tracksView = new TracksView( m_tracksScene, m_ui.tracksFrame );
}
void Timeline::changeEvent( QEvent *e )
......
......@@ -24,6 +24,8 @@
#define TIMELINE_H
#include "ui_Timeline.h"
#include "TracksView.h"
#include "TracksScene.h"
class Timeline : public QWidget
{
......@@ -37,6 +39,8 @@ protected:
private:
Ui::Timeline m_ui;
TracksView* m_tracksView;
TracksScene* m_tracksScene;
};
......
......@@ -22,6 +22,6 @@
#include "TracksScene.h"
TracksScene::TracksScene()
TracksScene::TracksScene( QObject* parent ) : QGraphicsScene( parent )
{
}
......@@ -28,7 +28,7 @@
class TracksScene : public QGraphicsScene
{
public:
TracksScene();
TracksScene( QObject* parent = 0 );
};
#endif // TRACKSSCENE_H
/*****************************************************************************
* TracksWidget.cpp: QGraphicsView that contains the TracksScene
* TracksView.cpp: QGraphicsView that contains the TracksScene
*****************************************************************************
* Copyright (C) 2008-2009 the VLMC team
*
......@@ -20,8 +20,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "TracksWidget.h"
#include "TracksView.h"
TracksWidget::TracksWidget()
TracksView::TracksView( QGraphicsScene* scene, QWidget* parent )
: QGraphicsView( scene, parent )
{
}
/*****************************************************************************
* TracksWidget.h: QGraphicsView that contains the TracksScene
* TracksView.h: QGraphicsView that contains the TracksScene
*****************************************************************************
* Copyright (C) 2008-2009 the VLMC team
*
......@@ -20,15 +20,15 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef TRACKSWIDGET_H
#define TRACKSWIDGET_H
#ifndef TRACKSVIEW_H
#define TRACKSVIEW_H
#include <QGraphicsWidget>
#include <QGraphicsView>
class TracksWidget : public QGraphicsWidget
class TracksView : public QGraphicsView
{
public:
TracksWidget();
TracksView( QGraphicsScene* scene, QWidget* parent = 0 );
};
#endif // TRACKSWIDGET_H
#endif // TRACKSVIEW_H
......@@ -18,7 +18,7 @@ SOURCES += src/main.cpp \
src/LibVLCpp/VLCInstance.cpp \
src/LibVLCpp/VlmMedia.cpp \
src/gui/Timeline.cpp \
src/gui/TracksWidget.cpp \
src/gui/TracksView.cpp \
src/gui/TracksScene.cpp
HEADERS += src/gui/MainWindow.h \
src/gui/DockWidgetManager.h \
......@@ -29,7 +29,7 @@ HEADERS += src/gui/MainWindow.h \
src/LibVLCpp/VLCInstance.h \
src/LibVLCpp/VlmMedia.h \
src/gui/Timeline.h \
src/gui/TracksWidget.h \
src/gui/TracksView.h \
src/gui/TracksScene.h
FORMS += src/gui/ui/MainWindow.ui \
src/gui/ui/Timeline.ui \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment