-
Notifications
You must be signed in to change notification settings - Fork 0
/
gradient_dialog.h
50 lines (38 loc) · 1.15 KB
/
gradient_dialog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
* SPDX-FileCopyrightText: 2020 Nick Korotysh <[email protected]>
*
* SPDX-License-Identifier: LGPL-3.0-or-later
*/
#pragma once
#include <QDialog>
namespace Ui {
class GradientDialog;
}
class GradientDialog : public QDialog
{
Q_OBJECT
public:
static QGradient getGradient(bool* ok,
const QGradient& gradient = QLinearGradient(),
QWidget* parent = nullptr,
const QString& title = QString());
explicit GradientDialog(QWidget* parent = nullptr)
: GradientDialog(QLinearGradient(), parent) {}
explicit GradientDialog(const QGradient& gradient,
QWidget* parent = nullptr);
~GradientDialog();
QGradient gradient() const;
public slots:
void setGradient(const QGradient& gradient);
signals:
void gradientChanged(const QGradient& gradient);
private slots:
void on_type_linear_rbtn_clicked();
void on_type_radial_rbtn_clicked();
void on_type_conical_rbtn_clicked();
void on_spread_pad_rbtn_clicked();
void on_spread_repeat_rbtn_clicked();
void on_spread_reflect_rbtn_clicked();
private:
Ui::GradientDialog* ui;
};