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


C++ KUniqueApplication::dcopClient方法代码示例

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


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

示例1: kdemain

KDE_EXPORT int kdemain(int argc, char **argv)
{
    KAboutData aboutdata("knotify", I18N_NOOP("KNotify"), "3.0", I18N_NOOP("KDE Notification Server"), KAboutData::License_GPL,
                         "(C) 1997-2003, KDE Developers");
    aboutdata.addAuthor("Carsten Pfeiffer", I18N_NOOP("Current Maintainer"), "[email protected]");
    aboutdata.addAuthor("Christian Esken", 0, "[email protected]");
    aboutdata.addAuthor("Stefan Westerfeld", I18N_NOOP("Sound support"), "[email protected]");
    aboutdata.addAuthor("Charles Samuels", I18N_NOOP("Previous Maintainer"), "[email protected]");

    KCmdLineArgs::init(argc, argv, &aboutdata);
    KUniqueApplication::addCmdLineOptions();


    // initialize application
    if(!KUniqueApplication::start())
    {
        kdDebug() << "Running knotify found" << endl;
        return 0;
    }

    KUniqueApplication app;
    app.disableSessionManagement();

    // start notify service
    KNotify *notify = new KNotify();

    app.dcopClient()->setDefaultObject("Notify");
    app.dcopClient()->setDaemonMode(true);
    // kdDebug() << "knotify starting" << endl;

    int ret = app.exec();
    delete notify;

    return ret;
}
开发者ID:,项目名称:,代码行数:35,代码来源:

示例2: main

int main(int argc, char *argv[])
{
    KAboutData aboutData( "amor", I18N_NOOP("amor"),
        AMOR_VERSION, description, KAboutData::License_GPL,
        "(c) 1999, Martin R. Jones");
    aboutData.addAuthor("Martin R. Jones",0, "[email protected]");
    aboutData.addAuthor("Gerardo Puga", I18N_NOOP("Current maintainer"), "[email protected]"); 
    KCmdLineArgs::init( argc, argv, &aboutData );

    if (!KUniqueApplication::start()) {
	fprintf(stderr, "%s is already running!\n", aboutData.appName());
	exit(0);
    }
    KUniqueApplication app;

    // session management
    AmorSessionWidget *sessionWidget = new AmorSessionWidget;
    app.setTopWidget(sessionWidget);

    new Amor();

    app.dcopClient()->setDefaultObject( "AmorIface" );

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

示例3: aboutdata

extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
{
    KLocale::setMainCatalogue("kdelibs");
    //  GS 5/2001 - I changed the name to "KDE" to make it look better
    //              in the titles of dialogs which are displayed.
    KAboutData aboutdata("kio_uiserver", I18N_NOOP("KDE"), "0.8", I18N_NOOP("KDE Progress Information UI Server"), KAboutData::License_GPL,
                         "(C) 2000, David Faure & Matt Koss");
    // Who's the maintainer ? :)
    aboutdata.addAuthor("David Faure", I18N_NOOP("Developer"), "[email protected]");
    aboutdata.addAuthor("Matej Koss", I18N_NOOP("Developer"), "[email protected]");

    KCmdLineArgs::init(argc, argv, &aboutdata);
    // KCmdLineArgs::addCmdLineOptions( options );
    KUniqueApplication::addCmdLineOptions();

    if(!KUniqueApplication::start())
    {
        kdDebug(7024) << "kio_uiserver is already running!" << endl;
        return (0);
    }

    KUniqueApplication app;

    // This app is started automatically, no need for session management
    app.disableSessionManagement();
    app.dcopClient()->setDaemonMode(true);

    uiserver = UIServer::createInstance();

    //    app.setMainWidget( uiserver );

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


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