-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.cpp
49 lines (42 loc) · 1.17 KB
/
main.cpp
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include "lecp.h"
#include <QtWidgets/QApplication>
#include <QtDebug>
#include <QFile>
#include <QTime>
#include <QTextStream>
void myMessageOutput(QtMsgType type, const QMessageLogContext &, const QString & msg)
{
QString txt;
switch (type) {
case QtDebugMsg:
txt = QString("Debug: %1").arg(msg);
break;
case QtWarningMsg:
txt = QString("Warning: %1").arg(msg);
break;
case QtCriticalMsg:
txt = QString("Critical: %1").arg(msg);
break;
case QtFatalMsg:
txt = QString("Fatal: %1").arg(msg);
break;
}
QFile outFile("Log/log");
outFile.open(QIODevice::WriteOnly | QIODevice::Append);
QTextStream ts(&outFile);
ts << QTime::currentTime().toString() << txt << endl;
}
int main(int argc, char *argv[])
{
//qInstallMessageHandler(myMessageOutput);
qDebug() << sizeof(int);
qDebug() << sizeof(MyQline) << sizeof(MyQPoint);
qDebug() << sizeof(Vertex) << sizeof(HalfEdge) << sizeof(LECP_Point);
qDebug() << sizeof(Mesh) << sizeof(Polygon);
QApplication a(argc, argv);
QApplication::addLibraryPath("./plugins");
a.setWindowIcon(QIcon(QStringLiteral(":/Resources/main.ico")));
LECP w;
w.show();
return a.exec();
}