本文整理汇总了C++中profile::Ptr::command方法的典型用法代码示例。如果您正苦于以下问题:C++ Ptr::command方法的具体用法?C++ Ptr::command怎么用?C++ Ptr::command使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类profile::Ptr
的用法示例。
在下文中一共展示了Ptr::command方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setupGeneralPage
void EditProfileDialog::setupGeneralPage(const Profile::Ptr info)
{
// basic profile options
_ui->profileNameEdit->setText( info->name() );
ShellCommand command( info->command() , info->arguments() );
_ui->commandEdit->setText( command.fullCommand() );
KUrlCompletion* exeCompletion = new KUrlCompletion(KUrlCompletion::ExeCompletion);
exeCompletion->setParent(this);
exeCompletion->setDir(QString());
_ui->commandEdit->setCompletionObject( exeCompletion );
_ui->initialDirEdit->setText( info->defaultWorkingDirectory() );
KUrlCompletion* dirCompletion = new KUrlCompletion(KUrlCompletion::DirCompletion);
dirCompletion->setParent(this);
_ui->initialDirEdit->setCompletionObject( dirCompletion );
_ui->initialDirEdit->setClearButtonShown(true);
_ui->dirSelectButton->setIcon( KIcon("folder-open") );
_ui->iconSelectButton->setIcon( KIcon(info->icon()) );
_ui->startInSameDirButton->setChecked(info->property<bool>(Profile::StartInCurrentSessionDir));
// window options
_ui->showMenuBarButton->setChecked( info->property<bool>(Profile::ShowMenuBar) );
// signals and slots
connect( _ui->dirSelectButton , SIGNAL(clicked()) , this , SLOT(selectInitialDir()) );
connect( _ui->iconSelectButton , SIGNAL(clicked()) , this , SLOT(selectIcon()) );
connect( _ui->startInSameDirButton , SIGNAL(toggled(bool)) , this ,
SLOT(startInSameDir(bool)));
connect( _ui->profileNameEdit , SIGNAL(textChanged(const QString&)) , this ,
SLOT(profileNameChanged(const QString&)) );
connect( _ui->initialDirEdit , SIGNAL(textChanged(const QString&)) , this ,
SLOT(initialDirChanged(const QString&)) );
connect(_ui->commandEdit , SIGNAL(textChanged(const QString&)) , this ,
SLOT(commandChanged(const QString&)) );
connect(_ui->showMenuBarButton , SIGNAL(toggled(bool)) , this ,
SLOT(showMenuBar(bool)) );
connect(_ui->environmentEditButton , SIGNAL(clicked()) , this ,
SLOT(showEnvironmentEditor()) );
}
示例2: config
bool KDE4ProfileWriter::writeProfile(const QString& path , const Profile::Ptr profile)
{
KConfig config(path, KConfig::NoGlobals);
KConfigGroup general = config.group(GENERAL_GROUP);
// Parent profile if set, when loading the profile in future, the parent
// must be loaded as well if it exists.
if (profile->parent())
general.writeEntry("Parent", profile->parent()->path());
if (profile->isPropertySet(Profile::Command)
|| profile->isPropertySet(Profile::Arguments))
general.writeEntry("Command",
ShellCommand(profile->command(), profile->arguments()).fullCommand());
// Write remaining properties
writeProperties(config, profile, Profile::DefaultPropertyNames);
return true;
}