Exemple #1
2
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    Controller controller; //
    QtQuick2ApplicationViewer viewer;

    viewer.rootContext()->
            setContextProperty("controller", &controller); //
    viewer.installEventFilter(&controller);
    viewer.setMainQmlFile(QStringLiteral("qml/QCloseConfirm/main.qml"));

    viewer.showExpanded();

    return app.exec();
}
Exemple #2
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    QtQuick2ApplicationViewer viewer;
    //viewer.setMainQmlFile(QStringLiteral("qml/NightClock/main.qml"));
    viewer.setMainQmlFile(QStringLiteral("qml/NightClock/main2.qml"));
    viewer.showExpanded();

    return app.exec();
}
Exemple #3
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    QtQuick2ApplicationViewer viewer;
    qmlRegisterType<MQTT>("mqtt", 1, 0, "MQTT");
    viewer.setMainQmlFile(QStringLiteral("qml/mqtt/main.qml"));
    viewer.showExpanded();

    return app.exec();
}
Exemple #4
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    QtQuick2ApplicationViewer viewer;
    viewer.setMainQmlFile(QStringLiteral("qml/tv_001/main.qml"));
//    viewer.showExpanded();
    viewer.showFullScreen();

    return app.exec();
}
Exemple #5
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);
    QtQuick2ApplicationViewer viewer;
    qmlRegisterType<mupServerHandle>("mupServerHandle", 1, 0, "ServerHandle");
    viewer.setMainQmlFile(QStringLiteral("qml/MUP_qchartjs/main.qml"));

    viewer.showExpanded();

    return app.exec();
}
Exemple #6
0
int main(int argc, char *argv[])
{
  QGuiApplication app(argc, argv);

  qmlRegisterType<Triangle>("com.example.qtriangleplugin", 1, 0, "Triangle");

  QtQuick2ApplicationViewer viewer;
  viewer.setMainQmlFile(QStringLiteral("qml/QTriangle/main.qml"));
  viewer.showExpanded();

  return app.exec();
}
Exemple #7
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);
    QtQuick2ApplicationViewer viewer;

    qmlRegisterType<OVRVisionItem>("OVRVision", 1, 0, "OVRVision");

    viewer.setMainQmlFile(QStringLiteral("qml/OVRVisionOpenCV/main.qml"));
    viewer.showFullScreen();

    return app.exec();
}
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);
    // It is a good Idea to use a URI naming scheme to specify the module package name
    qmlRegisterType<VSXuAccelerometer>("org.vovoid.vsxu", 1, 0, "VSXuAccelerometer");

    QtQuick2ApplicationViewer viewer;
    viewer.setMainQmlFile(QStringLiteral("qml/VSXuDroid/main.qml"));
    viewer.showExpanded();

    return app.exec();
}
Exemple #9
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    qmlRegisterType<GameModel>("LifeGame", 1, 0, "GameModel");

    QtQuick2ApplicationViewer viewer;
    viewer.setMainQmlFile(QStringLiteral("qml/LifeGameQML01/main.qml"));
    viewer.showExpanded();

    return app.exec();
}
Exemple #10
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);
    QtQuick2ApplicationViewer viewer;
    Hash hash(viewer.rootContext());

    viewer.rootContext()->setContextProperty("hash", &hash);
    viewer.setMainQmlFile(QStringLiteral("qrc:/qml/pasgen/main.qml"));
    viewer.showExpanded();

    return app.exec();
}
Exemple #11
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    qmlRegisterType<ConwayListModel>("com.minimoog77", 1, 0, "ConwayListModel");

    QtQuick2ApplicationViewer viewer;
    viewer.setMainQmlFile(QStringLiteral("qml/quickconway/main.qml"));
    viewer.showExpanded();

    return app.exec();
}
Exemple #12
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);


    QtQuick2ApplicationViewer viewer;
    qmlRegisterType<OAuth2>("OAuth2",0,1,"OAuth2");

    viewer.setMainQmlFile(QStringLiteral("qml/OAuthPlayground/main.qml"));
    viewer.showExpanded();

    return app.exec();
}
Exemple #13
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);
    FishManager* fishManager = new FishManager(&app);

    QtQuick2ApplicationViewer viewer;
    viewer.setMainQmlFile(QStringLiteral("qml/FishRandomizer/main.qml"));
    viewer.showExpanded();
    viewer.rootContext()->setContextProperty("fishManager",fishManager);
    qmlRegisterType<Fish>("Fishes",1,0,"FishObj");

    return app.exec();
}
Exemple #14
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);
    QtQuick2ApplicationViewer viewer;

    VideosDatabase *db = new VideosDatabase;
    viewer.rootContext()->setContextProperty("videosDB", db);

    viewer.setMainQmlFile(QStringLiteral("qml/app/qtquick20/main.qml")); // MAINQML
    viewer.showFullScreen();

    return app.exec();
}
Exemple #15
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    QtQuick2ApplicationViewer viewer;

    viewer.addImportPath(QStringLiteral("plugins"));

    viewer.setMainQmlFile(QStringLiteral("qml/Bananas/main.qml"));
    viewer.showExpanded();

    return app.exec();
}
Exemple #16
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    QtQuick2ApplicationViewer viewer;
    viewer.setMainQmlFile(QStringLiteral("qml/qtandroidrunner/main.qml"));
    viewer.showExpanded();

    QtAndroidRunner *runner = QtAndroidRunner::instance();
    runner->start(new WebViewInitializer());

    return app.exec();
}
Exemple #17
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    QtQuick2ApplicationViewer viewer;

    qmlRegisterType<FileTreeModel>("tk.corvinus.FileTreeModel", 1, 0, "FileTreeModel");

    viewer.setMainQmlFile(QStringLiteral("qml/ImageViewer/main.qml"));
    viewer.showExpanded();

    return app.exec();
}
Exemple #18
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);
    registryTypes ();

    Box2DPlugin plugin;
    plugin.registerTypes("Box2D");

    QtQuick2ApplicationViewer viewer;
    viewer.setMainQmlFile(QStringLiteral("qml/Arkanoid/main.qml"));
    viewer.showExpanded();

    return app.exec();
}
Exemple #19
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    QtQuick2ApplicationViewer viewer;
    viewer.setMainQmlFile(QString("qml/main.qml"));
    viewer.setIcon(QIcon("qrc:/res/logo.png"));
    viewer.setMinimumHeight(255);
    viewer.setMaximumHeight(255);
    viewer.setMinimumWidth(660);
    viewer.setMaximumWidth(660);
    viewer.showExpanded();

    return app.exec();
}
Exemple #20
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

