+ Interface for selection of Python view providers

This commit is contained in:
wmayer
2013-10-25 15:07:39 +02:00
parent b652dc13aa
commit 2d62de2932
2 changed files with 111 additions and 1 deletions

View File

@@ -48,7 +48,9 @@ public:
// Returns the icon
QIcon getIcon() const;
std::vector<App::DocumentObject*> claimChildren(const std::vector<App::DocumentObject*>&) const;
bool useNewSelectionModel() const;
std::string getElement(const SoDetail *det) const;
SoDetail* getDetail(const char*) const;
std::vector<Base::Vector3d> getSelectionShape(const char* Element) const;
bool setEdit(int ModNum);
bool unsetEdit(int ModNum);
@@ -124,11 +126,18 @@ public:
/** @name Selection handling */
//@{
virtual bool useNewSelectionModel() const {
return ViewProviderT::useNewSelectionModel();
return imp->useNewSelectionModel();
}
virtual std::string getElement(const SoDetail *det) const {
std::string name = imp->getElement(det);
if (!name.empty()) return name;
return ViewProviderT::getElement(det);
}
virtual SoDetail* getDetail(const char* name) const {
SoDetail* det = imp->getDetail(name);
if (det) return det;
return ViewProviderT::getDetail(name);
}
virtual std::vector<Base::Vector3d> getSelectionShape(const char* Element) const {
return ViewProviderT::getSelectionShape(Element);
};