本文整理汇总了C++中KAboutData类的典型用法代码示例。如果您正苦于以下问题:C++ KAboutData类的具体用法?C++ KAboutData怎么用?C++ KAboutData使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了KAboutData类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: KCModule
KclockModule::KclockModule(QWidget *parent, const char *name, const QStringList &) : KCModule(KlockModuleFactory::instance(), parent, name)
{
KAboutData *about = new KAboutData(I18N_NOOP("kcmclock"), I18N_NOOP("KDE Clock Control Module"), 0, 0, KAboutData::License_GPL,
"(c) 1996 - 2001 Luca Montecchiani");
about->addAuthor("Luca Montecchiani", I18N_NOOP("Original author"), "[email protected]");
about->addAuthor("Paul Campbell", I18N_NOOP("Current Maintainer"), "[email protected]");
about->addAuthor("Benjamin Meyer", I18N_NOOP("Added NTP support"), "[email protected]");
setAboutData(about);
setQuickHelp(
i18n("<h1>Date & Time</h1> This control module can be used to set the system date and"
" time. As these settings do not only affect you as a user, but rather the whole system, you"
" can only change these settings when you start the Control Center as root. If you do not have"
" the root password, but feel the system time should be corrected, please contact your system"
" administrator."));
KGlobal::locale()->insertCatalogue("timezones"); // For time zone translations
QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint());
dtime = new Dtime(this);
layout->addWidget(dtime);
connect(dtime, SIGNAL(timeChanged(bool)), this, SIGNAL(changed(bool)));
tzone = new Tzone(this);
layout->addWidget(tzone);
connect(tzone, SIGNAL(zoneChanged(bool)), this, SIGNAL(changed(bool)));
layout->addStretch();
if(getuid() == 0)
setButtons(Help | Apply);
else
setButtons(Help);
}
示例2: KCModule
KCMKOrgSummary::KCMKOrgSummary(QWidget *parent, const char *name)
: KCModule(parent, name)
{
initGUI();
customDaysChanged(1);
connect(mCalendarGroup, SIGNAL(clicked(int)), SLOT(modified()));
connect(mCalendarGroup, SIGNAL(clicked(int)), SLOT(buttonClicked(int)));
connect(mTodoGroup, SIGNAL(clicked(int)), SLOT(modified()));
connect(mCustomDays, SIGNAL(valueChanged(int)), SLOT(modified()));
connect(mCustomDays, SIGNAL(valueChanged(int)), SLOT(customDaysChanged(int)));
KAcceleratorManager::manage(this);
load();
KAboutData *about = new KAboutData(I18N_NOOP("kcmkorgsummary"),
I18N_NOOP("Schedule Configuration Dialog"),
0, 0, KAboutData::License_GPL,
I18N_NOOP("(c) 2003 - 2004 Tobias Koenig"));
about->addAuthor("Tobias Koenig", 0, "[email protected]");
setAboutData(about);
}
示例3: KCModule
KcmKRfb::KcmKRfb(QWidget *p, const char *name, const QStringList &) :
KCModule(KcmKRfbFactory::instance(), p, name),
m_configuration(KRFB_CONFIGURATION_MODE) {
m_confWidget = new ConfigurationWidget(this);
QVBoxLayout *l = new QVBoxLayout(this, 0, KDialog::spacingHint());
l->add(m_confWidget);
setButtons(Default|Apply|Reset);
KAboutData* about = new KAboutData( "kcm_krfb", I18N_NOOP("Desktop Sharing Control Module"),
VERSION,
I18N_NOOP("Configure desktop sharing"), KAboutData::License_GPL,
"(c) 2002, Tim Jansen\n",
0, "http://www.tjansen.de/krfb", "[email protected]");
about->addAuthor("Tim Jansen", 0, "[email protected]");
setAboutData( about );
load();
connect(m_confWidget->passwordInput, SIGNAL(textChanged(const QString&)), SLOT(configChanged()) );
connect(m_confWidget->allowUninvitedCB, SIGNAL(clicked()), SLOT(configChanged()) );
connect(m_confWidget->enableSLPCB, SIGNAL(clicked()), SLOT(configChanged()) );
connect(m_confWidget->confirmConnectionsCB, SIGNAL(clicked()), SLOT(configChanged()) );
connect(m_confWidget->allowDesktopControlCB, SIGNAL(clicked()), SLOT(configChanged()) );
connect(m_confWidget->autoPortCB, SIGNAL(clicked()), SLOT(configChanged()) );
connect(m_confWidget->portInput, SIGNAL(valueChanged(int)), SLOT(configChanged()) );
connect((QObject*)m_confWidget->manageInvitations, SIGNAL(clicked()),
&m_configuration, SLOT(showManageInvitationsDialog()) );
connect(&m_configuration, SIGNAL(invitationNumChanged(int)),
this, SLOT(setInvitationNum(int)));
setInvitationNum(m_configuration.invitations().size());
connect(m_confWidget->disableBackgroundCB, SIGNAL(clicked()), SLOT(configChanged()) );
}
示例4: KCModule
KCMCgi::KCMCgi(QWidget *parent, const char *name)
: KCModule(parent, name)
{
setButtons(Default|Apply);
QVBoxLayout *topLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());
QGroupBox *topBox = new QGroupBox( 1, Horizontal, i18n("Paths to Local CGI Programs"), this );
topLayout->addWidget( topBox );
mListBox = new QListBox( topBox );
QHBox *buttonBox = new QHBox( topBox );
buttonBox->setSpacing( KDialog::spacingHint() );
mAddButton = new QPushButton( i18n("Add..."), buttonBox );
connect( mAddButton, SIGNAL( clicked() ), SLOT( addPath() ) );
mRemoveButton = new QPushButton( i18n("Remove"), buttonBox );
connect( mRemoveButton, SIGNAL( clicked() ), SLOT( removePath() ) );
connect( mListBox, SIGNAL( clicked ( QListBoxItem * )),this, SLOT( slotItemSelected( QListBoxItem *)));
mConfig = new KConfig("kcmcgirc");
load();
updateButton();
KAboutData *about =
new KAboutData( I18N_NOOP("kcmcgi"),
I18N_NOOP("CGI KIO Slave Control Module"),
0, 0, KAboutData::License_GPL,
I18N_NOOP("(c) 2002 Cornelius Schumacher") );
about->addAuthor( "Cornelius Schumacher", 0, "[email protected]" );
setAboutData(about);
}
示例5: QApplication
KPlatoWork_Application::KPlatoWork_Application(int argc, char **argv)
: QApplication(argc, argv),
m_mainwindow( 0 )
{
KAboutData *aboutData = KPlatoWork::newAboutData();
KAboutData::setApplicationData( *aboutData );
setWindowIcon(QIcon::fromTheme(QStringLiteral("calligraplanwork")));
aboutData->setupCommandLine(&m_commandLineParser);
m_commandLineParser.addHelpOption();
m_commandLineParser.addVersionOption();
m_commandLineParser.addPositionalArgument(QStringLiteral("[file]"), i18n("File to open"));
m_commandLineParser.process(*this);
aboutData->processCommandLine(&m_commandLineParser);
// Tell the iconloader about share/apps/calligra/icons
/* KIconLoader::global()->addAppDir("calligra");
// Initialize all Calligra directories etc.
KoGlobal::initialize();
new KoApplicationAdaptor(this);
QDBusConnection::sessionBus().registerObject("/application", this);*/
delete aboutData;
}
示例6: main
int main(int argc, char **argv)
{
QApplication app(argc, argv);
KAboutData about = newBrainDumpAboutData();
KAboutData::setApplicationData(about);
QCommandLineParser parser;
parser.addVersionOption();
parser.addHelpOption();
parser.process(app);
about.setupCommandLine(&parser);
about.processCommandLine(&parser);
KIconLoader::global()->addAppDir("calligra");
KoGlobal::initialize();
RootSection* doc = new RootSection;
MainWindow* window = new MainWindow(doc);
window->setVisible(true);
app.exec();
// Ensure the root section is saved
doc->sectionsIO()->save();
delete doc;
app.exit(0);
}
示例7: KCModule
TaskbarConfig::TaskbarConfig(QWidget *parent, const char *name, const QStringList &) : KCModule(TaskBarFactory::instance(), parent, name)
{
QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint());
m_widget = new TaskbarConfigUI(this);
layout->addWidget(m_widget);
// TODO: Load these from .desktop files?
m_appearances.append(TaskbarAppearance(i18n("Elegant"), false, false, true));
m_appearances.append(TaskbarAppearance(i18n("Classic"), true, false, true));
m_appearances.append(TaskbarAppearance(i18n("For Transparency"), false, true, true));
for(TaskbarAppearance::List::const_iterator it = m_appearances.constBegin(); it != m_appearances.constEnd(); ++it)
{
m_widget->appearance->insertItem((*it).name());
}
connect(m_widget->appearance, SIGNAL(activated(int)), this, SLOT(appearanceChanged(int)));
addConfig(TaskBarSettings::self(), m_widget);
setQuickHelp(
i18n("<h1>Taskbar</h1> You can configure the taskbar here."
" This includes options such as whether or not the taskbar should show all"
" windows at once or only those on the current desktop."
" You can also configure whether or not the Window List button will be displayed."));
QStringList list = i18nActionList();
m_widget->kcfg_LeftButtonAction->insertStringList(list);
m_widget->kcfg_MiddleButtonAction->insertStringList(list);
m_widget->kcfg_RightButtonAction->insertStringList(list);
m_widget->kcfg_GroupTasks->insertStringList(i18nGroupModeList());
connect(m_widget->kcfg_GroupTasks, SIGNAL(activated(int)), this, SLOT(slotUpdateComboBox()));
connect(m_widget->kcfg_UseCustomColors, SIGNAL(stateChanged(int)), this, SLOT(slotUpdateCustomColors()));
slotUpdateCustomColors();
updateAppearanceCombo();
if(KWin::numberOfDesktops() < 2)
{
m_widget->kcfg_ShowAllWindows->hide();
m_widget->kcfg_SortByDesktop->hide();
m_widget->spacer2->changeSize(0, 0);
}
if(!QApplication::desktop()->isVirtualDesktop() || QApplication::desktop()->numScreens() == 1) // No Ximerama
{
m_widget->showAllScreens->hide();
}
connect(m_widget->showAllScreens, SIGNAL(stateChanged(int)), SLOT(changed()));
KAboutData *about = new KAboutData(I18N_NOOP("kcmtaskbar"), I18N_NOOP("KDE Taskbar Control Module"), 0, 0, KAboutData::License_GPL,
I18N_NOOP("(c) 2000 - 2001 Matthias Elter"));
about->addAuthor("Matthias Elter", 0, "[email protected]");
about->addCredit("Stefan Nikolaus", I18N_NOOP("KConfigXT conversion"), "[email protected]");
setAboutData(about);
load();
QTimer::singleShot(0, this, SLOT(notChanged()));
}
示例8: 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 );
}
示例9: KCModule
KCMNic::KCMNic(QWidget *parent, const char *name, const QStringList &) : KCModule(KCMNicFactory::instance(), parent, name)
{
QVBoxLayout *box = new QVBoxLayout(this, 0, KDialog::spacingHint());
m_list = new QListView(this);
box->addWidget(m_list);
m_list->addColumn(i18n("Name"));
m_list->addColumn(i18n("IP Address"));
m_list->addColumn(i18n("Network Mask"));
m_list->addColumn(i18n("Type"));
m_list->addColumn(i18n("State"));
m_list->addColumn(i18n("HWaddr"));
m_list->setAllColumnsShowFocus(true);
QHBoxLayout *hbox = new QHBoxLayout(box);
m_updateButton = new QPushButton(i18n("&Update"), this);
hbox->addWidget(m_updateButton);
hbox->addStretch(1);
QTimer *timer = new QTimer(this);
timer->start(60000);
connect(m_updateButton, SIGNAL(clicked()), this, SLOT(update()));
connect(timer, SIGNAL(timeout()), this, SLOT(update()));
update();
KAboutData *about = new KAboutData(I18N_NOOP("kcminfo"), I18N_NOOP("KDE Panel System Information Control Module"), 0, 0, KAboutData::License_GPL,
I18N_NOOP("(c) 2001 - 2002 Alexander Neundorf"));
about->addAuthor("Alexander Neundorf", 0, "[email protected]");
setAboutData(about);
}
示例10: KAboutData
KAboutData *KopeteRichTextEditPart::createAboutData()
{
KAboutData *aboutData = new KAboutData("kopeterichtexteditpart", I18N_NOOP("KopeteRichTextEditPart"), "0.1",
I18N_NOOP("A simple rich text editor part for Kopete"),
KAboutData::License_LGPL );
aboutData->addAuthor("Richard J. Moore", 0, "[email protected]", "http://xmelegance.org/" );
aboutData->addAuthor("Jason Keirstead", 0, "[email protected]", "http://www.keirstead.org/" );
return aboutData;
}
示例11: I18N_NOOP
KAboutData *NoteeditFactory::aboutData() {
KAboutData *about = new KAboutData
("noteedit", I18N_NOOP("NoteEdit"), VERSION,
"a KDE3/Qt3 based note editor.\nFor help subscribe to one of the\nmailing lists, or post a message\nin one of the public forums. See",
KAboutData::License_GPL, 0, 0,
//"http://rnvs.informatik.tu-chemnitz.de/~jan/noteedit/noteedit.html",
"http://developer.berlios.de/projects/noteedit",
ADDRESS);
about->addAuthor
("Joerg Anders", I18N_NOOP("Main author"), ADDRESS);
about->addAuthor
("Christian Fasshauer", I18N_NOOP("programmer"), "[email protected]");
#ifdef WITH_TSE3
about->addAuthor
("Pete Goodliffe", I18N_NOOP("TSE3 sequencer library"),
"[email protected]");
#endif
about->addAuthor("Erik Sigra", I18N_NOOP("developer"), "[email protected]");
about->addAuthor
("David Faure", I18N_NOOP("KDE User Interface"), "[email protected]");
about->addAuthor("Matt Gerassimoff", 0, "[email protected]");
about->addAuthor
("Leon Vinken", I18N_NOOP("MusicXML interface"),
"[email protected]");
about->addAuthor("Georg Rudolph", I18N_NOOP("lilypond interface"), "[email protected]");
return about;
}
示例12: KCModule
PcmciaConfig::PcmciaConfig (QWidget * parent, const char *name)
: KCModule(parent, name)
{
KAboutData *about =
new KAboutData(I18N_NOOP("kcmlaptop"),
I18N_NOOP("KDE Panel System Information Control Module"),
0, 0, KAboutData::License_GPL,
I18N_NOOP("(c) 1999 - 2002 Paul Campbell"));
about->addAuthor("Paul Campbell", 0, "[email protected]");
setAboutData( about );
KGlobal::locale()->insertCatalogue("klaptopdaemon"); // For translation of klaptopdaemon messages
label0 = laptop_portable::pcmcia_info(0, this);
label0_text = laptop_portable::pcmcia_info(1, this);
label1 = laptop_portable::pcmcia_info(2, this);
label1_text = laptop_portable::pcmcia_info(3, this);
QVBoxLayout *top_layout = new QVBoxLayout(this, 15, 5);
QGridLayout *top_grid = new QGridLayout(2, 2);
top_layout->addLayout(top_grid);
top_grid->setColStretch(0, 0);
top_grid->setColStretch(1, 1);
top_grid->addRowSpacing(0, 40);
top_grid->addRowSpacing(1, 40);
label0->setFixedSize(80, 24);
top_grid->addWidget(label0, 0, 0);
label0_text->adjustSize();
top_grid->addWidget(label0_text, 0, 1);
label1->setFixedSize(80, 24);
top_grid->addWidget(label1, 1, 0);
label1_text->adjustSize();
top_grid->addWidget(label1_text, 1, 1);
top_layout->addStretch(1);
QHBoxLayout *v1 = new QHBoxLayout;
top_layout->addLayout(v1, 0);
v1->addStretch(1);
QString s1 = LAPTOP_VERSION;
QString s2 = i18n("Version: ")+s1;
QLabel* vers = new QLabel(s2, this);
vers->setMinimumSize(vers->sizeHint());
v1->addWidget(vers, 0);
top_layout->activate();
load();
setButtons(Help);
}
示例13: KCModule
Module::Module(QWidget *parent, const QVariantList &args)
: KCModule(parent, args)
, ui(new Ui::Module)
, m_manager(new DriverManager(this))
{
KAboutData *aboutData = new KAboutData("kcm-driver-manager",
i18n("Driver Manager"),
global_s_versionStringFull,
QStringLiteral(""),
KAboutLicense::LicenseKey::GPL_V3,
i18n("Copyright 2013 Rohan Garg"));
aboutData->addAuthor(i18n("Rohan Garg"), i18n("Author"), QStringLiteral("[email protected]"));
aboutData->addAuthor(i18n("Harald Sitter"), i18n("Qt 5 port"), QStringLiteral("[email protected]"));
setAboutData(aboutData);
// We have no help so remove the button from the buttons.
setButtons(buttons() ^ KCModule::Help);
ui->setupUi(this);
ui->progressBar->setVisible(false);
connect(ui->reloadButton, SIGNAL(clicked(bool)), SLOT(load()));
m_overlay = new KPixmapSequenceOverlayPainter(this);
m_overlay->setWidget(this);
#warning variable name
QString label = xi18nc("@title/rich", "<title>Your computer requires no proprietary drivers</title>");
m_label = new QLabel(label, this);
m_label->hide();
ui->driverOptionsVLayout->addWidget(m_label);
//Debconf handling
QString uuid = QUuid::createUuid().toString();
uuid.remove('{').remove('}').remove('-');
m_pipe = QDir::tempPath() % QLatin1String("/qapt-sock-") % uuid;
m_debconfGui = new DebconfKde::DebconfGui(m_pipe, this);
m_debconfGui->connect(m_debconfGui, SIGNAL(activated()), this, SLOT(showDebconf()));
m_debconfGui->connect(m_debconfGui, SIGNAL(deactivated()), this, SLOT(hideDebconf()));
m_debconfGui->hide();
connect(m_manager, SIGNAL(refreshFailed()),
this, SLOT(onRefreshFailed()));
connect(m_manager, SIGNAL(devicesReady(DeviceList)),
this, SLOT(onDevicesReady(DeviceList)));
connect(m_manager, SIGNAL(changeProgressChanged(int)),
this, SLOT(progressChanged(int)));
connect(m_manager, SIGNAL(changeFinished()),
this, SLOT(finished()));
connect(m_manager, SIGNAL(changeFailed(QString)),
this, SLOT(failed(QString)));
}
示例14: 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);
}
示例15: KCModule
KCMRules::KCMRules(QWidget *parent, const char *name) : KCModule(parent, name), config("kwinrulesrc")
{
QVBoxLayout *layout = new QVBoxLayout(this);
widget = new KCMRulesList(this);
layout->addWidget(widget);
connect(widget, SIGNAL(changed(bool)), SLOT(moduleChanged(bool)));
KAboutData *about = new KAboutData(I18N_NOOP("kcmkwinrules"), I18N_NOOP("Window-Specific Settings Configuration Module"), 0, 0,
KAboutData::License_GPL, I18N_NOOP("(c) 2004 KWin and KControl Authors"));
about->addAuthor("Lubos Lunak", 0, "[email protected]");
setAboutData(about);
}