Logo Search packages:      
Sourcecode: qcake version File versions  Download package

main.cpp

/***************************************************************************
                          main.cpp  -  description
                             -------------------
    begin                : Fri JAN  12 16:54:22 CET 2007
    copyright            : (C) 2007 by Harald Krippel
    email                : harald@the-develop.net
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#include <QApplication>

#include "globdefines.h"
#include "mainwindow.hpp"
#include "astar.hpp"
#include "listviews.hpp"
#include <plib/ssg.h>
#include "messages.hpp"

// global variables !!!!
int g_mouse_mode=0;
int g_mouse_x=0;
int g_mouse_y=0;
int g_mouse_button=0;
sgVec3 g_poi; // point of interest
int g_window_w=0;
int g_window_h=0;
int g_key=0;
int g_playmode=0;
int g_switch = 0;
long g_nextid=0;

Glcontrol    *g_gl=NULL;
QString g_prjpath;
QString g_apppath;
QString g_editor;
// Catalog
QString g_3dcatalogpath;
QString g_scriptcatalogpath;
QString g_soundcatalogpath;
QString g_shadercatalogpath;
QString g_physikcatalogpath;

Messages *g_messages = NULL;

FolderListItem *g_tmpItem=NULL;
FolderListItem *g_switchScene = NULL;
// AStar
aStar *gastar= NULL;

int main(int argc, char *argv[])
{
    int error=0;

    QApplication app(argc, argv);

    QSplashScreen *splash = new QSplashScreen(QPixmap(":/images/qcake.png"));
    splash->setWindowFlags(splash->windowFlags() | Qt::WindowStaysOnTopHint);
    splash->show();
    splash->showMessage("Initialize QCake Designer...", Qt::AlignRight | Qt::AlignTop, Qt::blue);
    QTimer::singleShot(2000, splash, SLOT(close()));

    g_apppath = QCoreApplication::applicationDirPath ();
 #ifdef    Q_OS_MACX
    g_apppath = ".";
 #endif
    qWarning(g_apppath.toAscii());
    Q_INIT_RESOURCE(dockwidgets);
    g_messages = new Messages;
    MainWindow mainWin;
    mainWin.show();
    if (splash) {
        delete splash;
    }
    error = app.exec();
    if (g_messages) {
        delete g_messages;
    }
    return (error);
}

Generated by  Doxygen 1.6.0   Back to index