MCPcopy Create free account
hub / github.com/KDE/labplot / showPopup

Method showPopup

src/frontend/widgets/TreeViewComboBox.cpp:126–139  ·  view source on GitHub ↗

! Displays the tree view of items in the combobox. Triggers showTopLevelOnly() to show toplevel items only. */

Source from the content-addressed store, hash-verified

124 Triggers showTopLevelOnly() to show toplevel items only.
125*/
126void TreeViewComboBox::showPopup() {
127 if (!m_treeView->model() || !m_treeView->model()->hasChildren())
128 return;
129
130 QModelIndex root = m_treeView->model()->index(0, 0);
131 showTopLevelOnly(root);
132 m_groupBox->show();
133 m_groupBox->resize(this->width(), 250);
134 m_groupBox->move(mapToGlobal(this->rect().topLeft()));
135
136 setEditText(m_currentText);
137 m_lineEdit->setText(QString()); // delete the previous search string
138 m_lineEdit->setFocus();
139}
140
141/*!
142 \reimp

Callers

nothing calls this directly

Calls 11

hasChildrenMethod · 0.80
showMethod · 0.80
moveMethod · 0.80
rectMethod · 0.80
QStringClass · 0.50
modelMethod · 0.45
indexMethod · 0.45
resizeMethod · 0.45
widthMethod · 0.45
setTextMethod · 0.45
setFocusMethod · 0.45

Tested by

no test coverage detected