Spreadsheet: get access to the sheet view from the view provider via Python
This commit is contained in:
@@ -41,5 +41,10 @@ select(topLeft, bottomRight, flags): Select the specified range using the given
|
||||
<UserDocu>Set the current active cell</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getView">
|
||||
<Documentation>
|
||||
<UserDocu>Get access to the sheet view</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
</PythonExport>
|
||||
</GenerateModel>
|
||||
</GenerateModel>
|
||||
|
||||
@@ -94,6 +94,18 @@ PyObject* ViewProviderSpreadsheetPy::setCurrentIndex(PyObject* args)
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
PyObject* ViewProviderSpreadsheetPy::getView(PyObject* args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return nullptr;
|
||||
|
||||
ViewProviderSheet* vp = this->getViewProviderSheetPtr();
|
||||
SheetView* sheetView = vp->getView();
|
||||
if (sheetView)
|
||||
return sheetView->getPyObject();
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject *ViewProviderSpreadsheetPy::getCustomAttributes(const char* /*attr*/) const
|
||||
{
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user