当前位置: 首页>>代码示例>>C++>>正文


C++ Launcher类代码示例

本文整理汇总了C++中Launcher的典型用法代码示例。如果您正苦于以下问题:C++ Launcher类的具体用法?C++ Launcher怎么用?C++ Launcher使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Launcher类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: threadMain

void threadMain(int argc, char* argv[], int& status, QtWrapper* qt)
{
    try
    {
        Launcher l;
        l.parseOptions(argc, argv);
        l.menuLoop();
        status = EXIT_SUCCESS;
    }
    catch (po::error& err)
    {
        cerr << "Launcher: Program options error: " << err.what() << endl;
        Launcher::pauseConsole();
        status = EXIT_FAILURE;
    }
    catch (LauncherException& ex)
    {
        cerr << "Launcher: Error: " << ex.what() << endl;
        Launcher::pauseConsole();
        status = EXIT_FAILURE;
    }
    catch (...)
    {
        cerr << "Launcher: Unexpected error - exiting" << endl;
        Launcher::pauseConsole();
        status = EXIT_FAILURE;
    }

    qt->quit();
}
开发者ID:hribarjernej89,项目名称:iris_core,代码行数:30,代码来源:Launcher.cpp

示例2: gtk_list_store_insert_with_values

void Category::insert_items(GtkListStore* model)
{
	for (std::vector<Element*>::size_type i = 0, end = m_items.size(); i < end; ++i)
	{
		Element* element = m_items.at(i);
		if (element)
		{
			Launcher* launcher = static_cast<Launcher*>(element);
			gtk_list_store_insert_with_values(model,
					NULL, INT_MAX,
					LauncherView::COLUMN_ICON, launcher->get_icon(),
					LauncherView::COLUMN_TEXT, launcher->get_text(),
					LauncherView::COLUMN_TOOLTIP, launcher->get_tooltip(),
					LauncherView::COLUMN_LAUNCHER, launcher,
					-1);
		}
		else if ((i + 1) < end)
		{
			gtk_list_store_insert_with_values(model,
					NULL, INT_MAX,
					LauncherView::COLUMN_ICON, NULL,
					LauncherView::COLUMN_TEXT, NULL,
					LauncherView::COLUMN_TOOLTIP, NULL,
					LauncherView::COLUMN_LAUNCHER, NULL,
					-1);
		}
	}
}
开发者ID:gottcode,项目名称:xfce4-whiskermenu-plugin,代码行数:28,代码来源:category.cpp

示例3: main

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    Launcher w;
    w.show();

    return a.exec();
}
开发者ID:LuaxY,项目名称:ARK-Launcher,代码行数:8,代码来源:main.cpp

示例4: main

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    Launcher launcher;
    launcher.show();

    return app.exec();
}
开发者ID:svech,项目名称:Multifitting,代码行数:8,代码来源:main.cpp

示例5: main

int main(int argc, char * argv[]) {
	Launcher launcher;

	launcher.init(argc, argv);

	launcher.uninit();
	
	return 0;
}
开发者ID:,项目名称:,代码行数:9,代码来源:

示例6: main

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    __mark( M1, "Progra~, entry." );
    Launcher w;
    w.show();
    __elapsed( M1, "User code initialized in");
    return a.exec();
}
开发者ID:vega0,项目名称:publix,代码行数:9,代码来源:main.cpp

示例7: main

int main(int argc, char* argv[])
{

	Launcher launcher;
	launcher.run();

	_CrtDumpMemoryLeaks();

	return 0;
}
开发者ID:arch1en,项目名称:Launcher,代码行数:10,代码来源:main.cpp

示例8: g_markup_escape_text

