began large scale restructure
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
# Olive - Non-Linear Video Editor
|
||||
# Copyright (C) 2019 Olive Team
|
||||
#
|
||||
# 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
add_subdirectory(mainwindow)
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# Olive - Non-Linear Video Editor
|
||||
# Copyright (C) 2019 Olive Team
|
||||
#
|
||||
# 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
window/mainwindow/mainwindow.h
|
||||
window/mainwindow/mainwindow.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
@@ -0,0 +1,30 @@
|
||||
#include "mainwindow.h"
|
||||
|
||||
// Panel objects
|
||||
#include "panel/viewer/viewer.h"
|
||||
|
||||
olive::MainWindow::MainWindow(QWidget *parent) :
|
||||
QMainWindow(parent)
|
||||
{
|
||||
// Create empty central widget - we don't actually want a central widget but some of Qt's docking/undocking fails
|
||||
// without it
|
||||
QWidget* centralWidget = new QWidget(this);
|
||||
centralWidget->setMaximumSize(QSize(0, 0));
|
||||
setCentralWidget(centralWidget);
|
||||
|
||||
// Set tabs to be on top of panels (default behavior is bottom)
|
||||
setTabPosition(Qt::AllDockWidgetAreas, QTabWidget::North);
|
||||
|
||||
// Allow panels to be tabbed within each other
|
||||
setDockNestingEnabled(true);
|
||||
|
||||
// TODO Use settings data to create panels and restore state if they exist
|
||||
ViewerPanel* viewer_panel = new ViewerPanel(this);
|
||||
addDockWidget(Qt::TopDockWidgetArea, viewer_panel);
|
||||
ViewerPanel* viewer_panel2 = new ViewerPanel(this);
|
||||
addDockWidget(Qt::TopDockWidgetArea, viewer_panel2);
|
||||
ViewerPanel* viewer_panel3 = new ViewerPanel(this);
|
||||
addDockWidget(Qt::BottomDockWidgetArea, viewer_panel3);
|
||||
ViewerPanel* viewer_panel4 = new ViewerPanel(this);
|
||||
addDockWidget(Qt::BottomDockWidgetArea, viewer_panel4);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
|
||||
namespace olive {
|
||||
|
||||
/**
|
||||
* @brief The MainWindow class
|
||||
*
|
||||
* Olive's main window responsible for docking widgets.
|
||||
*/
|
||||
class MainWindow : public QMainWindow {
|
||||
Q_OBJECT
|
||||
public:
|
||||
MainWindow(QWidget* parent = nullptr);
|
||||
private:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user