本文整理汇总了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);
}
示例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);
}
示例3: model
void PrimitiveTreeView::itemPressed(const QModelIndex & index)
{
QModelIndex parent = model()->parent(index);
if(!parent.isValid())
{
setExpanded(index, !isExpanded(index));
}
}
示例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);
}
示例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);
}
}
示例6: layerTreeModel
void QgsLayerTreeView::updateExpandedStateFromNode( QgsLayerTreeNode* node )
{
QModelIndex idx = layerTreeModel()->node2index( node );
setExpanded( idx, node->isExpanded() );
foreach ( QgsLayerTreeNode* child, node->children() )
updateExpandedStateFromNode( child );
}
示例7: setExpanded
void AutoExpandingTreeView::ItemClicked(const QModelIndex& index) {
if (ignore_next_click_) {
ignore_next_click_ = false;
return;
}
setExpanded(index, !isExpanded(index));
}
示例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();
}
示例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();
}
示例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);
}
示例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());
}
示例12: switch
bool TransferItem::setData(int role, const QVariant &value) {
switch (role) {
case ExpandedRole:
setExpanded(value.toBool());
return true;
default:
return false;
}
}
示例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);
}
示例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);
}
}
示例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);
}
}