void Category::insert_items(GtkTreeStore* model, GtkTreeIter* parent, const gchar* fallback_icon)
{
	for (std::vector<Element*>::size_type i = 0, end = m_items.size(); i < end; ++i)
	{
		Element* element = m_items.at(i);
		if (is_category(element))
		{
			Category* category = static_cast<Category*>(element);
			if (category->empty())
			{
				continue;
			}

			const gchar* icon = category->get_icon();
			if (!gtk_icon_theme_has_icon(gtk_icon_theme_get_default(), icon))
			{
				icon = fallback_icon;
			}
			gchar* text = g_markup_escape_text(category->get_text(), -1);
			const gchar* tooltip = category->get_tooltip();

			GtkTreeIter iter;
			gtk_tree_store_insert_with_values(model,
					&iter, parent, INT_MAX,
					LauncherView::COLUMN_ICON, icon,
					LauncherView::COLUMN_TEXT, text,
					LauncherView::COLUMN_TOOLTIP, tooltip,
					LauncherView::COLUMN_LAUNCHER, NULL,
					-1);
			g_free(text);
			category->insert_items(model, &iter, icon);
		}
		else if (element)
		{
			Launcher* launcher = static_cast<Launcher*>(element);
			gtk_tree_store_insert_with_values(model,
					NULL, parent, INT_MAX,
					LauncherView::COLUMN_ICON, launcher->get_icon(),
					LauncherView::COLUMN_TEXT, launcher->get_text(),
					LauncherView::COLUMN_TOOLTIP, launcher->get_tooltip(),
					LauncherView::COLUMN_LAUNCHER, launcher,
					-1);
		}
		else if ((i + 1) < end)
		{
			gtk_tree_store_insert_with_values(model,
					NULL, parent, INT_MAX,
					LauncherView::COLUMN_ICON, NULL,
					LauncherView::COLUMN_TEXT, NULL,
					LauncherView::COLUMN_TOOLTIP, NULL,
					LauncherView::COLUMN_LAUNCHER, NULL,
					-1);
		}
	}
}
开发者ID:gottcode,项目名称:xfce4-whiskermenu-plugin,代码行数:55,代码来源:category.cpp

示例9: QString

