本文整理汇总了C++中setHelp函数的典型用法代码示例。如果您正苦于以下问题:C++ setHelp函数的具体用法?C++ setHelp怎么用?C++ setHelp使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setHelp函数的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: print
ParameterList::ParameterList()
{
Callback helpCallback = [&](uint32_t) {
print();
};
setHelp(add("help", helpCallback), "Print help");
setHelp(add("h", helpCallback), "Print help");
}
开发者ID:nvpro-samples,项目名称:shared_sources,代码行数:9,代码来源:parametertools.cpp
示例2: columns
CmdStatistics::CmdStatistics():
columns(-1),
sorting(-1)
{
setCmd("stat");
setInfo("Messages statistics.");
setHelp("rpri [name] [priority] Set render priority.");
setHelp("stat [columns=-1] [sorting=-1] Number of colums to output (-1:all), sort by column (-1:none).");
setMsgType( af::Msg::TStatRequest);
setMsgOutType( af::Msg::TStatData);
}
开发者ID:CGRU,项目名称:cgru,代码行数:11,代码来源:cmd_statistics.cpp
示例3: it
void Application::parseOptions(const QStringList &options)
{
QStringListIterator it(options);
// skip file name;
if (it.hasNext()) it.next();
//parse options; if help or bad option exit
while (it.hasNext()) {
QString option = it.next();
if (option == QLatin1String("--help") || option == QLatin1String("-h")) {
setHelp();
break;
} else if (option == QLatin1String("--logwindow") ||
option == QLatin1String("-l")) {
_showLogWindow = true;
} else if (option == QLatin1String("--logfile")) {
if (it.hasNext() && !it.peekNext().startsWith(QLatin1String("--"))) {
_logFile = it.next();
} else {
setHelp();
}
} else if (option == QLatin1String("--logdir")) {
if (it.hasNext() && !it.peekNext().startsWith(QLatin1String("--"))) {
_logDir = it.next();
} else {
setHelp();
}
} else if (option == QLatin1String("--logexpire")) {
if (it.hasNext() && !it.peekNext().startsWith(QLatin1String("--"))) {
_logExpire = it.next().toInt();
} else {
setHelp();
}
} else if (option == QLatin1String("--logflush")) {
_logFlush = true;
} else if (option == QLatin1String("--confdir")) {
if (it.hasNext() && !it.peekNext().startsWith(QLatin1String("--"))) {
QString confDir = it.next();
if (!ConfigFile::setConfDir( confDir )) {
std::cerr << "Invalid path passed to --confdir" << std::endl;
std::exit(1);
}
} else {
showHelp();
}
} else if (option == QLatin1String("--debug")) {
_debugMode = true;
} else {
setHelp();
break;
}
}
}
开发者ID:Buckeye,项目名称:client,代码行数:53,代码来源:application.cpp
示例4: setCmd
CmdInvalid::CmdInvalid()
{
setCmd("inv");
setInfo("Try invalid message.");
setHelp("Send invalid type of message. For debug purposes.");
setMsgType( af::Msg::TInvalid);
}
开发者ID:AlbertR,项目名称:cgru170,代码行数:7,代码来源:cmd_invalid.cpp
示例5: setCmd
CmdRenderDelete::CmdRenderDelete()
{
setCmd("rdel");
setInfo("Delete render.");
setHelp("rdel [name] Delete render with specified name, in no name porivieded, local host name used.");
setMsgType( af::Msg::TJSON);
}
开发者ID:AlbertR,项目名称:cgru170,代码行数:7,代码来源:cmd_render.cpp
示例6: setCmd
CmdFork::CmdFork()
{
setCmd("fork");
setArgsCount(1);
setInfo("Fork process.");
setHelp("fork [count] Fork command process. For debug purposes only !");
}
开发者ID:Spudster3,项目名称:cgru,代码行数:7,代码来源:cmd_arguments.cpp
示例7: setAlias
DisplayVersionCommand::DisplayVersionCommand()
{
osVersion = "0.001.001 BETA";
setAlias("ver");
setHelp("This command shows the current version of the running operating system.");
setDesc("Shows the current operating system version number");
}
开发者ID:hashr25,项目名称:DestrOS,代码行数:7,代码来源:DisplayVersionCommand.cpp
示例8: setCmd
CmdTestThreads::CmdTestThreads()
{
setCmd("tthr");
setArgsCount(1);
setInfo("Test threads.");
setHelp("tthr [count]\nRaise [count] number of threads. For debug purposes.");
}
开发者ID:CGRU,项目名称:cgru,代码行数:7,代码来源:cmd_test.cpp
示例9: KDialog
TemplateManagementDialog::TemplateManagementDialog(
QWidget *parent, const QStringList &templates, const QString &type )
: KDialog( parent ), m_templates( templates ), m_type( type ), m_changed( false )
{
QString m_type_translated = i18n( qPrintable( m_type ) );
setCaption( i18n( "Manage %1 Templates", m_type_translated ) );
setButtons( Ok | Cancel | Help );
setObjectName( "template_management_dialog" );
setHelp( "entering-data-events-template-buttons", "korganizer" );
QWidget *widget = new QWidget( this );
widget->setObjectName( "template_management_dialog_base" );
m_base.setupUi( widget );
setMainWidget( widget );
m_base.m_listBox->addItems( m_templates );
m_base.m_listBox->setSelectionMode( QAbstractItemView::SingleSelection );
connect( m_base.m_buttonAdd, SIGNAL(clicked()),
SLOT(slotAddTemplate()) );
connect( m_base.m_buttonRemove, SIGNAL(clicked()),
SLOT(slotRemoveTemplate()) );
connect( m_base.m_buttonApply, SIGNAL(clicked()),
SLOT(slotApplyTemplate()) );
connect( m_base.m_listBox, SIGNAL(itemSelectionChanged()),
SLOT(slotItemSelected()) );
connect( m_base.m_listBox, SIGNAL(itemDoubleClicked(QListWidgetItem *)),
SLOT(slotApplyTemplate()) );
connect( this, SIGNAL(okClicked()), SLOT(slotOk()) );
m_base.m_buttonRemove->setEnabled( false );
m_base.m_buttonApply->setEnabled( false );
}
开发者ID:akhuettel,项目名称:kdepim-noakonadi,代码行数:33,代码来源:templatemanagementdialog.cpp
示例10: KDialog
ExportDialog::ExportDialog(QWidget * parent)
: KDialog(parent),m_outputStream(0)
{
kDebug() << "ExportDialog::ExportDialog";
setButtons(Help | User1 | Cancel);
kDebug() << "ExportDialog: setButtons";
ui.setupUi(mainWidget());
kDebug() << "ExportDialog: ui.setupUi(mainWidget());";
setButtonGuiItem(User1, KGuiItem(i18n("OK")));
kDebug() << "ExportDialog: setButtonGuiItem(User1, KGuiItem(i18n(\"OK\")));";
ui.targetFile->setMode(KFile::File | KFile::Directory | KFile::LocalOnly);
kDebug() << "ui.targetFile->setMode(KFile::File | KFile::Directory | KFile::LocalOnly);";
setCaption(i18n("Export Chemical Data"));
kDebug() << "ui.targetFile->setMode(KFile::File | KFile::Directory | KFile::LocalOnly);";
populateElementList();
kDebug() << "ui.targetFile->setMode(KFile::File | KFile::Directory | KFile::LocalOnly);";
ui.formatList->addItem(".html (formatted html document)", "html");
ui.formatList->addItem(".xml (raw element data)", "xml");
ui.formatList->addItem(".csv (comma-separated data)", "csv");
kDebug() << "ui.formatList->addItem(...);";
connect(this, SIGNAL(user1Clicked()), this, SLOT(slotOkClicked()));
kDebug() << "connect(this, SIGNAL(user1Clicked()), this, SLOT(slotOkClicked()));";
setHelp(QString(),"kalzium");
kDebug() << "setHelp(QString(),\"kalzium\");";
}
开发者ID:Anumittal,项目名称:Kalzium,代码行数:29,代码来源:exportdialog.cpp
示例11: setCmd
CmdNetwork::CmdNetwork()
{
setCmd("net");
setArgsCount(1);
setInfo("Network operations.");
setHelp("net [operation] For testing purposes. Operations: [if,ip,pm,pa].");
}
开发者ID:AlbertR,项目名称:cgru170,代码行数:7,代码来源:cmd_network.cpp
示例12: setCmd
CmdSrvCapacity::CmdSrvCapacity()
{
setCmd("srvcap");
setArgsCount(2);
setInfo("apply capacity to command.");
setHelp("srvcap [servicename] [command] [capacity]");
}
开发者ID:Spudster3,项目名称:cgru,代码行数:7,代码来源:cmd_service.cpp
示例13: KPageDialog
ConfigDialog::ConfigDialog( const ActionList *list, KGlobalAccel *accel,
bool isApplet )
: KPageDialog()
{
setFaceType( Tabbed );
setCaption( i18n("Configure") );
setButtons( Ok | Cancel | Help );
if ( isApplet )
setHelp( QString(), "klipper" );
KVBox *w = 0L; // the parent for the widgets
w = new KVBox( this );
generalWidget = new GeneralWidget( w, "general widget" );
addPage( w, i18n("&General") );
w = new KVBox( this );
actionWidget = new ActionWidget( list, this, w, "actions widget" );
addPage( w, i18n("Ac&tions") );
w = new KVBox( this );
shortcutsWidget = new KShortcutsEditor( w, KShortcutsEditor::GlobalAction );
addPage( w, i18n("&Shortcuts") );
}
开发者ID:jschwartzenberg,项目名称:kicker,代码行数:25,代码来源:configdialog.cpp
示例14: KDialogBase
NewIdentityDialog::NewIdentityDialog(const QStringList &identities,
QWidget *parent, const char *name,
bool modal)
: KDialogBase(parent, name, modal, i18n("New Identity"),
Ok | Cancel | Help, Ok, true)
{
setHelp(QString::fromLatin1("configure-identity-newidentitydialog"));
QWidget *page = makeMainWidget();
QVBoxLayout *vlay = new QVBoxLayout(page, 0, spacingHint());
// row 0: line edit with label
QHBoxLayout *hlay = new QHBoxLayout(vlay); // inherits spacing
mLineEdit = new KLineEdit(page);
mLineEdit->setFocus();
hlay->addWidget(new QLabel(mLineEdit, i18n("&New identity:"), page));
hlay->addWidget(mLineEdit, 1);
connect(mLineEdit, SIGNAL(textChanged(const QString &)),
this, SLOT(slotEnableOK(const QString &)));
mButtonGroup = new QButtonGroup(page);
mButtonGroup->hide();
// row 1: radio button
QRadioButton *radio = new QRadioButton(i18n("&With empty fields"), page);
radio->setChecked(true);
mButtonGroup->insert(radio, Empty);
vlay->addWidget(radio);
// row 2: radio button
radio = new QRadioButton(i18n("&Use Control Center settings"), page);
mButtonGroup->insert(radio, ControlCenter);
vlay->addWidget(radio);
// row 3: radio button
radio = new QRadioButton(i18n("&Duplicate existing identity"), page);
mButtonGroup->insert(radio, ExistingEntry);
vlay->addWidget(radio);
// row 4: combobox with existing identities and label
hlay = new QHBoxLayout(vlay); // inherits spacing
mComboBox = new QComboBox(false, page);
mComboBox->insertStringList(identities);
mComboBox->setEnabled(false);
QLabel *label = new QLabel(mComboBox, i18n("&Existing identities:"), page);
label->setEnabled(false);
hlay->addWidget(label);
hlay->addWidget(mComboBox, 1);
vlay->addStretch(1); // spacer
// enable/disable combobox and label depending on the third radio
// button's state:
connect(radio, SIGNAL(toggled(bool)),
label, SLOT(setEnabled(bool)));
connect(radio, SIGNAL(toggled(bool)),
mComboBox, SLOT(setEnabled(bool)));
enableButtonOK(false); // since line edit is empty
}
开发者ID:serghei,项目名称:kde3-kdepim,代码行数:59,代码来源:configuredialog_p.cpp
示例15: setAlias
DisplayHelpCommand::DisplayHelpCommand(std::vector<Command*>* cmdList)
{
setAlias("help");
setDesc("Displays help information about system or command");
setHelp("Follow this command with the name of another command to get more information \n about that command.");
setCommandList(cmdList);
}
开发者ID:hashr25,项目名称:DestrOS,代码行数:8,代码来源:DisplayHelpCommand.cpp
示例16: setCmd
CmdJobsPause::CmdJobsPause()
{
setCmd("jpause");
setArgsCount(1);
setInfo("Pause jobs.");
setHelp("jpause [mask] Pause jobs which names match the mask.");
setMsgType( af::Msg::TJobPause);
}
开发者ID:Spudster3,项目名称:cgru,代码行数:8,代码来源:cmd_job.cpp
示例17: setCmd
CmdConfirm::CmdConfirm()
{
setCmd("cfm");
setInfo("Send confirm message.");
setHelp("Watching server output you can see threads response speed. For debug purposes.");
setMsgType( af::Msg::TConfirm);
setRecieving();
}
开发者ID:Spudster3,项目名称:cgru,代码行数:8,代码来源:cmd_confirm.cpp
注:本文中的setHelp函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论