/
EditWidget.h
47 lines (40 loc) · 1 KB
/
EditWidget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef EDITWIDGET_H
#define EDITWIDGET_H
#include <QtGui>
#include "Item.h"
class EditWidget : public QWidget
{
Q_OBJECT;
public:
EditWidget();
void SetItem(const Item* item); //Set item to edit or NULL to prompt creation of a new item.
bool GetItemInfo(Item& item); //Fills out item info using edited values in widgets.
signals:
void NewItem();
void NewStoneItem();
void NewWoodItem();
void NewGlassItem();
void NewTorchesItem();
void DeleteItem();
void UpdateItem();
private slots:
void FilterTypeList(const QString& filterText);
void SetDamageToZero();
void SetCountToSixtyFour();
private:
QWidget* newWidget;
QPushButton* newButton;
QWidget* editWidget;
QLabel* slotLabel;
QLineEdit* typeSearchEdit;
QListWidget* typeListWidget;
QLabel* damageLabel;
QSpinBox* damageSpinBox;
QLabel* detailLabel;
QComboBox* detailComboBox;
QSpinBox* countSpinBox;
QPushButton* deleteButton;
void PopulateTypeListWidget();
int FindTypeRow(const int type) const;
};
#endif