void Configuration::findApplication(const QString &query)
{
    for (int i = (m_findApplicationUi.resultsLayout->count() - 1); i >= 0; --i)
    {
        m_findApplicationUi.resultsLayout->takeAt(i)->widget()->deleteLater();
        m_findApplicationUi.resultsLayout->removeItem(m_findApplicationUi.resultsLayout->itemAt(i));
    }

    if (query.length() < 3)
    {
        m_findApplicationDialog->adjustSize();

        return;
    }

    KService::List services = KServiceTypeTrader::self()->query("Application", QString("exist Exec and ( (exist Keywords and '%1' ~subin Keywords) or (exist GenericName and '%1' ~~ GenericName) or (exist Name and '%1' ~~ Name) )").arg(query));

    if (!services.isEmpty())
    {
        foreach (const KService::Ptr &service, services)
        {
            if (!service->noDisplay() && service->property("NotShowIn", QVariant::String) != "KDE")
            {
                Launcher* launcher = new Launcher(KUrl(service->entryPath()), m_applet);

                QWidget* entryWidget = new QWidget(static_cast<QWidget*>(parent()));
                QLabel* iconLabel = new QLabel(entryWidget);
                QLabel* textLabel = new QLabel(QString("%1<br /><small>%3</small>").arg(launcher->title()).arg(launcher->description()), entryWidget);

                iconLabel->setPixmap(launcher->icon().pixmap(32, 32));

                textLabel->setFixedSize(240, 40);

                QHBoxLayout* entryWidgetLayout = new QHBoxLayout(entryWidget);
                entryWidgetLayout->addWidget(iconLabel);
                entryWidgetLayout->addWidget(textLabel);
                entryWidgetLayout->setAlignment(Qt::AlignLeft | Qt::AlignVCenter);

                entryWidget->setToolTip(QString("<b>%1</b><br /><i>%2</i>").arg(launcher->title()).arg(launcher->description()));
                entryWidget->setLayout(entryWidgetLayout);
                entryWidget->setFixedSize(300, 40);
                entryWidget->setObjectName(service->entryPath());
                entryWidget->installEventFilter(this);
                entryWidget->setCursor(QCursor(Qt::PointingHandCursor));

                m_findApplicationUi.resultsLayout->addWidget(entryWidget);

                delete launcher;
            }
        }
    }
开发者ID:amithash,项目名称:fancytasks,代码行数:51,代码来源:FancyTasksConfiguration.cpp

示例10: main

int main(int argc, char *argv[])
{
    Network yarp;
    if (!yarp.checkNetwork())
        return 1;

    ResourceFinder rf;
    rf.setVerbose(true);
    rf.setDefault("name","mover");
    rf.configure(argc,argv);

    Launcher launcher;
    return launcher.runModule(rf);
}
开发者ID:iron76,项目名称:Teaching,代码行数:14,代码来源:main.cpp

示例11: Launcher

void Configuration::addMenu(QAction *action)
{
    if (!action->data().isNull())
    {
        Launcher* launcher = new Launcher(KUrl("menu:" + action->data().toString()), m_applet);

        QListWidgetItem *item = new QListWidgetItem(launcher->icon(), launcher->title(), m_arrangementUi.currentActionsListWidget);
        item->setToolTip(launcher->launcherUrl().pathOrUrl());

        m_arrangementUi.currentActionsListWidget->insertItem((m_arrangementUi.currentActionsListWidget->currentRow() + 1), item);

        delete launcher;
    }
}
开发者ID:amithash,项目名称:fancytasks,代码行数:14,代码来源:FancyTasksConfiguration.cpp

示例12: main

int main()
{
    Network yarp;
    if (!yarp.checkNetwork())
    {
        cout<<"Error: yarp server does not seem available"<<endl;
        return 1;
    }

    // register here the new yarp devices
    // for dealing with the fake robot
    registerFakeMotorDevices();
    
    Launcher launcher;
    ResourceFinder rf;
    return launcher.runModule(rf);
}
开发者ID:robotology,项目名称:icub-tutorials,代码行数:17,代码来源:main.cpp

示例13: main

int main(int argc, char *argv[])
#endif
{
    mfxStatus sts;
    Launcher transcode;
    sts = transcode.Init(argc, argv);
    fflush(stdout);
    MSDK_CHECK_PARSE_RESULT(sts, MFX_ERR_NONE, 1);

    transcode.Run();

    sts = transcode.ProcessResult();
    fflush(stdout);
    MSDK_CHECK_RESULT(sts, MFX_ERR_NONE, 1);

    return 0;
}
开发者ID:camkego,项目名称:samples,代码行数:17,代码来源:sample_multi_transcode.cpp

示例14: dialog

void Configuration::addLauncher()
{
    KFileDialog dialog(KUrl("~"), "", NULL);
    dialog.setWindowModality(Qt::NonModal);
    dialog.setMode(KFile::File | KFile::Directory);
    dialog.setOperationMode(KFileDialog::Opening);
    dialog.exec();

    if (!dialog.selectedUrl().isEmpty())
    {
        Launcher* launcher = new Launcher(dialog.selectedUrl(), m_applet);

        QListWidgetItem *item = new QListWidgetItem(launcher->icon(), launcher->title(), m_arrangementUi.currentActionsListWidget);
        item->setToolTip(launcher->launcherUrl().pathOrUrl());

        m_arrangementUi.currentActionsListWidget->insertItem((m_arrangementUi.currentActionsListWidget->currentRow() + 1), item);

        delete launcher;
    }
}
开发者ID:amithash,项目名称:fancytasks,代码行数:20,代码来源:FancyTasksConfiguration.cpp

示例15: main

int main(int argc, char *argv[])
{
    Network yarp;
    if (!yarp.checkNetwork())
    {
        yError("YARP server not available!");
        return -1;
    }

    ResourceFinder rf;
    rf.setVerbose(true);
    rf.setDefault("name","iSpeak");
    rf.setDefault("robot","icub");
    rf.setDefault("package","festival");
    rf.setDefault("package_options","");
    rf.configure(argc,argv);

    Launcher launcher;
    return launcher.runModule(rf);
}
开发者ID:francesco-romano,项目名称:icub-main,代码行数:20,代码来源:main.cpp


注:本文中的Launcher类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。