ff7tk  1.2.0.13
Work with Final Fantasy 7 game data
ItemPreview.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2012 - 2020 Chris Rizzitello <sithlord48@gmail.com>
2 // SPDX-License-Identifier: LGPL-3.0-or-later
3 
4 #pragma once
5 
6 #include <QWidget>
7 #include <ff7tkwidgets_export.h>
8 
9 class QGroupBox;
10 class QHBoxLayout;
11 class QLabel;
12 class QListWidget;
13 
14 class FF7TKWIDGETS_EXPORT ItemPreview : public QWidget
15 {
16  Q_OBJECT
17 public:
18  ItemPreview(QFlags<Qt::WindowType> WindowFlags = Qt::Widget, QWidget *parent = nullptr);
19  int id(void);//return shown id.
20 public slots:
21  void setItem(quint16);
22  void setItem(int);
23 private:
24  void setName(QString);
25  void setDesc(QString);
26  void setIcon(QPixmap);
27  void elemental_info(int);
28  void status_info(int);
29  QHBoxLayout *makeMateriaPair(QLabel *slot1, QLabel *slot2 , QLabel *link);
30  bool eventFilter(QObject *obj, QEvent *ev);
31  QLabel *lbl_name = nullptr;
32  QLabel *lbl_desc = nullptr;
33  QLabel *lbl_icon = nullptr;
34  QList<QLabel *> slotLabels;
35  QList<QLabel *> slotLinks;
36  QGroupBox *materia_slot_box = nullptr;
37  QGroupBox *elemental_box = nullptr;
38  QGroupBox *status_box = nullptr;
39  QListWidget *elemental_effects = nullptr;
40  QListWidget *status_effects = nullptr;
41  int _id;
42  QSize slotSize;
43  QSize linkSize;
44 };
ItemPreview
Definition: ItemPreview.h:14