aboutsummaryrefslogtreecommitdiff
path: root/VMProtect/application.h
blob: 466d289fe59da079a709a1440d5ab4833d4e29a0 (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
#ifndef APPLICATION_H
#define APPLICATION_H

class Application : public QApplication
{
	Q_OBJECT
public:
	Application(int &argc, char **argv);
	bool isHelpMode() { return help_filename_.length() > 0; }
	const QString &helpFileName() const { return help_filename_; }
	static double stylesheetScaleFactor() { return stylesheetScaleFactor_; }
	static double devicePixelRatio() { return devicePixelRatio_; }

	~Application();

signals:
	void fileOpenEvent(const QString &);

protected:
	/*virtual*/ bool event(QEvent *event);

	void installStylesheet();
	QByteArray transformStylesheet(const QByteArray &qssData);
	void initScalingConstants();
	static double stylesheetScaleFactor_, devicePixelRatio_;

	QString help_filename_;
};

#endif