-
Notifications
You must be signed in to change notification settings - Fork 4
/
itemsearch.h
49 lines (37 loc) · 1.27 KB
/
itemsearch.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
#ifndef ITEMSEARCH_H
#define ITEMSEARCH_H
#include <QDialog>
#include <QTime>
#include <QFutureWatcher>
#include "ui_itemsearch.h"
class ItemModel;
class QItemSelectionModel;
class ItemSearch : public QDialog
{
Q_OBJECT
public:
ItemSearch( QWidget *parent = 0 );
virtual ~ItemSearch( void );
void toggleAdvanced( void );
quint32 colorDominance( const QImage& image, quint8 colorIntensity = 30 ) const;
ItemList itemSelection( QItemSelectionModel *selectionModel );
void performSearch( const HeaderList& headerSearch, const PropertyList& propertySearch, ItemFile *itemFile );
bool verifyItem( const HeaderList& headerSearch, const PropertyList& propertySearch, const TibiaItem *item ) const;
private:
QFutureWatcher<void> searchWatcher;
QTime time;
ItemList results;
ItemModel *itemModel;
Ui::ItemSearchClass *ui;
signals:
void selectItems( const ItemList&, const ItemList&, const ItemList&, const ItemList& );
protected:
virtual void closeEvent( QCloseEvent *event );
private slots:
void onSearchComplete( void );
void on_buttonSelect_clicked( void );
void on_buttonFind_clicked( void );
void on_comboVersions_currentIndexChanged( int );
void on_checkAdvanced_stateChanged( int );
};
#endif // ITEMSEARCH_H