#ifdef MEASURE_BPM
    qmlRegisterType<AudioListenerBPM>("com.monkeybusiness.dancer",1,0,"AudioListener");
#else
    qmlRegisterType<AudioListener>("com.monkeybusiness.dancer",1,0,"AudioListener");
#endif

    QtQuick2ApplicationViewer viewer;
    viewer.setMainQmlFile(QStringLiteral("qml/main.qml"));
    viewer.showExpanded();

    return app.exec();
}
Exemple #21
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    QtQuick2ApplicationViewer viewer;
    viewer.setMainQmlFile(QStringLiteral("qml/testCacheName/main.qml"));
    viewer.showExpanded();

    QSize requestSize;
    requestSize.setHeight(200);
    requestSize.setWidth(200);
    qDebug() << "++++aaaaaaaa" << cacheKey("/home/mengcong/Pictures/1.jpg", requestSize);
    qDebug() << "++++bbbbbbbb" << cacheKey("/home/mengcong/Pictures/1.jpg", requestSize);

    return app.exec();
}
Exemple #22
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    QtQuick2ApplicationViewer viewer;

    qmlRegisterType<MindCell>("org.ginosoft.qmlcomponents", 1, 0, "MindCell");

    CellManager cellManager;
    viewer.rootContext()->setContextProperty("cellManager", &cellManager);

    viewer.setMainQmlFile(QStringLiteral("qml/DontMind/main.qml"));
    viewer.showExpanded();

    return app.exec();
}
Exemple #23
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);
    QtQuick2ApplicationViewer viewer;

    QQmlEngine engine;
    QQmlComponent component(&engine, QUrl::fromLocalFile("qml/Playing/Player.qml"));
    QObject *object = component.create();

    viewer.rootContext()->setContextProperty("player", object);

    viewer.setMainQmlFile(QStringLiteral("qml/Playing/main.qml"));
    viewer.showExpanded();

    return app.exec();
}
Exemple #24
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    QtQuick2ApplicationViewer *viewer = new QtQuick2ApplicationViewer;

    qmlRegisterType<BrowserDbus>("browserdbusinterface",1,0,"BrowserInterface");
    qmlRegisterType<Bookmark>("browserdbusinterface",1,0,"Tmp");

    viewer->setMainQmlFile(QStringLiteral("qml/demoui/main.qml"));
    viewer->setFlags(Qt::WindowStaysOnTopHint|Qt::FramelessWindowHint);
    viewer->setGeometry(0, 0, 1024, 80);
    viewer->show();

    QObject::connect((QObject*)viewer->rootObject(), SIGNAL(bookmarksopen(bool)),(QObject*)viewer, SLOT(changeGeometry(bool)));

    return app.exec();
}
Exemple #25
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    QtQuick2ApplicationViewer viewer;
    viewer.setTitle("tst_reloader");
    QString path;
    if (argc == 2)
        path = argv[1];
    else
        path = QStringLiteral("../qmlreloader/qml/qmlreloader/main.qml");
    viewer.setMainQmlFile(path);
    viewer.showExpanded();

    Reloader reloader(&viewer, path);

    return app.exec();
}
Exemple #26
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    Timekeeper timekeeper;
    QtQuick2ApplicationViewer viewer;

    timekeeper.nextWeek();
    timekeeper.addEvent(QStringLiteral("Jotain"), 2, 2);
    timekeeper.addEvent(QStringLiteral("Muuta"), 2, 3);
    timekeeper.prevWeek();

    viewer.rootContext()->setContextProperty("timekeeper", &timekeeper);
    viewer.setMainQmlFile(QStringLiteral("qml/timekeeper/main.qml"));
    viewer.setTitle(QStringLiteral("Timekeeper"));
    viewer.showExpanded();


    return app.exec();
}
Exemple #27
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    QString filepath = app.arguments().value(1, "./why_are_you_reading_this.png");
    filepath = QDir().absoluteFilePath(filepath);
    Comic comic;
    if (QFile(filepath).exists()) {
        comic.load(QImage(filepath));
    } else {
        qDebug() << "File does not exist:" << filepath;
    }

    QtQuick2ApplicationViewer viewer;
    viewer.engine()->addImageProvider("comicimageprovider", new ComicImageProvider(comic));
    QQmlContext* context = viewer.rootContext();
    context->setContextProperty("comic", &comic);
    viewer.setMainQmlFile(QStringLiteral("qml/quick/main.qml"));
    viewer.showExpanded();

    return app.exec();
}
int main(int argc, char *argv[])
{
    qmlRegisterType<GridEqualizer>("mbrdna.qml.components", 1, 0, "GridEqualizer");
    qmlRegisterType<BeforeRenderItem>("mbrdna.qml.components", 1, 0, "BeforeRenderItem");

    QGuiApplication app(argc, argv);

    QtQuick2ApplicationViewer viewer;
    viewer.setSurfaceType(QWindow::OpenGLSurface);

    QSurfaceFormat format;
    format.setSamples(8);
    viewer.setFormat(format);
    viewer.setMainQmlFile(QStringLiteral("qml/GridVisualization/main.qml"));
    viewer.showExpanded();

    //Connect Before RenderItem
    QObject::connect(&viewer, SIGNAL(beforeRendering()), BeforeRenderGlobal::Instance(), SLOT(handlerBefore()), Qt::DirectConnection);
    QObject::connect(&viewer, SIGNAL(afterRendering()), BeforeRenderGlobal::Instance(), SLOT(handlerAfter()), Qt::DirectConnection);

    return app.exec();
}
Exemple #29
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

	CommHandler comm;
	ColorModel model;

    QtQuick2ApplicationViewer viewer;
	viewer.rootContext()->setContextProperty("comm", &comm);
	viewer.rootContext()->setContextProperty("model", &model);
    viewer.setMainQmlFile(QStringLiteral("qml/QtLight/main.qml"));
    viewer.showExpanded();

