ff7tk 0.80.25
Work with Final Fantasy 7 game data
DoubleCheckBox.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 <QWidget>
19
20#ifndef ff7tkwidgets_export_h
21 #include <ff7tkwidgets_export.h>
22#endif
23
24class QCheckBox;
25class QLabel;
26
30class FF7TKWIDGETS_EXPORT DoubleCheckBox : public QWidget
31{
32 Q_OBJECT
33public:
37 explicit DoubleCheckBox(QWidget *parent = nullptr);
42 explicit DoubleCheckBox(const QString &text, QWidget *parent = nullptr);
43 ~DoubleCheckBox() = default;
47 void setText(const QString &text);
48
53 void setChecked(int box, bool checked);
54
59 bool isChecked(int box);
60
65 void setBoxToolTip(int box, const QString &text);
66
70 void setToolTip(const QString &text);
71
72signals:
76 void box1_toggled(bool checked);
77
81 void box2_toggled(bool checked);
82private:
83 void init_display();
84 QCheckBox *cb_one = nullptr;
85 QCheckBox *cb_two = nullptr;
86 QLabel *label = nullptr;
87 qreal _scale = 1;
88};
one text two checkable boxes
Definition: DoubleCheckBox.h:31
~DoubleCheckBox()=default
void box2_toggled(bool checked)
Signal: box2 has had its state changed.
void box1_toggled(bool checked)
Signal: box1 has had its state changed.