Subversion Repositories public iLand

Rev

Rev 1221 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 Werner 1
#include <QtGui/QApplication>
2
#include "mainwindow.h"
301 werner 3
#include "../3rdparty/MersenneTwister.h"
763 werner 4
#include "globalsettings.h"
301 werner 5
MTRand _mtrand;
6
MTRand &mtRand()
7
{
8
    return _mtrand;
9
}
3 Werner 10
 
772 werner 11
// stuff from globalsettings.cpp in order to compile the lightroom
12
int _loglevel=0;
13
 // true, if detailed debug information is logged
14
bool logLevelDebug()
15
{
16
    return _loglevel<1;
17
}
356 werner 18
 
772 werner 19
// true, if only important aggreate info is logged
20
bool logLevelInfo()
21
{
22
    return _loglevel<2;
23
}
24
 
25
// true if only severe warnings/errors are logged.
26
bool logLevelWarning()
27
{
28
    return _loglevel<3;
29
}
30
void setLogLevel(int loglevel)
31
{
32
    _loglevel=loglevel;
33
    switch (loglevel) {
34
    case 0: qDebug() << "Loglevel set to Debug."; break;
35
    case 1: qDebug() << "Loglevel set to Info."; break;
36
    case 2: qDebug() << "Loglevel set to Warning."; break;
37
    case 3: qDebug() << "Loglevel set to Error/Quiet."; break;
38
    default: qDebug() << "invalid log level" << loglevel; break;
39
    }
40
}
41
 
3 Werner 42
int main(int argc, char *argv[])
43
{
44
    QApplication a(argc, argv);
45
    MainWindow w;
46
    w.show();
47
    return a.exec();
48
}