예제 #1
0
파일: main.cpp 프로젝트: speakman/qlc
int main(int argc, char** argv)
{
	QApplication qapp(argc, argv);

	EnttecDMXUSBOut dmxusb;

	int r;
	do {
		dmxusb.rescanWidgets();

		QStringListIterator it(dmxusb.outputs());
		while (it.hasNext() == true)
		{
			QString widget = it.next();
			qDebug() << widget;
		}

		dmxusb.open(0);

		QByteArray ba(512, 0);
		dmxusb.writeRange(0, 0, (t_value*) ba.data(), 512);

		r = QMessageBox::question(NULL, "Rescan?",
			"Rescan available Enttec DMX USB widgets?",
			QMessageBox::Yes, QMessageBox::No);

		dmxusb.close(0);

	} while (r == QMessageBox::Yes);

	return 0;
}
int main(int argc, char** argv) {
  QApplication qapp(argc, argv);
  MaskTestForm mtform;
  mtform.show();
  return qapp.exec();

}
예제 #3
0
//start id=testcode
int main(int argc, char** argv) {
    QApplication qapp(argc, argv);
    Mp3File* sourceptr = new Mp3File;
    PropertySelectorControl* tchd = new PropertySelectorControl(sourceptr);
    tchd->show();
    return qapp.exec();
}
예제 #4
0
int main(int argc, char *argv[])
{
    QCoreApplication qapp(argc, argv);
    qapp.setApplicationName(QLatin1String("main"));
    qapp.setApplicationVersion(QLatin1String(ABOUT_VERSION));
    qapp.setOrganizationName(QLatin1String(ABOUT_ORGANIZATIONID));

	QStringList list = qapp.arguments();

	int ii = list.indexOf(QLatin1String("install"));
	int iu = list.indexOf(QLatin1String("uninstall"));

	if (ii>=0) {
		//QDir dir =  QDir::current();
		//dir.cdUp ();
		QSettings s;
		s.setValue(QLatin1String("path"), list[ii+1]);
		return 0;
	} else if (iu >=0) {
		QSettings s;
		s.clear();
	    return 0;
	} else {
		    qDebug() << "Usage: --install path OR --uninstall";
//			Sleep(2000);
	}

    return 1;
}
예제 #5
0
main(int argc, char** argv)
{
    XtAppContext app;

    Widget toplevel = XtAppInitialize(
	&app, "Editors",
	0, 0, &argc, argv, 0, 0, 0);
    QXtApplication qapp(XtDisplay(toplevel));

    Widget form = XtVaCreateManagedWidget("form", formWidgetClass, toplevel, 0);

    EncapsulatedQtWidget qtchild(form);

    Arg args[20];
    Cardinal nargs=0;
    XtSetArg(args[nargs], XtNwidth, 200);                    nargs++;
    XtSetArg(args[nargs], XtNheight, 200);                   nargs++;
    XtSetValues(qtchild.xtWidget(), args, nargs);

    nargs=0;
    XtSetArg(args[nargs], XtNeditType, XawtextEdit);         nargs++;
    XtSetArg(args[nargs], XtNstring, XTEDMSG);               nargs++;
    XtSetArg(args[nargs], XtNwidth, 200);                    nargs++;
    XtSetArg(args[nargs], XtNheight, 200);                   nargs++;
    XtSetArg(args[nargs], XtNfromHoriz, qtchild.xtWidget()); nargs++;
    Widget xtchild = XtCreateManagedWidget("editor", asciiTextWidgetClass,
	form, args, nargs);

    XtRealizeWidget(toplevel);
    XtAppMainLoop(app);
}
예제 #6
0
파일: main.cpp 프로젝트: speakman/qlc
int main(int argc, char** argv)
{
	QCoreApplication qapp(argc, argv);

	UDMXOut ud;
	ud.init();

	if (ud.outputs().size() > 0)
	{
		qDebug() << "uDMX devices:" << ud.outputs();

		unsigned char uni[512] = { 0 };
		uni[0] = 64;
		uni[1] = 127;
		uni[2] = 192;
		uni[3] = 255;

		ud.open(0);
		ud.writeRange(0, 0, (t_value*) uni, 512);
		ud.close(0);
	}
	else
	{
		qDebug() << "No uDNX devices present.";
	}

	return 0;
}
예제 #7
0
파일: main.cpp 프로젝트: abletterer/CGoGN-1
int main( int argc, char **argv )
{
  QApplication qapp(argc, argv);

  PythonQt::init(PythonQt::IgnoreSiteModule | PythonQt::RedirectStdOut);
  PythonQt_QtAll::init();

  PythonQtObjectPtr  mainContext = PythonQt::self()->getMainModule();

  bool showConsole = false;
  QStringList files;
  for (int i = 1; i < argc; i++) {
    QString arg = argv[i];
    QString argLower = arg.toLower();
    if (argLower == "-console" || argLower == "-c") {
      showConsole = true;
    } else {
      QString file = arg;
      QFileInfo info(file);
      if (info.exists()) {
        files << info.absoluteFilePath();
        // add the file's absolute path for local importing
        PythonQt::self()->addSysPath(info.absolutePath());
      } else {
        QMessageBox::warning(NULL, "PyLauncher", QString("File does not exist: %1").arg(file));
      }
    }
  }
  PythonQtScriptingConsole console(NULL, mainContext);

  Q_FOREACH(QString file, files) {
    mainContext.evalFile(file);
  }
int main(int argc, char** argv) {
    QApplication qapp(argc, argv);
    AudioMetaData* sourceptr = new AudioMetaData();
    PropertySelectorControl* tchd = new PropertySelectorControl(sourceptr);
    tchd->show();
    return qapp.exec();
}
예제 #9
0
파일: main.cpp 프로젝트: PML369/qlcplus
/**
 * THE entry point for the application
 *
 * @param argc Number of arguments in array argv
 * @param argv Arguments array
 */
int main(int argc, char** argv)
{
    /* Create the Qt core application object */
    QApplication qapp(argc, argv);

#if defined(__APPLE__) || defined(Q_OS_MAC)
    /* Load plugins from within the bundle ONLY */
    QDir dir(QApplication::applicationDirPath());
    dir.cdUp();
    dir.cd("plugins");
    QApplication::setLibraryPaths(QStringList(dir.absolutePath()));
#endif

    /* Let te world know... */
    printVersion();

    /* Parse command-line arguments */
    if (parseArgs(argc, argv) == false)
        return 0;

    /* Load translation for current locale */
    loadTranslation(QLocale::system().name(), qapp);

    /* Create and initialize the Fixture Editor application object */
    App app;
    if (FXEDArgs::fixture.isEmpty() == false)
        app.loadFixtureDefinition(FXEDArgs::fixture);

    /* Show and execute the application */
    app.show();
    return qapp.exec();
}
예제 #10
0
파일: qtosg.cpp 프로젝트: vicrucann/cherish
int main(int argc, char** argv)
{
//    QApplication::setAttribute(Qt::AA_DisableHighDpiScaling);
    SetProcessDPIAware();

    QApplication qapp(argc, argv);

    int x = QApplication::desktop()->physicalDpiX();
    int y = QApplication::desktop()->physicalDpiY();
    double scaleX = 284.0/double(x);
    double scaleY = 285.0/double(y);

    std::cout << x << " " << y << std::endl;
    std::cout << QApplication::desktop()->logicalDpiX() << " " << QApplication::desktop()->logicalDpiY() << std::endl;



    QMainWindow window;
    QtOSGWidget* widget = new QtOSGWidget(1, 1, &window);
    window.setCentralWidget(widget);
    window.show();

    std::cout << scaleX << " " << scaleY << std::endl;
//    std::cout << pr << " " << ps << std::endl;

    return qapp.exec();
}
예제 #11
0
파일: main.cpp 프로젝트: glocklueng/qlc
int main(int argc, char** argv)
{
    QApplication qapp(argc, argv);
    int r;

    EWing_Test ewi;
    r = QTest::qExec(&ewi, argc, argv);
    if (r != 0)
        return r;

    EPlaybackWing_Test epl;
    r = QTest::qExec(&epl, argc, argv);
    if (r != 0)
        return r;

    EShortcutWing_Test esh;
    r = QTest::qExec(&esh, argc, argv);
    if (r != 0)
        return r;

    EProgramWing_Test epr;
    r = QTest::qExec(&epr, argc, argv);
    if (r != 0)
        return r;

    return 0;
}
예제 #12
0
int main(int argc, char **argv)
{
	QCoreApplication qapp(argc, argv);
	AppMain appMain;
	QObject::connect(&appMain, SIGNAL(quit()), &qapp, SLOT(quit()));
	QTimer::singleShot(0, &appMain, SLOT(start()));
	return qapp.exec();
}
예제 #13
0
int main(int argc, char *argv[])
{
  QApplication qapp(argc, argv);
  DS::MainWin *main_win = new DS::MainWin();
  qapp.setMainWidget(main_win);
  main_win->show();
  qapp.exec();
  return 0;
}
예제 #14
0
파일: main.cpp 프로젝트: speakman/qlc
int main(int argc, char** argv)
{
	QCoreApplication qapp(argc, argv);

	EnttecDMXUSBProOut pro;
	pro.init();

	return qapp.exec();
}
예제 #15
0
파일: main.cpp 프로젝트: OnceBe/qlcplus
/**
 * THE entry point for the application
 *
 * @param argc Number of arguments in array argv
 * @param argv Arguments array
 */
int main(int argc, char** argv)
{
    /* Create the Qt core application object */
    QApplication qapp(argc, argv);

    /* At least MIDI plugin requires this so best to declare it here for everyone */
    qRegisterMetaType<QVariant>("QVariant");

#ifdef __APPLE__
    /* Load plugins from within the bundle ONLY */
    QDir dir(QApplication::applicationDirPath());
    dir.cdUp();
    dir.cd("plugins");
    QApplication::setLibraryPaths(QStringList(dir.absolutePath()));
#endif

    QLCi18n::init();

    /* Let the world know... */
    printVersion();

    /* Parse command-line arguments */
    if (parseArgs() == false)
        return 0;

    /* Load translation for main application */
    QLCi18n::loadTranslation("qlcplus");

    /* Handle debug messages */
    qInstallMsgHandler(qlcMessageHandler);

    /* Create and initialize the QLC application object */
    App app;

#if defined(WIN32) || defined(__APPLE__)
    if (QLCArgs::debugLevel < QtSystemMsg)
    {
        QLCArgs::dbgBox = new DebugBox(&app);
        QLCArgs::dbgBox->show();
    }
#endif
    app.startup();
    app.show();

    if (QLCArgs::workspace.isEmpty() == false)
        app.loadXML(QLCArgs::workspace);
    if (QLCArgs::operate == true)
        app.slotModeOperate();
    if (QLCArgs::kioskMode == true)
        app.enableKioskMode();
    if (QLCArgs::fullScreen == true)
        app.slotControlFullScreen(QLCArgs::fullScreenResize);
    if (QLCArgs::kioskMode == true && QLCArgs::closeButtonRect.isValid() == true)
        app.createKioskCloseButton(QLCArgs::closeButtonRect);

    return qapp.exec();
}
예제 #16
0
파일: main.cpp 프로젝트: JIghtuse/zeal
int main(int argc, char *argv[])
{
    QCoreApplication::setApplicationName(QStringLiteral("Zeal"));
    QCoreApplication::setApplicationVersion(ZEAL_VERSION);
    QCoreApplication::setOrganizationDomain(QStringLiteral("zealdocs.org"));
    QCoreApplication::setOrganizationName(QStringLiteral("Zeal"));

    QApplication qapp(argc, argv);

#ifdef Q_OS_WIN32
    qapp.setStyle(new ZealProxyStyle());
#endif

    const CommandLineParameters clParams = parseCommandLine(qapp);

    // Detect already running instance and optionally pass a search query to it.
    if (!clParams.force) {
        QScopedPointer<QLocalSocket> socket(new QLocalSocket());
        socket->connectToServer(serverName);

        if (socket->waitForConnected(500)) {
            if (!clParams.query.isEmpty())
                socket->write(clParams.query.toLocal8Bit());
            else
                QTextStream(stdout) << QObject::tr("Already running. Terminating.") << endl;

            return 0;
        }
    }

    // look for icons in:
    // 1. user's data directory (same as docsets dir, but in icons/)
    // 2. executable directory/icons
    // 3. on unix, standard/legacy install location
    // 4. current directory/icons
    QStringList searchPaths;
    searchPaths << QStandardPaths::locateAll(QStandardPaths::DataLocation, QStringLiteral("icons"),
                                             QStandardPaths::LocateDirectory);
    searchPaths << QDir(QCoreApplication::applicationDirPath())
                   .absoluteFilePath(QStringLiteral("icons"));
#ifndef Q_OS_WIN32
    searchPaths << QStringLiteral("/usr/share/pixmaps/zeal");
#endif
    searchPaths << QStringLiteral("./icons");
    QDir::setSearchPaths(QStringLiteral("icons"), searchPaths);

    QScopedPointer<MainWindow> mainWindow(new MainWindow());

    if (!mainWindow->startHidden())
        mainWindow->show();

    if (!clParams.query.isEmpty())
        mainWindow->bringToFrontAndSearch(clParams.query);

    return qapp.exec();
}
예제 #17
0
파일: main.cpp 프로젝트: AmesianX/Publisher
int main(int argc, char *argv[])
{
	Q_INIT_RESOURCE(resources);
	QApplication qapp(argc, argv);

	MainWindow main;
	main.show();

	return qapp.exec();
}
예제 #18
0
/* This file includes tests for QLC's ENGINE components. UI tests are done
   separately. */
int main(int argc, char** argv)
{
	QApplication qapp(argc, argv);

	Bus_Test bus;
	QTest::qExec(&bus, argc, argv);

	Fixture_Test fixture;
	QTest::qExec(&fixture, argc, argv);

	return 0;
}
예제 #19
0
파일: main.cpp 프로젝트: speakman/qlc
int main(int argc, char** argv)
{
	QApplication qapp(argc, argv);
	int r;
	
	VCWidgetProperties_Test props;
	r = QTest::qExec(&props, argc, argv);
	if (r != 0)
		return r;

	return 0;
}
예제 #20
0
파일: main.cpp 프로젝트: speakman/qlc
int main(int argc, char** argv)
{
	QApplication qapp(argc, argv);

	TestEPlaybackWing test1;
	QTest::qExec(&test1, argc, argv);

	TestEShortcutWing test2;
	QTest::qExec(&test2, argc, argv);

	TestEProgramWing test3;
	QTest::qExec(&test3, argc, argv);
}
예제 #21
0
int main(int argc, char **argv)
{
  QApplication qapp(argc, argv);
  QLocale::setDefault(QLocale::system());

  WMainWindow *mainwindow = new WMainWindow();
  mainwindow->show();

  const int result = qapp.exec();

  delete mainwindow;

  return result;
}
예제 #22
0
파일: main.cpp 프로젝트: haugerbr/zeal
int main(int argc, char *argv[])
{
    QCoreApplication::setApplicationName(QStringLiteral("Zeal"));
    QCoreApplication::setApplicationVersion(ZEAL_VERSION);
    QCoreApplication::setOrganizationDomain(QStringLiteral("zealdocs.org"));
    QCoreApplication::setOrganizationName(QStringLiteral("Zeal"));

    QScopedPointer<QApplication> qapp(new QApplication(argc, argv));

    const CommandLineParameters clParams = parseCommandLine(qapp->arguments());

#ifdef Q_OS_WIN32
    const static QHash<QString, QString> protocols = {
        {QStringLiteral("dash"), QStringLiteral("Dash Protocol")},
        {QStringLiteral("dash-plugin"), QStringLiteral("Dash Plugin Protocol")}
    };

    if (clParams.unregisterProtocolHandlers) {
        unregisterProtocolHandlers(protocols);
        ::exit(EXIT_SUCCESS);
    } else {
        registerProtocolHandlers(protocols, clParams.registerProtocolHandlers);
        if (clParams.registerProtocolHandlers)
            ::exit(EXIT_SUCCESS);
    }

    qapp->setStyle(new ZealProxyStyle());
#endif


    // Detect already running instance and optionally pass a search query to it.
    if (!clParams.force) {
        QScopedPointer<QLocalSocket> socket(new QLocalSocket());
        socket->connectToServer(Zeal::Core::Application::localServerName());

        if (socket->waitForConnected(500)) {
            QDataStream out(socket.data());
            out << clParams.query;
            socket->flush();
            return 0;
        }
    }

    QDir::setSearchPaths(QStringLiteral("typeIcon"), {QStringLiteral(":/icons/type")});

    QScopedPointer<Zeal::Core::Application> app(new Zeal::Core::Application(clParams.query));

    return qapp->exec();
}
예제 #23
0
int main(int argc, char** argv)
{
    QApplication qapp(argc, argv);
    KComponentData cd("graphicsview-test");

    Calligra::Sheets::Part part;
    Calligra::Sheets::Doc doc(&part);
    part.setDocument(&doc);


    bool ok = doc.openUrl(QUrl("/home/marijn/kde/src/calligra/docs/oos_AMSAT-IARU_Link_Model.ods"));
    if (!ok) {
        qDebug() << "failed to load";
        return 0;
    }

    QFont font(KoGlobal::defaultFont());

    Calligra::Sheets::CanvasItem* canvas = new Calligra::Sheets::CanvasItem(&doc);

    QRect usedArea = canvas->activeSheet()->usedArea(true);
    QFontMetricsF fm(font, 0);
    QSizeF size(canvas->activeSheet()->columnPosition(usedArea.right()+3), canvas->activeSheet()->rowPosition(usedArea.bottom()+5));
    canvas->setDocumentSize(size);
    size = canvas->zoomHandler()->documentToView(size);
    canvas->resize(size);
    canvas->setPos(0, 0);

    Calligra::Sheets::ColumnHeaderItem* columnHeader = static_cast<Calligra::Sheets::ColumnHeaderItem*>(canvas->columnHeader());
    static_cast<QGraphicsWidget*>(columnHeader)->resize(size.width(), fm.height() + 3);
    columnHeader->setPos(0, -columnHeader->height());

    Calligra::Sheets::RowHeaderItem* rowHeader = static_cast<Calligra::Sheets::RowHeaderItem*>(canvas->rowHeader());
    static_cast<QGraphicsWidget*>(rowHeader)->resize(fm.width(QString::fromLatin1("99999")) + 3, size.height());
    rowHeader->setPos(-rowHeader->width(), 0);

    columnHeader->toolChanged("PanTool");
    rowHeader->toolChanged("PanTool");
    
    QGraphicsScene scene;
    scene.addItem(canvas);
    scene.addItem(columnHeader);
    scene.addItem(rowHeader);

    QGraphicsView view(&scene);
    view.show();

    qapp.exec();
}
예제 #24
0
파일: main.cpp 프로젝트: mfilipe/QT-Study-1
int main(int argc, char *argv[])
{
    QApplication qapp(argc, argv);

    QQuickView *qtstudy = new QQuickView;
    Pastebin *pastebin = new Pastebin;

    qtstudy->rootContext()->setContextProperty("qapp", &qapp);
    qtstudy->rootContext()->setContextProperty("qpastebin", pastebin);

    qtstudy->setSource(QUrl("qrc:/qml/qtstudy.qml"));
    qtstudy->show();

    return qapp.exec();
}
예제 #25
0
int main(int argc, char **argv)
{
  QApplication qapp(argc, argv);

  csPDFium::initialize();

  WMainWindow *mainwindow = new WMainWindow();
  mainwindow->show();
  const int result = qapp.exec();
  delete mainwindow;

  csPDFium::destroy();

  return result;
}
예제 #26
0
main(int argc, char** argv)
{
    XtAppContext app;

    Widget toplevel = XtAppInitialize(
	&app, "Editors",
	0, 0, &argc, argv, 0, 0, 0);
    QXtApplication qapp(XtDisplay(toplevel));

    Widget form = XtVaCreateManagedWidget("form",
		    xmFormWidgetClass, toplevel, 0);

    EncapsulatedQtWidget qtchild(form);

    const int marg=10;

    Arg args[20];
    Cardinal nargs=0;
    XtSetArg(args[nargs], XmNwidth, 200);                      nargs++;
    XtSetArg(args[nargs], XmNheight, 200);                     nargs++;
    XtSetArg(args[nargs], XmNleftOffset, marg);                nargs++;
    XtSetArg(args[nargs], XmNtopOffset, marg);                 nargs++;
    XtSetArg(args[nargs], XmNbottomOffset, marg);              nargs++;
    XtSetArg(args[nargs], XmNtopAttachment, XmATTACH_FORM);    nargs++;
    XtSetArg(args[nargs], XmNbottomAttachment, XmATTACH_FORM); nargs++;
    XtSetArg(args[nargs], XmNleftAttachment, XmATTACH_FORM);   nargs++;
    XtSetValues(qtchild.xtWidget(), args, nargs);

    nargs=0;
    XtSetArg(args[nargs], XmNeditMode, XmMULTI_LINE_EDIT);     nargs++;
    XtSetArg(args[nargs], XmNvalue, XTEDMSG);                  nargs++;    
    XtSetArg(args[nargs], XmNwidth, 200);                      nargs++;
    XtSetArg(args[nargs], XmNheight, 200);                     nargs++;
    XtSetArg(args[nargs], XmNtopOffset, marg);                 nargs++;
    XtSetArg(args[nargs], XmNbottomOffset, marg);              nargs++;
    XtSetArg(args[nargs], XmNrightOffset, marg);               nargs++;
    XtSetArg(args[nargs], XmNtopAttachment, XmATTACH_FORM);    nargs++;
    XtSetArg(args[nargs], XmNbottomAttachment, XmATTACH_FORM); nargs++;
    XtSetArg(args[nargs], XmNrightAttachment, XmATTACH_FORM);  nargs++;
    XtSetArg(args[nargs], XmNleftAttachment, XmATTACH_WIDGET); nargs++;
    XtSetArg(args[nargs], XmNleftWidget, qtchild.xtWidget());  nargs++;
    Widget xtchild = XtCreateManagedWidget("editor", xmTextWidgetClass,
	form, args, nargs);

    XtRealizeWidget(toplevel);
    XtAppMainLoop(app);
}
예제 #27
0
int main(int argc, char** argv) {
	QApplication qapp(argc, argv);

	MainUI mainui;
	/*std::cout << "argc: " << argc << std::endl;
	std::cout << "argv: " << argv << std::endl;*/
	mainui.resize(390, 90);

	// Prepare and set window title
	std::stringstream ss;
	ss << "APK Installer " << APKI_VERSION;
	mainui.setWindowTitle(ss.str().c_str());

	mainui.show();

	return qapp.exec();
};
예제 #28
0
int main(int argc, char* argv[])
{
    QApplication qapp(argc, argv);
    Composite::Main::MainWidget mainwin(argc, argv);

    QPalette pal = Composite::Looks::create_default_palette();
    qapp.setPalette(pal);

    // Set up audio engine
    Tritium::Logger::create_instance();
    Tritium::Logger::get_instance()->set_logging_level( "Debug" );
    Tritium::T<Tritium::Preferences>::shared_ptr prefs( new Tritium::Preferences() );
    Tritium::Engine engine(prefs);

    /////////////////////////////////////////////
    // Temporary code to get GMkit loaded
    /////////////////////////////////////////////
    {
	Tritium::LocalFileMng loc( &engine );
	QString gmkit;
	std::vector<QString>::iterator it;
	std::vector<QString> list;
	list = loc.getSystemDrumkitList();
	for( it = list.begin() ; it < list.end() ; ++it ) {
	    if( (*it).endsWith("GMkit") ) {
		gmkit = *it;
	    }
	    break;
	}
	assert( ! gmkit.isNull() );
	Tritium::T<Tritium::Drumkit>::shared_ptr dk = loc.loadDrumkit( gmkit );
	assert( dk );
	engine.loadDrumkit( dk );
    }

    /////////////////////////////////////////////
    // End of temporary code
    /////////////////////////////////////////////

    mainwin.set_audio_engine( &engine );

    mainwin.show();

    return qapp.exec();
}
예제 #29
0
int main(int argc, char* argv[]) 
{
   QApplication qapp(argc, argv);

   //Create special QGLWidget's when we create DeltaWin instances
   dtQt::QtGuiWindowSystemWrapper::EnableQtGUIWrapper();

   //The main UI window
   ObjectWorkspace win;

   //The object viewer Application
   dtCore::RefPtr<ObjectViewer> mViewer = new ObjectViewer();
   mViewer->Config();

   win.SetViewer(mViewer.get());
   win.OnInitialization();
   win.show(); //show the UI

   //create a little class to ensure Delta3D performs Window "steps"
   dtCore::System::GetInstance().Start();
   dtQt::DeltaStepper stepper;
   stepper.Start();

   // If we have an argument(possibly from drag and drop)
   if (argc >= 2)
   {
      QFileInfo fileInfo(QCoreApplication::arguments().at(1));

      if (fileInfo.fileName().endsWith(QString("xml"), Qt::CaseInsensitive))
      {
         win.OnLoadMap(fileInfo.baseName().toStdString());
      }
      else
      {
         win.OnLoadGeometry(QCoreApplication::arguments().at(1).toStdString());
      }
   }
   
   qapp.exec();
   stepper.Stop();

   return EXIT_SUCCESS;
}
예제 #30
0
int main( int argc, char **argv )
{
  QApplication qapp(argc, argv);

  PythonQt::init(PythonQt::IgnoreSiteModule | PythonQt::RedirectStdOut);
  PythonQt_QtAll::init();

  PythonQtObjectPtr  mainContext = PythonQt::self()->getMainModule();
  PythonQtScriptingConsole console(NULL, mainContext);

  // add a QObject to the namespace of the main python context
  PyExampleObject example;
  mainContext.addObject("example", &example);

  mainContext.evalFile(":example.py");

  console.show();
  return qapp.exec();
}