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

New UI which will contain the timeline components

parent a6b59210
......@@ -25,6 +25,7 @@
#include <QPalette>
#include <QDockWidget>
#include "MainWindow.h"
#include "Timeline.h"
MainWindow::MainWindow( QWidget *parent ) :
QMainWindow( parent )
......@@ -48,11 +49,11 @@ void MainWindow::changeEvent( QEvent *e )
void MainWindow::m_initializeDockWidgets( void )
{
QWidget *central = new QWidget( this );
DockWidgetManager *dockManager = DockWidgetManager::instance();
Timeline* timeline = new Timeline( this );
timeline->show();
setCentralWidget( timeline );
central->show();
setCentralWidget( central );
DockWidgetManager *dockManager = DockWidgetManager::instance();
//First param is NULL for the moment. It will be replaced by the LibraryWidget
dockManager->addDockedWidget( 0,
......
#include "Timeline.h"
Timeline::Timeline(QWidget *parent) :
QWidget(parent){
m_ui.setupUi(this);
Timeline::Timeline( QWidget *parent ) :
QWidget( parent )
{
m_ui.setupUi( this );
}
void Timeline::changeEvent(QEvent *e)
void Timeline::changeEvent( QEvent *e )
{
switch (e->type()) {
switch ( e->type() ) {
case QEvent::LanguageChange:
m_ui.retranslateUi(this);
break;
......
......@@ -3,17 +3,19 @@
#include "ui_Timeline.h"
class Timeline : public QWidget {
class Timeline : public QWidget
{
Q_OBJECT
Q_DISABLE_COPY(Timeline)
Q_DISABLE_COPY( Timeline )
public:
explicit Timeline(QWidget *parent = 0);
explicit Timeline( QWidget *parent = 0 );
protected:
virtual void changeEvent(QEvent *e);
virtual void changeEvent( QEvent *e );
private:
Ui::Timeline m_ui;
};
#endif // TIMELINE_H
<ui version="4.0" >
<author/>
<comment/>
<exportmacro/>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Timeline</class>
<widget class="QWidget" name="Timeline" >
<property name="objectName" >
<string notr="true" >Form</string>
</property>
<property name="geometry" >
<widget class="QWidget" name="Timeline">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
<width>429</width>
<height>167</height>
</rect>
</property>
<property name="windowTitle" >
<property name="windowTitle">
<string>Form</string>
</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>
<pixmapfunction/>
<resources/>
<connections/>
</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