aboutsummaryrefslogtreecommitdiff
path: root/VMProtect/function_dialog.h
blob: 54b3b54a150fcf7244ce265268a83242aa83a363 (plain)
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
#ifndef FUNCTION_DIALOG_H
#define FUNCTION_DIALOG_H

struct AddressInfo {
	uint64_t address;
	IArchitecture *arch;
};

enum ShowMode {
	smAddFunction,
	smGotoAddress
};

class FunctionDialog : public QDialog
{
    Q_OBJECT
public:
	FunctionDialog(IFile *file, IArchitecture *arch, ShowMode mode, QWidget *parent = NULL);
	QList<AddressInfo> addresses() const { return addresses_; }
	CompilationType compilationType() const;
	uint32_t compilationOptions() const;
private slots:
	void okButtonClicked();
	void functionsTreeSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
	void functionsFilterChanged();
	void helpClicked();
	void sectionClicked(int index);
private:
	bool checkAddress(const AddressInfo &info);

	QTabWidget *tabBar_;
	IFile *file_;
	ShowMode mode_;
	QLineEdit *addressEdit_;
	SearchLineEdit *functionsFilter_;
	QTreeView *functionsTree_;
	QList<AddressInfo> addresses_;
	EnumProperty *compilationType_;
	BoolProperty *lockToKey_;
	std::auto_ptr<MapFunctionBundleListModel> functionBundleListModel_;
	std::auto_ptr<MapFunctionListModel> functionListModel_;
	IArchitecture *defaultArch_;
};

#endif