-
Notifications
You must be signed in to change notification settings - Fork 4
/
itemeditor.h
105 lines (89 loc) · 2.7 KB
/
itemeditor.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#ifndef ITEMEDITOR_H
#define ITEMEDITOR_H
#include <QMdiSubWindow>
#include <QUndoStack>
#include <QWidget>
#include "tibiahandler.h"
#include "ui_itemeditor.h"
class ItemSpriteModel;
class ItemEditor : public QMdiSubWindow
{
Q_OBJECT
public:
ItemEditor( QWidget *parent = 0, Qt::WindowFlags flags = 0, TibiaItem *tibiaItem = NULL, const ItemData& itemData = ItemData() );
~ItemEditor( void );
TibiaItem *getTibiaItem( void ) const {
return m_tibiaItem;
};
QUndoStack *getUndoStack( void ) const {
return m_undoStack;
};
QSpinBox *getWidth( void ) const {
return ui->viewAttributeWidth;
};
QSpinBox *getHeight( void ) const {
return ui->viewAttributeHeight;
};
QSpinBox *getCropsize( void ) const {
return ui->viewAttributeCropsize;
};
QSpinBox *getLayers( void ) const {
return ui->viewAttributeLayers;
};
QSpinBox *getXDiv( void ) const {
return ui->viewAttributeXDiv;
};
QSpinBox *getYDiv( void ) const {
return ui->viewAttributeYDiv;
};
QSpinBox *getZDiv( void ) const {
return ui->viewAttributeZDiv;
};
QSpinBox *getAnimations( void ) const {
return ui->viewAttributeAnimations;
};
ItemAttributes *getItemAttributes( void ) const {
return ui->itemAttributes;
};
protected:
virtual void closeEvent( QCloseEvent *event );
private:
DrawParameters dParams;
ItemSpriteModel *m_spriteModel;
QUndoStack *m_undoStack;
TibiaItem *m_tibiaItem;
ItemData m_itemData;
QWidget *m_internalWidget;
Ui::ItemEditorClass *ui;
signals:
void savedItem( TibiaItem *, const ItemData& );
public slots:
void repaint( void );
void onInvalidate( void );
void onLoadItem( void );
void onSetupAnimations( void );
void onSetupLayers( void );
void onSetupAddons( void );
void onSetupFloorPattern( void );
void onSetupDirections( void );
void onToggleBlend( bool );
void onSetAnimation( int );
void onSetLayer( int );
void onSetAddon( int );
void onSetFloorPattern( int value );
void onSetDirectionEast( void );
void onSetDirectionNorth( void );
void onSetDirectionNorthEast( void );
void onSetDirectionNorthWest( void );
void onSetDirectionSouth( void );
void onSetDirectionSouthEast( void );
void onSetDirectionSouthWest( void );
void onSetDirectionWest( void );
void onAppearanceButtonClicked( QAbstractButton * );
void onAttributeButtonClicked( QAbstractButton * );
void onImageChanged( const QImage& );
void onCurrentIndexChanged( int );
friend class CommandSetItemProperties;
friend class CommandSetItemAppearance;
};
#endif // ITEMEDITOR_H