main.cpp 553 Bytes
Newer Older
Philipp Erhardt's avatar
initial  
Philipp Erhardt committed
1
2
3
#include <QApplication>
#include <QImage>
#include <QString>
Philipp Erhardt's avatar
Philipp Erhardt committed
4
#include <QPalette>
Philipp Erhardt's avatar
initial  
Philipp Erhardt committed
5
6
7
#include <iostream>

#include "resourcemanager.h"
Philipp Erhardt's avatar
Philipp Erhardt committed
8
#include "viewer.h"
Philipp Erhardt's avatar
initial  
Philipp Erhardt committed
9
10
11
12

int main(int argc, char *argv[]) {
	using namespace std;
	QApplication app(argc, argv);
Philipp Erhardt's avatar
Philipp Erhardt committed
13
	app.setPalette(QPalette(QColor(255, 255, 255), QColor(0, 0, 0)));
Philipp Erhardt's avatar
initial  
Philipp Erhardt committed
14
15
16
17
18
19

	if (argc != 2) {
		cerr << "usage: " << argv[0] << " <path>" << endl;
		return 1;
	}

20
	ResourceManager res(QString::fromUtf8(argv[1]));
Philipp Erhardt's avatar
Philipp Erhardt committed
21
	if (res.is_null()) {
Philipp Erhardt's avatar
initial  
Philipp Erhardt committed
22
		return 1;
Philipp Erhardt's avatar
Philipp Erhardt committed
23
	}
Philipp Erhardt's avatar
Philipp Erhardt committed
24
25
	Viewer katarakt(&res);
	katarakt.show();
Philipp Erhardt's avatar
initial  
Philipp Erhardt committed
26

Philipp Erhardt's avatar
Philipp Erhardt committed
27
	return katarakt.exec();
Philipp Erhardt's avatar
initial  
Philipp Erhardt committed
28
29
}