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


C++ KLocalizedString函数代码示例

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


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

示例1: main

int main(int argc, char** argv)
{
    // Initialise the program
    KCmdLineArgs::init(argc, argv, "kexidbcomboboxtest", 0, KLocalizedString(), "", KLocalizedString(), true);
    KApplication* app = new KApplication(true, true);

    // Look for installed database drivers
    KDbDriverManager manager;
    KDbDriver::InfoHash drvs = manager.driversInfo();

    // Set up a combo box and a quit widget in a new container
    QWidget* vbox = new QWidget();
    Q3VBoxLayout* vbLayout = new Q3VBoxLayout(vbox);

    KexiDBDriverComboBox* all = new KexiDBDriverComboBox(vbox, drvs);
    KexiDBDriverComboBox* srvOnly = new KexiDBDriverComboBox(vbox, drvs,
            KexiDBDriverComboBox::ShowServerDrivers);

    QPushButton* quit = new QPushButton("Quit", vbox);

    vbLayout->addWidget(all);     // Combobox listing all drivers
    vbLayout->addWidget(srvOnly); // Combobox only drivers for DB servers
    vbLayout->addWidget(quit);

    // Show the whole lot
    QObject::connect(quit, SIGNAL(clicked()), app, SLOT(quit()));
    vbox->show();
    app->exec();

    delete app;
}
开发者ID:TheTypoMaster,项目名称:calligra,代码行数:31,代码来源:kexidbdrivercombotest.cpp

示例2: main

int main(int argc, char ** argv)
{
    KCmdLineOptions options;
    options.add("+URL1", ki18n("The first URL to play"));
    options.add("+URL2", ki18n("The second URL to play"));

    KAboutData about("crossfade", 0, ki18n("Phonon Crossfade Example"),
            "1.0", KLocalizedString(),
            KAboutData::License_LGPL);
    about.addAuthor(ki18n("Matthias Kretz"), KLocalizedString(), "[email protected]");
    KCmdLineArgs::init(argc, argv, &about);
    KCmdLineArgs::addCmdLineOptions(options);
    KApplication app;
    KUrl url1;
    KUrl url2;
    KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
    if (args->count() == 2)
    {
        url1 = args->url(0);
        url2 = args->url(1);
        if (url1.isValid() && url2.isValid())
        {
            Crossfader xfader(url1, url2);
            return app.exec();
        }
    }
    return 1;
}
开发者ID:KDE,项目名称:kdeexamples,代码行数:28,代码来源:crossfade.cpp

示例3: main

int main(int argc, char **argv)
{
    KCmdLineArgs::init(argc, argv, "demo", 0, KLocalizedString(), "version", KLocalizedString());

    KApplication app;
    app.setQuitOnLastWindowClosed( true );

    QWidget *mainWidget = new QWidget;
    QVBoxLayout* l = new QVBoxLayout;

    KTextEditor::Message* m = new KTextEditor::Message(KTextEditor::Message::Information, "This is an information message, awesome!");
    QAction* a = new QAction("Action 1", m);
    m->addAction(a);
    a = new QAction("Action 2", m);
    m->addAction(a, false);

    KateMessageWidget* mw = new KateMessageWidget(m);
    l->addWidget(mw);
    mw = new KateMessageWidget(m);
    l->addWidget(mw);
    l->addWidget(new QLabel("some text in the middle", mw));
    mw = new KateMessageWidget(m);
    l->addWidget(mw);
    l->addWidget(new QLabel("some text at the bottom", mw));

    mainWidget->setLayout(l);
    mainWidget->show();

    return app.exec();
}
开发者ID:azat-archive,项目名称:kate,代码行数:30,代码来源:main.cpp

示例4: main

