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


C++ KApplication类代码示例

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


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

示例1: main

int main(int argc, char **argv)
{
    KCmdLineArgs::init( argc, argv, "test", 0, ki18n("Test"), "1.0", ki18n("test app"));
    KApplication app;
    DemoWidget w;
    w.setFont(QFont("helvetica", 12, QFont::Bold));
    w.show();
    return app.exec();
}
开发者ID:vasi,项目名称:kdelibs,代码行数:9,代码来源:kpopuptest.cpp

示例2: main

int main(int argc, char **argv)
{
    KCmdLineArgs::init(argc, argv, "test", "test", "test", "0.1");
    KApplication app;

    TestManager manager(&app);

    return app.exec();
}
开发者ID:serghei,项目名称:kde3-kdepim,代码行数:9,代码来源:testmanager.cpp

示例3: main

int main(int argc, char **argv)
{
    KApplication *app = new KApplication(argc, argv, "KGradientTest");
    KGradientWidget w;
    w.resize(250 * cols, 250 * rows);
    app->setMainWidget(&w);
    w.show();
    return(app->exec());
}
开发者ID:,项目名称:,代码行数:9,代码来源:

示例4: main

int main(int argc, char** argv )
{
    KCmdLineArgs::init(argc, argv, "ktabwidgettest", 0, ki18n("KTabWidgetTest"), "1.0", ki18n("ktabwidget test app"));
    //KApplication::disableAutoDcopRegistration();
    KApplication app;
    Test *t = new Test();
    t->show();
    app.exec();
}
开发者ID:fluxer,项目名称:kdelibs,代码行数:9,代码来源:ktabwidgettest.cpp

示例5: main

int main( int argc, char **argv )
{
  KCmdLineArgs::init( argc, argv, "sendqueued", 0,
                      ki18n( "sendqueued" ), "0",
                      ki18n( "An app that sends all queued messages" ) );
  KApplication app;
  new Runner();
  return app.exec();
}
开发者ID:pvuorela,项目名称:kcalcore,代码行数:9,代码来源:sendqueued.cpp

示例6: sessionConfigName

/*
  Auxiliary function to calculate a a session config name used for the
  instance specific config object.
  Syntax:  "session/<appname>_<sessionId>"
 */
QString KApplicationPrivate::sessionConfigName() const
{
#ifdef QT_NO_SESSIONMANAGER
#error QT_NO_SESSIONMANAGER was set, this will not compile. Reconfigure Qt with Session management support.
#endif
    QString sessKey = q->sessionKey();
    if ( sessKey.isEmpty() && !sessionKey.isEmpty() )
        sessKey = sessionKey;
    return QString(QLatin1String("session/%1_%2_%3")).arg(q->applicationName()).arg(q->sessionId()).arg(sessKey);
}
开发者ID:fluxer,项目名称:kdelibs,代码行数:15,代码来源:kapplication.cpp

示例7: main

int main(int argc, char **argv)
{
    KAboutData about("fedge", I18N_NOOP("fedge"), version, description, KAboutData::License_GPL, "(C) 2004 mkulke", 0, 0, "[email protected]");
    about.addAuthor( "mkulke", 0, "[email protected]" );
    KCmdLineArgs::init(argc, argv, &about);
    KCmdLineArgs::addCmdLineOptions(options);
    KApplication app;
	 app.setMainWidget(new Fedge());
    return app.exec();
}
开发者ID:BackupTheBerlios,项目名称:fedge-svn,代码行数:10,代码来源:main.cpp

示例8: main

