src/main.cpp

changeset 200
ca23936b455b
parent 158
5bd755eaa5a8
child 201
5d201ee4a9c3
equal deleted inserted replaced
199:6988973515d2 200:ca23936b455b
17 */ 17 */
18 18
19 #include <QApplication> 19 #include <QApplication>
20 #include "mainwindow.h" 20 #include "mainwindow.h"
21 #include "version.h" 21 #include "version.h"
22 #include <iostream>
23 #include <QMessageBox>
24 #include <QLabel>
25 #include <QImageReader>
26 #include <QPushButton>
27 22
28 int main(int argc, char *argv[]) 23 static void doQtRegistrations()
29 { 24 {
30 QCoreApplication::setApplicationName(::appName); 25 QCoreApplication::setApplicationName(::appName);
31 QCoreApplication::setOrganizationName("hecknology.net"); 26 QCoreApplication::setOrganizationName("hecknology.net");
32 QCoreApplication::setOrganizationDomain("hecknology.net"); 27 QCoreApplication::setOrganizationDomain("hecknology.net");
33 ::qRegisterMetaTypeStreamOperators<Library>("Library"); 28 qRegisterMetaTypeStreamOperators<Library>("Library");
34 ::qRegisterMetaTypeStreamOperators<Libraries>("Libraries"); 29 qRegisterMetaTypeStreamOperators<Libraries>("Libraries");
30 }
31
32 int main(int argc, char *argv[])
33 {
34 doQtRegistrations();
35 QApplication app{argc, argv}; 35 QApplication app{argc, argv};
36 MainWindow mainwindow; 36 MainWindow mainwindow;
37 mainwindow.show(); 37 mainwindow.show();
38 return app.exec(); 38 return app.exec();
39 } 39 }
40
41 QDataStream& operator<<(QDataStream& stream, const glm::vec3& vec)
42 {
43 return stream << vec.x << vec.y << vec.z;
44 }
45 QDataStream& operator>>(QDataStream& stream, glm::vec3& vec)
46 {
47 return stream >> vec.x >> vec.y >> vec.z;
48 }

mercurial