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

Method setColumnSelectedInView

src/backend/spreadsheet/Spreadsheet.cpp:1180–1195  ·  view source on GitHub ↗

! * Emits the signal to select or to deselect the column number \c index in the project explorer, * if \c selected=true or \c selected=false, respectively. * The signal is handled in \c AspectTreeModel and forwarded to the tree view in \c ProjectExplorer. * This function is called in \c SpreadsheetView upon selection changes. */

Source from the content-addressed store, hash-verified

1178 * This function is called in \c SpreadsheetView upon selection changes.
1179 */
1180void Spreadsheet::setColumnSelectedInView(int index, bool selected) {
1181 if (selected) {
1182 Q_EMIT childAspectSelectedInView(child<Column>(index));
1183
1184 // deselect the spreadsheet in the project explorer, if a child (column) was selected
1185 // and also all possible parents like folder, workbook, datapicker curve, datapicker
1186 // to prevents unwanted multiple selection in the project explorer
1187 // if one of the parents of the selected column was also selected before.
1188 AbstractAspect* parent = this;
1189 while (parent) {
1190 Q_EMIT childAspectDeselectedInView(parent);
1191 parent = parent->parentAspect();
1192 }
1193 } else
1194 Q_EMIT childAspectDeselectedInView(child<Column>(index));
1195}
1196
1197QVector<AspectType> Spreadsheet::pasteTypes() const {
1198 return QVector<AspectType>{AspectType::Column};

Callers 2

columnClickedMethod · 0.80
selectionChangedMethod · 0.80

Calls 1

parentAspectMethod · 0.80

Tested by

no test coverage detected