ff7tk 0.80.25
Work with Final Fantasy 7 game data
MenuListWidget.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#include <QEvent>
20
21#include <DoubleCheckBox.h>
22
23#ifndef ff7tkwidgets_export_h
24 #include <ff7tkwidgets_export.h>
25#endif
26
30class FF7TKWIDGETS_EXPORT MenuListWidget : public QWidget
31{
32 Q_OBJECT
33public:
37 enum BOX {
38 MENUVISIBLE = 1,
39 MENULOCKED = 2
40 };
41 explicit MenuListWidget(QWidget *parent = nullptr);
42protected:
43 void changeEvent(QEvent *e);
44signals:
49 void visibleToggled(int row, bool checked);
50
55 void lockedToggled(int row, bool checked);
56public slots:
62 void setChecked(int row, int box, bool checked);
63
64private slots:
65 void cb_item_one_toggled(bool checked);
66 void cb_item_two_toggled(bool checked);
67 void cb_magic_one_toggled(bool checked);
68 void cb_magic_two_toggled(bool checked);
69 void cb_materia_one_toggled(bool checked);
70 void cb_materia_two_toggled(bool checked);
71 void cb_equip_one_toggled(bool checked);
72 void cb_equip_two_toggled(bool checked);
73 void cb_status_one_toggled(bool checked);
74 void cb_status_two_toggled(bool checked);
75 void cb_order_one_toggled(bool checked);
76 void cb_order_two_toggled(bool checked);
77 void cb_limit_one_toggled(bool checked);
78 void cb_limit_two_toggled(bool checked);
79 void cb_config_one_toggled(bool checked);
80 void cb_config_two_toggled(bool checked);
81 void cb_phs_one_toggled(bool checked);
82 void cb_phs_two_toggled(bool checked);
83 void cb_save_one_toggled(bool checked);
84 void cb_save_two_toggled(bool checked);
85private:
86 DoubleCheckBox *cb_item = nullptr;
87 DoubleCheckBox *cb_magic = nullptr;
88 DoubleCheckBox *cb_materia = nullptr;
89 DoubleCheckBox *cb_equip = nullptr;
90 DoubleCheckBox *cb_status = nullptr;
91 DoubleCheckBox *cb_order = nullptr;
92 DoubleCheckBox *cb_limit = nullptr;
93 DoubleCheckBox *cb_config = nullptr;
94 DoubleCheckBox *cb_phs = nullptr;
95 DoubleCheckBox *cb_save = nullptr;
96 QLabel *lbl_title = nullptr;
97 void init_display();
98 void connectAll();
99 void disconnectAll();
100 void updateText();
101};
one text two checkable boxes
Definition: DoubleCheckBox.h:31
easily manage the menus in Final Fantasy 7
Definition: MenuListWidget.h:31
void visibleToggled(int row, bool checked)
SIGNAL: The visible box has changed its checked state.
BOX
Acces to Visible and Locked boxes without knowing their index.
Definition: MenuListWidget.h:37
void lockedToggled(int row, bool checked)
SIGNAL: The locked box has changed its checked state.