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


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

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


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

示例1: kdemain

extern "C" int KDE_EXPORT kdemain(int argc, char *argv[])
{
  Klipper::createAboutData();
  KCmdLineArgs::init( argc, argv, Klipper::aboutData());
  KUniqueApplication::addCmdLineOptions();

  if (!KUniqueApplication::start()) {
       fprintf(stderr, "Klipper is already running!\n");
       exit(0);
  }
  KUniqueApplication app;
  app.disableSessionManagement();

  Klipper *toplevel = new Klipper();

  // Make Klipper conform to freedesktop system tray standard, see
  // http://bugs.kde.org/show_bug.cgi?id=69119
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
  QXEmbed::initialize();
#endif

  KWin::setSystemTrayWindowFor( toplevel->winId(), 0 );
  toplevel->setGeometry(-100, -100, 42, 42 );
  toplevel->show();

  int ret = app.exec();
  delete toplevel;
  Klipper::destroyAboutData();
  return ret;
}
开发者ID:,项目名称:,代码行数:30,代码来源:

示例2: main

int main(int argc, char **argv) {
	KupDaemon *lDaemon = new KupDaemon();
	if(!lDaemon->shouldStart()) {
		qWarning() <<ki18n("Kup is not enabled, enable it from the system settings module.").toString();
		return 0;
	}
	KAboutData lAbout("kupdaemon", "kup", ki18nc("@title", "Kup Daemon"), version, ki18n(description),
	                  KAboutData::License_GPL, ki18n("Copyright (C) 2011 Simon Persson"),
	                  KLocalizedString(), 0, "[email protected]");
	lAbout.addAuthor(ki18n("Simon Persson"), KLocalizedString(), "[email protected]");
	KCmdLineArgs::init(argc, argv, &lAbout);

	KUniqueApplication::addCmdLineOptions();
	if (!KUniqueApplication::start()) {
		qWarning() <<ki18n("Kup is already running!").toString();
		return 0;
	}
	KUniqueApplication lApp;

	// Use for debugging...
	//		KApplication lApp;

	lApp.setQuitOnLastWindowClosed(false);
	lApp.disableSessionManagement();

	KStartupInfo::appStarted(); //make startup notification go away.

	lDaemon->setupGuiStuff();

	return lApp.exec();
}
开发者ID:kcroot,项目名称:Kup,代码行数:31,代码来源:main.cpp

示例3: aboutdata

extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
{
    //  GS 5/2001 - I changed the name to "KDE" to make it look better
    //              in the titles of dialogs which are displayed.
    KAboutData aboutdata("kuiserver", "kdelibs4", ki18n("Job Manager"),
                         "0.8", ki18n("KDE Job Manager"),
                         KAboutData::License_GPL_V2, ki18n("(C) 2000-2009, KDE Team"));

    aboutdata.addAuthor(ki18n("Shaun Reich"), ki18n("Maintainer"), "[email protected]");
    aboutdata.addAuthor(ki18n("Rafael Fernández López"), ki18n("Former Maintainer"), "[email protected]");
    aboutdata.addAuthor(ki18n("David Faure"), ki18n("Former maintainer"), "[email protected]");
    aboutdata.addAuthor(ki18n("Matej Koss"), ki18n("Developer"), "[email protected]");

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

    if (!KUniqueApplication::start()) {
        kDebug(7024) << "kuiserver is already running!";
        return 0;
    }

    KUniqueApplication app;

    // This app is started automatically, no need for session management
    app.disableSessionManagement();
    app.setQuitOnLastWindowClosed(false);

    ProgressListModel model;

    return app.exec();
}
开发者ID:KDE,项目名称:kde-runtime,代码行数:31,代码来源:main.cpp

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