#ifdef Q_OS_UNIX
	qDebug() << "You are on Unix";
#endif
#ifdef Q_OS_WIN
	qDebug() << "You are on Windows";
#endif

    return app.exec();
}
int main(int argc, char *argv[])
{
	QCoreApplication::setOrganizationDomain("ecikowaty.com");
	QCoreApplication::setOrganizationName("ecikowaty");

	QApplication app(argc, argv);

	Settings settings;
	QtQuick2ApplicationViewer viewer;
	ingonline::AccountInfoProvider accountInfoProvider;

	AccountModel accountModel;
	QObject::connect(&accountInfoProvider, &ingonline::AccountInfoProvider::balanceDataUpdated,
					 &accountModel, &AccountModel::replaceWith);
	try
	{
		HistoryModel historyModel;
		QObject::connect(&accountInfoProvider, &ingonline::AccountInfoProvider::historyDataUpdated,
						 &historyModel, &HistoryModel::replaceWith);

		viewer.rootContext()->setContextProperty("accountInfoProvider", &accountInfoProvider);
		viewer.rootContext()->setContextProperty("accountModel", &accountModel);
		viewer.rootContext()->setContextProperty("historyModel", &historyModel);
		viewer.rootContext()->setContextProperty("settings", &settings);

		viewer.setMainQmlFile(QStringLiteral("qml/main.qml"));
		viewer.showExpanded();

		return app.exec();
	}
	catch (const std::runtime_error& e)
	{
		qCritical() << e.what();
		return 1;
	}

	return 0;
}