本文整理汇总了C++中KAboutData::setTranslator方法的典型用法代码示例。如果您正苦于以下问题:C++ KAboutData::setTranslator方法的具体用法?C++ KAboutData::setTranslator怎么用?C++ KAboutData::setTranslator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KAboutData
的用法示例。
在下文中一共展示了KAboutData::setTranslator方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QDialog
NotesAgentSettingsDialog::NotesAgentSettingsDialog(QWidget *parent)
: QDialog(parent)
{
setWindowTitle(i18n("Configure Notes Agent"));
setWindowIcon(QIcon::fromTheme(QStringLiteral("knotes")));
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help, this);
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
connect(buttonBox, &QDialogButtonBox::rejected, this, &NotesAgentSettingsDialog::reject);
connect(okButton, &QPushButton::clicked, this, &NotesAgentSettingsDialog::slotOkClicked);
setModal(true);
QWidget *mainWidget = new QWidget(this);
QHBoxLayout *lay = new QHBoxLayout(mainWidget);
QTabWidget *tab = new QTabWidget;
lay->addWidget(tab);
mNotify = new KNotifyConfigWidget(this);
mNotify->setApplication(QStringLiteral("akonadi_notes_agent"));
tab->addTab(mNotify, i18n("Notify"));
mNetworkConfig = new NoteShared::NoteNetworkConfigWidget(this);
tab->addTab(mNetworkConfig, i18n("Network"));
mNetworkConfig->load();
mainLayout->addWidget(mainWidget);
mainLayout->addWidget(buttonBox);
readConfig();
KAboutData aboutData = KAboutData(
QStringLiteral("notesagent"),
i18n("Notes Agent"),
QStringLiteral(KNOTES_VERSION),
i18n("Notes Agent."),
KAboutLicense::GPL_V2,
i18n("Copyright (C) 2013-2016 Laurent Montel"));
aboutData.addAuthor(i18n("Laurent Montel"),
i18n("Maintainer"), QStringLiteral("[email protected]"));
QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("knotes")));
aboutData.setTranslator(i18nc("NAME OF TRANSLATORS", "Your names"),
i18nc("EMAIL OF TRANSLATORS", "Your emails"));
KHelpMenu *helpMenu = new KHelpMenu(this, aboutData, true);
//Initialize menu
QMenu *menu = helpMenu->menu();
helpMenu->action(KHelpMenu::menuAboutApp)->setIcon(QIcon::fromTheme(QStringLiteral("knotes")));
buttonBox->button(QDialogButtonBox::Help)->setMenu(menu);
}
示例2: QDialog
SendLaterConfigureDialog::SendLaterConfigureDialog(QWidget *parent)
: QDialog(parent)
{
setWindowTitle(i18n("Configure"));
setWindowIcon(QIcon::fromTheme(QStringLiteral("kmail")));
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help);
QVBoxLayout *mainLayout = new QVBoxLayout(this);
setLayout(mainLayout);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
connect(buttonBox, &QDialogButtonBox::rejected, this, &SendLaterConfigureDialog::reject);
mWidget = new SendLaterWidget(this);
mWidget->setObjectName(QStringLiteral("sendlaterwidget"));
connect(mWidget, &SendLaterWidget::sendNow, this, &SendLaterConfigureDialog::sendNow);
mainLayout->addWidget(mWidget);
mainLayout->addWidget(buttonBox);
connect(okButton, &QPushButton::clicked, this, &SendLaterConfigureDialog::slotSave);
readConfig();
KAboutData aboutData = KAboutData(
QStringLiteral("sendlateragent"),
i18n("Send Later Agent"),
QStringLiteral(KDEPIM_VERSION),
i18n("Send emails later agent."),
KAboutLicense::GPL_V2,
i18n("Copyright (C) 2013-2016 Laurent Montel"));
aboutData.addAuthor(i18n("Laurent Montel"),
i18n("Maintainer"), QStringLiteral("[email protected]"));
QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("kmail")));
aboutData.setTranslator(i18nc("NAME OF TRANSLATORS", "Your names"),
i18nc("EMAIL OF TRANSLATORS", "Your emails"));
KHelpMenu *helpMenu = new KHelpMenu(this, aboutData, true);
//Initialize menu
QMenu *menu = helpMenu->menu();
helpMenu->action(KHelpMenu::menuAboutApp)->setIcon(QIcon::fromTheme(QStringLiteral("kmail")));
buttonBox->button(QDialogButtonBox::Help)->setMenu(menu);
}
示例3: aboutData
extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
{
// here we go, construct the Kate version
QString kateVersion = KateApp::kateVersion();
KAboutData aboutData ("kate", I18N_NOOP("Kate"), kateVersion.latin1(),
I18N_NOOP( "Kate - Advanced Text Editor" ), KAboutData::License_LGPL_V2,
I18N_NOOP( "(c) 2000-2005 The Kate Authors" ), 0, "http://kate.kde.org");
aboutData.addAuthor ("Christoph Cullmann", I18N_NOOP("Maintainer"), "[email protected]", "http://www.babylon2k.de");
aboutData.addAuthor ("Anders Lund", I18N_NOOP("Core Developer"), "[email protected]", "http://www.alweb.dk");
aboutData.addAuthor ("Joseph Wenninger", I18N_NOOP("Core Developer"), "[email protected]","http://stud3.tuwien.ac.at/~e9925371");
aboutData.addAuthor ("Hamish Rodda",I18N_NOOP("Core Developer"), "[email protected]");
aboutData.addAuthor ("Waldo Bastian", I18N_NOOP( "The cool buffersystem" ), "[email protected]" );
aboutData.addAuthor ("Charles Samuels", I18N_NOOP("The Editing Commands"), "[email protected]");
aboutData.addAuthor ("Matt Newell", I18N_NOOP("Testing, ..."), "[email protected]");
aboutData.addAuthor ("Michael Bartl", I18N_NOOP("Former Core Developer"), "[email protected]");
aboutData.addAuthor ("Michael McCallum", I18N_NOOP("Core Developer"), "[email protected]");
aboutData.addAuthor ("Jochen Wilhemly", I18N_NOOP( "KWrite Author" ), "[email protected]" );
aboutData.addAuthor ("Michael Koch",I18N_NOOP("KWrite port to KParts"), "[email protected]");
aboutData.addAuthor ("Christian Gebauer", 0, "[email protected]" );
aboutData.addAuthor ("Simon Hausmann", 0, "[email protected]" );
aboutData.addAuthor ("Glen Parker",I18N_NOOP("KWrite Undo History, Kspell integration"), "[email protected]");
aboutData.addAuthor ("Scott Manson",I18N_NOOP("KWrite XML Syntax highlighting support"), "[email protected]");
aboutData.addAuthor ("John Firebaugh",I18N_NOOP("Patches and more"), "[email protected]");
aboutData.addAuthor ("Dominik Haumann", I18N_NOOP("Developer & Highlight wizard"), "[email protected]");
aboutData.addCredit ("Matteo Merli",I18N_NOOP("Highlighting for RPM Spec-Files, Perl, Diff and more"), "[email protected]");
aboutData.addCredit ("Rocky Scaletta",I18N_NOOP("Highlighting for VHDL"), "[email protected]");
aboutData.addCredit ("Yury Lebedev",I18N_NOOP("Highlighting for SQL"),"");
aboutData.addCredit ("Chris Ross",I18N_NOOP("Highlighting for Ferite"),"");
aboutData.addCredit ("Nick Roux",I18N_NOOP("Highlighting for ILERPG"),"");
aboutData.addCredit ("Carsten Niehaus", I18N_NOOP("Highlighting for LaTeX"),"");
aboutData.addCredit ("Per Wigren", I18N_NOOP("Highlighting for Makefiles, Python"),"");
aboutData.addCredit ("Jan Fritz", I18N_NOOP("Highlighting for Python"),"");
aboutData.addCredit ("Daniel Naber","","");
aboutData.addCredit ("Roland Pabel",I18N_NOOP("Highlighting for Scheme"),"");
aboutData.addCredit ("Cristi Dumitrescu",I18N_NOOP("PHP Keyword/Datatype list"),"");
aboutData.addCredit ("Carsten Pfeiffer", I18N_NOOP("Very nice help"), "");
aboutData.addCredit (I18N_NOOP("All people who have contributed and I have forgotten to mention"),"","");
aboutData.setTranslator(I18N_NOOP2("NAME OF TRANSLATORS","Your names"), I18N_NOOP2("EMAIL OF TRANSLATORS","Your emails"));
// command line args init and co
KCmdLineArgs::init (argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions (options);
KCmdLineArgs::addTempFileOption();
KateApp::addCmdLineOptions ();
// get our command line args ;)
KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
// now, first try to contact running kate instance if needed
if ( args->isSet("use") || (::getenv("KATE_PID")!=0) )
{
DCOPClient client;
client.attach ();
// get all attached clients ;)
QCStringList allClients = client.registeredApplications();
// search for a kate app client, use the first found
QCString kateApp;
if ( args->isSet("start") )
{
for (unsigned int i=0; i < allClients.count(); i++)
{
if (allClients[i] == "kate" || allClients[i].left(5) == "kate-")
{
DCOPRef ref( allClients[i], "KateApplication" );
QString s = ref.call( "session" );
if ( QString(args->getOption("start")) == s )
{
kateApp = allClients[i];
break;
}
}
}
}
else if ( (args->isSet("pid")) || (::getenv("KATE_PID") !=0 ) )
{
QCString tryApp;
if ( args->isSet("pid") )
tryApp = args->getOption("pid");
else
tryApp = ::getenv("KATE_PID");
if ( client.isApplicationRegistered( tryApp.prepend("kate-") ) )
kateApp = tryApp;
}
else
{
for (unsigned int i=0; i < allClients.count(); ++i)
{
if (allClients[i] == "kate" || allClients[i].left(5) == "kate-")
{
kateApp = allClients[i];
break;
}
//.........这里部分代码省略.........
示例4: createAboutData
KAboutData* Kexi::createAboutData()
{
KAboutData *aboutData = new KAboutData(
"kexi", 0,
ki18n(KEXI_APP_NAME),
KEXI_VERSION_STRING
#ifndef CUSTOM_VERSION
" (KOffice " KOFFICE_VERSION_STRING ")"
#endif
, ki18n(description),
KAboutData::License_LGPL_V2,
ki18n("(c) 2002-2010, Kexi Team"),
ki18n("This software is developed by Kexi Team - an international group\n"
"of independent developers."),
"http://www.koffice.org/kexi",
"su[email protected]"
);
// authors sorted by last nontrivial contribution date
aboutData->addAuthor(
ki18n("Jarosław Staniek"), ki18n("Project maintainer & developer, design, KexiDB, commercially supported version, MS Windows version"), "[email protected]");
aboutData->addAuthor(
ki18n("OpenOffice Polska LLC"), ki18n("Sponsoring and support (employer of Jarosław Staniek in 2003-2007)"), "[email protected]");
aboutData->addAuthor(
ki18n("Sebastian Sauer"), ki18n("Scripting module (KROSS), Python language bindings, design"), "[email protected]");
aboutData->addAuthor(
ki18n("Adam Pigg"), ki18n("PostgreSQL database driver, Migration and Reporting modules"), "[email protected]");
aboutData->addAuthor(
ki18n("Sharan Rao"), ki18n("Sybase/MS SQL Server database drivers, xBase migration plugin, improvements for KexiDB"), "[email protected]");
aboutData->addAuthor(
ki18n("Cédric Pasteur"), ki18n("First version of Property Editor and Form Designer"), "[email protected]");
aboutData->addAuthor(
ki18n("Martin Ellis"), ki18n("Contributions for MySQL and KexiDB, fixes, Migration module, MS Access file format support"), "[email protected]");
aboutData->addAuthor(
ki18n("Christian Nitschkowski"), ki18n("Graphics effects, helper dialogs"), "[email protected]");
aboutData->addAuthor(
ki18n("Lucijan Busch"), ki18n("Former project maintainer & developer"), "[email protected]");
aboutData->addAuthor(
ki18n("Peter Simonsson"), ki18n("Former developer"), "[email protected]");
aboutData->addAuthor(
ki18n("Joseph Wenninger"), ki18n("Original Form Designer, original user interface & much more"), "[email protected]");
aboutData->addAuthor(
ki18n("Seth Kurzenberg"), ki18n("CQL++, SQL assistance"), "[email protected]");
aboutData->addAuthor(
ki18n("Laurent Montel"), ki18n("Original code cleanings"), "[email protected]");
aboutData->addAuthor(
ki18n("Till Busch"), ki18n("Bugfixes, original Table Widget"), "[email protected]");
aboutData->addCredit(
ki18n("Daniel Molkentin"), ki18n("Initial design improvements"), "[email protected]");
aboutData->addCredit(
ki18n("Kristof Borrey"), ki18n("Icons and user interface research"), "[email protected]");
aboutData->addCredit(
ki18n("Tomas Krassnig"), ki18n("Coffee sponsoring"), "[email protected]");
aboutData->addCredit(
ki18n("Paweł Wirecki / OpenOffice Polska"), ki18n("Numerous bug reports, usability tests, technical support"));
aboutData->setTranslator(
ki18nc("NAME OF TRANSLATORS", "Your names"), ki18nc("EMAIL OF TRANSLATORS", "Your emails"));
#if defined(CUSTOM_VERSION) && defined(Q_WS_WIN)
aboutData->setProgramLogo(KEXI_APP_LOGO);
#endif
return aboutData;
}
示例5: contextMenuEvent
void PlasmaMuleApplet::contextMenuEvent(QGraphicsSceneContextMenuEvent * event)
{
QStringList::const_iterator constIterator;
QMenu menu;
if (m_catDirs.count() == 1)
{
menu.addAction (KIcon("folder"), QString("Default"));
} else {
QMenu *open_sub_menu = menu.addMenu("Open Incoming");
for (constIterator = m_catNames.constBegin(); constIterator != m_catNames.constEnd(); constIterator++)
{
open_sub_menu->addAction(KIcon("folder"), "Folder for " + *constIterator);
if (constIterator != m_catNames.constEnd())
{
open_sub_menu->addSeparator();
}
}
menu.addSeparator();
}
QClipboard* clipboard = QApplication::clipboard();
if (!clipboard->text(QClipboard::Clipboard).isEmpty() || !clipboard->text(QClipboard::Selection).isEmpty())
{
if (m_catDirs.count() == 1)
{
if (!clipboard->text(QClipboard::Clipboard).isEmpty())
{
menu.addAction(KIcon("arrow-down-double"), "Download Link from Clipboard");
if (!clipboard->text(QClipboard::Selection).isEmpty())
{
menu.addSeparator();
}
}
if (!clipboard->text(QClipboard::Selection).isEmpty())
{
menu.addAction(KIcon("arrow-down-double"), "Download Link from Selection");
}
} else {
QMenu *download_sub_menu = menu.addMenu("Download Link");
for (constIterator = m_catNames.constBegin(); constIterator != m_catNames.constEnd(); constIterator++)
{
if (!clipboard->text(QClipboard::Clipboard).isEmpty())
{
download_sub_menu->addAction(KIcon("arrow-down-double"), "Clipboard->" + *constIterator);
if (!clipboard->text(QClipboard::Selection).isEmpty())
{
download_sub_menu->addSeparator();
}
}
if (!clipboard->text(QClipboard::Selection).isEmpty())
{
download_sub_menu->addAction(KIcon("arrow-down-double"), "Selection->" + *constIterator);
}
if (constIterator != m_catNames.constEnd())
{
download_sub_menu->addSeparator();
}
}
}
}
menu.addSeparator();
menu.addAction(KIcon("documentinfo"), "About");
QAction* selectedItem = menu.exec(QCursor::pos());
if (selectedItem)
{
if (selectedItem->text() == "About")
{
KPluginInfo* service = new KPluginInfo (KService::serviceByDesktopName ("plasma-applet-plasmamule"));
KAboutData* aboutData = new KAboutData (service->name().toUtf8(),
service->name().toUtf8(),
ki18n(service->pluginName().toUtf8()),
service->version().toUtf8(),
ki18n(service->comment().toUtf8()),
KAboutData::License_GPL_V3,
ki18n(QByteArray()),
ki18n(QByteArray()),
service->website().toLatin1(),
service->email().toLatin1());
aboutData->addAuthor (ki18n(service->author().toUtf8()),
ki18n(QByteArray()),
service->email().toLatin1(),
service->website().toLatin1());
aboutData->setTranslator(ki18nc ("NAME OF TRANSLATORS", "Your names"),
ki18nc("EMAIL OF TRANSLATORS", "Your emails"));
aboutData->setProgramIconName (service->icon());
KAboutApplicationDialog* about = new KAboutApplicationDialog(aboutData, KAboutApplicationDialog::HideTranslators);
about->exec();
} else if (selectedItem->text().startsWith("Folder for"))
{
//.........这里部分代码省略.........