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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
/*
* 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;
}
|