当前位置: 首页>>代码示例>>C++>>正文


C++ TQListViewItem::startRename方法代码示例

本文整理汇总了C++中TQListViewItem::startRename方法的典型用法代码示例。如果您正苦于以下问题:C++ TQListViewItem::startRename方法的具体用法?C++ TQListViewItem::startRename怎么用?C++ TQListViewItem::startRename使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TQListViewItem的用法示例。


在下文中一共展示了TQListViewItem::startRename方法的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);
}
开发者ID:Fat-Zer,项目名称:tdelibs,代码行数:7,代码来源:kxmlcommanddlg.cpp

示例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 );
}
开发者ID:MagicGroup,项目名称:eva,代码行数:31,代码来源:createsmileywindow.cpp

示例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);
}
开发者ID:Fat-Zer,项目名称:tdelibs,代码行数:9,代码来源:kxmlcommanddlg.cpp

示例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 );
	}
}
开发者ID:MagicGroup,项目名称:eva,代码行数:15,代码来源:createsmileywindow.cpp

示例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);
	}
}
开发者ID:Fat-Zer,项目名称:tdelibs,代码行数:18,代码来源:kxmlcommanddlg.cpp

示例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);
	}
}
开发者ID:Fat-Zer,项目名称:tdelibs,代码行数:18,代码来源:kxmlcommanddlg.cpp


注:本文中的TQListViewItem::startRename方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。