本文整理汇总了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;
}
示例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();
}
示例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();
}