diff --git a/src/Mod/Spreadsheet/App/AppSpreadsheet.cpp b/src/Mod/Spreadsheet/App/AppSpreadsheet.cpp index ff25d9efb..cdb2f1b36 100644 --- a/src/Mod/Spreadsheet/App/AppSpreadsheet.cpp +++ b/src/Mod/Spreadsheet/App/AppSpreadsheet.cpp @@ -44,6 +44,7 @@ PyMODINIT_FUNC initSpreadsheet() { Spreadsheet::PropertySheet::init(); Spreadsheet::Sheet::init(); + Spreadsheet::SheetPython::init(); new Spreadsheet::Module(); Base::Console().Log("Loading Spreadsheet module... done\n"); diff --git a/src/Mod/Spreadsheet/App/Sheet.cpp b/src/Mod/Spreadsheet/App/Sheet.cpp index 31b41cc16..d7e2e8192 100644 --- a/src/Mod/Spreadsheet/App/Sheet.cpp +++ b/src/Mod/Spreadsheet/App/Sheet.cpp @@ -1336,3 +1336,17 @@ void PropertySpreadsheetQuantity::Paste(const Property &from) _Unit = static_cast(&from)->_Unit; hasSetValue(); } + +// Python sheet feature --------------------------------------------------------- + +namespace App { +/// @cond DOXERR +PROPERTY_SOURCE_TEMPLATE(Spreadsheet::SheetPython, Spreadsheet::Sheet) +template<> const char* Spreadsheet::SheetPython::getViewProviderName(void) const { + return "SpreadsheetGui::ViewProviderSheet"; +} +/// @endcond + +// explicit template instantiation +template class SpreadsheetExport FeaturePythonT; +} diff --git a/src/Mod/Spreadsheet/App/Sheet.h b/src/Mod/Spreadsheet/App/Sheet.h index 0f0d7a82b..d7ae90374 100644 --- a/src/Mod/Spreadsheet/App/Sheet.h +++ b/src/Mod/Spreadsheet/App/Sheet.h @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include "PropertySheet.h" @@ -302,6 +303,8 @@ protected: friend class PropertySheet; }; +typedef App::FeaturePythonT SheetPython; + } //namespace Spreadsheet