[TD]clazy warnings and duplicate setter/getter

- clazy warning re missing Q_OBJECT

- include TechDrawGlobal.h in headers

- resolve duplicate setter/getters
This commit is contained in:
Wanderer Fan
2022-07-28 12:58:17 -04:00
committed by WandererFan
parent 2c047e361d
commit aa1193559b
122 changed files with 294 additions and 79 deletions

View File

@@ -23,6 +23,8 @@
#ifndef _ARROWENUMS_H_
#define _ARROWENUMS_H_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <vector>
#include <string>
#include <QCoreApplication>

View File

@@ -23,6 +23,8 @@
#ifndef TECHDRAW_COSMETIC_H
#define TECHDRAW_COSMETIC_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <boost/uuid/uuid.hpp>
#include <App/FeaturePython.h>

View File

@@ -23,6 +23,8 @@
#ifndef TECHDRAW_COSMETICEXTENSION_H
#define TECHDRAW_COSMETICEXTENSION_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <App/DocumentObjectExtension.h>
#include <App/ExtensionPython.h>
#include <Base/Vector3D.h>

View File

@@ -23,6 +23,8 @@
#ifndef _DrawDimHelper_h_
#define _DrawDimHelper_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Geom2d_Curve.hxx>
#include <string>

View File

@@ -23,6 +23,8 @@
#ifndef _TechDraw_DrawGeomHatch_h_
#define _TechDraw_DrawGeomHatch_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <App/DocumentObject.h>
#include <App/FeaturePython.h>
#include <App/PropertyFile.h>

View File

