本文整理汇总了C++中TQListViewItem::setRenameEnabled方法的典型用法代码示例。如果您正苦于以下问题:C++ TQListViewItem::setRenameEnabled方法的具体用法?C++ TQListViewItem::setRenameEnabled怎么用?C++ TQListViewItem::setRenameEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TQListViewItem
的用法示例。
在下文中一共展示了TQListViewItem::setRenameEnabled方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: slotAddReq
void KXmlCommandDlg::slotAddReq()
{
TQListViewItem *item = new TQListViewItem(m_requirements, m_requirements->lastItem(), i18n("exec:/"));
item->setRenameEnabled(0, true);
m_requirements->ensureItemVisible(item);
item->startRename(0);
}
示例2: slotAddGroupClicked
// add a group
void CustomSmileyManager::slotAddGroupClicked( )
{
TQString name = TQString(i18n("Group%1")).arg(m_Config->numGroups());
TQString path = EvaMain::user->getSetting()->getCustomSmileyDir() + "/";
TQDir dir(path + name);
if(!dir.exists()){ // if the dest dir doesn't exist,
if(dir.mkdir( path + name )) // create the dir
m_IsChanged = true;
else{ // create failed
KMessageBox::error( this, i18n( "Cannot create the directory \"%1\". " ).arg( dir.path() ), i18n( "Add Group" ) );
return;
}
} else { // the directory exists, the group name should be used already
KMessageBox::error( this, i18n( "A directory named \"%1\" already exists. " ).arg( dir.path() ), i18n( "Directory Exists!" ) );
return;
}
TQListViewItem *item = new TQListViewItem(lvGroups, lvGroups->lastItem(), name);
m_Config->addGroup( name );
m_IsChanged = true;
m_Config->saveXML();
lvGroups->setSelected( item, true);
d->m_Action = GroupActionPrivate::GEdit;
d->m_Item = item;
d->m_OldName = name;
item->setRenameEnabled( 0, true);
item->startRename( 0 );
}
示例3: slotAddValue
void KXmlCommandAdvancedDlg::slotAddValue()
{
TQListViewItem *item = new TQListViewItem(m_values, m_values->lastItem(), i18n("Name"), i18n("Description"));
item->setRenameEnabled(0, true);
item->setRenameEnabled(1, true);
m_values->ensureItemVisible(item);
slotValueSelected(item);
item->startRename(0);
}
示例4: slotEditGroupClicked
// rename the group
void CustomSmileyManager::slotEditGroupClicked( )
{
TQListViewItem *item = lvGroups->selectedItem();
if(item){
if(item == lvGroups->firstChild()) return;
d->m_Action = GroupActionPrivate::GEdit;
d->m_Item = item;
d->m_OldName = item->text( 0 );
item->setRenameEnabled( 0, true );
item->startRename( 0 );
}
}
示例5: slotAddOption
void KXmlCommandAdvancedDlg::slotAddOption()
{
if (m_view->currentItem())
{
TQString ID = generateId(m_opts);
DrBase *opt = new DrStringOption;
opt->setName(ID);
opt->set("text", i18n("New Option"));
m_opts[ID] = opt;
TQListViewItem *item = new TQListViewItem(m_view->currentItem(), i18n("New Option"), ID);
item->setRenameEnabled(0, true);
item->setPixmap(0, SmallIcon("document"));
m_view->ensureItemVisible(item);
item->startRename(0);
}
}
示例6: slotAddGroup
void KXmlCommandAdvancedDlg::slotAddGroup()
{
if (m_view->currentItem())
{
TQString ID = generateId(m_opts);
DrGroup *grp = new DrGroup;
grp->setName(ID);
grp->set("text", i18n("New Group"));
m_opts[ID] = grp;
TQListViewItem *item = new TQListViewItem(m_view->currentItem(), i18n("New Group"), ID);
item->setRenameEnabled(0, true);
item->setPixmap(0, SmallIcon("folder"));
m_view->ensureItemVisible(item);
item->startRename(0);
}
}