ff7tk 0.80.25
Work with Final Fantasy 7 game data
PhsListWidget.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 <QEvent>
19#include <QLabel>
20#include <DoubleCheckBox.h>
21
22#ifndef ff7tkwidgets_export_h
23 #include <ff7tkwidgets_export.h>
24#endif
25
31class FF7TKWIDGETS_EXPORT PhsListWidget : public QWidget
32{
33 Q_OBJECT
34public:
38 enum Box {
39 PHSALLOWED = 1,
40 PHSVISIBLE = 2
41 };
42
43 explicit PhsListWidget(QWidget *parent = nullptr);
44
45protected:
46 void changeEvent(QEvent *e);
47
48signals:
53 void allowedToggled(int row, bool checked);
54
59 void visibleToggled(int row, bool checked);
60public slots:
61
67 void setChecked(int row, int box, bool checked);
68
69private slots:
70 void cb_cloud_allowedToggled(bool checked);
71 void cb_cloud_visibleToggled(bool checked);
72 void cb_barret_allowedToggled(bool checked);
73 void cb_barret_visibleToggled(bool checked);
74 void cb_tifa_allowedToggled(bool checked);
75 void cb_tifa_visibleToggled(bool checked);
76 void cb_aerith_allowedToggled(bool checked);
77 void cb_aerith_visibleToggled(bool checked);
78 void cb_red_allowedToggled(bool checked);
79 void cb_red_visibleToggled(bool checked);
80 void cb_yuffie_allowedToggled(bool checked);
81 void cb_yuffie_visibleToggled(bool checked);
82 void cb_cait_allowedToggled(bool checked);
83 void cb_cait_visibleToggled(bool checked);
84 void cb_vincent_allowedToggled(bool checked);
85 void cb_vincent_visibleToggled(bool checked);
86 void cb_cid_allowedToggled(bool checked);
87 void cb_cid_visibleToggled(bool checked);
88
89private:
90 DoubleCheckBox *cb_cloud = nullptr;
91 DoubleCheckBox *cb_barret = nullptr;
92 DoubleCheckBox *cb_tifa = nullptr;
93 DoubleCheckBox *cb_aerith = nullptr;
94 DoubleCheckBox *cb_red = nullptr;
95 DoubleCheckBox *cb_yuffie = nullptr;
96 DoubleCheckBox *cb_cait = nullptr;
97 DoubleCheckBox *cb_vincent = nullptr;
98 DoubleCheckBox *cb_cid = nullptr;
99 QLabel *lbl_phs = nullptr;
100 void init_display();
101 void connectAll();
102 void disconnectAll();
103 void updateText();
104};
one text two checkable boxes
Definition: DoubleCheckBox.h:31
Easily manage the who can be in the phs.
Definition: PhsListWidget.h:32
void allowedToggled(int row, bool checked)
SIGNAL: The allowed box has changed its checked state.
Box
Acces to Allow and Visible boxes without knowing their index.
Definition: PhsListWidget.h:38
void visibleToggled(int row, bool checked)
SIGNAL: The visible box has changed its checked state.