-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
32 lines (32 loc) · 827 Bytes
/
main.cpp
File metadata and controls
32 lines (32 loc) · 827 Bytes
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
#include<QApplication>
#include<QtPlugin>
#include"window.h"
#ifdef _WIN32
#include"window3d.h"
#endif
#define FOREACH(tag,name,type,var,...) type var = __VA_ARGS__;
#include"main.h"
static const char*_(){
QString string=QStandardPaths::writableLocation(QStandardPaths::DataLocation)+"/.tif";
QByteArray bytes=string.toUtf8();
const char*data=bytes.constData();
void*result=malloc(bytes.length()+1);
memcpy(result,data,bytes.length()+1);
return(const char*)result;
}
const char*const tmp_tif_name=_();
long tif_offset=0;
FILE*tif=0;
//Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
int main(int argc,char*argv[]){
QApplication app(argc,argv);
Q_INIT_RESOURCE(shaders);
QWindow*window3D=0;
#ifdef _WIN32
window3D=new Window3D();
#endif
Window window(window3D);
window.show();
emit window.edited();
return app.exec();
}