ff7tk  0.02
Toolkit for making FF7 Tools
PhsListWidget.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // copyright 2012 - 2016 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 #ifndef PHSLISTWIDGET_H
17 #define PHSLISTWIDGET_H
18 
19 #include "qglobal.h"
20 #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
21  #include <QtWidgets>
22 #else
23  #include <QtGui>
24 #endif
25 #include "DoubleCheckBox.h"
31 class PhsListWidget : public QWidget
32 {
33  Q_OBJECT
34 public:
39 
40  explicit PhsListWidget(qreal Scale=1, QWidget * parent=0);
41 
42 signals:
47  void allowedToggled(int row,bool checked);
48 
53  void visibleToggled(int row,bool checked);
54 public slots:
55 
61  void setChecked(int row,int box,bool checked);
62 private slots:
63  void cb_cloud_allowedToggled(bool checked);
64  void cb_cloud_visibleToggled(bool checked);
65  void cb_barret_allowedToggled(bool checked);
66  void cb_barret_visibleToggled(bool checked);
67  void cb_tifa_allowedToggled(bool checked);
68  void cb_tifa_visibleToggled(bool checked);
69  void cb_aerith_allowedToggled(bool checked);
70  void cb_aerith_visibleToggled(bool checked);
71  void cb_red_allowedToggled(bool checked);
72  void cb_red_visibleToggled(bool checked);
73  void cb_yuffie_allowedToggled(bool checked);
74  void cb_yuffie_visibleToggled(bool checked);
75  void cb_cait_allowedToggled(bool checked);
76  void cb_cait_visibleToggled(bool checked);
77  void cb_vincent_allowedToggled(bool checked);
78  void cb_vincent_visibleToggled(bool checked);
79  void cb_cid_allowedToggled(bool checked);
80  void cb_cid_visibleToggled(bool checked);
81 
82 private:
92  QLabel *lbl_phs;
93  void init_display();
94  void connectAll();
95  void disconnectAll();
96  qreal scale;
97 };
98 
99 #endif // PHSMENULIST_H
void cb_barret_allowedToggled(bool checked)
void cb_vincent_visibleToggled(bool checked)
void visibleToggled(int row, bool checked)
SIGNAL: The visible box has changed its checked state.
void cb_yuffie_visibleToggled(bool checked)
PhsListWidget(qreal Scale=1, QWidget *parent=0)
Box
Acces to Allow and Visible boxes without knowing their index.
Definition: PhsListWidget.h:38
DoubleCheckBox * cb_cloud
Definition: PhsListWidget.h:83
DoubleCheckBox * cb_cait
Definition: PhsListWidget.h:89
void cb_vincent_allowedToggled(bool checked)
void cb_tifa_allowedToggled(bool checked)
void setChecked(int row, int box, bool checked)
SLOT: set the check state for an item.
Easily manage the who can be in the phs.
Definition: PhsListWidget.h:31
void cb_barret_visibleToggled(bool checked)
void cb_aerith_visibleToggled(bool checked)
void cb_cloud_visibleToggled(bool checked)
QLabel * lbl_phs
Definition: PhsListWidget.h:92
DoubleCheckBox * cb_barret
Definition: PhsListWidget.h:84
void allowedToggled(int row, bool checked)
SIGNAL: The allowed box has changed its checked state.
void cb_aerith_allowedToggled(bool checked)
DoubleCheckBox * cb_aerith
Definition: PhsListWidget.h:86
DoubleCheckBox * cb_tifa
Definition: PhsListWidget.h:85
DoubleCheckBox * cb_cid
Definition: PhsListWidget.h:91
void cb_red_allowedToggled(bool checked)
void cb_cid_allowedToggled(bool checked)
DoubleCheckBox * cb_red
Definition: PhsListWidget.h:87
void cb_yuffie_allowedToggled(bool checked)
void cb_red_visibleToggled(bool checked)
void cb_cloud_allowedToggled(bool checked)
void cb_cait_allowedToggled(bool checked)
void cb_cid_visibleToggled(bool checked)
void cb_tifa_visibleToggled(bool checked)
DoubleCheckBox * cb_vincent
Definition: PhsListWidget.h:90
void cb_cait_visibleToggled(bool checked)
DoubleCheckBox * cb_yuffie
Definition: PhsListWidget.h:88
one text two checkable boxes