ff7tk 0.80.25
Work with Final Fantasy 7 game data
ItemList.h
Go to the documentation of this file.
1/****************************************************************************/
2// copyright 2012 - 2022 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 <QTableWidget>
19#include <QEvent>
20
21#ifndef ff7tkwidgets_export_h
22 #include <ff7tkwidgets_export.h>
23#endif
24
25class ItemPreview;
26class ItemSelector;
27
28class FF7TKWIDGETS_EXPORT ItemList : public QTableWidget
29{
30 Q_OBJECT
31public:
32 explicit ItemList(QWidget *parent = nullptr);
33protected:
34 bool eventFilter(QObject *, QEvent *);
35 void changeEvent(QEvent *e);
36signals:
37 void itemsChanged(QList<quint16> items);
38public slots:
39 void setItems(const QList<quint16> &items);
40 void setMaximumItemQty(int maxQty);
41 void setEditableItemCombo(bool);
42private slots:
43 void listSelectionChanged(int row, int colum, int prevRow, int prevColum);
44 void itemSelector_changed(quint16);
45private:
46 void itemupdate();
47 void updateItem(int row);
48 void destroyTooltip();
49 void destroySelector();
50 ItemSelector *itemSelector = nullptr;
51 ItemPreview *itemPreview = nullptr;
52 QList<quint16> itemlist;
53 int itemQtyLimit;
54 bool createdSelector;
55 bool createdTooltip;
56 bool editableItemCombo = false;
57};
Definition: ItemList.h:29
void itemsChanged(QList< quint16 > items)
Definition: ItemPreview.h:30
Definition: ItemSelector.h:29