diff --git a/app/panel/CMakeLists.txt b/app/panel/CMakeLists.txt
index f07698e31..492fa1607 100644
--- a/app/panel/CMakeLists.txt
+++ b/app/panel/CMakeLists.txt
@@ -16,6 +16,7 @@
add_subdirectory(project)
add_subdirectory(timeline)
+add_subdirectory(tool)
add_subdirectory(viewer)
set(OLIVE_SOURCES
diff --git a/app/panel/project/project.h b/app/panel/project/project.h
index ed802b194..e779cbbf1 100644
--- a/app/panel/project/project.h
+++ b/app/panel/project/project.h
@@ -23,4 +23,4 @@ private:
ProjectExplorer* explorer_;
};
-#endif // PROJECT_H
+#endif // PROJECT_PANEL_H
diff --git a/app/panel/timeline/timeline.h b/app/panel/timeline/timeline.h
index 58ce03afe..3f8f4ad5a 100644
--- a/app/panel/timeline/timeline.h
+++ b/app/panel/timeline/timeline.h
@@ -1,5 +1,5 @@
-#ifndef TIMELINE_H
-#define TIMELINE_H
+#ifndef TIMELINE_PANEL_H
+#define TIMELINE_PANEL_H
#include "widget/panel/panel.h"
@@ -16,4 +16,4 @@ private:
void Retranslate();
};
-#endif // TIMELINE_H
+#endif // TIMELINE_PANEL_H
diff --git a/app/panel/tool/CMakeLists.txt b/app/panel/tool/CMakeLists.txt
new file mode 100644
index 000000000..7244ed3ff
--- /dev/null
+++ b/app/panel/tool/CMakeLists.txt
@@ -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 .
+
+set(OLIVE_SOURCES
+ ${OLIVE_SOURCES}
+ panel/tool/tool.h
+ panel/tool/tool.cpp
+ PARENT_SCOPE
+)
diff --git a/app/panel/tool/tool.cpp b/app/panel/tool/tool.cpp
new file mode 100644
index 000000000..24abfa7c5
--- /dev/null
+++ b/app/panel/tool/tool.cpp
@@ -0,0 +1,26 @@
+#include "tool.h"
+
+#include "widget/toolbar/toolbar.h"
+
+ToolPanel::ToolPanel(QWidget *parent) :
+ PanelWidget(parent)
+{
+ Toolbar* t = new Toolbar(this);
+
+ setWidget(t);
+
+ Retranslate();
+}
+
+void ToolPanel::changeEvent(QEvent *e)
+{
+ if (e->type() == QEvent::LanguageChange) {
+ Retranslate();
+ }
+ QDockWidget::changeEvent(e);
+}
+
+void ToolPanel::Retranslate()
+{
+ SetTitle(tr("Tools"));
+}
diff --git a/app/panel/tool/tool.h b/app/panel/tool/tool.h
new file mode 100644
index 000000000..e0fcfbbef
--- /dev/null
+++ b/app/panel/tool/tool.h
@@ -0,0 +1,19 @@
+#ifndef TOOL_PANEL_H
+#define TOOL_PANEL_H
+
+#include "widget/panel/panel.h"
+
+class ToolPanel : public PanelWidget
+{
+ Q_OBJECT
+public:
+ ToolPanel(QWidget* parent);
+
+protected:
+ virtual void changeEvent(QEvent* e) override;
+
+private:
+ void Retranslate();
+};
+
+#endif // TOOL_PANEL_H
diff --git a/app/panel/viewer/viewer.cpp b/app/panel/viewer/viewer.cpp
index 87b7ed4e2..7a659b2fc 100644
--- a/app/panel/viewer/viewer.cpp
+++ b/app/panel/viewer/viewer.cpp
@@ -5,9 +5,6 @@
ViewerPanel::ViewerPanel(QWidget *parent) :
PanelWidget(parent)
{
- SetTitle(tr("Viewer"));
- SetSubtitle(tr("(None)"));
-
// QObject system handles deleting this
ViewerWidget* viewer = new ViewerWidget(this);
diff --git a/app/ui/icons/icons.cpp b/app/ui/icons/icons.cpp
index df8be7e26..e7a2fe061 100644
--- a/app/ui/icons/icons.cpp
+++ b/app/ui/icons/icons.cpp
@@ -26,6 +26,19 @@ QIcon olive::icon::Redo;
QIcon olive::icon::TreeView;
QIcon olive::icon::ListView;
QIcon olive::icon::IconView;
+QIcon olive::icon::ToolPointer;
+QIcon olive::icon::ToolEdit;
+QIcon olive::icon::ToolRipple;
+QIcon olive::icon::ToolRazor;
+QIcon olive::icon::ToolSlip;
+QIcon olive::icon::ToolSlide;
+QIcon olive::icon::ToolHand;
+QIcon olive::icon::ToolTransition;
+QIcon olive::icon::Snapping;
+QIcon olive::icon::ZoomIn;
+QIcon olive::icon::ZoomOut;
+QIcon olive::icon::Record;
+QIcon olive::icon::Add;
void olive::icon::LoadAll()
{
@@ -44,6 +57,21 @@ void olive::icon::LoadAll()
TreeView = Create("treeview");
ListView = Create("listview");
IconView = Create("iconview");
+
+ ToolPointer = Create("arrow");
+ ToolEdit = Create("beam");
+ ToolRipple = Create("ripple");
+ ToolRazor = Create("razor");
+ ToolSlip = Create("slip");
+ ToolSlide = Create("slide");
+ ToolHand = Create("hand");
+ ToolTransition = Create("transition-tool");
+
+ Snapping = Create("magnet");
+ ZoomIn = Create("zoomin");
+ ZoomOut = Create("zoomout");
+ Record = Create("record");
+ Add = Create("add-button");
}
QIcon olive::icon::Create(const QString &name)
diff --git a/app/ui/icons/icons.h b/app/ui/icons/icons.h
index e27a6571b..faa6c9199 100644
--- a/app/ui/icons/icons.h
+++ b/app/ui/icons/icons.h
@@ -24,6 +24,23 @@ extern QIcon TreeView;
extern QIcon ListView;
extern QIcon IconView;
+// Tool Icons
+extern QIcon ToolPointer;
+extern QIcon ToolEdit;
+extern QIcon ToolRipple;
+extern QIcon ToolRazor;
+extern QIcon ToolSlip;
+extern QIcon ToolSlide;
+extern QIcon ToolHand;
+extern QIcon ToolTransition;
+
+// Miscellaneous Icons
+extern QIcon Snapping;
+extern QIcon ZoomIn;
+extern QIcon ZoomOut;
+extern QIcon Record;
+extern QIcon Add;
+
QIcon Create(const QString& name);
void LoadAll();
diff --git a/app/widget/CMakeLists.txt b/app/widget/CMakeLists.txt
index 170c144bb..9ee4973f5 100644
--- a/app/widget/CMakeLists.txt
+++ b/app/widget/CMakeLists.txt
@@ -14,11 +14,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
+add_subdirectory(flowlayout)
add_subdirectory(menu)
add_subdirectory(panel)
add_subdirectory(playbackcontrols)
add_subdirectory(projectexplorer)
add_subdirectory(projecttoolbar)
+add_subdirectory(toolbar)
add_subdirectory(viewer)
set(OLIVE_SOURCES
diff --git a/app/widget/flowlayout/CMakeLists.txt b/app/widget/flowlayout/CMakeLists.txt
new file mode 100644
index 000000000..fa325df82
--- /dev/null
+++ b/app/widget/flowlayout/CMakeLists.txt
@@ -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 .
+
+set(OLIVE_SOURCES
+ ${OLIVE_SOURCES}
+ widget/flowlayout/flowlayout.h
+ widget/flowlayout/flowlayout.cpp
+ PARENT_SCOPE
+)
diff --git a/app/widget/flowlayout/flowlayout.cpp b/app/widget/flowlayout/flowlayout.cpp
new file mode 100644
index 000000000..0dd3a1f60
--- /dev/null
+++ b/app/widget/flowlayout/flowlayout.cpp
@@ -0,0 +1,200 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include
+
+#include "flowlayout.h"
+FlowLayout::FlowLayout(QWidget *parent, int margin, int hSpacing, int vSpacing)
+ : QLayout(parent), m_hSpace(hSpacing), m_vSpace(vSpacing)
+{
+ setContentsMargins(margin, margin, margin, margin);
+}
+
+FlowLayout::FlowLayout(int margin, int hSpacing, int vSpacing)
+ : m_hSpace(hSpacing), m_vSpace(vSpacing)
+{
+ setContentsMargins(margin, margin, margin, margin);
+}
+
+FlowLayout::~FlowLayout()
+{
+ QLayoutItem *item;
+ while ((item = takeAt(0)))
+ delete item;
+}
+
+void FlowLayout::addItem(QLayoutItem *item)
+{
+ itemList.append(item);
+}
+
+int FlowLayout::horizontalSpacing() const
+{
+ if (m_hSpace >= 0) {
+ return m_hSpace;
+ } else {
+ return smartSpacing(QStyle::PM_LayoutHorizontalSpacing);
+ }
+}
+
+int FlowLayout::verticalSpacing() const
+{
+ if (m_vSpace >= 0) {
+ return m_vSpace;
+ } else {
+ return smartSpacing(QStyle::PM_LayoutVerticalSpacing);
+ }
+}
+
+int FlowLayout::count() const
+{
+ return itemList.size();
+}
+
+QLayoutItem *FlowLayout::itemAt(int index) const
+{
+ return itemList.value(index);
+}
+
+QLayoutItem *FlowLayout::takeAt(int index)
+{
+ if (index >= 0 && index < itemList.size())
+ return itemList.takeAt(index);
+ else
+ return 0;
+}
+
+Qt::Orientations FlowLayout::expandingDirections() const
+{
+ return 0;
+}
+
+bool FlowLayout::hasHeightForWidth() const
+{
+ return true;
+}
+
+int FlowLayout::heightForWidth(int width) const
+{
+ int height = doLayout(QRect(0, 0, width, 0), true);
+ return height;
+}
+
+void FlowLayout::setGeometry(const QRect &rect)
+{
+ QLayout::setGeometry(rect);
+ doLayout(rect, false);
+}
+
+QSize FlowLayout::sizeHint() const
+{
+ return minimumSize();
+}
+
+QSize FlowLayout::minimumSize() const
+{
+ QSize size;
+ QLayoutItem *item;
+ foreach (item, itemList)
+ size = size.expandedTo(item->minimumSize());
+
+ size += QSize(2*margin(), 2*margin());
+ return size;
+}
+
+int FlowLayout::doLayout(const QRect &rect, bool testOnly) const
+{
+ int left, top, right, bottom;
+ getContentsMargins(&left, &top, &right, &bottom);
+ QRect effectiveRect = rect.adjusted(+left, +top, -right, -bottom);
+ int x = effectiveRect.x();
+ int y = effectiveRect.y();
+ int lineHeight = 0;
+
+ QLayoutItem *item;
+ foreach (item, itemList) {
+ QWidget *wid = item->widget();
+ int spaceX = horizontalSpacing();
+ if (spaceX == -1)
+ spaceX = wid->style()->layoutSpacing(
+ QSizePolicy::PushButton, QSizePolicy::PushButton, Qt::Horizontal);
+ int spaceY = verticalSpacing();
+ if (spaceY == -1)
+ spaceY = wid->style()->layoutSpacing(
+ QSizePolicy::PushButton, QSizePolicy::PushButton, Qt::Vertical);
+ int nextX = x + item->sizeHint().width() + spaceX;
+ if (nextX - spaceX > effectiveRect.right() && lineHeight > 0) {
+ x = effectiveRect.x();
+ y = y + lineHeight + spaceY;
+ nextX = x + item->sizeHint().width() + spaceX;
+ lineHeight = 0;
+ }
+
+ if (!testOnly)
+ item->setGeometry(QRect(QPoint(x, y), item->sizeHint()));
+
+ x = nextX;
+ lineHeight = qMax(lineHeight, item->sizeHint().height());
+ }
+ return y + lineHeight - rect.y() + bottom;
+}
+int FlowLayout::smartSpacing(QStyle::PixelMetric pm) const
+{
+ QObject *parent = this->parent();
+ if (!parent) {
+ return -1;
+ } else if (parent->isWidgetType()) {
+ QWidget *pw = static_cast(parent);
+ return pw->style()->pixelMetric(pm, 0, pw);
+ } else {
+ return static_cast(parent)->spacing();
+ }
+}
diff --git a/app/widget/flowlayout/flowlayout.h b/app/widget/flowlayout/flowlayout.h
new file mode 100644
index 000000000..72f5282aa
--- /dev/null
+++ b/app/widget/flowlayout/flowlayout.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#ifndef FLOWLAYOUT_H
+#define FLOWLAYOUT_H
+
+#include
+#include
+#include
+class FlowLayout : public QLayout
+{
+public:
+ explicit FlowLayout(QWidget *parent, int margin = -1, int hSpacing = -1, int vSpacing = -1);
+ explicit FlowLayout(int margin = -1, int hSpacing = -1, int vSpacing = -1);
+ ~FlowLayout();
+
+ void addItem(QLayoutItem *item) override;
+ int horizontalSpacing() const;
+ int verticalSpacing() const;
+ Qt::Orientations expandingDirections() const override;
+ bool hasHeightForWidth() const override;
+ int heightForWidth(int) const override;
+ int count() const override;
+ QLayoutItem *itemAt(int index) const override;
+ QSize minimumSize() const override;
+ void setGeometry(const QRect &rect) override;
+ QSize sizeHint() const override;
+ QLayoutItem *takeAt(int index) override;
+
+private:
+ int doLayout(const QRect &rect, bool testOnly) const;
+ int smartSpacing(QStyle::PixelMetric pm) const;
+
+ QList itemList;
+ int m_hSpace;
+ int m_vSpace;
+};
+
+#endif // FLOWLAYOUT_H
diff --git a/app/widget/toolbar/CMakeLists.txt b/app/widget/toolbar/CMakeLists.txt
new file mode 100644
index 000000000..20c429060
--- /dev/null
+++ b/app/widget/toolbar/CMakeLists.txt
@@ -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 .
+
+set(OLIVE_SOURCES
+ ${OLIVE_SOURCES}
+ widget/toolbar/toolbar.h
+ widget/toolbar/toolbar.cpp
+ PARENT_SCOPE
+)
diff --git a/app/widget/toolbar/toolbar.cpp b/app/widget/toolbar/toolbar.cpp
new file mode 100644
index 000000000..43ddd1ff1
--- /dev/null
+++ b/app/widget/toolbar/toolbar.cpp
@@ -0,0 +1,93 @@
+#include "toolbar.h"
+
+#include
+#include
+
+#include "widget/flowlayout/flowlayout.h"
+#include "ui/icons/icons.h"
+
+Toolbar::Toolbar(QWidget *parent) :
+ QWidget(parent)
+{
+ FlowLayout* layout = new FlowLayout(this);
+ layout->setMargin(0);
+
+ btn_pointer_tool = new QPushButton();
+ btn_pointer_tool->setIcon(olive::icon::ToolPointer);
+ layout->addWidget(btn_pointer_tool);
+
+ btn_edit_tool = new QPushButton();
+ btn_edit_tool->setIcon(olive::icon::ToolEdit);
+ layout->addWidget(btn_edit_tool);
+
+ btn_ripple_tool = new QPushButton();
+ btn_ripple_tool->setIcon(olive::icon::ToolRipple);
+ layout->addWidget(btn_ripple_tool);
+
+ btn_razor_tool = new QPushButton();
+ btn_razor_tool->setIcon(olive::icon::ToolRazor);
+ layout->addWidget(btn_razor_tool);
+
+ btn_slip_tool = new QPushButton();
+ btn_slip_tool->setIcon(olive::icon::ToolSlip);
+ layout->addWidget(btn_slip_tool);
+
+ btn_slide_tool = new QPushButton();
+ btn_slide_tool->setIcon(olive::icon::ToolSlide);
+ layout->addWidget(btn_slide_tool);
+
+ btn_hand_tool = new QPushButton();
+ btn_hand_tool->setIcon(olive::icon::ToolHand);
+ layout->addWidget(btn_hand_tool);
+
+ btn_transition_tool = new QPushButton();
+ btn_transition_tool->setIcon(olive::icon::ToolTransition);
+ layout->addWidget(btn_transition_tool);
+
+ btn_snapping_toggle = new QPushButton();
+ btn_snapping_toggle->setIcon(olive::icon::Snapping);
+ layout->addWidget(btn_snapping_toggle);
+
+ btn_zoom_in = new QPushButton();
+ btn_zoom_in->setIcon(olive::icon::ZoomIn);
+ layout->addWidget(btn_zoom_in);
+
+ btn_zoom_out = new QPushButton();
+ btn_zoom_out->setIcon(olive::icon::ZoomOut);
+ layout->addWidget(btn_zoom_out);
+
+ btn_record = new QPushButton();
+ btn_record->setIcon(olive::icon::Record);
+ layout->addWidget(btn_record);
+
+ btn_add = new QPushButton();
+ btn_add->setIcon(olive::icon::Add);
+ layout->addWidget(btn_add);
+
+ Retranslate();
+}
+
+void Toolbar::changeEvent(QEvent *e)
+{
+ if (e->type() == QEvent::LanguageChange) {
+ Retranslate();
+ }
+ QWidget::changeEvent(e);
+}
+
+void Toolbar::Retranslate()
+{
+ btn_pointer_tool->setToolTip(tr("Pointer Tool"));
+ btn_edit_tool->setToolTip(tr("Edit Tool"));
+ btn_ripple_tool->setToolTip(tr("Ripple Tool"));
+ btn_razor_tool->setToolTip(tr("Razor Tool"));
+ btn_slip_tool->setToolTip(tr("Slip Tool"));
+ btn_slide_tool->setToolTip(tr("Slide Tool"));
+ btn_hand_tool->setToolTip(tr("Hand Tool"));
+ btn_transition_tool->setToolTip(tr("Transition Tool"));
+ btn_snapping_toggle->setToolTip(tr("Toggle Snapping"));
+ btn_zoom_in->setToolTip(tr("Zoom In"));
+ btn_zoom_out->setToolTip(tr("Zoom Out"));
+ btn_record->setToolTip(tr("Record Audio"));
+ btn_add->setToolTip(tr("Add Object"));
+}
diff --git a/app/widget/toolbar/toolbar.h b/app/widget/toolbar/toolbar.h
new file mode 100644
index 000000000..4065ed633
--- /dev/null
+++ b/app/widget/toolbar/toolbar.h
@@ -0,0 +1,32 @@
+#ifndef TOOLBAR_H
+#define TOOLBAR_H
+
+#include
+
+class Toolbar : public QWidget
+{
+public:
+ Toolbar(QWidget* parent);
+
+protected:
+ virtual void changeEvent(QEvent* e) override;
+
+private:
+ void Retranslate();
+
+ QPushButton* btn_pointer_tool;
+ QPushButton* btn_edit_tool;
+ QPushButton* btn_ripple_tool;
+ QPushButton* btn_razor_tool;
+ QPushButton* btn_slip_tool;
+ QPushButton* btn_slide_tool;
+ QPushButton* btn_hand_tool;
+ QPushButton* btn_transition_tool;
+ QPushButton* btn_snapping_toggle;
+ QPushButton* btn_zoom_in;
+ QPushButton* btn_zoom_out;
+ QPushButton* btn_record;
+ QPushButton* btn_add;
+};
+
+#endif // TOOLBAR_H
diff --git a/app/window/mainwindow/mainwindow.cpp b/app/window/mainwindow/mainwindow.cpp
index 919f08eec..90aa5275a 100644
--- a/app/window/mainwindow/mainwindow.cpp
+++ b/app/window/mainwindow/mainwindow.cpp
@@ -24,6 +24,7 @@
#include "panel/project/project.h"
#include "panel/viewer/viewer.h"
#include "panel/timeline/timeline.h"
+#include "panel/tool/tool.h"
// Main menu bar
#include "mainmenu.h"
@@ -61,6 +62,9 @@ void olive::MainWindow::ProjectOpen(Project* p)
ViewerPanel* viewer_panel2 = new ViewerPanel(this);
addDockWidget(Qt::TopDockWidgetArea, viewer_panel2);
+ ToolPanel* tool_panel = new ToolPanel(this);
+ addDockWidget(Qt::BottomDockWidgetArea, tool_panel);
+
TimelinePanel* timeline_panel = new TimelinePanel(this);
addDockWidget(Qt::BottomDockWidgetArea, timeline_panel);
}