MCPcopy Create free account
hub / github.com/Liniyous/ElaWidgetTools / setCurrentStackIndex

Method setCurrentStackIndex

ElaWidgetTools/ElaWindow.cpp:253–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251}
252
253void ElaWindow::setCurrentStackIndex(int currentStackIndex)
254{
255 Q_D(ElaWindow);
256 if (currentStackIndex >= d->_centerStackedWidget->getContainerStackedWidget()->count() || currentStackIndex < 0 || currentStackIndex == d->_centerStackedWidget->getLastTargetIndex())
257 {
258 return;
259 }
260 int currentCenterStackedWidgetIndex = d->_centerStackedWidget->getContainerStackedWidget()->currentIndex();
261 auto command = new ElaWindowStackChangeCommand(this);
262 command->setWindowPrivate(d);
263 command->setUndoStackIndex(currentCenterStackedWidgetIndex);
264 command->setRedoStackIndex(currentStackIndex);
265 ElaActionCommander::getInstance()->recordCommand("ElaWidgetToolsAction", command);
266}
267
268int ElaWindow::getCurrentStackIndex() const
269{

Callers 1

mouseReleaseEventMethod · 0.80

Calls 3

countMethod · 0.80
recordCommandMethod · 0.80

Tested by

no test coverage detected