本文整理汇总了C++中TQListViewItem::setOpen方法的典型用法代码示例。如果您正苦于以下问题:C++ TQListViewItem::setOpen方法的具体用法?C++ TQListViewItem::setOpen怎么用?C++ TQListViewItem::setOpen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TQListViewItem
的用法示例。
在下文中一共展示了TQListViewItem::setOpen方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: parseXmlCommand
void KXmlCommandAdvancedDlg::parseXmlCommand(KXmlCommand *xmlcmd)
{
m_view->clear();
TQListViewItem *root = new TQListViewItem(m_view, xmlcmd->name(), xmlcmd->name());
DrMain *driver = xmlcmd->driver();
root->setPixmap(0, SmallIcon("fileprint"));
root->setOpen(true);
if (driver)
{
DrMain *clone = driver->cloneDriver();
if (!clone->get("text").isEmpty())
root->setText(0, clone->get("text"));
root->setText(1, "__root__");
clone->setName("__root__");
m_opts["__root__"] = clone;
parseGroupItem(clone, root);
clone->flatten();
}
m_command->setText(xmlcmd->command());
m_inputfile->setText(xmlcmd->io(true, false));
m_inputpipe->setText(xmlcmd->io(true, true));
m_outputfile->setText(xmlcmd->io(false, false));
m_outputpipe->setText(xmlcmd->io(false, true));
m_comment->setText( xmlcmd->comment() );
viewItem(0);
}
示例2: unfoldTreeList
void KJanusWidget::unfoldTreeList( bool persist )
{
if( mFace == TreeList )
{
if( persist )
connect( mTreeList, TQT_SIGNAL( collapsed( TQListViewItem * ) ), this, TQT_SLOT( slotReopen( TQListViewItem * ) ) );
else
disconnect( mTreeList, TQT_SIGNAL( collapsed( TQListViewItem * ) ), this, TQT_SLOT( slotReopen( TQListViewItem * ) ) );
for( TQListViewItem * item = mTreeList->firstChild(); item; item = item->itemBelow() )
item->setOpen( true );
}
示例3: KMWizardPage
KMWLocal::KMWLocal(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_title = i18n("Local Port Selection");
m_ID = KMWizard::Local;
m_nextpage = KMWizard::Driver;
m_initialized = false;
m_block = false;
m_ports = new TDEListView(this);
m_ports->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken);
m_ports->setLineWidth(1);
m_ports->header()->hide();
m_ports->addColumn("");
m_ports->setSorting(-1);
TQListViewItem *root = new TQListViewItem(m_ports, i18n("Local System"));
root->setPixmap(0, SmallIcon("tdeprint_computer"));
root->setOpen(true);
connect(m_ports, TQT_SIGNAL(selectionChanged(TQListViewItem*)), TQT_SLOT(slotPortSelected(TQListViewItem*)));
TQLabel *l1 = new TQLabel(i18n("URI:"), this);
m_localuri = new TQLineEdit(this);
connect( m_localuri, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotTextChanged( const TQString& ) ) );
m_parents[0] = new TQListViewItem(root, i18n("Parallel"));
m_parents[1] = new TQListViewItem(root, m_parents[0], i18n("Serial"));
m_parents[2] = new TQListViewItem(root, m_parents[1], i18n("USB"));
m_parents[3] = new TQListViewItem(root, m_parents[2], i18n("Others"));
for (int i=0;i<4;i++)
m_parents[i]->setPixmap(0, SmallIcon("input_devices_settings"));
TQLabel *l2 = new TQLabel(i18n("<p>Select a valid detected port, or enter directly the corresponding URI in the bottom edit field.</p>"), this);
TQVBoxLayout *lay0 = new TQVBoxLayout(this, 0, 10);
TQHBoxLayout *lay1 = new TQHBoxLayout(0, 0, 10);
lay0->addWidget(l2, 0);
lay0->addWidget(m_ports, 1);
lay0->addLayout(lay1, 0);
lay1->addWidget(l1, 0);
lay1->addWidget(m_localuri, 1);
}