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

main.cpp

/*
 * This file is part of the QPxTool project.
 * Copyright (C) 2005-2006 Gennady "ShultZ" Kozlov <qpxtool@mail.ru>
 *
 * 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.
 * See the file "COPYING" for the exact licensing terms.
 */

#include <stdio.h>
#include <sys/utsname.h>

#include <qapplication.h>

#include <qmainwindow.h>
#include <QPxTool.h>

#if (QT_VERSION-1 >= 0x040000)
#error "QT4 not supported!"
#endif

#include "version.h"
//#include "buildhost.h"

struct      utsname sys;


int main(int argc, char *argv[])
{
//     const char *program_name = argv[0];
      printf("\n________________________________________");
      printf("\n QPxTool-%s\n (c) 2005-2006, Gennady \"ShultZ\" Kozlov",VERSION);
      printf("\n________________________________________");
      printf("\ncurrent system:");
      uname(&sys);      
      printf("\nOS name : %s\nrelease : %s\nversion : %s\nmachine : %s\nnode    : %s\ndomain  : %s",
#if defined(__linux)
            sys.sysname, sys.release, sys.version, sys.machine, sys.nodename, sys.domainname);
#else
            sys.sysname, sys.release, sys.version, sys.nodename, sys.machine, "<unknown>");
#endif
/*
      printf("\n________________________________________");


      printf("\nbuilt on:");
      printf("\nOS name : %s\nrelease : %s\nversion : %s\nmachine : %s\nnode    : %s",
            b_os, b_release, b_version, b_machine, b_node);
*/

      printf("\n________________________________________\n");
      QApplication QPT(argc,argv);
//    QPxTool_mainwin *mainwindow;
      QPxToolWidget *mainwindow;
      printf("** creating mainwin\n");
//    mainwindow = new QPxTool_mainwin(0 ,"QPT_MainWindow");
      mainwindow = new QPxToolWidget(0 ,"QPT_MainWindow");
      printf("** setting main widget\n");
      QPT.setMainWidget(mainwindow);
      printf("** initializing main window...\n");
//    pix_logo.convertFromImage(QImage(q_xpm),0);
//    mainwindow->setIcon(pix_logo);
      mainwindow->setCaption(QString("QPxTool - v%1").arg(VERSION));
//    mainwindow->init();
      mainwindow->show();
      bool rc = QPT.exec();
      delete mainwindow;
      return rc;
}

Generated by  Doxygen 1.6.0   Back to index