-
Notifications
You must be signed in to change notification settings - Fork 4
/
exportthread.h
69 lines (56 loc) · 1.74 KB
/
exportthread.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
#ifndef EXPORTTHREAD_H
#define EXPORTTHREAD_H
#include <QDir>
#include "userthread.h"
#include "tibiaresource.h"
#include "tibiahandler.h"
#include "resourcehandler.h"
class TibiaItem;
enum ExportMode_t {
EXPORT_NONE = 0,
EXPORT_ITEM,
EXPORT_LIBRARY,
EXPORT_PNG,
EXPORT_BMP
};
class ExportThread : public UserThread
{
Q_OBJECT
public:
ExportThread( QObject *parent = 0, ExportMode_t mode = EXPORT_NONE );
virtual ~ExportThread( void );
virtual void setup( void );
ExportMode_t getMode( void ) const {
return m_exportMode;
};
void exportItems( const QString& name, ItemList& items, quint32& currentItem, QTime& time );
void exportSprites( const QString& name, ResourceList& sprites, quint32& currentSprite, QTime& time );
bool exportSprite( const QDir& dir, const SharedResource& );
bool exportItem( const QDir& dir, TibiaItem * );
void setFormat( const quint32 _format );
void setMode( const ExportMode_t mode );
void setDirectory( const QString& dir );
void setItems( const ItemList& vector );
void setOutfits( const ItemList& vector );
void setEffects( const ItemList& vector );
void setProjectiles( const ItemList& vector );
void setSprites( const ResourceList& vector );
void setPictures( const ResourceList& vector );
void setDrawParameters( const DrawParameters& params );
protected:
virtual void run( void );
private:
bool m_abort;
mutable QMutex mutex;
quint32 m_format;
QString m_directory;
ExportMode_t m_exportMode;
DrawParameters m_dParams;
ItemList m_items;
ItemList m_outfits;
ItemList m_effects;
ItemList m_projectiles;
ResourceList m_sprites;
ResourceList m_pictures;
};
#endif // EXPORTTHREAD_H