Spreadsheet: Added Python version of Spreadhseet::Sheet
This commit is contained in:
parent
e487633bc6
commit
8f45e13789
|
@ -44,6 +44,7 @@ PyMODINIT_FUNC initSpreadsheet() {
|
||||||
Spreadsheet::PropertySheet::init();
|
Spreadsheet::PropertySheet::init();
|
||||||
|
|
||||||
Spreadsheet::Sheet::init();
|
Spreadsheet::Sheet::init();
|
||||||
|
Spreadsheet::SheetPython::init();
|
||||||
|
|
||||||
new Spreadsheet::Module();
|
new Spreadsheet::Module();
|
||||||
Base::Console().Log("Loading Spreadsheet module... done\n");
|
Base::Console().Log("Loading Spreadsheet module... done\n");
|
||||||
|
|
|
@ -1336,3 +1336,17 @@ void PropertySpreadsheetQuantity::Paste(const Property &from)
|
||||||
_Unit = static_cast<const PropertySpreadsheetQuantity*>(&from)->_Unit;
|
_Unit = static_cast<const PropertySpreadsheetQuantity*>(&from)->_Unit;
|
||||||
hasSetValue();
|
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<Spreadsheet::Sheet>;
|
||||||
|
}
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#include <App/DynamicProperty.h>
|
#include <App/DynamicProperty.h>
|
||||||
#include <App/Material.h>
|
#include <App/Material.h>
|
||||||
#include <App/Range.h>
|
#include <App/Range.h>
|
||||||
|
#include <App/FeaturePython.h>
|
||||||
#include <Base/Unit.h>
|
#include <Base/Unit.h>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include "PropertySheet.h"
|
#include "PropertySheet.h"
|
||||||
|
@ -302,6 +303,8 @@ protected:
|
||||||
friend class PropertySheet;
|
friend class PropertySheet;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef App::FeaturePythonT<Sheet> SheetPython;
|
||||||
|
|
||||||
} //namespace Spreadsheet
|
} //namespace Spreadsheet
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user