colordialog: began widgets and dialogs for a managed color picker

This commit is contained in:
itsmattkc
2020-04-01 17:57:19 +11:00
parent 6ea6dd810e
commit bcc8eaee55
12 changed files with 222 additions and 1 deletions
+1
View File
@@ -16,6 +16,7 @@
add_subdirectory(about)
add_subdirectory(actionsearch)
add_subdirectory(color)
add_subdirectory(export)
add_subdirectory(footageproperties)
add_subdirectory(keyframeproperties)
+22
View File
@@ -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}
dialog/color/colordialog.h
dialog/color/colordialog.cpp
PARENT_SCOPE
)
+28
View File
@@ -0,0 +1,28 @@
#include "colordialog.h"
#include <QDialogButtonBox>
#include <QSplitter>
#include <QVBoxLayout>
#include "widget/colorwheel/colorwheelwidget.h"
ColorDialog::ColorDialog(ColorManager* color_manager, QWidget *parent) :
QDialog(parent),
color_manager_(color_manager)
{
QVBoxLayout* layout = new QVBoxLayout(this);
QSplitter* splitter = new QSplitter(Qt::Horizontal);
layout->addWidget(splitter);
ColorWheelWidget* cww1 = new ColorWheelWidget();
ColorWheelWidget* cww2 = new ColorWheelWidget();
splitter->addWidget(cww1);
splitter->addWidget(cww2);
QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
connect(buttons, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(buttons, &QDialogButtonBox::rejected, this, &QDialog::reject);
layout->addWidget(buttons);
}
+19
View File
@@ -0,0 +1,19 @@
#ifndef COLORDIALOG_H
#define COLORDIALOG_H
#include <QDialog>
#include "render/color.h"
#include "render/colormanager.h"
class ColorDialog : public QDialog
{
public:
ColorDialog(ColorManager* color_manager, QWidget* parent = nullptr);
private:
ColorManager* color_manager_;
};
#endif // COLORDIALOG_H