ff7tk 0.80.25
Work with Final Fantasy 7 game data
DialogPreview.h
Go to the documentation of this file.
1/****************************************************************************/
2// copyright 2012 - 2020 Chris Rizzitello <sithlord48@gmail.com> //
3// //
4// This file is part of FF7tk //
5// //
6// FF7tk is free software: you can redistribute it and/or modify //
7// it under the terms of the GNU General Public License as published by //
8// the Free Software Foundation, either version 3 of the License, or //
9// (at your option) any later version. //
10// //
11// FF7tk is distributed in the hope that it will be useful, //
12// but WITHOUT ANY WARRANTY; without even the implied warranty of //
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
14// GNU General Public License for more details. //
15/****************************************************************************/
16#pragma once
17
18#include <QLabel>
19
20#ifndef ff7tkwidgets_export_h
21 #include <ff7tkwidgets_export.h>
22#endif
23
24class QPushButton;
25
26class FF7TKWIDGETS_EXPORT DialogPreview : public QLabel
27{
28 Q_OBJECT
29public:
30 DialogPreview(QWidget *parent = nullptr);
31 ~DialogPreview() = default;
32 inline QColor ll()
33 {
34 return lower_left;
35 }
36 inline QColor lr()
37 {
38 return lower_right;
39 }
40 inline QColor ul()
41 {
42 return upper_left;
43 }
44 inline QColor ur()
45 {
46 return upper_right;
47 };
48 void setLLeft(QColor newColor);
49 void setULeft(QColor newColor);
50 void setLRight(QColor newColor);
51 void setURight(QColor newColor);
52signals:
53 void LL_ColorChanged(QColor color);
54 void LR_ColorChanged(QColor color);
55 void UL_ColorChanged(QColor color);
56 void UR_ColorChanged(QColor color);
57private:
58 void draw();
59 QColor upper_left;
60 QColor upper_right;
61 QColor lower_left;
62 QColor lower_right;
63 QPushButton *btn_ul = nullptr;
64 QPushButton *btn_ur = nullptr;
65 QPushButton *btn_ll = nullptr;
66 QPushButton *btn_lr = nullptr;
67 inline static const QString _style = QStringLiteral("QPushButton:enabled{background-color: #00000000;border:0px;} QPushButton:hover{background-color: %1;}");
68protected:
69 void resizeEvent(QResizeEvent *);
70};
71
Definition: DialogPreview.h:27
QColor ur()
Definition: DialogPreview.h:44
QColor lr()
Definition: DialogPreview.h:36
void UR_ColorChanged(QColor color)
void LL_ColorChanged(QColor color)
void UL_ColorChanged(QColor color)
void LR_ColorChanged(QColor color)
QColor ul()
Definition: DialogPreview.h:40
QColor ll()
Definition: DialogPreview.h:32
~DialogPreview()=default