int main(int argc, char *argv[])
{
    KAboutData aboutData("itemview-test", 0, ki18n("test for item view"),
                         "0.1", ki18n("test app"),
                         KAboutData::License_GPL,
                         ki18n("(c) 2008 Alessandro Diaferia"),
                         KLocalizedString(), "", "[email protected]");
    aboutData.addAuthor(ki18n("Alessandro Diaferia"), KLocalizedString(), "[email protected]");

    KCmdLineArgs::init(argc, argv, &aboutData);

    KCmdLineOptions options;
    KCmdLineArgs::addCmdLineOptions(options);
    KCmdLineArgs::parsedArgs();
    KApplication app;

    KDialog *window = new KDialog();
    RaptorItemsView *itemsView = new RaptorItemsView(window);
    Kickoff::ApplicationModel *model = new Kickoff::ApplicationModel();
    itemsView->setModel(model);
    RaptorItemDelegate *delegate = new RaptorItemDelegate();
    itemsView->setItemDelegate(delegate);

    window->setMainWidget(itemsView);

    window->show();

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

示例5: main

int main(int argc, char *argv[])
{
    KAboutData aboutData("PTT", 0, ki18n("Plasma Theme Tester"),
                         "0.1", ki18n("Description"), 
                         KAboutData::License_GPL,
                         ki18n("(c) 2008  Riccardo Iaconelli"), 
                         KLocalizedString(), "", "[email protected]");
    aboutData.addAuthor(ki18n("Riccardo Iaconelli"), KLocalizedString(), "[email protected]");

    KCmdLineArgs::init(argc, argv, &aboutData);

    KCmdLineOptions options;
    KCmdLineArgs::addCmdLineOptions(options);
    KCmdLineArgs::parsedArgs();
    KApplication app;

    Ui::MainWindow ui;
    KMainWindow *mw = new KMainWindow;
    ui.setupUi(mw);

// set all the properties...
    ui.background->setType("background");

    mw->show();

    return app.exec();
}
开发者ID:ruphy,项目名称:plasma-theme-tester,代码行数:27,代码来源:main.cpp

示例6: main

int main(int argc, char *argv[])
{
    KAboutData aboutData("orario", 0, ki18n("Orario"),
                         "0.1", ki18n("Description"), 
                         KAboutData::License_GPL,
                         ki18n("(c) 2008  Riccardo Iaconelli"), 
                         KLocalizedString(), "", "[email protected]");
    aboutData.addAuthor(ki18n("Riccardo Iaconelli"), KLocalizedString(), "[email protected]");

    KCmdLineArgs::init(argc, argv, &aboutData);

    KCmdLineOptions options;
    KCmdLineArgs::addCmdLineOptions(options);
    KCmdLineArgs::parsedArgs();
    KApplication app;
    
    KMainWindow *wi = new KMainWindow;
    QWidget *w = new QWidget;
    Ui::Form ui;
    ui.setupUi(w);
    wi->setCentralWidget(w);
    wi->show();

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

示例7: main

int main(int argc, char **argv)
{
    KAboutData about("active-documentviewer", 0, ki18n("Reader"), version, ki18n(description),
                     KAboutData::License_GPL, ki18n("Copyright 2012 Marco Martin"), KLocalizedString(), 0, "[email protected]");
                     about.addAuthor( ki18n("Marco Martin"), KLocalizedString(), "[email protected]" );
    about.setProgramIconName("okular");

    KCmdLineArgs::init(argc, argv, &about);

    KCmdLineOptions options;
    options.add("+[url]", ki18n( "URL of the file to open" ));

    KCmdLineArgs::addCmdLineOptions(options);
    KApplication app;

    KCmdLineArgs *args = KCmdLineArgs::parsedArgs();

    KGlobal::locale()->insertCatalog("org.kde.okular");
    //kDebug() << "ARGS:" << args << args->count();

    KDeclarativeMainWindow *mainWindow = new KDeclarativeMainWindow();
    mainWindow->declarativeView()->setPackageName("org.kde.active.documentviewer");
    mainWindow->show();
    args->clear();
    return app.exec();
}
开发者ID:Axure,项目名称:okular,代码行数:26,代码来源:main.cpp

示例8: main

int main(int argc, char **argv) {
  KAboutData aboutData("kppplogview", 0, ki18n("KPPP Log Viewer"),
    version, ki18n(description), KAboutData::License_GPL,
    ki18n("(c) 1999-2002, The KPPP Developers"));
  aboutData.addAuthor(ki18n("Bernd Wuebben"),KLocalizedString(), "[email protected]");
  aboutData.addAuthor(ki18n("Mario Weilguni"));
  aboutData.addAuthor(ki18n("Harri Porten"),KLocalizedString(), "[email protected]");
  KCmdLineArgs::init(argc, argv, &aboutData);


  KCmdLineOptions option;

  option.add("kppp", ki18n("Run in KPPP mode"));

  KCmdLineArgs::addCmdLineOptions( option );

  KApplication a;

  loadLogs();

  TopWidget *w = new TopWidget;
  w->show();

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

示例9: KCModule

KCMKontactSummary::KCMKontactSummary( const KComponentData &inst, QWidget *parent )
  : KCModule( inst, parent )
{
  setButtons( NoAdditionalButton );
  QVBoxLayout *layout = new QVBoxLayout( this );
  layout->setSpacing( KDialog::spacingHint() );
  layout->setMargin( 0 );

  QLabel *label =
    new QLabel( i18n( "Select the plugin summaries to show on the summary page." ), this );
  layout->addWidget( label );

  mPluginView = new PluginView( this );
  layout->addWidget( mPluginView );

  layout->setStretchFactor( mPluginView, 1 );

  load();
  connect( mPluginView, SIGNAL(itemChanged(QTreeWidgetItem*,int)),
           this, SLOT(changed()) );

  KAboutData *about = new KAboutData( I18N_NOOP( "kontactsummary" ), 0,
                                      ki18n( "KDE Kontact Summary" ),
                                      0, KLocalizedString(), KAboutData::License_GPL,
                                      ki18n( "(c), 2004 Tobias Koenig" ) );

  about->addAuthor( ki18n( "Tobias Koenig" ), KLocalizedString(), "[email protected]" );
  setAboutData( about );
}
开发者ID:akhuettel,项目名称:kdepim-noakonadi,代码行数:29,代码来源:kcmkontactsummary.cpp

示例10: 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

示例11: 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

示例12: main

int main ( int argc, char **argv ) {
  KAboutData about ( "kmilion", 0, ki18n ( "KMilion" ), version, ki18n ( description ),
                     KAboutData::License_GPL, ki18n ( "(C) 2010 Mikołaj Sochacki" ), KLocalizedString(), 0, "[email protected]" );
  about.addAuthor ( ki18n ( "Mikołaj Sochacki" ), KLocalizedString(), "[email protected]" );
  KCmdLineArgs::init ( argc, argv, &about );

  KCmdLineOptions options;
  options.add ( "+[URL]", ki18n ( "Document to open" ) );
  KCmdLineArgs::addCmdLineOptions ( options );
  KApplication app;
  
  KMilion *widget = new KMilion;
  const QRect r = app.desktop()->frameGeometry();
  widget->setScreenSize ( r.width(), r.height() );
  KCmdLineArgs *args;
  if ( app.isSessionRestored() ) {
      RESTORE ( KMilion );
    }
  else {
      args = KCmdLineArgs::parsedArgs();
      widget->show();
    }
  args->clear();

  // Tak jest w orginale nie mam pojęcia dlaczego? Szczególnie po co kilka razy show!
  //see if we are starting with session management
//     if (app.isSessionRestored())
//     {
//         RESTORE(KMilion);
//     }
//     else
//     {
//         // no session.. just start up normally
//         KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
//         if (args->count() == 0)
//         {
//             //kmilion *widget = new kmilion;
//             widget->show();
//         }
//         else
//         {
//             int i = 0;
//             for (; i < args->count(); i++)
//             {
//                 //kmilion *widget = new kmilion;
//                 widget->show();
//             }
//         }
//         args->clear();
//     }

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

示例13: KAboutData

AboutData::AboutData()
	: KAboutData ("silence", 0,
		ki18n(APPNAME), VERSION,
		ki18n("An information management tool."),
		KAboutData::License_GPL_V2,
		ki18n("(c) 2009 - 2010, Silence developers"),
		KLocalizedString(),
		"http://silence.sekalura.net",
		"[email protected]")
{
	addAuthor(ki18n("Manuel Unglaub"), ki18n("Maintainer"), "[email protected]");
	addAuthor(ki18n("Yves Adler"), KLocalizedString(), "[email protected]");
}
开发者ID:munglaub,项目名称:silence,代码行数:13,代码来源:aboutdata.cpp

示例14: switch

KLocalizedString KSaneOption::unitString()
{
    switch (m_optDesc->unit) {
    case SANE_UNIT_NONE:        return KLocalizedString();
    case SANE_UNIT_PIXEL:       return ki18ncp("SpinBox parameter unit", " Pixel", " Pixels");
    case SANE_UNIT_BIT:         return ki18ncp("SpinBox parameter unit", " Bit", " Bits");
    case SANE_UNIT_MM:          return ki18nc("SpinBox parameter unit (Millimeter)", " mm");
    case SANE_UNIT_DPI:         return ki18nc("SpinBox parameter unit (Dots Per Inch)", " DPI");
    case SANE_UNIT_PERCENT:     return ki18nc("SpinBox parameter unit (Percentage)", " %");
    case SANE_UNIT_MICROSECOND: return ki18nc("SpinBox parameter unit (Microseconds)", " µs");
    }
    return KLocalizedString();
}
开发者ID:KDE,项目名称:libksane,代码行数:13,代码来源:ksaneoption.cpp

示例15: main

int main(int argc, char **argv)
{
    KAboutData about("moviemanager", 0, ki18n("MovieManager"), version, ki18n(description),
                     KAboutData::License_GPL, ki18n("(C) 2012 Sandeep Raju P & Sadan Sohan M"), KLocalizedString(), 0, "[email protected]\[email protected]");
    about.addAuthor( ki18n("Sandeep Raju P"), KLocalizedString(), "[email protected]" );
    about.addAuthor( ki18n("Sadan Sohan M"), KLocalizedString(), "[email protected]" );
    KCmdLineArgs::init(argc, argv, &about);

    KCmdLineOptions options;
    options.add("+[URL]", ki18n( "Document to open" ));
    KCmdLineArgs::addCmdLineOptions(options);
    KApplication app;

    MovieManager *widget = new MovieManager();

    // see if we are starting with session management
    if (app.isSessionRestored())
    {
        RESTORE(MovieManager);
    }
    else
    {
        // no session.. just start up normally
        KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
        if (args->count() == 0)
        {
            //moviemanager *widget = new moviemanager;
            //widget->setMaximumSize(200,200);
            widget->show();
            //mainListScroll->show();
           // widget->mainListScroll->show();

        }
        else
        {
            int i = 0;
            for (; i < args->count(); i++)
            {
                //moviemanager *widget = new moviemanager;
                //widget->setMaximumSize(200,200);
                widget->show();
                //widget->mainListScroll->show();
            }
        }
        args->clear();
    }

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


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