Commit 07558f66 authored by geoff's avatar geoff

Add of the dock of the preview

parent 8908115f
......@@ -62,6 +62,13 @@ void MainWindow::m_initializeDockWidgets( void )
Qt::AllDockWidgetAreas,
QDockWidget::AllDockWidgetFeatures,
Qt::TopDockWidgetArea );
dockManager->addDockedWidget( new PreviewWidget( this ),
tr( "Preview" ),
Qt::AllDockWidgetAreas,
QDockWidget::AllDockWidgetFeatures,
Qt::TopDockWidgetArea );
//dockManager->addDockedWidget( 0,
// "library2",
// Qt::AllDockWidgetAreas,
......
......@@ -26,6 +26,7 @@
#include <QApplication>
#include "ui_MainWindow.h"
#include "LibraryWidget.h"
#include "PreviewWidget.h"
#include "DockWidgetManager.h"
class MainWindow : public QMainWindow
......
#include "PreviewWidget.h"
#include "ui_PreviewWidget.h"
PreviewWidget::PreviewWidget(QWidget *parent) :
QDialog(parent),
m_ui(new Ui::PreviewWidget)
{
m_ui->setupUi(this);
}
PreviewWidget::~PreviewWidget()
{
delete m_ui;
}
void PreviewWidget::changeEvent(QEvent *e)
{
switch (e->type()) {
case QEvent::LanguageChange:
m_ui->retranslateUi(this);
break;
default:
break;
}
}
#ifndef PREVIEWWIDGET_H
#define PREVIEWWIDGET_H
#include <QtGui/QDialog>
namespace Ui {
class PreviewWidget;
}
class PreviewWidget : public QDialog {
Q_OBJECT
Q_DISABLE_COPY(PreviewWidget)
public:
explicit PreviewWidget(QWidget *parent = 0);
virtual ~PreviewWidget();
protected:
virtual void changeEvent(QEvent *e);
private:
Ui::PreviewWidget *m_ui;
};
#endif // PREVIEWWIDGET_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PreviewWidget</class>
<widget class="QDialog" name="PreviewWidget">
<property name="windowModality">
<enum>Qt::ApplicationModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>328</width>
<height>248</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<property name="sizeGripEnabled">
<bool>false</bool>
</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="QFrame" name="frame">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>320</width>
<height>240</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
......@@ -21,7 +21,8 @@ SOURCES += src/main.cpp \
src/LibVLCpp/VLCMediaPlayer.cpp \
src/LibVLCpp/VLCMedia.cpp \
src/gui/TracksView.cpp \
src/gui/TracksScene.cpp
src/gui/TracksScene.cpp \
src/gui/PreviewWidget.cpp
HEADERS += src/gui/MainWindow.h \
src/gui/DockWidgetManager.h \
src/gui/LibraryWidget.h \
......@@ -34,11 +35,12 @@ HEADERS += src/gui/MainWindow.h \
src/LibVLCpp/VLCMediaPlayer.h \
src/LibVLCpp/VLCMedia.h \
src/gui/TracksView.h \
src/gui/TracksScene.h
src/gui/TracksScene.h \
src/gui/PreviewWidget.h
FORMS += src/gui/ui/MainWindow.ui \
src/gui/ui/Timeline.ui \
src/gui/ui/LibraryWidget.ui
src/gui/ui/LibraryWidget.ui \
src/gui/ui/PreviewWidget.ui
RESOURCES +=
INCLUDEPATH += src/LibVLCpp
LIBS = -L/usr/local/lib \
......
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