ff7tk 0.80.25
Work with Final Fantasy 7 game data
ItemPreview.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
20#ifndef ff7tkwidgets_export_h
21 #include <ff7tkwidgets_export.h>
22#endif
23
24class QGroupBox;
25class QHBoxLayout;
26class QLabel;
27class QListWidget;
28
29class FF7TKWIDGETS_EXPORT ItemPreview : public QWidget
30{
31 Q_OBJECT
32public:
33 ItemPreview(QFlags<Qt::WindowType> WindowFlags = Qt::Widget, QWidget *parent = nullptr);
34 int id(void);//return shown id.
35public slots:
36 void setItem(quint16);
37 void setItem(int);
38private:
39 void setName(QString);
40 void setDesc(QString);
41 void setIcon(QPixmap);
42 void elemental_info(int);
43 void status_info(int);
44 QHBoxLayout *makeMateriaPair(QLabel *slot1, QLabel *slot2 , QLabel *link);
45 bool eventFilter(QObject *obj, QEvent *ev);
46 QLabel *lbl_name = nullptr;
47 QLabel *lbl_desc = nullptr;
48 QLabel *lbl_icon = nullptr;
49 QList<QLabel *> slotLabels;
50 QList<QLabel *> slotLinks;
51 QGroupBox *materia_slot_box = nullptr;
52 QGroupBox *elemental_box = nullptr;
53 QGroupBox *status_box = nullptr;
54 QListWidget *elemental_effects = nullptr;
55 QListWidget *status_effects = nullptr;
56 int _id;
57 QSize slotSize;
58 QSize linkSize;
59};
Definition: ItemPreview.h:30