Beispiel #1
0
Army::Army(QObject* parent) : QObject(parent)
{
    QLoggerManager *manager = QLoggerManager::getInstance();
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_TRACE), QLogger::TraceLevel);
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_INFO), QLogger::InfoLevel);
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_ERR), QLogger::ErrorLevel);
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_WARN), QLogger::WarnLevel);
}
Beispiel #2
0
ModelFactory::ModelFactory()
{
    QLoggerManager *manager = QLoggerManager::getInstance();
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_TRACE), QLogger::TraceLevel);
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_INFO), QLogger::InfoLevel);
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_ERR), QLogger::ErrorLevel);
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_WARN), QLogger::WarnLevel);
}
Beispiel #3
0
Army::Army(const Army &copy) : QObject(copy.parent())
{
    QLoggerManager *manager = QLoggerManager::getInstance();
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_TRACE), QLogger::TraceLevel);
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_INFO), QLogger::InfoLevel);
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_ERR), QLogger::ErrorLevel);
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_WARN), QLogger::WarnLevel);


    name = copy.name;
    units = copy.units;
}
Beispiel #4
0
MagicalObject::MagicalObject(const MagicalObject &copy) : QObject(copy.parent())
{
    QLoggerManager *manager = QLoggerManager::getInstance();
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_TRACE), QLogger::TraceLevel);
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_INFO), QLogger::InfoLevel);
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_ERR), QLogger::ErrorLevel);
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_WARN), QLogger::WarnLevel);

    name = copy.name;
    points = copy.points;
    cabalistic = copy.cabalistic;
    specialRules = copy.specialRules;
}
Beispiel #5
0
MagicalObject::MagicalObject(QString n, int p, bool c, QString s, QObject *parent) : QObject(parent)
{
    QLoggerManager *manager = QLoggerManager::getInstance();
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_TRACE), QLogger::TraceLevel);
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_INFO), QLogger::InfoLevel);
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_ERR), QLogger::ErrorLevel);
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_WARN), QLogger::WarnLevel);

    name = n;
    points = p;
    cabalistic = c;
    specialRules = s;
}
EnhancedGraphicsScene::EnhancedGraphicsScene(QObject *parent) :
    QGraphicsScene(parent)
{
    QLoggerManager *manager = QLoggerManager::getInstance();
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_TRACE), QLogger::TraceLevel);
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_INFO), QLogger::InfoLevel);
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_ERR), QLogger::ErrorLevel);
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_WARN), QLogger::WarnLevel);

    rubberBandOn = false;
    rot = false;
    firstRot = true;
    clicked = false;
}
Beispiel #7
0
int main(int argc, char *argv[])
{
	QApplication a(argc, argv);
    
    QLoggerManager *manager = QLoggerManager::getInstance();
    qDebug()<<QDir::currentPath();
    QStringList moduleList;
    moduleList.append("Server");
    moduleList.append("ClientThread");
    manager->addDestination(QDir::currentPath() + "/logs/sever.log", QStringList("Server"),QLogger::TraceLevel);
    manager->addDestination(QDir::currentPath() + "/logs/client.log", QStringList("ClientThread"),QLogger::TraceLevel);

	MainWindow w;
	w.show();
	a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
	return a.exec();
}
Beispiel #8
0
ModelWindow::ModelWindow(QString f, QWidget *parent) :
    QWidget(parent),
    ui(new Ui::ModelWindow)
{
    QLoggerManager *manager = QLoggerManager::getInstance();
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_TRACE), QLogger::TraceLevel);
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_INFO), QLogger::InfoLevel);
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_ERR), QLogger::ErrorLevel);
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_WARN), QLogger::WarnLevel);

    QLog_Info(LOG_ID_INFO, "ModelWindow() : entered model window with loading constructor.");

    ui->setupUi(this);

    setWindowTitle("Warhole " +
                   WARHOLE_VERSION_STRING +
                   tr(" - Création de figurine"));

    image = new QPixmap();

    scene = new QGraphicsScene();

    ui->graphicsView->setScene(scene);

    options = new QStandardItemModel();
    regOptions = new QStandardItemModel();
    crew = new QStandardItemModel();

    QStringList modelList;
    modelList << CAVALERY_STRING << CHARACTER_STRING << CHARRIOT_STRING <<
    		     INFANTERY_STRING << MONSTER_STRING << WARMACHINE_STRING;
    ui->comboUnitType->addItems(modelList);

    ui->viewOptions->setModel(options);
    ui->viewOptions2->setModel(regOptions);
    options->setHorizontalHeaderLabels(OPTION_HEADER);
    regOptions->setHorizontalHeaderLabels(OPTION_HEADER);

    ui->viewModelCrew->setModel(crew);
    ui->viewModelCrew->header()->hide();

    loadInfanteryWidget();

    load(f);
}
MagicalObjectWindow::MagicalObjectWindow(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::MagicalObjectWindow)
{
    QLoggerManager *manager = QLoggerManager::getInstance();
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_TRACE), QLogger::TraceLevel);
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_INFO), QLogger::InfoLevel);
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_ERR), QLogger::ErrorLevel);
    manager->addDestination("./logs/lastrun.log", QStringList(LOG_ID_WARN), QLogger::WarnLevel);

    ui->setupUi(this);

    setWindowTitle("Warhole " +
                   WARHOLE_VERSION_STRING +
                   tr(" - Objets magiques"));

    model = new QFileSystemModel(this);

    objects = new QStandardItemModel();
    ui->treeViewExistingObjects->setModel(objects);
}
Beispiel #10
0
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    a.setStyle(QStyleFactory::create("cleanlooks"));

    //a.setStyle("fusion");
    //a.setStyle("windows");
    //a.setStyle("motif");
    //a.setStyle("cde");
    //a.setStyle("plastique");
    //a.setStyle("windowsxp");
    //a.setStyle("macintosh");

    //a.setStyle(QStyleFactory::create("Fusion"));

    a.setStyleSheet("QToolTip { color: #fff; background-color: #111; border-radius: 3px; border: 1px solid #333; font: 14px; }");

    // startup de log engine
    QLoggerManager *manager = QLoggerManager::getInstance();
    manager->addDestination("file.log", "Default", DebugLevel);
    QLog_Debug("Default", QString("%1 started").arg( a.applicationDisplayName() ));

    QTranslator translator;
    // look up e.g. :/translations/app.xx_XX.qm
    if (translator.load(QLocale(), QLatin1String("app"), QLatin1String("."), QLatin1String(":/translations")))
        a.installTranslator(&translator);

//Force Locale
//if (translator.load(QLocale(QLocale::Portuguese, QLocale::Brazil), QLatin1String("app"), QLatin1String("."), QLatin1String(":/translations")))
//    a.installTranslator(&translator);


QLog_Debug("Default", QString("TranslationData %1").arg( sizeof(TranslationData) ));
QLog_Debug("Default", QString("PROFILE_SIZE %1").arg( PROFILE_SIZE ));
QLog_Debug("Default", QString("ProfileData %1").arg( sizeof(ProfileData) ));


    Dialog w;

    w.show();

    return a.exec();
}