Commit 395f9a02 authored by Christophe Courtaut's avatar Christophe Courtaut

Added a new Widget : UndoView

parent 689acb5e
/*****************************************************************************
* UndoStack.cpp: UndoStack For Undo/Redo Purposes
*****************************************************************************
* Copyright (C) 2008-2009 the VLMC team
*
* Authors: Christophe Courtaut <christophe.courtaut@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "UndoStack.h"
UndoStack::UndoStack()
{
}
/*****************************************************************************
* UndoStack.h: UndoStack For Undo/Redo Purposes
*****************************************************************************
* Copyright (C) 2008-2009 the VLMC team
*
* Authors: Christophe Courtaut <christophe.courtaut@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef UNDOSTACK_H
#define UNDOSTACK_H
#include <QUndoStack>
#include "Singleton.hpp"
class UndoStack : public QUndoStack, public Singleton<UndoStack>
{
Q_OBJECT
Q_DISABLE_COPY( UndoStack );
private:
UndoStack();
friend class Singleton<UndoStack>;
};
#endif // UNDOSTACK_H
......@@ -26,6 +26,7 @@
#include <QDockWidget>
#include <QFileDialog>
#include <QSlider>
#include <QUndoView>
#include "MainWindow.h"
#include "MediaListWidget.h"
......@@ -37,6 +38,7 @@
#include "FileBrowser.h"
#include "WorkflowRenderer.h"
#include "ClipRenderer.h"
#include "UndoStack.h"
MainWindow::MainWindow( QWidget *parent ) :
QMainWindow( parent ), m_renderer( NULL )
......@@ -158,6 +160,11 @@ void MainWindow::m_initializeDockWidgets( void )
Qt::AllDockWidgetAreas,
QDockWidget::AllDockWidgetFeatures,
Qt::TopDockWidgetArea );
dockManager->addDockedWidget( new QUndoView( UndoStack::getInstance(), this),
tr( "History" ),
Qt::AllDockWidgetAreas,
QDockWidget::AllDockWidgetFeatures,
Qt::LeftDockWidgetArea );
setupLibrary();
m_metaDataManager = MetaDataManager::getInstance();
}
......
......@@ -45,7 +45,8 @@ SOURCES += src/main.cpp \
src/API/vlmc_module_variables.cpp \
src/API/Module.cpp \
src/API/ModuleManager.cpp \
src/WorkflowFileRenderer.cpp
src/WorkflowFileRenderer.cpp \
src/UndoStack.cpp
HEADERS += src/gui/MainWindow.h \
src/gui/DockWidgetManager.h \
src/gui/LibraryWidget.h \
......@@ -88,7 +89,8 @@ HEADERS += src/gui/MainWindow.h \
src/API/vlmc_module_internal.h \
src/WorkflowFileRenderer.h \
src/vlmc.h \
src/tools/Pool.hpp
src/tools/Pool.hpp \
src/UndoStack.h
FORMS += src/gui/ui/MainWindow.ui \
src/gui/ui/PreviewWidget.ui \
src/gui/ui/Preferences.ui \
......@@ -98,7 +100,7 @@ FORMS += src/gui/ui/MainWindow.ui \
src/gui/ui/Transcode.ui \
src/gui/ui/FileBrowser.ui \
src/gui/ui/WorkflowFileRenderer.ui
FORMS +=
FORMS +=
TRANSLATIONS = ts/vlmc_es.ts \
ts/vlmc_fr.ts \
ts/vlmc_sv.ts
......
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