本文整理汇总了C++中spreadsheetgui::SheetView::currentIndex方法的典型用法代码示例。如果您正苦于以下问题:C++ SheetView::currentIndex方法的具体用法?C++ SheetView::currentIndex怎么用?C++ SheetView::currentIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类spreadsheetgui::SheetView
的用法示例。
在下文中一共展示了SheetView::currentIndex方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: activated
void CmdSpreadsheetSplitCell::activated(int iMsg)
{
if (getActiveGuiDocument()) {
Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow();
SpreadsheetGui::SheetView * sheetView = freecad_dynamic_cast<SpreadsheetGui::SheetView>(activeWindow);
if (sheetView) {
Sheet * sheet = sheetView->getSheet();
QModelIndex current = sheetView->currentIndex();
if (current.isValid()) {
std::string address = CellAddress(current.row(), current.column()).toString();
Gui::Command::openCommand("Split cell");
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.splitCell('%s')", sheet->getNameInDocument(),
address.c_str());
Gui::Command::commitCommand();
Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()");
}
}
}
}