ff7tk  0.02
Toolkit for making FF7 Tools
ItemList.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // copyright 2012 - 2016 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 #ifndef ITEMLIST_H
17 #define ITEMLIST_H
18 
19 #include "qglobal.h"
20 #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
21  #include <QtWidgets>
22 #else
23  #include <QtGui>
24 #endif
25 
26 #include "ItemPreview.h"
27 #include "ItemSelector.h"
28 #include "../data/FF7Item.h"
29 
30 class ItemList : public QTableWidget
31 {
32  Q_OBJECT
33 public:
34  explicit ItemList(qreal Scale=1,QWidget *parent=0);
35 protected:
36  bool eventFilter(QObject *, QEvent *);
37 signals:
38  void itemsChanged(QList<quint16> items);
39 public slots:
40  void setItems(QList<quint16> items);
41  void setMaximumItemQty(int maxQty);
42  void setEditableItemCombo(bool);
43 private slots:
44  void listSelectionChanged(int row,int colum,int prevRow,int prevColum);
45  void itemSelector_changed(quint16);
46 private:
47  void itemupdate();
48  void updateItem(int row);
53  QList<quint16> itemlist;
57  qreal scale;
58 };
59 #endif // ITEMLIST_H
QList< quint16 > itemlist
Definition: ItemList.h:53
void itemsChanged(QList< quint16 > items)
void setMaximumItemQty(int maxQty)
Definition: ItemList.cpp:121
void itemupdate()
Definition: ItemList.cpp:169
void itemSelector_changed(quint16)
Definition: ItemList.cpp:143
bool eventFilter(QObject *, QEvent *)
Definition: ItemList.cpp:18
void setItems(QList< quint16 > items)
Definition: ItemList.cpp:136
void setEditableItemCombo(bool)
Definition: ItemList.cpp:267
Class containg all kinds of info about items in FF7.
Definition: FF7Item.h:99
int itemQtyLimit
Definition: ItemList.h:50
void updateItem(int row)
Definition: ItemList.cpp:233
ItemPreview * itemPreview
Definition: ItemList.h:52
bool createdSelector
Definition: ItemList.h:54
void listSelectionChanged(int row, int colum, int prevRow, int prevColum)
Definition: ItemList.cpp:206
bool createdTooltip
Definition: ItemList.h:55
FF7Item Items
Definition: ItemList.h:49
ItemSelector * itemSelector
Definition: ItemList.h:51
bool editableItemCombo
Definition: ItemList.h:56
qreal scale
Definition: ItemList.h:57
ItemList(qreal Scale=1, QWidget *parent=0)
Definition: ItemList.cpp:89