Commit 4eb218fb authored by Ludovic Fauvet's avatar Ludovic Fauvet

New UI which will contain the timeline components

parent a6b59210
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <QPalette> #include <QPalette>
#include <QDockWidget> #include <QDockWidget>
#include "MainWindow.h" #include "MainWindow.h"
#include "Timeline.h"
MainWindow::MainWindow( QWidget *parent ) : MainWindow::MainWindow( QWidget *parent ) :
QMainWindow( parent ) QMainWindow( parent )
...@@ -48,11 +49,11 @@ void MainWindow::changeEvent( QEvent *e ) ...@@ -48,11 +49,11 @@ void MainWindow::changeEvent( QEvent *e )
void MainWindow::m_initializeDockWidgets( void ) void MainWindow::m_initializeDockWidgets( void )
{ {
QWidget *central = new QWidget( this ); Timeline* timeline = new Timeline( this );
DockWidgetManager *dockManager = DockWidgetManager::instance(); timeline->show();
setCentralWidget( timeline );
central->show(); DockWidgetManager *dockManager = DockWidgetManager::instance();
setCentralWidget( central );
//First param is NULL for the moment. It will be replaced by the LibraryWidget //First param is NULL for the moment. It will be replaced by the LibraryWidget
dockManager->addDockedWidget( 0, dockManager->addDockedWidget( 0,
......
#include "Timeline.h" #include "Timeline.h"
Timeline::Timeline(QWidget *parent) : Timeline::Timeline( QWidget *parent ) :
QWidget(parent){ QWidget( parent )
m_ui.setupUi(this); {
m_ui.setupUi( this );
} }
void Timeline::changeEvent(QEvent *e) void Timeline::changeEvent( QEvent *e )
{ {
switch (e->type()) { switch ( e->type() ) {
case QEvent::LanguageChange: case QEvent::LanguageChange:
m_ui.retranslateUi(this); m_ui.retranslateUi(this);
break; break;
......
...@@ -3,17 +3,19 @@ ...@@ -3,17 +3,19 @@
#include "ui_Timeline.h" #include "ui_Timeline.h"
class Timeline : public QWidget { class Timeline : public QWidget
{
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY(Timeline) Q_DISABLE_COPY( Timeline )
public: public:
explicit Timeline(QWidget *parent = 0); explicit Timeline( QWidget *parent = 0 );
protected: protected:
virtual void changeEvent(QEvent *e); virtual void changeEvent( QEvent *e );
private: private:
Ui::Timeline m_ui; Ui::Timeline m_ui;
}; };
#endif // TIMELINE_H #endif // TIMELINE_H
<ui version="4.0" > <?xml version="1.0" encoding="UTF-8"?>
<author/> <ui version="4.0">
<comment/>
<exportmacro/>
<class>Timeline</class> <class>Timeline</class>
<widget class="QWidget" name="Timeline" > <widget class="QWidget" name="Timeline">
<property name="objectName" > <property name="geometry">
<string notr="true" >Form</string>
</property>
<property name="geometry" >
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>400</width> <width>429</width>
<height>300</height> <height>167</height>
</rect> </rect>
</property> </property>
<property name="windowTitle" > <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QWidget" name="widget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>25</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>50</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QFrame" name="rulerFrame">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>24</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QFrame" name="headersContainer">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
<item row="1" column="1" rowspan="2">
<widget class="QFrame" name="tracksFrame">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
<item row="2" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>144</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget> </widget>
<pixmapfunction/> <resources/>
<connections/> <connections/>
</ui> </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