Fix getViewObject inheritance across all ViewProviders
This commit is contained in:
parent
f2f9a938a7
commit
70420d9e3b
|
@ -38,7 +38,6 @@
|
||||||
#include <Gui/SoFCSelection.h>
|
#include <Gui/SoFCSelection.h>
|
||||||
#include <Gui/Selection.h>
|
#include <Gui/Selection.h>
|
||||||
|
|
||||||
#include <Mod/TechDraw/App/DrawViewAnnotation.h>
|
|
||||||
#include "ViewProviderAnnotation.h"
|
#include "ViewProviderAnnotation.h"
|
||||||
|
|
||||||
using namespace TechDrawGui;
|
using namespace TechDrawGui;
|
||||||
|
|
|
@ -29,9 +29,7 @@
|
||||||
|
|
||||||
#include "ViewProviderDrawingView.h"
|
#include "ViewProviderDrawingView.h"
|
||||||
|
|
||||||
namespace TechDraw{
|
#include <Mod/TechDraw/App/DrawViewAnnotation.h>
|
||||||
class DrawViewAnnotation;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace TechDrawGui {
|
namespace TechDrawGui {
|
||||||
|
|
||||||
|
@ -54,7 +52,7 @@ public:
|
||||||
virtual std::vector<std::string> getDisplayModes(void) const;
|
virtual std::vector<std::string> getDisplayModes(void) const;
|
||||||
virtual void updateData(const App::Property*);
|
virtual void updateData(const App::Property*);
|
||||||
|
|
||||||
TechDraw::DrawViewAnnotation* getViewObject() const;
|
virtual TechDraw::DrawViewAnnotation* getViewObject() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace TechDrawGui
|
} // namespace TechDrawGui
|
||||||
|
|
|
@ -38,7 +38,6 @@
|
||||||
#include <Gui/SoFCSelection.h>
|
#include <Gui/SoFCSelection.h>
|
||||||
#include <Gui/Selection.h>
|
#include <Gui/Selection.h>
|
||||||
|
|
||||||
#include <Mod/TechDraw/App/DrawViewDimension.h>
|
|
||||||
#include "ViewProviderDimension.h"
|
#include "ViewProviderDimension.h"
|
||||||
|
|
||||||
using namespace TechDrawGui;
|
using namespace TechDrawGui;
|
||||||
|
|
|
@ -25,12 +25,9 @@
|
||||||
#ifndef DRAWINGGUI_VIEWPROVIDERDIMENSION_H
|
#ifndef DRAWINGGUI_VIEWPROVIDERDIMENSION_H
|
||||||
#define DRAWINGGUI_VIEWPROVIDERDIMENSION_H
|
#define DRAWINGGUI_VIEWPROVIDERDIMENSION_H
|
||||||
|
|
||||||
#include <Gui/ViewProviderFeature.h>
|
|
||||||
#include "ViewProviderDrawingView.h"
|
#include "ViewProviderDrawingView.h"
|
||||||
|
#include <Mod/TechDraw/App/DrawViewDimension.h>
|
||||||
|
|
||||||
namespace TechDraw{
|
|
||||||
class DrawViewDimension;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace TechDrawGui {
|
namespace TechDrawGui {
|
||||||
|
|
||||||
|
@ -53,7 +50,7 @@ public:
|
||||||
virtual std::vector<std::string> getDisplayModes(void) const;
|
virtual std::vector<std::string> getDisplayModes(void) const;
|
||||||
virtual void updateData(const App::Property*);
|
virtual void updateData(const App::Property*);
|
||||||
|
|
||||||
TechDraw::DrawViewDimension* getViewObject() const;
|
virtual TechDraw::DrawViewDimension* getViewObject() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace TechDrawGui
|
} // namespace TechDrawGui
|
||||||
|
|
|
@ -43,7 +43,6 @@
|
||||||
#include <Gui/ViewProvider.h>
|
#include <Gui/ViewProvider.h>
|
||||||
#include <Gui/WaitCursor.h>
|
#include <Gui/WaitCursor.h>
|
||||||
|
|
||||||
#include <Mod/TechDraw/App/DrawView.h>
|
|
||||||
#include <Mod/TechDraw/App/DrawViewClip.h>
|
#include <Mod/TechDraw/App/DrawViewClip.h>
|
||||||
#include <Mod/TechDraw/App/DrawPage.h>
|
#include <Mod/TechDraw/App/DrawPage.h>
|
||||||
|
|
||||||
|
|
|
@ -28,9 +28,8 @@
|
||||||
#include <Gui/ViewProviderFeature.h>
|
#include <Gui/ViewProviderFeature.h>
|
||||||
#include <Gui/ViewProviderDocumentObjectGroup.h>
|
#include <Gui/ViewProviderDocumentObjectGroup.h>
|
||||||
|
|
||||||
namespace TechDraw{
|
#include <Mod/TechDraw/App/DrawView.h>
|
||||||
class DrawView;
|
#include "QGIView.h"
|
||||||
}
|
|
||||||
|
|
||||||
namespace TechDrawGui {
|
namespace TechDrawGui {
|
||||||
class QGIView;
|
class QGIView;
|
||||||
|
@ -66,7 +65,7 @@ public:
|
||||||
virtual void startRestoring();
|
virtual void startRestoring();
|
||||||
virtual void finishRestoring();
|
virtual void finishRestoring();
|
||||||
//@}
|
//@}
|
||||||
TechDraw::DrawView* getViewObject() const;
|
virtual TechDraw::DrawView* getViewObject() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_docReady; //sb MDI + QGraphicsScene ready
|
bool m_docReady; //sb MDI + QGraphicsScene ready
|
||||||
|
|
|
@ -32,8 +32,6 @@
|
||||||
/// Here the FreeCAD includes sorted by Base,App,Gui......
|
/// Here the FreeCAD includes sorted by Base,App,Gui......
|
||||||
#include <Base/Console.h>
|
#include <Base/Console.h>
|
||||||
#include <Base/Parameter.h>
|
#include <Base/Parameter.h>
|
||||||
#include <Base/Exception.h>
|
|
||||||
#include <Base/Sequencer.h>
|
|
||||||
|
|
||||||
#include <App/Application.h>
|
#include <App/Application.h>
|
||||||
#include <App/Document.h>
|
#include <App/Document.h>
|
||||||
|
@ -49,14 +47,13 @@
|
||||||
#include <Gui/SoFCSelection.h>
|
#include <Gui/SoFCSelection.h>
|
||||||
#include <Gui/ViewProviderDocumentObject.h>
|
#include <Gui/ViewProviderDocumentObject.h>
|
||||||
|
|
||||||
#include <Mod/TechDraw/App/DrawProjGroup.h>
|
|
||||||
|
|
||||||
#include "TaskProjGroup.h"
|
#include "TaskProjGroup.h"
|
||||||
#include "ViewProviderProjGroup.h"
|
#include "ViewProviderProjGroup.h"
|
||||||
|
|
||||||
using namespace TechDrawGui;
|
using namespace TechDrawGui;
|
||||||
|
|
||||||
PROPERTY_SOURCE(TechDrawGui::ViewProviderProjGroup, Gui::ViewProviderDocumentObject)
|
PROPERTY_SOURCE(TechDrawGui::ViewProviderProjGroup, TechDrawGui::ViewProviderDrawingView)
|
||||||
|
|
||||||
//**************************************************************************
|
//**************************************************************************
|
||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
|
@ -165,8 +162,12 @@ std::vector<App::DocumentObject*> ViewProviderProjGroup::claimChildren(void) con
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TechDraw::DrawProjGroup* ViewProviderProjGroup::getViewObject() const
|
||||||
TechDraw::DrawProjGroup* ViewProviderProjGroup::getObject() const
|
|
||||||
{
|
{
|
||||||
return dynamic_cast<TechDraw::DrawProjGroup*>(pcObject);
|
return dynamic_cast<TechDraw::DrawProjGroup*>(pcObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TechDraw::DrawProjGroup* ViewProviderProjGroup::getObject() const
|
||||||
|
{
|
||||||
|
return getViewObject();
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (c) 2013 Luke Parry <l.parry@warwick.ac.uk> *
|
* Copyright (c) 2013 Luke Parry <l.parry@warwick.ac.uk> *
|
||||||
* *
|
* *
|
||||||
* This file is part of the FreeCAD CAx development system. *
|
* This file is part of the FreeCAD CAx development system. *
|
||||||
* *
|
* *
|
||||||
* This library is free software; you can redistribute it and/or *
|
* This library is free software; you can redistribute it and/or *
|
||||||
* modify it under the terms of the GNU Library General Public *
|
* modify it under the terms of the GNU Library General Public *
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
* *
|
* *
|
||||||
* This library is distributed in the hope that it will be useful, *
|
* This library is distributed in the hope that it will be useful, *
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
* GNU Library General Public License for more details. *
|
* GNU Library General Public License for more details. *
|
||||||
* *
|
* *
|
||||||
* You should have received a copy of the GNU Library General Public *
|
* You should have received a copy of the GNU Library General Public *
|
||||||
|
@ -26,17 +26,13 @@
|
||||||
#include <Gui/ViewProviderFeature.h>
|
#include <Gui/ViewProviderFeature.h>
|
||||||
#include <Gui/ViewProviderDocumentObject.h>
|
#include <Gui/ViewProviderDocumentObject.h>
|
||||||
|
|
||||||
#include <QPointer>
|
#include <Mod/TechDraw/App/DrawView.h>
|
||||||
|
#include <Mod/TechDraw/App/DrawProjGroup.h>
|
||||||
|
|
||||||
#include "ViewProviderDrawingView.h"
|
#include "ViewProviderDrawingView.h"
|
||||||
|
|
||||||
namespace TechDraw{
|
|
||||||
class DrawProjGroup;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace TechDrawGui {
|
namespace TechDrawGui {
|
||||||
|
|
||||||
|
|
||||||
class TechDrawGuiExport ViewProviderProjGroup : public ViewProviderDrawingView
|
class TechDrawGuiExport ViewProviderProjGroup : public ViewProviderDrawingView
|
||||||
{
|
{
|
||||||
PROPERTY_HEADER(TechDrawGui::ViewProviderProjGroup);
|
PROPERTY_HEADER(TechDrawGui::ViewProviderProjGroup);
|
||||||
|
@ -61,6 +57,7 @@ public:
|
||||||
virtual void updateData(const App::Property*);
|
virtual void updateData(const App::Property*);
|
||||||
|
|
||||||
TechDraw::DrawProjGroup* getObject() const;
|
TechDraw::DrawProjGroup* getObject() const;
|
||||||
|
virtual TechDraw::DrawProjGroup* getViewObject() const;
|
||||||
void unsetEdit(int ModNum);
|
void unsetEdit(int ModNum);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -40,12 +40,8 @@
|
||||||
#include <Gui/Control.h>
|
#include <Gui/Control.h>
|
||||||
#include <Gui/Document.h>
|
#include <Gui/Document.h>
|
||||||
#include <Gui/MainWindow.h>
|
#include <Gui/MainWindow.h>
|
||||||
#include <Gui/Selection.h>
|
|
||||||
#include <Gui/SoFCSelection.h>
|
|
||||||
|
|
||||||
|
|
||||||
#include <Mod/TechDraw/App/DrawProjGroupItem.h>
|
|
||||||
|
|
||||||
#include "ViewProviderProjGroupItem.h"
|
#include "ViewProviderProjGroupItem.h"
|
||||||
|
|
||||||
using namespace TechDrawGui;
|
using namespace TechDrawGui;
|
||||||
|
@ -141,8 +137,12 @@ bool ViewProviderProjGroupItem::doubleClicked(void)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TechDraw::DrawProjGroupItem* ViewProviderProjGroupItem::getViewObject() const
|
||||||
TechDraw::DrawProjGroupItem* ViewProviderProjGroupItem::getObject() const
|
|
||||||
{
|
{
|
||||||
return dynamic_cast<TechDraw::DrawProjGroupItem*>(pcObject);
|
return dynamic_cast<TechDraw::DrawProjGroupItem*>(pcObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TechDraw::DrawProjGroupItem* ViewProviderProjGroupItem::getObject() const
|
||||||
|
{
|
||||||
|
return getViewObject();
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (c) 2014 Luke Parry <l.parry@warwick.ac.uk> *
|
* Copyright (c) 2014 Luke Parry <l.parry@warwick.ac.uk> *
|
||||||
* *
|
* *
|
||||||
* This file is part of the FreeCAD CAx development system. *
|
* This file is part of the FreeCAD CAx development system. *
|
||||||
* *
|
* *
|
||||||
* This library is free software; you can redistribute it and/or *
|
* This library is free software; you can redistribute it and/or *
|
||||||
* modify it under the terms of the GNU Library General Public *
|
* modify it under the terms of the GNU Library General Public *
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
* *
|
* *
|
||||||
* This library is distributed in the hope that it will be useful, *
|
* This library is distributed in the hope that it will be useful, *
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
* GNU Library General Public License for more details. *
|
* GNU Library General Public License for more details. *
|
||||||
* *
|
* *
|
||||||
* You should have received a copy of the GNU Library General Public *
|
* You should have received a copy of the GNU Library General Public *
|
||||||
|
@ -24,10 +24,9 @@
|
||||||
#define DRAWINGGUI_VIEWPROVIDERVIEWGROUPITEM_H
|
#define DRAWINGGUI_VIEWPROVIDERVIEWGROUPITEM_H
|
||||||
|
|
||||||
#include "ViewProviderViewPart.h"
|
#include "ViewProviderViewPart.h"
|
||||||
|
#include <Mod/TechDraw/App/DrawView.h>
|
||||||
namespace TechDraw{
|
#include <Mod/TechDraw/App/DrawViewPart.h>
|
||||||
class DrawProjGroupItem;
|
#include <Mod/TechDraw/App/DrawProjGroupItem.h>
|
||||||
}
|
|
||||||
|
|
||||||
namespace TechDrawGui {
|
namespace TechDrawGui {
|
||||||
|
|
||||||
|
@ -52,6 +51,7 @@ public:
|
||||||
void setupContextMenu(QMenu*, QObject*, const char*);
|
void setupContextMenu(QMenu*, QObject*, const char*);
|
||||||
virtual void updateData(const App::Property*);
|
virtual void updateData(const App::Property*);
|
||||||
|
|
||||||
|
virtual TechDraw::DrawProjGroupItem* getViewObject() const;
|
||||||
TechDraw::DrawProjGroupItem* getObject() const;
|
TechDraw::DrawProjGroupItem* getObject() const;
|
||||||
void unsetEdit(int ModNum);
|
void unsetEdit(int ModNum);
|
||||||
|
|
||||||
|
|
|
@ -28,16 +28,15 @@
|
||||||
|
|
||||||
/// Here the FreeCAD includes sorted by Base,App,Gui......
|
/// Here the FreeCAD includes sorted by Base,App,Gui......
|
||||||
#include <Base/Console.h>
|
#include <Base/Console.h>
|
||||||
#include <Base/Parameter.h>
|
//#include <Base/Parameter.h>
|
||||||
#include <Base/Exception.h>
|
//#include <Base/Exception.h>
|
||||||
#include <Base/Sequencer.h>
|
//#include <Base/Sequencer.h>
|
||||||
#include <App/Application.h>
|
#include <App/Application.h>
|
||||||
#include <App/Document.h>
|
#include <App/Document.h>
|
||||||
#include <App/DocumentObject.h>
|
#include <App/DocumentObject.h>
|
||||||
#include <Gui/SoFCSelection.h>
|
//#include <Gui/SoFCSelection.h>
|
||||||
#include <Gui/Selection.h>
|
//#include <Gui/Selection.h>
|
||||||
|
|
||||||
#include <Mod/TechDraw/App/DrawViewSpreadsheet.h>
|
|
||||||
#include "ViewProviderSpreadsheet.h"
|
#include "ViewProviderSpreadsheet.h"
|
||||||
|
|
||||||
using namespace TechDrawGui;
|
using namespace TechDrawGui;
|
||||||
|
|
|
@ -24,14 +24,12 @@
|
||||||
#ifndef DRAWINGGUI_VIEWPROVIDERSPREADSHEET_H
|
#ifndef DRAWINGGUI_VIEWPROVIDERSPREADSHEET_H
|
||||||
#define DRAWINGGUI_VIEWPROVIDERSPREADSHEET_H
|
#define DRAWINGGUI_VIEWPROVIDERSPREADSHEET_H
|
||||||
|
|
||||||
#include <Gui/ViewProviderFeature.h>
|
#include "ViewProviderSymbol.h"
|
||||||
|
#include <Mod/TechDraw/App/DrawViewSpreadsheet.h>
|
||||||
|
#include <Mod/TechDraw/App/DrawViewSymbol.h>
|
||||||
|
|
||||||
#include "ViewProviderSymbol.h"
|
#include "ViewProviderSymbol.h"
|
||||||
|
|
||||||
namespace TechDraw{
|
|
||||||
class DrawViewSpreadsheet;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace TechDrawGui {
|
namespace TechDrawGui {
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,7 +51,7 @@ public:
|
||||||
virtual std::vector<std::string> getDisplayModes(void) const;
|
virtual std::vector<std::string> getDisplayModes(void) const;
|
||||||
virtual void updateData(const App::Property*);
|
virtual void updateData(const App::Property*);
|
||||||
|
|
||||||
TechDraw::DrawViewSpreadsheet* getViewObject() const;
|
virtual TechDraw::DrawViewSpreadsheet* getViewObject() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace TechDrawGui
|
} // namespace TechDrawGui
|
||||||
|
|
|
@ -38,7 +38,6 @@
|
||||||
#include <Gui/SoFCSelection.h>
|
#include <Gui/SoFCSelection.h>
|
||||||
#include <Gui/Selection.h>
|
#include <Gui/Selection.h>
|
||||||
|
|
||||||
#include <Mod/TechDraw/App/DrawViewSymbol.h>
|
|
||||||
#include "ViewProviderSymbol.h"
|
#include "ViewProviderSymbol.h"
|
||||||
|
|
||||||
using namespace TechDrawGui;
|
using namespace TechDrawGui;
|
||||||
|
|
|
@ -25,13 +25,10 @@
|
||||||
#ifndef DRAWINGGUI_VIEWPROVIDERSYMBOL_H
|
#ifndef DRAWINGGUI_VIEWPROVIDERSYMBOL_H
|
||||||
#define DRAWINGGUI_VIEWPROVIDERSYMBOL_H
|
#define DRAWINGGUI_VIEWPROVIDERSYMBOL_H
|
||||||
|
|
||||||
#include <Gui/ViewProviderFeature.h>
|
#include <Mod/TechDraw/App/DrawView.h>
|
||||||
|
#include <Mod/TechDraw/App/DrawViewSymbol.h>
|
||||||
|
#include "ViewProviderDrawingView.h"
|
||||||
#include "ViewProviderDrawingView.h"
|
#include "ViewProviderDrawingView.h"
|
||||||
|
|
||||||
namespace TechDraw{
|
|
||||||
class DrawViewSymbol;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace TechDrawGui {
|
namespace TechDrawGui {
|
||||||
|
|
||||||
|
@ -54,7 +51,7 @@ public:
|
||||||
virtual std::vector<std::string> getDisplayModes(void) const;
|
virtual std::vector<std::string> getDisplayModes(void) const;
|
||||||
virtual void updateData(const App::Property*);
|
virtual void updateData(const App::Property*);
|
||||||
|
|
||||||
TechDraw::DrawViewSymbol* getViewObject() const;
|
virtual TechDraw::DrawViewSymbol* getViewObject() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace TechDrawGui
|
} // namespace TechDrawGui
|
||||||
|
|
|
@ -33,15 +33,11 @@
|
||||||
/// Here the FreeCAD includes sorted by Base,App,Gui......
|
/// Here the FreeCAD includes sorted by Base,App,Gui......
|
||||||
#include <Base/Console.h>
|
#include <Base/Console.h>
|
||||||
#include <Base/Parameter.h>
|
#include <Base/Parameter.h>
|
||||||
#include <Base/Exception.h>
|
|
||||||
#include <Base/Sequencer.h>
|
|
||||||
#include <App/Application.h>
|
#include <App/Application.h>
|
||||||
#include <App/Document.h>
|
#include <App/Document.h>
|
||||||
#include <App/DocumentObject.h>
|
#include <App/DocumentObject.h>
|
||||||
#include <Gui/Selection.h>
|
#include <Gui/Selection.h>
|
||||||
|
|
||||||
#include <Mod/TechDraw/App/DrawViewClip.h>
|
|
||||||
|
|
||||||
#include "ViewProviderViewClip.h"
|
#include "ViewProviderViewClip.h"
|
||||||
|
|
||||||
using namespace TechDrawGui;
|
using namespace TechDrawGui;
|
||||||
|
@ -121,7 +117,12 @@ bool ViewProviderViewClip::isShow(void) const
|
||||||
return Visibility.getValue();
|
return Visibility.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
TechDraw::DrawViewClip* ViewProviderViewClip::getObject() const
|
TechDraw::DrawViewClip* ViewProviderViewClip::getViewObject() const
|
||||||
{
|
{
|
||||||
return dynamic_cast<TechDraw::DrawViewClip*>(pcObject);
|
return dynamic_cast<TechDraw::DrawViewClip*>(pcObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TechDraw::DrawViewClip* ViewProviderViewClip::getObject() const
|
||||||
|
{
|
||||||
|
return getViewObject();
|
||||||
|
}
|
||||||
|
|
|
@ -25,13 +25,10 @@
|
||||||
#ifndef DRAWINGGUI_VIEWPROVIDERCLIP_H
|
#ifndef DRAWINGGUI_VIEWPROVIDERCLIP_H
|
||||||
#define DRAWINGGUI_VIEWPROVIDERCLIP_H
|
#define DRAWINGGUI_VIEWPROVIDERCLIP_H
|
||||||
|
|
||||||
#include <Gui/ViewProviderDocumentObjectGroup.h>
|
#include <Mod/TechDraw/App/DrawView.h>
|
||||||
|
#include <Mod/TechDraw/App/DrawViewClip.h>
|
||||||
#include "ViewProviderDrawingView.h"
|
#include "ViewProviderDrawingView.h"
|
||||||
|
|
||||||
namespace TechDraw{
|
|
||||||
class DrawViewClip;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace TechDrawGui {
|
namespace TechDrawGui {
|
||||||
|
|
||||||
class TechDrawGuiExport ViewProviderViewClip : public ViewProviderDrawingView
|
class TechDrawGuiExport ViewProviderViewClip : public ViewProviderDrawingView
|
||||||
|
@ -50,6 +47,8 @@ public:
|
||||||
virtual bool useNewSelectionModel(void) const {return false;}
|
virtual bool useNewSelectionModel(void) const {return false;}
|
||||||
/// returns a list of all possible modes
|
/// returns a list of all possible modes
|
||||||
virtual std::vector<std::string> getDisplayModes(void) const;
|
virtual std::vector<std::string> getDisplayModes(void) const;
|
||||||
|
|
||||||
|
virtual TechDraw::DrawViewClip* getViewObject() const;
|
||||||
TechDraw::DrawViewClip* getObject() const;
|
TechDraw::DrawViewClip* getObject() const;
|
||||||
|
|
||||||
/// Hide the object in the view
|
/// Hide the object in the view
|
||||||
|
|
|
@ -31,15 +31,14 @@
|
||||||
/// Here the FreeCAD includes sorted by Base,App,Gui......
|
/// Here the FreeCAD includes sorted by Base,App,Gui......
|
||||||
#include <Base/Console.h>
|
#include <Base/Console.h>
|
||||||
#include <Base/Parameter.h>
|
#include <Base/Parameter.h>
|
||||||
#include <Base/Exception.h>
|
//#include <Base/Exception.h>
|
||||||
#include <Base/Sequencer.h>
|
//#include <Base/Sequencer.h>
|
||||||
#include <App/Application.h>
|
#include <App/Application.h>
|
||||||
#include <App/Document.h>
|
#include <App/Document.h>
|
||||||
#include <App/DocumentObject.h>
|
#include <App/DocumentObject.h>
|
||||||
#include <Gui/SoFCSelection.h>
|
//#include <Gui/SoFCSelection.h>
|
||||||
#include <Gui/Selection.h>
|
//#include <Gui/Selection.h>
|
||||||
|
|
||||||
#include <Mod/TechDraw/App/DrawViewPart.h>
|
|
||||||
#include <Mod/TechDraw/App/DrawViewDimension.h>
|
#include <Mod/TechDraw/App/DrawViewDimension.h>
|
||||||
#include <Mod/TechDraw/App/DrawHatch.h>
|
#include <Mod/TechDraw/App/DrawHatch.h>
|
||||||
|
|
||||||
|
@ -112,7 +111,12 @@ std::vector<App::DocumentObject*> ViewProviderViewPart::claimChildren(void) cons
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TechDraw::DrawViewPart* ViewProviderViewPart::getViewPart() const
|
TechDraw::DrawViewPart* ViewProviderViewPart::getViewObject() const
|
||||||
{
|
{
|
||||||
return dynamic_cast<TechDraw::DrawViewPart*>(pcObject);
|
return dynamic_cast<TechDraw::DrawViewPart*>(pcObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TechDraw::DrawViewPart* ViewProviderViewPart::getViewPart() const
|
||||||
|
{
|
||||||
|
return getViewObject();
|
||||||
|
}
|
||||||
|
|
|
@ -25,10 +25,8 @@
|
||||||
#define DRAWINGGUI_VIEWPROVIDERVIEWPART_H
|
#define DRAWINGGUI_VIEWPROVIDERVIEWPART_H
|
||||||
|
|
||||||
#include "ViewProviderDrawingView.h"
|
#include "ViewProviderDrawingView.h"
|
||||||
|
#include <Mod/TechDraw/App/DrawView.h>
|
||||||
namespace TechDraw{
|
#include <Mod/TechDraw/App/DrawViewPart.h>
|
||||||
class DrawViewPart;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace TechDrawGui {
|
namespace TechDrawGui {
|
||||||
|
|
||||||
|
@ -51,6 +49,7 @@ public:
|
||||||
public:
|
public:
|
||||||
virtual std::vector<App::DocumentObject*> claimChildren(void) const;
|
virtual std::vector<App::DocumentObject*> claimChildren(void) const;
|
||||||
|
|
||||||
|
virtual TechDraw::DrawViewPart* getViewObject() const;
|
||||||
TechDraw::DrawViewPart* getViewPart() const;
|
TechDraw::DrawViewPart* getViewPart() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -33,15 +33,10 @@
|
||||||
/// Here the FreeCAD includes sorted by Base,App,Gui......
|
/// Here the FreeCAD includes sorted by Base,App,Gui......
|
||||||
#include <Base/Console.h>
|
#include <Base/Console.h>
|
||||||
#include <Base/Parameter.h>
|
#include <Base/Parameter.h>
|
||||||
#include <Base/Exception.h>
|
|
||||||
#include <Base/Sequencer.h>
|
|
||||||
#include <App/Application.h>
|
#include <App/Application.h>
|
||||||
#include <App/Document.h>
|
#include <App/Document.h>
|
||||||
#include <App/DocumentObject.h>
|
#include <App/DocumentObject.h>
|
||||||
#include <Gui/SoFCSelection.h>
|
|
||||||
#include <Gui/Selection.h>
|
|
||||||
|
|
||||||
#include <Mod/TechDraw/App/DrawView.h>
|
|
||||||
#include "ViewProviderViewSection.h"
|
#include "ViewProviderViewSection.h"
|
||||||
|
|
||||||
using namespace TechDrawGui;
|
using namespace TechDrawGui;
|
||||||
|
@ -91,7 +86,7 @@ std::vector<App::DocumentObject*> ViewProviderViewSection::claimChildren(void) c
|
||||||
return ViewProviderViewPart::claimChildren();
|
return ViewProviderViewPart::claimChildren();
|
||||||
}
|
}
|
||||||
|
|
||||||
TechDraw::DrawView* ViewProviderViewSection::getViewObject() const
|
TechDraw::DrawViewSection* ViewProviderViewSection::getViewObject() const
|
||||||
{
|
{
|
||||||
return dynamic_cast<TechDraw::DrawView*>(pcObject);
|
return dynamic_cast<TechDraw::DrawViewSection*>(pcObject);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Copyright (c) 2004 Jürgen Riegel <juergen.riegel@web.de> *
|
* Copyright (c) 2004 Jürgen Riegel <juergen.riegel@web.de> *
|
||||||
* Copyright (c) 2013 Luke Parry <l.parry@warwick.ac.uk> *
|
* Copyright (c) 2013 Luke Parry <l.parry@warwick.ac.uk> *
|
||||||
* *
|
* *
|
||||||
* This file is part of the FreeCAD CAx development system. *
|
* This file is part of the FreeCAD CAx development system. *
|
||||||
* *
|
* *
|
||||||
* This library is free software; you can redistribute it and/or *
|
* This library is free software; you can redistribute it and/or *
|
||||||
* modify it under the terms of the GNU Library General Public *
|
* modify it under the terms of the GNU Library General Public *
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* *
|
* *
|
||||||
* This library is distributed in the hope that it will be useful, *
|
* This library is distributed in the hope that it will be useful, *
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
* GNU Library General Public License for more details. *
|
* GNU Library General Public License for more details. *
|
||||||
* *
|
* *
|
||||||
* You should have received a copy of the GNU Library General Public *
|
* You should have received a copy of the GNU Library General Public *
|
||||||
|
@ -25,11 +25,11 @@
|
||||||
#ifndef DRAWINGGUI_VIEWPROVIDERVIEWSECTION_H
|
#ifndef DRAWINGGUI_VIEWPROVIDERVIEWSECTION_H
|
||||||
#define DRAWINGGUI_VIEWPROVIDERVIEWSECTION_H
|
#define DRAWINGGUI_VIEWPROVIDERVIEWSECTION_H
|
||||||
|
|
||||||
#include "ViewProviderViewPart.h"
|
#include <Mod/TechDraw/App/DrawView.h>
|
||||||
|
#include <Mod/TechDraw/App/DrawViewPart.h>
|
||||||
|
#include <Mod/TechDraw/App/DrawViewSection.h>
|
||||||
|
|
||||||
namespace TechDraw{
|
#include "ViewProviderViewPart.h"
|
||||||
class DrawView;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace TechDrawGui {
|
namespace TechDrawGui {
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ public:
|
||||||
virtual void updateData(const App::Property*);
|
virtual void updateData(const App::Property*);
|
||||||
virtual std::vector<App::DocumentObject*> claimChildren(void) const;
|
virtual std::vector<App::DocumentObject*> claimChildren(void) const;
|
||||||
|
|
||||||
TechDraw::DrawView* getViewObject() const;
|
virtual TechDraw::DrawViewSection* getViewObject() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace TechDrawGui
|
} // namespace TechDrawGui
|
||||||
|
|
Loading…
Reference in New Issue
Block a user