int main( int argc, char **argv )
{
    KCmdLineArgs::init( argc, argv, "kselectactiontest", 0, ki18n("KSelectActionTest"), "1.0", ki18n("kselectaction test app"));
    KApplication app;

    SelectActionTest* test = new SelectActionTest;
    test->show();

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

示例9: main

int main(int argc, char *argv[])
{
	KAboutData about("kiriki", 0, ki18n("Kiriki"), "0.2", ki18n("A Yahtzee dice game for KDE"), KAboutData::License_GPL, ki18n("© 2005-2007 Albert Astals Cid"), KLocalizedString(), "http://games.kde.org/kiriki" );
	about.addAuthor(ki18n("Albert Astals Cid"), KLocalizedString(), "[email protected]");
	KCmdLineArgs::init(argc, argv, &about);
	KApplication app;
	KGlobal::locale()->insertCatalog( QLatin1String( "libkdegames" ));
	app.setTopWidget(new kiriki());
	return app.exec();
}
开发者ID:jsj2008,项目名称:kdegames,代码行数:10,代码来源:main.cpp

示例10: main

int main(int argc, char **argv)
{
  KAboutData aboutData( "ksnapshot", 0, ki18n("KSnapshot"),
    KSNAPVERSION, ki18n(description), KAboutData::License_GPL,
    ki18n("(c) 1997-2008, Richard J. Moore,\n(c) 2000, Matthias Ettrich,\n(c) 2002-2003 Aaron J. Seigo"));
  aboutData.addAuthor(ki18n("Richard J. Moore"),KLocalizedString(), "[email protected]");
  aboutData.addAuthor(ki18n("Matthias Ettrich"),KLocalizedString(), "[email protected]");
  aboutData.addAuthor(ki18n("Aaron J. Seigo"), KLocalizedString(), "[email protected]");
  aboutData.addCredit( ki18n("Nadeem Hasan"), ki18n("Region Grabbing\nReworked GUI"),
      "[email protected]" );
  aboutData.addCredit( ki18n("Marcus Hufgard"), ki18n("\"Open With\" function"),
      "[email protected]" );
  aboutData.addCredit( ki18n("Pau Garcia i Quiles"), ki18n("Free region grabbing, KIPI plugins support, port to Windows"),
      "[email protected]" );

  KCmdLineArgs::init( argc, argv, &aboutData );
  KCmdLineArgs::addCmdLineOptions( ksnapshot_options() ); // Add our own options.
  KCmdLineArgs *args = KCmdLineArgs::parsedArgs();

  // This is one of the applications that requires the "native" / X11 graphics backend to work.
  QApplication::setGraphicsSystem("native");
  KApplication app;

  // Create top level window
  KSnapshot *toplevel;
  bool showTopLevel = false;

  if ( args->isSet( "current" ) )
     toplevel = new KSnapshot( 0, KSnapshotObject::WindowUnderCursor );
  else if(args->isSet( "fullscreen" ))
  {
     //we grad directly desktop => show dialogbox
     showTopLevel = true;
     toplevel = new KSnapshot( 0, KSnapshotObject::FullScreen );
  }
  else if(args->isSet( "region" ))
     toplevel = new KSnapshot( 0, KSnapshotObject::Region );
  else if(args->isSet( "freeregion" ))
     toplevel = new KSnapshot( 0, KSnapshotObject::FreeRegion );
  else if(args->isSet( "child" ))
     toplevel = new KSnapshot( 0, KSnapshotObject::ChildWindow );
  else
  {
     showTopLevel = true;
     toplevel = new KSnapshot();
  }

  args->clear();
  new KsnapshotAdaptor(toplevel);
  QDBusConnection::sessionBus().registerObject("/KSnapshot", toplevel);

  if(showTopLevel)
     toplevel->show();
  return app.exec();
}
开发者ID:KDE,项目名称:ksnapshot,代码行数:55,代码来源:main.cpp

示例11: main

int main(int argc, char **argv)
{
  QString aboutText("KDE und Qt Programmierung\n(c) Addison-Wesley");
  KCmdLineArgs::init(argc, argv, "khelloworld", aboutText, "1.0");
  KApplication app;

  MyMainWindow *top = new MyMainWindow();
  top->show();

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

示例12: main

int main ( int argc, char **argv)
{
  KAboutData about("kcomboboxtest", 0, ki18n("kcomboboxtest"), "version");
  KCmdLineArgs::init(argc, argv, &about);

  KApplication a;

  KComboBoxTest* t= new KComboBoxTest;
  t->show ();
  return a.exec();
}
开发者ID:vasi,项目名称:kdelibs,代码行数:11,代码来源:kcomboboxtest.cpp

示例13: main

int main( int argc, char ** argv )
{
    KAboutData about("KHBoxTest", 0, ki18n("KHBoxTest"), "version");
    KCmdLineArgs::init(argc, argv, &about);

    KApplication app;

    KHBoxTest *toplevel = new KHBoxTest(0);
    toplevel->show();
    app.exec();
}
开发者ID:vasi,项目名称:kdelibs,代码行数:11,代码来源:khboxtest.cpp

示例14: UndoCommandEventFilter

PhotoLayoutsEditor * PhotoLayoutsEditor::instance(QWidget * parent)
{
    if (m_instance)
        return m_instance;
    else
    {
        KApplication * app = KApplication::kApplication();
        app->installEventFilter(new UndoCommandEventFilter(app));
        return (m_instance = new PhotoLayoutsEditor(parent));
    }
}
开发者ID:coder89,项目名称:PhotoLayoutsEditor,代码行数:11,代码来源:photolayoutseditor.cpp

示例15: main

int main( int argc, char **argv )
{
  KAboutData about("KPageWidgetTest", 0, ki18n("KPageWidgetTest"), "version");
  KCmdLineArgs::init( argc, argv, &about );

  KApplication app;

  KPageWidgetTest testWidget( 0 );
  testWidget.show();

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


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