main.cpp 404 Bytes
Newer Older
Philipp Erhardt's avatar
initial  
Philipp Erhardt committed
1
2
3
4
#include <QApplication>
#include <QString>
#include <iostream>
#include "resourcemanager.h"
Philipp Erhardt's avatar
Philipp Erhardt committed
5
#include "viewer.h"
Philipp Erhardt's avatar
initial  
Philipp Erhardt committed
6

Philipp Erhardt's avatar
Philipp Erhardt committed
7

Philipp Erhardt's avatar
initial  
Philipp Erhardt committed
8
9
10
11
12
13
14
15
16
int main(int argc, char *argv[]) {
	using namespace std;
	QApplication app(argc, argv);

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

Philipp Erhardt's avatar
Philipp Erhardt committed
17
	Viewer katarakt(QString::fromUtf8(argv[1]));
Philipp Erhardt's avatar
Philipp Erhardt committed
18
19
20
	if (!katarakt.is_valid()) {
		return 1;
	}
Philipp Erhardt's avatar
initial  
Philipp Erhardt committed
21

Philipp Erhardt's avatar
fail    
Philipp Erhardt committed
22
	return app.exec();
Philipp Erhardt's avatar
initial  
Philipp Erhardt committed
23
24
}