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


C++ setExpanded函数代码示例

本文整理汇总了C++中setExpanded函数的典型用法代码示例。如果您正苦于以下问题:C++ setExpanded函数的具体用法?C++ setExpanded怎么用?C++ setExpanded使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了setExpanded函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: indexAt

void TransfersView::dropEvent(QDropEvent * event)
{
    QModelIndex dropIndex = indexAt(event->pos());
    QTreeView::dropEvent(event);

    setExpanded(dropIndex, true);
}
开发者ID:KDE,项目名称:kget,代码行数:7,代码来源:transfersview.cpp

示例2: foreach

void FeedsView::onItemExpandRequested(const QList<RootItem*> &items, bool exp) {
  foreach (const RootItem *item, items) {
    QModelIndex source_index = m_sourceModel->indexForItem(item);
    QModelIndex proxy_index = m_proxyModel->mapFromSource(source_index);

    //setExpanded(proxy_index, !exp);
    setExpanded(proxy_index, exp);
  }
开发者ID:pmattern,项目名称:rssguard,代码行数:8,代码来源:feedsview.cpp

示例3: model

 void PrimitiveTreeView::itemPressed(const QModelIndex & index)
 {
   QModelIndex parent = model()->parent(index);
   if(!parent.isValid())
   {
     setExpanded(index, !isExpanded(index));
   }
 }
开发者ID:AlbertDeFusco,项目名称:avogadro,代码行数:8,代码来源:primitivetreeview.cpp

示例4: QTreeWidgetItem

TransverseCurveTreeWidgetItem::TransverseCurveTreeWidgetItem(const balazs::TransverseCurve& tc, QTreeWidgetItem *parent) :
    QTreeWidgetItem(parent), m_transverseCurve(tc)
{

    // length
    setText(0, QString::number(static_cast<double>(m_transverseCurve.length())));
    setExpanded(true);
}
开发者ID:b5strbal,项目名称:Arnoux_Yoccoz_0.2_cpp_Qt,代码行数:8,代码来源:TransverseCurveTreeWidgetItem.cpp

示例5: model

void TreeView::onRowsInserted(const QModelIndex &parent, int first, int last)
{
	for (; first <= last; ++first) {
		QModelIndex index = model()->index(first, 0, parent);
		if (!m_closedIndexes.contains(index.data(TagName).toString()))
			setExpanded(index, true);
	}
}
开发者ID:andrecurvello,项目名称:qutim,代码行数:8,代码来源:simplecontactlistview.cpp

示例6: layerTreeModel

void QgsLayerTreeView::updateExpandedStateFromNode( QgsLayerTreeNode* node )
{
  QModelIndex idx = layerTreeModel()->node2index( node );
  setExpanded( idx, node->isExpanded() );

  foreach ( QgsLayerTreeNode* child, node->children() )
    updateExpandedStateFromNode( child );
}
开发者ID:ACorradini,项目名称:QGIS,代码行数:8,代码来源:qgslayertreeview.cpp

示例7: setExpanded

void AutoExpandingTreeView::ItemClicked(const QModelIndex& index) {
  if (ignore_next_click_) {
    ignore_next_click_ = false;
    return;
  }

  setExpanded(index, !isExpanded(index));
}
开发者ID:Atrament666,项目名称:Clementine,代码行数:8,代码来源:autoexpandingtreeview.cpp

示例8: LLFloater

// Default constructor
LLFloaterProperties::LLFloaterProperties(const std::string& name, const LLRect& rect, const std::string& title, const LLUUID& item_id, const LLUUID& object_id) :
	LLFloater(name, rect, title),
	mItemID(item_id),
	mObjectID(object_id),
	mDirty(TRUE)
	// <edit>
	, mExpanded(FALSE)
	// </edit>
{
	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_inventory_item_properties.xml");

	if (!sPropertiesObserver)
	{
		sPropertiesObserver = new LLPropertiesObserver;
	}
	sPropertiesObserverCount++;
	
	childSetTextArg("TextPrice", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());
	
	// add the object to the static structure
	LLUUID key = mItemID ^ mObjectID;
	sInstances.insert(instance_map::value_type(key, this));
	// build the UI
	// item name & description
	childSetPrevalidate("LabelItemName",&LLLineEditor::prevalidatePrintableNotPipe);
	childSetCommitCallback("LabelItemName",onCommitName,this);
	childSetPrevalidate("LabelItemDesc",&LLLineEditor::prevalidatePrintableNotPipe);
	childSetCommitCallback("LabelItemDesc", onCommitDescription, this);
	// Creator information
	childSetAction("BtnCreator",onClickCreator,this);
	// owner information
	childSetAction("BtnOwner",onClickOwner,this);
	// acquired date
	// owner permissions
	// Permissions debug text
	// group permissions
	childSetCommitCallback("CheckShareWithGroup",&onCommitPermissions, this);
	// everyone permissions
	childSetCommitCallback("CheckEveryoneCopy",&onCommitPermissions, this);
	// next owner permissions
	childSetCommitCallback("CheckNextOwnerModify",&onCommitPermissions, this);
	childSetCommitCallback("CheckNextOwnerCopy",&onCommitPermissions, this);
	childSetCommitCallback("CheckNextOwnerTransfer",&onCommitPermissions, this);
	// Mark for sale or not, and sale info
	childSetCommitCallback("CheckPurchase",&onCommitSaleInfo, this);
	childSetCommitCallback("RadioSaleType",&onCommitSaleType, this);
	// "Price" label for edit
	childSetCommitCallback("EditPrice",&onCommitSaleInfo, this);
	// <edit>
	childSetAction("more_btn", &onClickMore, this);
	childSetAction("less_btn", &onClickLess, this);
	childSetAction("copy_btn", &onClickCopy, this);
	childSetAction("update_btn", &onClickUpdate, this);
	setExpanded(mExpanded);
	// </edit>
	// The UI has been built, now fill in all the values
	refresh();
}
开发者ID:fractured-crystal,项目名称:SingularityViewer,代码行数:59,代码来源:llfloaterproperties.cpp

示例9: setPdmRoot

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuPlotMainWindow::initializeGuiNewProjectLoaded()
{
    setPdmRoot(RiaApplication::instance()->project());
    restoreTreeViewState();

    if (m_pdmUiPropertyView && m_pdmUiPropertyView->currentObject())
    {
        m_pdmUiPropertyView->currentObject()->uiCapability()->updateConnectedEditors();
    }

    {
        auto* obj = RiaSummaryTools::summaryCaseMainCollection();
        if (obj)
        {
            setExpanded(obj);
        }
    }

    {
        auto* obj = RiaSummaryTools::summaryPlotCollection();
        if (obj)
        {
            setExpanded(obj);
        }
    }

    if (subWindowsAreTiled())
    {
        tileSubWindows();
    }

    if (m_activePlotViewWindow && m_activePlotViewWindow->viewWidget())
    {
        if (m_activePlotViewWindow->mdiWindowGeometry().isMaximized)
        {
            auto subWin = findMdiSubWindow(m_activePlotViewWindow->viewWidget());
            if (subWin)
            {
                subWin->showMaximized();
            }
        }
    }

    refreshToolbars();
}
开发者ID:OPM,项目名称:ResInsight,代码行数:48,代码来源:RiuPlotMainWindow.cpp

示例10: addDetails

    void addDetails() {
        // Add UL/DL packet and byte counts.
        ul_frames_item_ = new MacULDLTreeWidgetItem(this,  ueid_, rnti_, mac_ulsch_packet_count_row_type);
        ul_bytes_item_ = new MacULDLTreeWidgetItem(this,  ueid_, rnti_, mac_ulsch_byte_count_row_type);
        dl_frames_item_ = new MacULDLTreeWidgetItem(this,  ueid_, rnti_, mac_dlsch_packet_count_row_type);
        dl_bytes_item_ = new MacULDLTreeWidgetItem(this,  ueid_, rnti_, mac_dlsch_byte_count_row_type);

        setExpanded(false);
    }
开发者ID:acaceres2176,项目名称:wireshark,代码行数:9,代码来源:lte_mac_statistics_dialog.cpp

示例11: setObjectName

void ExpandableWidget::setTitle(const QString& title)
{
	m_title = title;
	m_button->setText(title);
	setObjectName(qPrintable(title));
	
	QSettings settings;
	setExpanded(settings.value(QString("ExpandableWidget/state/%1").arg(title),false).toBool());
}
开发者ID:TritonSailor,项目名称:livepro,代码行数:9,代码来源:ExpandableWidget.cpp

示例12: switch

bool TransferItem::setData(int role, const QVariant &value) {
    switch (role) {
    case ExpandedRole:
        setExpanded(value.toBool());
        return true;
    default:
        return false;
    }
}
开发者ID:wulinfa,项目名称:qdl2,代码行数:9,代码来源:transferitem.cpp

示例13: BaseClass

ExplorerReplicaSetTreeItem::ExplorerReplicaSetTreeItem(QTreeWidgetItem *parent, MongoServer *const server,
        const mongo::HostAndPort& repMemberHostAndPort, const bool isPrimary, const bool isUp)
    : BaseClass(parent),
      _repMemberHostAndPort(repMemberHostAndPort),
      _isPrimary(isPrimary),
      _isUp(isUp),
      _server(server),
      _connSettings(server->connectionRecord()->clone()),
      _bus(AppRegistry::instance().bus())
{
    // Set connection settings of this replica member
    _connSettings->setConnectionName(_repMemberHostAndPort.toString() + " [member of " + _connSettings->connectionName() + "]");
    _connSettings->setServerHost(_repMemberHostAndPort.host());
    _connSettings->setServerPort(_repMemberHostAndPort.port());
    _connSettings->setReplicaSet(false);
    _connSettings->replicaSetSettings()->setMembers(std::vector<std::string>()); // todo: replicaSetSettings->clear()

    // Add Actions
    auto openShellAction = new QAction("Open Shell", this);
    openShellAction->setIcon(GuiRegistry::instance().mongodbIcon());
    VERIFY(connect(openShellAction, SIGNAL(triggered()), SLOT(ui_openShell())));

    auto openDirectConnection = new QAction("Open Direct Connection", this);
    VERIFY(connect(openDirectConnection, SIGNAL(triggered()), SLOT(ui_openDirectConnection())));

    auto serverStatus = new QAction("Server Status", this);
    VERIFY(connect(serverStatus, SIGNAL(triggered()), SLOT(ui_serverStatus())));

    auto serverVersion = new QAction("MongoDB Version", this);
    VERIFY(connect(serverVersion, SIGNAL(triggered()), SLOT(ui_serverVersion())));

    auto serverHostInfo = new QAction("Host Info", this);
    VERIFY(connect(serverHostInfo, SIGNAL(triggered()), SLOT(ui_serverHostInfo())));

    auto showLog = new QAction("Show Log", this);
    VERIFY(connect(showLog, SIGNAL(triggered()), SLOT(ui_showLog())));

    BaseClass::_contextMenu->addAction(openShellAction);
    BaseClass::_contextMenu->addAction(openDirectConnection);
    BaseClass::_contextMenu->addSeparator();
    BaseClass::_contextMenu->addAction(serverStatus);
    BaseClass::_contextMenu->addAction(serverHostInfo);
    BaseClass::_contextMenu->addAction(serverVersion);
    BaseClass::_contextMenu->addSeparator();
    BaseClass::_contextMenu->addAction(showLog);

    //BaseClass::_contextMenu->setHidden(!_isUp);

    // Todo: remove ?
    //_bus->subscribe(this, DatabaseListLoadedEvent::Type, _server);
    //_bus->subscribe(this, MongoServerLoadingDatabasesEvent::Type, _server);

    updateState(_isUp, _isPrimary);

    setExpanded(true);
    setChildIndicatorPolicy(QTreeWidgetItem::DontShowIndicator);
}
开发者ID:paralect,项目名称:robomongo,代码行数:57,代码来源:ExplorerReplicaSetTreeItem.cpp

示例14: checkTag

void TreeView::checkTag(const QModelIndex &parent, QAbstractItemModel *model)
{
	for (int i = 0, count = model->rowCount(parent); i < count; ++i) {
		QModelIndex index = model->index(i, 0, parent);
		checkTag(index, model);
		if (!m_closedIndexes.contains(index.data(TagName).toString()))
			setExpanded(index, true);
	}
}
开发者ID:andrecurvello,项目名称:qutim,代码行数:9,代码来源:simplecontactlistview.cpp

示例15: OSCollapsibleView

VariableItemView::VariableItemView(bool t_fixed)
  : OSCollapsibleView()
{
  setMaximumWidth(650);

  variableContentView = new VariableContentView(t_fixed); 
  setContent(variableContentView);

  variableHeaderView = new VariableHeaderView(t_fixed);
  setHeader(variableHeaderView);
 

  if (t_fixed)
  {
    setExpanded(false);
  } else {
    setExpanded(true);
  }
}
开发者ID:Anto-F,项目名称:OpenStudio,代码行数:19,代码来源:VariableView.cpp


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