@@ -22,7 +22,9 @@
#ifndef _TechDraw_DrawLeaderLine_h_
#define _TechDraw_DrawLeaderLine_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
# include <App/DocumentObject.h>
# include <App/FeaturePython.h>
# include <App/PropertyLinks.h>
@@ -36,6 +38,7 @@ namespace TechDraw
class TechDrawExport DrawLeaderLine : public TechDraw::DrawView
{
PROPERTY_HEADER_WITH_OVERRIDE(TechDraw::DrawLeaderLine);
Q_OBJECT
public:
DrawLeaderLine();

View File

@@ -22,7 +22,9 @@
#ifndef _DrawPage_h_
#define _DrawPage_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <boost_signals2.hpp>
#include <App/DocumentObject.h>

View File

@@ -22,6 +22,8 @@
#ifndef _TECHDRAW_DrawParametricTemplate_h_
#define _TECHDRAW_DrawParametricTemplate_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <App/FeaturePython.h>
#include <App/PropertyFile.h>

View File

@@ -22,6 +22,8 @@
#ifndef _TECHDRAW_FEATUREVIEWGROUP_H_
#define _TECHDRAW_FEATUREVIEWGROUP_H_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <string>
# include <QRectF>
@@ -49,7 +51,8 @@ class DrawProjGroupItem;
class TechDrawExport DrawProjGroup : public TechDraw::DrawViewCollection
{
PROPERTY_HEADER_WITH_OVERRIDE(TechDraw::DrawProjGroup);
Q_OBJECT
public:
/// Constructor
DrawProjGroup();

View File

@@ -22,6 +22,8 @@
#ifndef _DrawProjGroupItem_h_
#define _DrawProjGroupItem_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <gp_Ax2.hxx>
@@ -51,6 +53,7 @@ class DrawProjGroup;
class TechDrawExport DrawProjGroupItem : public TechDraw::DrawViewPart
{
PROPERTY_HEADER_WITH_OVERRIDE(TechDraw::DrawProjGroupItem);
Q_OBJECT
public:
/// Constructor

View File

@@ -23,6 +23,8 @@
#ifndef _DrawProjectSplit_h_
#define _DrawProjectSplit_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>

View File

@@ -36,6 +36,7 @@ namespace TechDraw
class TechDrawExport DrawRichAnno : public TechDraw::DrawView
{
PROPERTY_HEADER_WITH_OVERRIDE(TechDraw::DrawRichAnno);
Q_OBJECT
public:
DrawRichAnno();

View File

@@ -22,6 +22,8 @@
#ifndef _TECHDRAW_DrawSVGTemplate_h_
#define _TECHDRAW_DrawSVGTemplate_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <App/FeaturePython.h>
#include <App/PropertyFile.h>

View File

@@ -22,6 +22,8 @@
#ifndef _TECHDRAW_DrawTemplate_h_
#define _TECHDRAW_DrawTemplate_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <App/DocumentObject.h>
#include <App/FeaturePython.h>

View File

@@ -22,6 +22,8 @@
#ifndef _TechDraw_DrawTile_h_
#define _TechDraw_DrawTile_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
# include <App/DocumentObject.h>
# include <App/FeaturePython.h>

View File

@@ -22,6 +22,8 @@
#ifndef _TechDraw_DrawTileWeld_h_
#define _TechDraw_DrawTileWeld_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <App/DocumentObject.h>
#include <App/FeaturePython.h>

View File

@@ -23,6 +23,8 @@
#ifndef _DrawUtil_h_
#define _DrawUtil_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <string>
#include <QByteArray>

View File

@@ -24,6 +24,8 @@
#ifndef _DrawViewAnnotation_h_
#define _DrawViewAnnotation_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <App/DocumentObject.h>
#include <App/FeaturePython.h>
#include <App/PropertyUnits.h>
@@ -38,6 +40,7 @@ namespace TechDraw
class TechDrawExport DrawViewAnnotation : public TechDraw::DrawView
{
PROPERTY_HEADER_WITH_OVERRIDE(TechDraw::DrawViewAnnotation);
Q_OBJECT
public:
/// Constructor

View File

@@ -22,6 +22,8 @@
#ifndef _DrawViewArch_h_
#define _DrawViewArch_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <App/DocumentObject.h>
#include <App/PropertyLinks.h>
@@ -36,7 +38,8 @@ namespace TechDraw
class TechDrawExport DrawViewArch : public TechDraw::DrawViewSymbol
{
PROPERTY_HEADER_WITH_OVERRIDE(TechDraw::DrawViewArch);
Q_OBJECT
public:
/// Constructor
DrawViewArch();

View File

@@ -22,6 +22,8 @@
#ifndef _TechDraw_DrawViewBalloon_h_
#define _TechDraw_DrawViewBalloon_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <App/DocumentObject.h>
#include <App/PropertyLinks.h>
@@ -42,6 +44,7 @@ class DrawViewPart;
class TechDrawExport DrawViewBalloon : public TechDraw::DrawView
{
PROPERTY_HEADER_WITH_OVERRIDE(TechDraw::DrawViewBalloon);
Q_OBJECT
public:
/// Constructor

View File

@@ -24,6 +24,8 @@
#ifndef _DrawViewClip_h_
#define _DrawViewClip_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <App/DocumentObject.h>
#include <App/FeaturePython.h>
#include <App/PropertyLinks.h>
@@ -38,6 +40,7 @@ namespace TechDraw
class TechDrawExport DrawViewClip: public TechDraw::DrawView
{
PROPERTY_HEADER_WITH_OVERRIDE(TechDraw::DrawViewClip);
Q_OBJECT
public:
/// Constructor

View File

@@ -24,6 +24,8 @@
#ifndef _TECHDRAW_FEATUREVIEWCOLLECTION_h_
#define _TECHDRAW_FEATUREVIEWCOLLECTION_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <App/DocumentObject.h>
#include <App/PropertyLinks.h>
@@ -37,6 +39,7 @@ namespace TechDraw
class TechDrawExport DrawViewCollection : public DrawView
{
PROPERTY_HEADER_WITH_OVERRIDE(TechDraw::DrawViewCollection);
Q_OBJECT
public:
App::PropertyLinkList Views;

View File

@@ -23,6 +23,8 @@
#ifndef _DrawViewDetail_h_
#define _DrawViewDetail_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <gp_Ax2.hxx>
#include <TopoDS_Shape.hxx>

View File

@@ -23,6 +23,8 @@
#ifndef _TechDraw_DrawViewDimExtent_h_
#define _TechDraw_DrawViewDimExtent_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <tuple>
#include <App/DocumentObject.h>
@@ -36,6 +38,7 @@ namespace TechDraw {
class TechDrawExport DrawViewDimExtent : public TechDraw::DrawViewDimension
{
PROPERTY_HEADER_WITH_OVERRIDE(TechDraw::DrawViewDimExtent);
Q_OBJECT
public:
/// Constructor

View File

@@ -22,6 +22,8 @@
#ifndef _TechDraw_DrawViewDimension_h_
#define _TechDraw_DrawViewDimension_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <tuple>
@@ -126,7 +128,8 @@ struct arcPoints
class TechDrawExport DrawViewDimension : public TechDraw::DrawView
{
PROPERTY_HEADER_WITH_OVERRIDE(TechDraw::DrawViewDimension);
Q_OBJECT
public:
/// Constructor
DrawViewDimension();

View File

@@ -22,6 +22,8 @@
#ifndef _DrawViewDraft_h_
#define _DrawViewDraft_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <App/DocumentObject.h>
#include <App/FeaturePython.h>
@@ -37,7 +39,8 @@ namespace TechDraw
class TechDrawExport DrawViewDraft : public TechDraw::DrawViewSymbol
{
PROPERTY_HEADER_WITH_OVERRIDE(TechDraw::DrawViewDraft);
Q_OBJECT
public:
/// Constructor
DrawViewDraft();

View File

@@ -39,7 +39,8 @@ namespace TechDraw
class TechDrawExport DrawViewImage : public TechDraw::DrawView
{
PROPERTY_HEADER_WITH_OVERRIDE(TechDraw::DrawViewImage);
Q_OBJECT
public:
/// Constructor
DrawViewImage();

View File

@@ -25,6 +25,8 @@
#ifndef _DrawViewMulti_h_
#define _DrawViewMulti_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <App/DocumentObject.h>
#include <App/FeaturePython.h>
#include <App/PropertyLinks.h>

View File

@@ -24,6 +24,8 @@
#ifndef _DrawViewSection_h_
#define _DrawViewSection_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <gp_Ax2.hxx>
#include <TopoDS_Shape.hxx>

View File

@@ -23,6 +23,8 @@
#ifndef _DrawViewSpreadsheet_h_
#define _DrawViewSpreadsheet_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <App/DocumentObject.h>
#include <App/FeaturePython.h>
#include <App/PropertyLinks.h>
@@ -36,6 +38,7 @@ namespace TechDraw
class TechDrawExport DrawViewSpreadsheet : public TechDraw::DrawViewSymbol
{
PROPERTY_HEADER_WITH_OVERRIDE(TechDraw::DrawViewSpreadsheet);
Q_OBJECT
public:
DrawViewSpreadsheet();

View File

@@ -22,6 +22,8 @@
#ifndef _DrawViewSymbol_h_
#define _DrawViewSymbol_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Mod/TechDraw/TechDrawGlobal.h>
@@ -41,7 +43,8 @@ class DrawPage;
class TechDrawExport DrawViewSymbol : public TechDraw::DrawView
{
PROPERTY_HEADER_WITH_OVERRIDE(TechDraw::DrawViewSymbol);
Q_OBJECT
public:
/// Constructor
DrawViewSymbol();

View File

@@ -23,6 +23,8 @@
#ifndef _TechDraw_DrawWeldSymbol_h_
#define _TechDraw_DrawWeldSymbol_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
# include <App/DocumentObject.h>
# include <App/FeaturePython.h>
@@ -37,6 +39,7 @@ class DrawTileWeld;
class TechDrawExport DrawWeldSymbol : public TechDraw::DrawView
{
PROPERTY_HEADER_WITH_OVERRIDE(TechDraw::DrawWeldSymbol);
Q_OBJECT
public:
DrawWeldSymbol();

View File

@@ -28,6 +28,8 @@
#ifndef TECHDRAW_EDGEWALKER_H
#define TECHDRAW_EDGEWALKER_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <vector>
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/planar_face_traversal.hpp>

View File

@@ -24,6 +24,8 @@
#ifndef TECHDRAW_FEATUREPROJECTION
#define TECHDRAW_FEATUREPROJECTION
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <App/DocumentObject.h>
#include <App/PropertyGeo.h>

View File

@@ -22,6 +22,8 @@
#ifndef _TechDraw_LandmarkDimension_h_
#define _TechDraw_LandmarkDimension_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
# include <App/DocumentObject.h>
# include <App/PropertyStandard.h>
@@ -42,7 +44,8 @@ class DrawViewPart;
class TechDrawExport LandmarkDimension : public TechDraw::DrawViewDimension
{
PROPERTY_HEADER_WITH_OVERRIDE(TechDraw::LandmarkDimension);
Q_OBJECT
public:
/// Constructor
LandmarkDimension();

View File

@@ -25,6 +25,8 @@
#ifndef _TechDraw_LINEGROUP_H_
#define _TechDraw_LINEGROUP_H_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <string>
namespace TechDraw

View File

@@ -19,7 +19,7 @@
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
//this file originally part of TechDraw workbench
//this file originally part of Drawing workbench
//migrated to TechDraw workbench 2022-01-26 by Wandererfan

View File

@@ -22,6 +22,8 @@
#ifndef TECHDRAW_PropertyCenterLineList_H
#define TECHDRAW_PropertyCenterLineList_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <vector>
#include <App/Property.h>

View File

@@ -22,6 +22,8 @@
#ifndef TECHDRAW_PropertyCosmeticEdgeList_H
#define TECHDRAW_PropertyCosmeticEdgeList_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <vector>
#include <App/Property.h>

View File

@@ -22,6 +22,8 @@
#ifndef TECHDRAW_PropertyCosmeticVertexList_H
#define TECHDRAW_PropertyCosmeticVertexList_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <vector>
#include <App/Property.h>

View File

@@ -22,6 +22,8 @@
#ifndef TECHDRAW_PropertyGeomFormatList_H
#define TECHDRAW_PropertyGeomFormatList_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <vector>
#include <App/Property.h>

View File

@@ -26,6 +26,8 @@
#ifndef _QDOMNODEMODEL_H_
#define _QDOMNODEMODEL_H_
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <QAbstractXmlNodeModel>
#include <QDomDocument>

View File

@@ -19,7 +19,7 @@
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
//this file originally part of TechDraw workbench
//this file originally part of Drawing workbench
//migrated to TechDraw workbench 2022-01-26 by Wandererfan

View File

@@ -887,8 +887,8 @@ void CmdTechDrawBalloon::activated(int iMsg)
ViewProviderViewPart* partVP = dynamic_cast<ViewProviderViewPart*>(guiDoc->getViewProvider(objFeat));
if (pageVP && partVP) {
QGVPage* viewPage = pageVP->getGraphicsView();
QGSPage* scenePage = pageVP->getGraphicsScene();
QGVPage* viewPage = pageVP->getQGVPage();
QGSPage* scenePage = pageVP->getQGSPage();
if (viewPage) {
viewPage->startBalloonPlacing();

View File

@@ -1885,7 +1885,7 @@ namespace TechDrawGui {
Gui::Document* guiDoc = Gui::Application::Instance->getDocument(page->getDocument());
ViewProviderPage* pageVP = dynamic_cast<ViewProviderPage*>(guiDoc->getViewProvider(page));
if (pageVP) {
QGSPage* scenePage = pageVP->getGraphicsScene();
QGSPage* scenePage = pageVP->getQGSPage();
featName = scenePage->getDrawPage()->getDocument()->getUniqueObjectName("Balloon");
std::string pageName = scenePage->getDrawPage()->getNameInDocument();
cmd->doCommand(cmd->Doc, "App.activeDocument().addObject('TechDraw::DrawViewBalloon','%s')",

View File

@@ -25,6 +25,8 @@
#ifndef DRAWINGGUI_DLGPREFSTECHDRAWIMPADVANCED_H
#define DRAWINGGUI_DLGPREFSTECHDRAWIMPADVANCED_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Gui/PropertyPage.h>
#include <memory>

View File

@@ -25,6 +25,8 @@
#ifndef DRAWINGGUI_DLGPREFSTECHDRAWIMPANNOTATION_H
#define DRAWINGGUI_DLGPREFSTECHDRAWIMPANNOTATION_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Gui/PropertyPage.h>
#include <memory>

View File

@@ -25,6 +25,8 @@
#ifndef DRAWINGGUI_DLGPREFSTECHDRAWIMPCOLORS_H
#define DRAWINGGUI_DLGPREFSTECHDRAWIMPCOLORS_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Gui/PropertyPage.h>
#include <memory>

View File

@@ -25,6 +25,8 @@
#ifndef DRAWINGGUI_DLGPREFSTECHDRAWIMPDIMENSIONS_H
#define DRAWINGGUI_DLGPREFSTECHDRAWIMPDIMENSIONS_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Gui/PropertyPage.h>
#include <memory>

View File

@@ -25,6 +25,8 @@
#ifndef DRAWINGGUI_DLGPREFSTECHDRAWIMPGENERAL_H
#define DRAWINGGUI_DLGPREFSTECHDRAWIMPGENERAL_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Gui/PropertyPage.h>
#include <memory>

View File

@@ -25,6 +25,8 @@
#ifndef DRAWINGGUI_DLGPREFSTECHDRAWIMPHLR_H
#define DRAWINGGUI_DLGPREFSTECHDRAWIMPHLR_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Gui/PropertyPage.h>
#include <memory>

View File

@@ -25,6 +25,8 @@
#ifndef DRAWINGGUI_DLGPREFSTECHDRAWIMPSCALE_H
#define DRAWINGGUI_DLGPREFSTECHDRAWIMPSCALE_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Gui/PropertyPage.h>
#include <memory>

View File

@@ -129,7 +129,7 @@ TechDraw::DrawPage* DrawGuiUtil::findPage(Gui::Command* cmd)
MDIViewPage* mvp = dynamic_cast<MDIViewPage*>(mv);
if (mvp) {
QString windowTitle = mvp->windowTitle();
QGSPage* qp = mvp->getViewProviderPage()->getGraphicsScene();
QGSPage* qp = mvp->getViewProviderPage()->getQGSPage();
page = qp->getDrawPage();
}
else {

View File

@@ -23,6 +23,7 @@
#ifndef _Grabber3d_h_
#define _Grabber3d_h_
#include <Mod/TechDraw/TechDrawGlobal.h>
class SoSeparator;
class SoCamera;

View File

@@ -144,8 +144,7 @@ MDIViewPage::~MDIViewPage()
void MDIViewPage::setScene(QGSPage* scene, QGVPage* viewWidget)
{
m_scene = scene;
m_view = viewWidget;
setCentralWidget(m_view); //this makes m_view a Qt child of MDIViewPage
setCentralWidget(viewWidget); //this makes viewWidget a Qt child of MDIViewPage
QObject::connect(m_scene, SIGNAL(selectionChanged()),
this, SLOT (sceneSelectionChanged()));
}
@@ -475,7 +474,7 @@ void MDIViewPage::toggleKeepUpdated()
void MDIViewPage::viewAll()
{
m_view->fitInView(m_scene->itemsBoundingRect(), Qt::KeepAspectRatio);
m_vpPage->getQGVPage()->fitInView(m_scene->itemsBoundingRect(), Qt::KeepAspectRatio);
}
void MDIViewPage::saveSVG()

View File

@@ -140,7 +140,6 @@ private:
std::string m_documentName;
bool isSelectionBlocked;
QPointer<QGSPage> m_scene;
QPointer<QGVPage> m_view;
QString m_currentPath;
ViewProviderPage* m_vpPage;

View File

@@ -23,6 +23,8 @@
#ifndef DRAWINGGUI_QGRAPHICSITEMARROW_H
#define DRAWINGGUI_QGRAPHICSITEMARROW_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Base/Vector3D.h>
# include "QGIPrimPath.h"

View File

@@ -23,6 +23,8 @@
#ifndef DRAWINGGUI_QGRAPHICSITEMCMARK_H
#define DRAWINGGUI_QGRAPHICSITEMCMARK_H
#include <Mod/TechDraw/TechDrawGlobal.h>
# include "QGIVertex.h"
namespace TechDrawGui

View File

@@ -23,6 +23,8 @@
#ifndef DRAWINGGUI_QGICAPTION_H
#define DRAWINGGUI_QGICAPTION_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include "QGCustomText.h"
namespace TechDrawGui

View File

@@ -23,6 +23,8 @@
#ifndef DRAWINGGUI_QGRAPHICSITEMDIMLINES_H
#define DRAWINGGUI_QGRAPHICSITEMDIMLINES_H
#include <Mod/TechDraw/TechDrawGlobal.h>
# include "QGIPrimPath.h"
QT_BEGIN_NAMESPACE

View File

@@ -23,6 +23,8 @@
#ifndef DRAWINGGUI_QGRAPHICSITEMDRAWINGTEMPLATE_H
#define DRAWINGGUI_QGRAPHICSITEMDRAWINGTEMPLATE_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include "QGITemplate.h"
QT_BEGIN_NAMESPACE

View File

@@ -23,6 +23,8 @@
#ifndef DRAWINGGUI_QGRAPHICSITEMEDGE_H
#define DRAWINGGUI_QGRAPHICSITEMEDGE_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include "QGIPrimPath.h"
namespace TechDrawGui

View File

@@ -26,6 +26,7 @@
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <QObject>
#include "QGIViewCollection.h"
QT_BEGIN_NAMESPACE

View File

@@ -23,6 +23,8 @@
#ifndef DRAWINGGUI_QGRAPHICSITEMSVGTEMPLATE_H
#define DRAWINGGUI_QGRAPHICSITEMSVGTEMPLATE_H
#include <Mod/TechDraw/TechDrawGlobal.h>
QT_BEGIN_NAMESPACE
class QGraphicsScene;
class QGraphicsSvgItem;

View File

@@ -23,6 +23,8 @@
#ifndef DRAWINGGUI_QGRAPHICSITEMVERTEX_H
#define DRAWINGGUI_QGRAPHICSITEMVERTEX_H
#include <Mod/TechDraw/TechDrawGlobal.h>
# include "QGIPrimPath.h"
namespace TechDrawGui

View File

@@ -606,63 +606,59 @@ QGIView* QGIView::getQGIVByName(std::string name)
/* static */
Gui::ViewProvider* QGIView::getViewProvider(App::DocumentObject* obj)
{
Gui::ViewProvider* result = nullptr;
if (obj) {
Gui::Document* guiDoc = Gui::Application::Instance->getDocument(obj->getDocument());
result = guiDoc->getViewProvider(obj);
return guiDoc->getViewProvider(obj);
}
return result;
return nullptr;
}
QGVPage* QGIView::getGraphicsView(TechDraw::DrawView* dv)
QGVPage* QGIView::getQGVPage(TechDraw::DrawView* dv)
{
QGVPage* graphicsView = nullptr;
if (dv != nullptr) {
TechDraw::DrawPage* page = dv->findParentPage();
if (page != nullptr) {
Gui::Document* activeGui = Gui::Application::Instance->getDocument(page->getDocument());
Gui::ViewProvider* vp = activeGui->getViewProvider(page);
ViewProviderPage* vpp = dynamic_cast<ViewProviderPage*>(vp);
if (vpp != nullptr) {
graphicsView = vpp->getGraphicsView();
}
}
ViewProviderPage* vpp = getViewProviderPage(dv);
if (!vpp) {
return vpp->getQGVPage();
}
return graphicsView;
return nullptr;
}
QGSPage* QGIView::getGraphicsScene(TechDraw::DrawView* dv)
QGSPage* QGIView::getQGSPage(TechDraw::DrawView* dv)
{
QGSPage* graphicsScene = nullptr;
if (dv != nullptr) {
TechDraw::DrawPage* page = dv->findParentPage();
if (page != nullptr) {
Gui::Document* activeGui = Gui::Application::Instance->getDocument(page->getDocument());
Gui::ViewProvider* vp = activeGui->getViewProvider(page);
ViewProviderPage* vpp = dynamic_cast<ViewProviderPage*>(vp);
if (vpp != nullptr) {
graphicsScene = vpp->getGraphicsScene();
}
}
ViewProviderPage* vpp = getViewProviderPage(dv);
if (vpp) {
return vpp->getQGSPage();
}
return graphicsScene;
return nullptr;
}
MDIViewPage* QGIView::getMDIViewPage() const
{
MDIViewPage* mdi = nullptr;
if (getViewObject() != nullptr) {
TechDraw::DrawPage* page = getViewObject()->findParentPage();
if (page != nullptr) {
Gui::Document* activeGui = Gui::Application::Instance->getDocument(page->getDocument());
Gui::ViewProvider* vp = activeGui->getViewProvider(page);
ViewProviderPage* vpp = dynamic_cast<ViewProviderPage*>(vp);
if (vpp != nullptr) {
mdi = vpp->getMDIViewPage();
}
}
if (!getViewObject()) {
return nullptr;
}
return mdi;
ViewProviderPage* vpp = getViewProviderPage(getViewObject());
if (vpp) {
return vpp->getMDIViewPage();
}
return nullptr;
}
ViewProviderPage* QGIView::getViewProviderPage(TechDraw::DrawView* dv)
{
if (!dv) {
return nullptr;
}
TechDraw::DrawPage* page = dv->findParentPage();
if (!page) {
return nullptr;
}
Gui::Document* activeGui = Gui::Application::Instance->getDocument(page->getDocument());
if (!activeGui) {
return nullptr;
}
return dynamic_cast<ViewProviderPage*>(activeGui->getViewProvider(page));
}
//remove a child of this from scene while keeping scene indexes valid

View File

@@ -37,7 +37,6 @@
#include <Base/Parameter.h>
#include <Base/Vector3D.h>
QT_BEGIN_NAMESPACE
class QGraphicsScene;
class QGraphicsSceneMouseEvent;
@@ -62,6 +61,7 @@ namespace TechDrawGui
{
class QGSPage;
class QGVPage;
class ViewProviderPage;
class QGCustomBorder;
class QGCustomLabel;
class QGCustomText;
@@ -90,6 +90,8 @@ public:
const std::string getViewNameAsString() const;
void setViewFeature(TechDraw::DrawView *obj);
TechDraw::DrawView * getViewObject() const;
MDIViewPage* getMDIViewPage() const;
double getScale();
virtual bool getFrameState();
@@ -131,8 +133,9 @@ public:
virtual void setSettingColor(QColor c) { m_colSetting = c; }
static Gui::ViewProvider* getViewProvider(App::DocumentObject* obj);
static QGVPage* getGraphicsView(TechDraw::DrawView* dv);
static QGSPage* getGraphicsScene(TechDraw::DrawView* dv);
static ViewProviderPage* getViewProviderPage(TechDraw::DrawView* dv);
static QGVPage* getQGVPage(TechDraw::DrawView* dv);
static QGSPage* getQGSPage(TechDraw::DrawView* dv);
static int calculateFontPixelSize(double sizeInMillimetres);
static int calculateFontPixelWidth(const QFont &font);
static const double DefaultFontSizeInMM;
@@ -141,8 +144,6 @@ public:
static double getPrefFontSize();
static double getDimFontSize();
MDIViewPage* getMDIViewPage() const;
virtual void removeChild(QGIView* child);
virtual void addArbitraryItem(QGraphicsItem* qgi);

View File

@@ -24,6 +24,8 @@
#ifndef DRAWINGGUI_QGRAPHICSITEMVIEWANNOTATION_H
#define DRAWINGGUI_QGRAPHICSITEMVIEWANNOTATION_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include "QGIView.h"
namespace TechDraw {

View File

@@ -23,6 +23,8 @@
#ifndef DRAWINGGUI_QGRAPHICSITEMCLIP_H
#define DRAWINGGUI_QGRAPHICSITEMCLIP_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include "QGIView.h"
namespace TechDrawGui

View File

@@ -23,6 +23,8 @@
#ifndef _DRAWINGGUI_QGRAPHICSITEMVIEWCOLLECTION_H
#define _DRAWINGGUI_QGRAPHICSITEMVIEWCOLLECTION_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include "QGIView.h"
QT_BEGIN_NAMESPACE

View File

@@ -23,6 +23,8 @@
#ifndef DRAWINGGUI_QGRAPHICSITEMVIEWIMAGE_H
#define DRAWINGGUI_QGRAPHICSITEMVIEWIMAGE_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include "QGIView.h"
namespace TechDraw {

View File

@@ -23,6 +23,8 @@
#ifndef DRAWINGGUI_QGRAPHICSITEMVIEWSECTION_H
#define DRAWINGGUI_QGRAPHICSITEMVIEWSECTION_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include "QGIViewPart.h"
namespace TechDrawGui

View File

@@ -23,6 +23,8 @@
#ifndef DRAWINGGUI_QGRAPHICSITEMVIEWSPREADSHEET_H
#define DRAWINGGUI_QGRAPHICSITEMVIEWSPREADSHEET_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include "QGIViewSymbol.h"
namespace TechDraw {

View File

@@ -28,6 +28,8 @@
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <QObject>
#include "QGCustomText.h"
QT_BEGIN_NAMESPACE

View File

@@ -289,7 +289,7 @@ QGVPage::~QGVPage()
void QGVPage::centerOnPage(void)
{
centerOn(m_vpPage->getGraphicsScene()->getTemplateCenter());
centerOn(m_vpPage->getQGSPage()->getTemplateCenter());
}
void QGVPage::initNavigationStyle()

View File

@@ -26,6 +26,7 @@
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <memory>
#include <QGraphicsView>
#include <QLabel>
#include <QPainterPath>

View File

@@ -23,6 +23,8 @@
#ifndef TECHDRAWGUI_TASKACTIVEVIEW_H
#define TECHDRAWGUI_TASKACTIVEVIEW_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Gui/TaskView/TaskDialog.h>
#include <Gui/TaskView/TaskView.h>

View File

@@ -24,6 +24,8 @@
#ifndef GUI_TASKVIEW_TASKBALLOON_H
#define GUI_TASKVIEW_TASKBALLOON_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Gui/TaskView/TaskDialog.h>
#include <Gui/TaskView/TaskView.h>

View File

@@ -23,6 +23,8 @@
#ifndef TECHDRAWGUI_TASKCENTERLINE_H
#define TECHDRAWGUI_TASKCENTERLINE_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Gui/TaskView/TaskDialog.h>
#include <Gui/TaskView/TaskView.h>

View File

@@ -23,6 +23,8 @@
#ifndef TECHDRAWGUI_TASKCOSVERTEX_H
#define TECHDRAWGUI_TASKCOSVERTEX_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Gui/TaskView/TaskDialog.h>
#include <Gui/TaskView/TaskView.h>

View File

@@ -23,6 +23,8 @@
#ifndef TECHDRAWGUI_TASKCOSMETICLINE_H
#define TECHDRAWGUI_TASKCOSMETICLINE_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Base/Vector3D.h>
#include <Gui/TaskView/TaskDialog.h>
#include <Gui/TaskView/TaskView.h>

View File

@@ -23,6 +23,8 @@
#ifndef TECHDRAWGUI_TASKCUSTOMIZEFORMAT_H
#define TECHDRAWGUI_TASKCUSTOMIZEFORMAT_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Gui/TaskView/TaskDialog.h>
#include <Gui/TaskView/TaskView.h>

View File

@@ -23,6 +23,8 @@
#ifndef TECHDRAWGUI_TASKDETAIL_H
#define TECHDRAWGUI_TASKDETAIL_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Base/Vector3D.h>
#include <Gui/TaskView/TaskDialog.h>
#include <Gui/TaskView/TaskView.h>

View File

@@ -23,6 +23,8 @@
#ifndef GUI_TASKVIEW_TASKDIMENSION_H
#define GUI_TASKVIEW_TASKDIMENSION_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Gui/TaskView/TaskDialog.h>
#include <Gui/TaskView/TaskView.h>

View File

@@ -23,6 +23,8 @@
#ifndef GUI_TASKVIEW_TASKGEOMHATCH_H
#define GUI_TASKVIEW_TASKGEOMHATCH_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Gui/TaskView/TaskDialog.h>
#include <Gui/TaskView/TaskView.h>

View File

@@ -24,6 +24,8 @@
#ifndef GUI_TASKVIEW_TASKHATCH_H
#define GUI_TASKVIEW_TASKHATCH_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <App/Material.h>
#include <Gui/TaskView/TaskDialog.h>
#include <Gui/TaskView/TaskView.h>

View File

@@ -23,6 +23,8 @@
#ifndef TECHDRAWGUI_TASKTEXTLEADER_H
#define TECHDRAWGUI_TASKTEXTLEADER_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Base/Vector3D.h>
#include <Gui/TaskView/TaskDialog.h>
#include <Gui/TaskView/TaskView.h>

View File

@@ -23,6 +23,8 @@
#ifndef GUI_TASKVIEW_TASKLINEDECOR_H
#define GUI_TASKVIEW_TASKLINEDECOR_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Gui/TaskView/TaskDialog.h>
#include <Gui/TaskView/TaskView.h>

View File

@@ -22,6 +22,8 @@
#ifndef GUI_TASKVIEW_TASKLINKDIM_H
#define GUI_TASKVIEW_TASKLINKDIM_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Gui/TaskView/TaskDialog.h>
#include <Gui/TaskView/TaskView.h>

View File

@@ -23,6 +23,8 @@
#ifndef GUI_TASKVIEW_TASKVIEWGROUP_H
#define GUI_TASKVIEW_TASKVIEWGROUP_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Mod/TechDraw/TechDrawGlobal.h>

View File

@@ -19,12 +19,14 @@
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
//this file originally part of TechDraw workbench
//this file originally part of Drawing workbench
//migrated to TechDraw workbench 2022-01-26 by Wandererfan
#ifndef TECHDRAWGUI_TASKDIALOG
#define TECHDRAWGUI_TASKDIALOG
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <QWidget>

View File

@@ -116,7 +116,7 @@ TaskRichAnno::TaskRichAnno(TechDrawGui::ViewProviderRichAnno* annoVP) :
m_qgParent = nullptr;
if (m_baseFeat) {
m_qgParent = m_vpp->getGraphicsScene()->findQViewForDocObj(m_baseFeat);
m_qgParent = m_vpp->getQGSPage()->findQViewForDocObj(m_baseFeat);
}
ui->setupUi(this);
@@ -158,8 +158,8 @@ TaskRichAnno::TaskRichAnno(TechDraw::DrawView* baseFeat,
m_vpp = static_cast<ViewProviderPage*>(vp);
m_qgParent = nullptr;
if (m_vpp->getGraphicsScene()) {
m_qgParent = m_vpp->getGraphicsScene()->findQViewForDocObj(baseFeat);
if (m_vpp->getQGSPage()) {
m_qgParent = m_vpp->getQGSPage()->findQViewForDocObj(baseFeat);
}
ui->setupUi(this);

View File

@@ -23,6 +23,8 @@
#ifndef TECHDRAWGUI_TASKRICHANNO_H
#define TECHDRAWGUI_TASKRICHANNO_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Base/Vector3D.h>
#include <Gui/TaskView/TaskDialog.h>
#include <Gui/TaskView/TaskView.h>

View File

@@ -23,6 +23,8 @@
#ifndef GUI_TASKVIEW_TASKSECTIONVIEW_H
#define GUI_TASKVIEW_TASKSECTIONVIEW_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Gui/TaskView/TaskDialog.h>
#include <Gui/TaskView/TaskView.h>

View File

@@ -23,6 +23,8 @@
#ifndef TECHDRAWGUI_TASKSELECTLINEATTRIBUTES_H
#define TECHDRAWGUI_TASKSELECTLINEATTRIBUTES_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Gui/TaskView/TaskDialog.h>
#include <Gui/TaskView/TaskView.h>

View File

@@ -23,6 +23,8 @@
#ifndef TECHDRAWGUI_TASKSURFACEFINISHSYMBOLS_H
#define TECHDRAWGUI_TASKSURFACEFINISHSYMBOLS_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Gui/TaskView/TaskDialog.h>
#include <Gui/TaskView/TaskView.h>

View File

@@ -23,6 +23,8 @@
#ifndef TECHDRAWGUI_TASKWELDINGSYMBOL_H
#define TECHDRAWGUI_TASKWELDINGSYMBOL_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Gui/TaskView/TaskDialog.h>
#include <Gui/TaskView/TaskView.h>

View File

@@ -23,6 +23,8 @@
#ifndef DRAWINGGUI_TEMPLATETEXTFIELD_H
#define DRAWINGGUI_TEMPLATETEXTFIELD_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <QGraphicsRectItem>
namespace TechDraw {

View File

@@ -24,6 +24,8 @@
#ifndef DRAWINGGUI_VIEWPROVIDERANNOTATION_H
#define DRAWINGGUI_VIEWPROVIDERANNOTATION_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <Mod/TechDraw/App/DrawViewAnnotation.h>
#include "ViewProviderDrawingView.h"

View File

@@ -24,6 +24,8 @@
#ifndef DRAWINGGUI_VIEWPROVIDERBALLOON_H
#define DRAWINGGUI_VIEWPROVIDERBALLOON_H
#include <Mod/TechDraw/TechDrawGlobal.h>
#include <App/PropertyUnits.h>
#include <Mod/TechDraw/App/DrawViewBalloon.h>

Some files were not shown because too many files have changed in this diff Show More