Q_DECL_EXPORT int main(int argc, char **argv) { Application app(argc, argv); // localization support QTranslator translator; const QString locale_string = QLocale().name(); const QString filename = QString::fromLatin1("bbminvitetodownload_%1").arg(locale_string); if (translator.load(filename, "app/native/qm")) { app.installTranslator(&translator); } //TODO: Define your own UUID here. You can generate one here: http://www.guidgenerator.com/ const QString uuid(QLatin1String("")); RegistrationHandler *registrationHandler = new RegistrationHandler(uuid, &app); InviteToDownload *inviteToDownload = new InviteToDownload(registrationHandler->context(), &app); bool ok = QObject::connect(registrationHandler, SIGNAL(registered()), inviteToDownload, SLOT(show())); Q_ASSERT(ok); Q_UNUSED(ok); return Application::exec(); }
ApplicationUI::ApplicationUI() : QObject() { // prepare the localization m_pTranslator = new QTranslator(this); m_pLocaleHandler = new LocaleHandler(this); bool res = QObject::connect(m_pLocaleHandler, SIGNAL(systemLanguageChanged()), this, SLOT(onSystemLanguageChanged())); // This is only available in Debug builds Q_ASSERT(res); // Since the variable is not used in the app, this is added to avoid a // compiler warning Q_UNUSED(res); // initial load onSystemLanguageChanged(); //TODO: Define your own UUID here. You can generate one here: http://www.guidgenerator.com/ const QString uuid(QLatin1String("")); RegistrationHandler *registrationHandler = new RegistrationHandler(uuid, this); ProfileBoxManager *profileBoxManager = new ProfileBoxManager(registrationHandler->context(), this); // Whenever the registration has finished successfully, we continue to the main UI bool ok = QObject::connect(registrationHandler, SIGNAL(registered()), profileBoxManager, SLOT(show())); Q_ASSERT(ok); Q_UNUSED(ok); }
Q_DECL_EXPORT int main(int argc, char **argv) { qmlRegisterType<QuranDbHelper>("dbutils", 1, 0, "QuranDbHelper"); // this is where the server is started etc Application app(argc, argv); // localization support QTranslator translator; QString locale_string = QLocale().name(); QString filename = QString("Quran_%1").arg(locale_string); if (translator.load(filename, "app/native/qm")) { app.installTranslator(&translator); } //new Quran(&app); // 2b078efb-bf88-4038-aa36-5f52ae35eeac const QString uuid(QLatin1String("348ccad0-411f-11e2-a25f-0800200c9a66")); //! [0] RegistrationHandler *registrationHandler = new RegistrationHandler(uuid, &app); Quran *quranApp = new Quran(registrationHandler->context(), &app); //Whenever the registration has finished successfully, we continue to the main UI QObject::connect(registrationHandler, SIGNAL(registered()), quranApp, SLOT(show())); // we complete the transaction started in the app constructor and start the client event loop here return Application::exec(); // when loop is exited the Application deletes the scene which deletes all its children (per qt rules for children) }
Q_DECL_EXPORT int main(int argc, char **argv) { // this is where the server is started etc Application app(argc, argv); // localization support QTranslator translator; QString locale_string = QLocale().name(); QString filename = QString( "NewsSpot_%1" ).arg( locale_string ); if (translator.load(filename, "app/native/qm")) { app.installTranslator( &translator ); } // create the application pane object to init UI etc. // BBM social platform connect const QString uuid("8aa6f6df-5c69-4df2-81f2-49aba8a03f9c"); RegistrationHandler *registrationHandler = new RegistrationHandler(uuid, &app); NewsSpot *newsSpot = new NewsSpot(registrationHandler->context(), &app); QObject::connect(registrationHandler, SIGNAL(registered()), newsSpot, SLOT(show())); // we complete the transaction started in the app constructor and start the client event loop here return Application::exec(); // when loop is exited the Application deletes the scene which deletes all its children (per qt rules for children) }
int main(int argc, char **argv) { Application app(argc, argv); // localization support QTranslator translator; const QString locale_string = QLocale().name(); const QString filename = QString::fromLatin1("bbmprofilebox_%1").arg(locale_string); if (translator.load(filename, "app/native/qm")) { app.installTranslator(&translator); } //TODO: Define your own UUID here. You can generate one here: http://www.guidgenerator.com/ const QString uuid(QLatin1String("")); //! [0] RegistrationHandler *registrationHandler = new RegistrationHandler(uuid, &app); ProfileBoxManager *profileBoxManager = new ProfileBoxManager(registrationHandler->context(), &app); // Whenever the registration has finished successfully, we continue to the main UI bool ok = QObject::connect(registrationHandler, SIGNAL(registered()), profileBoxManager, SLOT(show())); Q_ASSERT(ok); Q_UNUSED(ok); //! [0] return Application::exec(); }
int mainnnn(int argc, char** argv) { cout << "creating first cloud..."; MeshHandler * mh1 = new MeshHandler("cup1.pcd"); mh1->acquirePCD(); mh1->createCloud(); cout << "DONE" << endl; cout << "filtering first cloud..."; FilterHandler * filter1 = new FilterHandler(mh1->_cloud, "cup1_filtered.pcd"); mh1->_cloud = filter1->passThroughFilter("z", 0.0, 1, false); mh1->_cloud = filter1->voxelGridFilter(0.01f, 0.01f, 0.01f); cout << "DONE" << endl; cout << "creating second cloud..."; MeshHandler * mh2 = new MeshHandler("cup2.pcd"); mh2->acquirePCD(); mh2->createCloud(); cout << "DONE" << endl; cout << "filtering second cloud..."; FilterHandler * filter2 = new FilterHandler(mh2->_cloud, "cup2_filtered.pcd"); mh2->_cloud = filter2->passThroughFilter("z", 0.0, 1, false); mh2->_cloud = filter2->voxelGridFilter(0.01f, 0.01f, 0.01f); cout << "DONE" << endl; cout << "transforming clouds..."; RegistrationHandler * rh = new RegistrationHandler(mh1->_cloud, mh2->_cloud); IterativeClosestPoint<PointXYZ, PointXYZ> icp = rh->performICP(); cout << "DONE" << endl; cout << "::building mesh for transformed cloud::" << endl; cout << "calculating normals..."; MeshHandler * r_mh = new MeshHandler(rh->_result); NormalCalculator * normals = new NormalCalculator(r_mh->_cloud); normals->getReady(20); normals->calculate(); cout << "DONE" << endl; cout << "merging normals with cloud..."; r_mh->_cloud_w_normals = normals->mergeCloudWithNormals(); cout << "DONE" << endl; cout << "building the mesh..."; PolygonMesh mesh = r_mh->buildMesh("cup-reg.vtk", 0.025, 2.5, 100, M_PI/4, M_PI/18, 2*M_PI/3, false); cout << "DONE" << endl; r_mh->showMesh(mesh); return 0; }
Q_DECL_EXPORT int main(int argc, char **argv) { // this is where the server is started etc Application app(argc, argv); // localization support QTranslator translator; QString locale_string = QLocale().name(); QString filename = QString( "Monitor_%1" ).arg( locale_string ); if (translator.load(filename, "app/native/qm")) { app.installTranslator( &translator ); } // BBM social platform connect const QString uuid("c6144f34-3b74-4c38-81cc-e8db14a208e0"); RegistrationHandler *registrationHandler = new RegistrationHandler(uuid, &app); ApplicationUI *appUi = new ApplicationUI(registrationHandler->context(), &app); QObject::connect(registrationHandler, SIGNAL(registered()), appUi, SLOT(show())); // we complete the transaction started in the app constructor and start the client event loop here return Application::exec(); // when loop is exited the Application deletes the scene which deletes all its children (per qt rules for children) }
ApplicationUI::ApplicationUI(bb::cascades::Application *app) : QObject(app) { DataBaseController *dataBaseController = DataBaseController::getInstance( this); QmlDocument::defaultDeclarativeEngine()->rootContext()->setContextProperty( "_db", dataBaseController); ApplicationInfo::registerQmlTypes(); SqlDataModel::registerQmlTypes(); // prepare the localization m_pTranslator = new QTranslator(this); m_pLocaleHandler = new LocaleHandler(this); DataBaseController::createDB(); DataBaseController::createTables(); bool res = QObject::connect(m_pLocaleHandler, SIGNAL(systemLanguageChanged()), this, SLOT(onSystemLanguageChanged())); // This is only available in Debug builds Q_ASSERT(res); // Since the variable is not used in the app, this is added to avoid a // compiler warning Q_UNUSED(res); // initial load onSystemLanguageChanged(); // Create scene document from main.qml asset, the parent is set // to ensure the document gets destroyed properly at shut down. QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this); // const QString uuid(QLatin1String("76a353d0-bd9c-11e3-b1b6-0800200c9a66")); // full version const QString uuid(QLatin1String("f0af2ec0-bd9b-11e3-b1b6-0800200c9a66")); // free version RegistrationHandler *registrationHandler = new RegistrationHandler(uuid, app); m_inviteToDownload = new InviteToDownload(registrationHandler->context(), app); res = connect(registrationHandler, SIGNAL(registered()), m_inviteToDownload, SLOT(show())); Q_ASSERT(res); Q_UNUSED(res); ActiveFrameQML *activeFrame = new ActiveFrameQML(this); Application::instance()->setCover(activeFrame); // Create root object for the UI AbstractPane *root = qml->createRootObject<AbstractPane>(); qml->setContextProperty("_app", this); qml->documentContext()->setContextProperty("_settings", Settings::getInstance(this)); qml->documentContext()->setContextProperty("_notification", new Notification(this)); qml->documentContext()->setContextProperty("_packageCtrl", PackagesController::getInstance(this)); Settings::getInstance(this)->setParent(this); Settings::getInstance(this)->emitObjectName("last_update_date"); registrationHandler->registerApplication(); // Set created root object as the application scene app->setScene(root); }