[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:
committed by
WandererFan
parent
2c047e361d
commit
aa1193559b
@@ -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();
|
||||
|
||||
|
||||
@@ -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')",
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#ifndef DRAWINGGUI_DLGPREFSTECHDRAWIMPADVANCED_H
|
||||
#define DRAWINGGUI_DLGPREFSTECHDRAWIMPADVANCED_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Gui/PropertyPage.h>
|
||||
#include <memory>
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#ifndef DRAWINGGUI_DLGPREFSTECHDRAWIMPANNOTATION_H
|
||||
#define DRAWINGGUI_DLGPREFSTECHDRAWIMPANNOTATION_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Gui/PropertyPage.h>
|
||||
#include <memory>
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#ifndef DRAWINGGUI_DLGPREFSTECHDRAWIMPCOLORS_H
|
||||
#define DRAWINGGUI_DLGPREFSTECHDRAWIMPCOLORS_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Gui/PropertyPage.h>
|
||||
#include <memory>
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#ifndef DRAWINGGUI_DLGPREFSTECHDRAWIMPDIMENSIONS_H
|
||||
#define DRAWINGGUI_DLGPREFSTECHDRAWIMPDIMENSIONS_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Gui/PropertyPage.h>
|
||||
#include <memory>
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#ifndef DRAWINGGUI_DLGPREFSTECHDRAWIMPGENERAL_H
|
||||
#define DRAWINGGUI_DLGPREFSTECHDRAWIMPGENERAL_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Gui/PropertyPage.h>
|
||||
#include <memory>
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#ifndef DRAWINGGUI_DLGPREFSTECHDRAWIMPHLR_H
|
||||
#define DRAWINGGUI_DLGPREFSTECHDRAWIMPHLR_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Gui/PropertyPage.h>
|
||||
#include <memory>
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#ifndef DRAWINGGUI_DLGPREFSTECHDRAWIMPSCALE_H
|
||||
#define DRAWINGGUI_DLGPREFSTECHDRAWIMPSCALE_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Gui/PropertyPage.h>
|
||||
#include <memory>
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#ifndef _Grabber3d_h_
|
||||
#define _Grabber3d_h_
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
class SoSeparator;
|
||||
class SoCamera;
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef DRAWINGGUI_QGRAPHICSITEMARROW_H
|
||||
#define DRAWINGGUI_QGRAPHICSITEMARROW_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Base/Vector3D.h>
|
||||
|
||||
# include "QGIPrimPath.h"
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef DRAWINGGUI_QGRAPHICSITEMCMARK_H
|
||||
#define DRAWINGGUI_QGRAPHICSITEMCMARK_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
# include "QGIVertex.h"
|
||||
|
||||
namespace TechDrawGui
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef DRAWINGGUI_QGICAPTION_H
|
||||
#define DRAWINGGUI_QGICAPTION_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include "QGCustomText.h"
|
||||
|
||||
namespace TechDrawGui
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef DRAWINGGUI_QGRAPHICSITEMDIMLINES_H
|
||||
#define DRAWINGGUI_QGRAPHICSITEMDIMLINES_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
# include "QGIPrimPath.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef DRAWINGGUI_QGRAPHICSITEMDRAWINGTEMPLATE_H
|
||||
#define DRAWINGGUI_QGRAPHICSITEMDRAWINGTEMPLATE_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include "QGITemplate.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef DRAWINGGUI_QGRAPHICSITEMEDGE_H
|
||||
#define DRAWINGGUI_QGRAPHICSITEMEDGE_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include "QGIPrimPath.h"
|
||||
|
||||
namespace TechDrawGui
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include "QGIViewCollection.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef DRAWINGGUI_QGRAPHICSITEMSVGTEMPLATE_H
|
||||
#define DRAWINGGUI_QGRAPHICSITEMSVGTEMPLATE_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QGraphicsScene;
|
||||
class QGraphicsSvgItem;
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef DRAWINGGUI_QGRAPHICSITEMVERTEX_H
|
||||
#define DRAWINGGUI_QGRAPHICSITEMVERTEX_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
# include "QGIPrimPath.h"
|
||||
|
||||
namespace TechDrawGui
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#ifndef DRAWINGGUI_QGRAPHICSITEMVIEWANNOTATION_H
|
||||
#define DRAWINGGUI_QGRAPHICSITEMVIEWANNOTATION_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include "QGIView.h"
|
||||
|
||||
namespace TechDraw {
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef DRAWINGGUI_QGRAPHICSITEMCLIP_H
|
||||
#define DRAWINGGUI_QGRAPHICSITEMCLIP_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include "QGIView.h"
|
||||
|
||||
namespace TechDrawGui
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef _DRAWINGGUI_QGRAPHICSITEMVIEWCOLLECTION_H
|
||||
#define _DRAWINGGUI_QGRAPHICSITEMVIEWCOLLECTION_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include "QGIView.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef DRAWINGGUI_QGRAPHICSITEMVIEWIMAGE_H
|
||||
#define DRAWINGGUI_QGRAPHICSITEMVIEWIMAGE_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include "QGIView.h"
|
||||
|
||||
namespace TechDraw {
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef DRAWINGGUI_QGRAPHICSITEMVIEWSECTION_H
|
||||
#define DRAWINGGUI_QGRAPHICSITEMVIEWSECTION_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include "QGIViewPart.h"
|
||||
|
||||
namespace TechDrawGui
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef DRAWINGGUI_QGRAPHICSITEMVIEWSPREADSHEET_H
|
||||
#define DRAWINGGUI_QGRAPHICSITEMVIEWSPREADSHEET_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include "QGIViewSymbol.h"
|
||||
|
||||
namespace TechDraw {
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include "QGCustomText.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@@ -289,7 +289,7 @@ QGVPage::~QGVPage()
|
||||
|
||||
void QGVPage::centerOnPage(void)
|
||||
{
|
||||
centerOn(m_vpPage->getGraphicsScene()->getTemplateCenter());
|
||||
centerOn(m_vpPage->getQGSPage()->getTemplateCenter());
|
||||
}
|
||||
|
||||
void QGVPage::initNavigationStyle()
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <QGraphicsView>
|
||||
#include <QLabel>
|
||||
#include <QPainterPath>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
#ifndef GUI_TASKVIEW_TASKVIEWGROUP_H
|
||||
#define GUI_TASKVIEW_TASKVIEWGROUP_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef DRAWINGGUI_TEMPLATETEXTFIELD_H
|
||||
#define DRAWINGGUI_TEMPLATETEXTFIELD_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <QGraphicsRectItem>
|
||||
|
||||
namespace TechDraw {
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef GUI_VIEWPROVIDERCOSMETICEXTENSION_H
|
||||
#define GUI_VIEWPROVIDERCOSMETICEXTENSION_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Gui/ViewProviderExtensionPython.h>
|
||||
|
||||
namespace TechDrawGui
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
#ifndef DRAWINGGUI_VIEWPROVIDERDIMENSION_H
|
||||
#define DRAWINGGUI_VIEWPROVIDERDIMENSION_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <App/PropertyUnits.h>
|
||||
|
||||
@@ -30,7 +32,6 @@
|
||||
|
||||
#include "ViewProviderDrawingView.h"
|
||||
|
||||
|
||||
namespace TechDrawGui {
|
||||
|
||||
class TechDrawGuiExport ViewProviderDimension : public ViewProviderDrawingView
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#ifndef DRAWINGGUI_VIEWPROVIDERCROSSHATCH_H
|
||||
#define DRAWINGGUI_VIEWPROVIDERCROSSHATCH_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <App/PropertyStandard.h>
|
||||
#include <Gui/ViewProviderDocumentObject.h>
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef DRAWINGGUI_VIEWPROVIDERIMAGE_H
|
||||
#define DRAWINGGUI_VIEWPROVIDERIMAGE_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Mod/TechDraw/App/DrawViewImage.h>
|
||||
|
||||
#include "ViewProviderDrawingView.h"
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#ifndef DRAWINGGUI_VIEWPROVIDERLEADER_H
|
||||
#define DRAWINGGUI_VIEWPROVIDERLEADER_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <App/PropertyUnits.h>
|
||||
|
||||
#include <Mod/TechDraw/App/DrawLeaderLine.h>
|
||||
|
||||
@@ -502,7 +502,7 @@ void ViewProviderPage::setGrid()
|
||||
pageWidth = dp->getPageWidth();
|
||||
pageHeight = dp->getPageHeight();
|
||||
}
|
||||
QGVPage* widget = getGraphicsView();
|
||||
QGVPage* widget = getQGVPage();
|
||||
if (widget) {
|
||||
if (ShowGrid.getValue()) {
|
||||
widget->showGrid(true);
|
||||
|
||||
@@ -96,8 +96,6 @@ public:
|
||||
void setFrameState(bool state);
|
||||
void toggleFrameState();
|
||||
void setTemplateMarkers(bool state);
|
||||
QGVPage *getGraphicsView() { return m_graphicsView; }
|
||||
QGSPage* getGraphicsScene() { return m_graphicsScene; }
|
||||
|
||||
bool canDelete(App::DocumentObject* obj) const override;
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
|
||||
#ifndef DRAWINGGUI_VIEWPROVIDERVIEWGROUP_H
|
||||
#define DRAWINGGUI_VIEWPROVIDERVIEWGROUP_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Mod/TechDraw/App/DrawProjGroup.h>
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
|
||||
#ifndef DRAWINGGUI_VIEWPROVIDERVIEWGROUPITEM_H
|
||||
#define DRAWINGGUI_VIEWPROVIDERVIEWGROUPITEM_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Mod/TechDraw/App/DrawProjGroupItem.h>
|
||||
|
||||
|
||||
@@ -110,8 +110,8 @@ void ViewProviderRichAnno::updateData(const App::Property* p)
|
||||
if (p == &(getViewObject()->AnnoParent)) {
|
||||
// Base::Console().Message("VPRA::updateData(AnnoParent) - vpp: %X\n", getViewProviderPage());
|
||||
if (getViewProviderPage() &&
|
||||
getViewProviderPage()->getGraphicsScene()) {
|
||||
getViewProviderPage()->getGraphicsScene()->setRichAnnoGroups();
|
||||
getViewProviderPage()->getQGSPage()) {
|
||||
getViewProviderPage()->getQGSPage()->setRichAnnoGroups();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#ifndef TECHDRAWGUI_VIEWPROVIDERRICHANNO_H
|
||||
#define TECHDRAWGUI_VIEWPROVIDERRICHANNO_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <App/PropertyUnits.h>
|
||||
#include <Mod/TechDraw/App/DrawRichAnno.h>
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef DRAWINGGUI_VIEWPROVIDERSPREADSHEET_H
|
||||
#define DRAWINGGUI_VIEWPROVIDERSPREADSHEET_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Mod/TechDraw/App/DrawViewSpreadsheet.h>
|
||||
|
||||
#include "ViewProviderSymbol.h"
|
||||
|
||||
@@ -76,7 +76,7 @@ void ViewProviderTemplate::updateData(const App::Property* prop)
|
||||
Gui::ViewProvider* vp = Gui::Application::Instance->getDocument(t->getDocument())->getViewProvider(page);
|
||||
TechDrawGui::ViewProviderPage* vpp = dynamic_cast<TechDrawGui::ViewProviderPage*>(vp);
|
||||
if (vpp) {
|
||||
vpp->getGraphicsScene()->attachTemplate(t);
|
||||
vpp->getQGSPage()->attachTemplate(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -135,7 +135,7 @@ QGITemplate* ViewProviderTemplate::getQTemplate()
|
||||
Gui::ViewProvider* vp = Gui::Application::Instance->getDocument(dt->getDocument())->getViewProvider(page);
|
||||
TechDrawGui::ViewProviderPage* vpp = dynamic_cast<TechDrawGui::ViewProviderPage*>(vp);
|
||||
if (vpp != nullptr) {
|
||||
return vpp->getGraphicsScene()->getTemplate();
|
||||
return vpp->getQGSPage()->getTemplate();
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
|
||||
#ifndef DRAWINGGUI_VIEWPROVIDERTEMPLATE_H
|
||||
#define DRAWINGGUI_VIEWPROVIDERTEMPLATE_H
|
||||
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
namespace TechDraw{
|
||||
class DrawTemplate;
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef DRAWINGGUI_VIEWPROVIDERTILE_H
|
||||
#define DRAWINGGUI_VIEWPROVIDERTILE_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Gui/ViewProviderDocumentObject.h>
|
||||
#include <Mod/TechDraw/App/DrawTile.h>
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#ifndef DRAWINGGUI_VIEWPROVIDERCLIP_H
|
||||
#define DRAWINGGUI_VIEWPROVIDERCLIP_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Mod/TechDraw/App/DrawViewClip.h>
|
||||
|
||||
#include "ViewProviderDrawingView.h"
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
|
||||
#ifndef DRAWINGGUI_VIEWPROVIDERVIEWPART_H
|
||||
#define DRAWINGGUI_VIEWPROVIDERVIEWPART_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <App/PropertyUnits.h>
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
#ifndef TECHDRAWGUI_VIEWPROVIDERVIEWSECTION_H
|
||||
#define TECHDRAWGUI_VIEWPROVIDERVIEWSECTION_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Mod/TechDraw/App/DrawViewSection.h>
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef DRAWINGGUI_VIEWPROVIDERWELD_H
|
||||
#define DRAWINGGUI_VIEWPROVIDERWELD_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Gui/ViewProviderFeature.h>
|
||||
|
||||
#include "ViewProviderDrawingView.h"
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
#ifndef TECHDRAW_WORKBENCH_H
|
||||
#define TECHDRAW_WORKBENCH_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <Gui/Workbench.h>
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#ifndef _MRICHTEXTEDIT_H_
|
||||
#define _MRICHTEXTEDIT_H_
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <QPointer>
|
||||
|
||||
#include "ui_mrichtextedit.h"
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef _MTEXTEDIT_H_
|
||||
#define _MTEXTEDIT_H_
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <QImage>
|
||||
#include <QMimeData>
|
||||
#include <QTextEdit>
|
||||
|
||||
Reference in New Issue
Block a user