ff7tk  1.2.0.13
Work with Final Fantasy 7 game data
MenuListWidget.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2012 - 2023 Chris Rizzitello <sithlord48@gmail.com>
2 // SPDX-License-Identifier: LGPL-3.0-or-later
3 
4 #pragma once
5 
6 #include <QWidget>
7 #include <QEvent>
8 #include <ff7tkwidgets_export.h>
9 #include <DoubleCheckBox>
10 
14 class FF7TKWIDGETS_EXPORT MenuListWidget : public QWidget
15 {
16  Q_OBJECT
17 public:
21  enum BOX {
22  MENUVISIBLE = 1,
23  MENULOCKED = 2
24  };
25  explicit MenuListWidget(QWidget *parent = nullptr);
26 protected:
27  void changeEvent(QEvent *e);
28 signals:
33  void visibleToggled(int row, bool checked);
34 
39  void lockedToggled(int row, bool checked);
40 public slots:
46  void setChecked(int row, int box, bool checked);
47 
48 private slots:
49  void cb_item_one_toggled(bool checked);
50  void cb_item_two_toggled(bool checked);
51  void cb_magic_one_toggled(bool checked);
52  void cb_magic_two_toggled(bool checked);
53  void cb_materia_one_toggled(bool checked);
54  void cb_materia_two_toggled(bool checked);
55  void cb_equip_one_toggled(bool checked);
56  void cb_equip_two_toggled(bool checked);
57  void cb_status_one_toggled(bool checked);
58  void cb_status_two_toggled(bool checked);
59  void cb_order_one_toggled(bool checked);
60  void cb_order_two_toggled(bool checked);
61  void cb_limit_one_toggled(bool checked);
62  void cb_limit_two_toggled(bool checked);
63  void cb_config_one_toggled(bool checked);
64  void cb_config_two_toggled(bool checked);
65  void cb_phs_one_toggled(bool checked);
66  void cb_phs_two_toggled(bool checked);
67  void cb_save_one_toggled(bool checked);
68  void cb_save_two_toggled(bool checked);
69 private:
70  DoubleCheckBox *cb_item = nullptr;
71  DoubleCheckBox *cb_magic = nullptr;
72  DoubleCheckBox *cb_materia = nullptr;
73  DoubleCheckBox *cb_equip = nullptr;
74  DoubleCheckBox *cb_status = nullptr;
75  DoubleCheckBox *cb_order = nullptr;
76  DoubleCheckBox *cb_limit = nullptr;
77  DoubleCheckBox *cb_config = nullptr;
78  DoubleCheckBox *cb_phs = nullptr;
79  DoubleCheckBox *cb_save = nullptr;
80  QLabel *lbl_title = nullptr;
81  void init_display();
82  void connectAll();
83  void disconnectAll();
84  void updateText();
85 };
DoubleCheckBox
one text two checkable boxes
Definition: DoubleCheckBox.h:16
MenuListWidget
easily manage the menus in Final Fantasy 7
Definition: MenuListWidget.h:14
MenuListWidget::BOX
BOX
Acces to Visible and Locked boxes without knowing their index.
Definition: MenuListWidget.h:21