Removed unused QObject inheritances.
This commit is contained in:
parent
b883434318
commit
cd96b40983
|
@ -31,16 +31,7 @@ set(TechDrawGui_MOC_HDRS
|
||||||
QGITemplate.h
|
QGITemplate.h
|
||||||
QGISVGTemplate.h
|
QGISVGTemplate.h
|
||||||
QGIDrawingTemplate.h
|
QGIDrawingTemplate.h
|
||||||
QGIView.h
|
|
||||||
QGIViewCollection.h
|
|
||||||
QGIViewDimension.h
|
QGIViewDimension.h
|
||||||
QGIProjGroup.h
|
|
||||||
QGIViewPart.h
|
|
||||||
QGIViewSection.h
|
|
||||||
QGIViewAnnotation.h
|
|
||||||
QGIViewSymbol.h
|
|
||||||
QGIViewSpreadsheet.h
|
|
||||||
QGIViewClip.h
|
|
||||||
TaskProjGroup.h
|
TaskProjGroup.h
|
||||||
DlgPrefsTechDrawImp.h
|
DlgPrefsTechDrawImp.h
|
||||||
TaskLinkDim.h
|
TaskLinkDim.h
|
||||||
|
|
|
@ -183,8 +183,13 @@ MDIViewPage::MDIViewPage(ViewProviderPage *pageVp, Gui::Document* doc, QWidget*
|
||||||
MDIViewPage::~MDIViewPage()
|
MDIViewPage::~MDIViewPage()
|
||||||
{
|
{
|
||||||
// Safely remove graphicview items that have built up TEMP SOLUTION
|
// Safely remove graphicview items that have built up TEMP SOLUTION
|
||||||
for(QList<QGIView*>::iterator it = deleteItems.begin(); it != deleteItems.end(); ++it) {
|
for(auto it : deleteItems) {
|
||||||
(*it)->deleteLater();
|
auto qObjPtr( dynamic_cast<QObject *>(it) );
|
||||||
|
if (qObjPtr) {
|
||||||
|
qObjPtr->deleteLater();
|
||||||
|
} else {
|
||||||
|
delete it;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
deleteItems.clear();
|
deleteItems.clear();
|
||||||
|
|
||||||
|
@ -400,7 +405,7 @@ void MDIViewPage::preSelectionChanged(const QPoint &pos)
|
||||||
,pos.y()
|
,pos.y()
|
||||||
,0));
|
,0));
|
||||||
} else {
|
} else {
|
||||||
QGIView *view = qobject_cast<QGIView *>(obj);
|
auto view( dynamic_cast<QGIView *>(obj) );
|
||||||
|
|
||||||
if(!view)
|
if(!view)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -222,4 +222,3 @@ void QGIProjGroup::drawBorder()
|
||||||
// Base::Console().Message("TRACE - QGIProjGroup::drawBorder - doing nothing!!\n");
|
// Base::Console().Message("TRACE - QGIProjGroup::drawBorder - doing nothing!!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "moc_QGIProjGroup.cpp"
|
|
||||||
|
|
|
@ -44,8 +44,6 @@ namespace TechDrawGui
|
||||||
|
|
||||||
class TechDrawGuiExport QGIProjGroup : public QGIViewCollection
|
class TechDrawGuiExport QGIProjGroup : public QGIViewCollection
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QGIProjGroup();
|
QGIProjGroup();
|
||||||
|
|
||||||
|
@ -60,9 +58,6 @@ public:
|
||||||
virtual void updateView(bool update = false);
|
virtual void updateView(bool update = false);
|
||||||
virtual void drawBorder(void);
|
virtual void drawBorder(void);
|
||||||
|
|
||||||
Q_SIGNALS:
|
|
||||||
void dirty();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool sceneEventFilter(QGraphicsItem* watched, QEvent *event);
|
virtual bool sceneEventFilter(QGraphicsItem* watched, QEvent *event);
|
||||||
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||||
|
|
|
@ -279,13 +279,11 @@ void QGIView::setViewFeature(TechDraw::DrawView *obj)
|
||||||
float x = obj->X.getValue();
|
float x = obj->X.getValue();
|
||||||
float y = obj->Y.getValue();
|
float y = obj->Y.getValue();
|
||||||
setPosition(x, y);
|
setPosition(x, y);
|
||||||
|
|
||||||
Q_EMIT dirty();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QGIView::toggleCache(bool state)
|
void QGIView::toggleCache(bool state)
|
||||||
{
|
{
|
||||||
// TODO: huh? IR //temp for devl. chaching was hiding problems WF
|
// temp for devl. chaching was hiding problems WF
|
||||||
setCacheMode((state)? NoCache : NoCache);
|
setCacheMode((state)? NoCache : NoCache);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -385,4 +383,3 @@ void _debugRect(char* text, QRectF r) {
|
||||||
r.left(),r.top(),r.right(),r.bottom());
|
r.left(),r.top(),r.right(),r.bottom());
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "moc_QGIView.cpp"
|
|
||||||
|
|
|
@ -41,10 +41,8 @@ namespace TechDrawGui
|
||||||
class QGCustomBorder;
|
class QGCustomBorder;
|
||||||
class QGCustomLabel;
|
class QGCustomLabel;
|
||||||
|
|
||||||
class TechDrawGuiExport QGIView : public QObject, public QGraphicsItemGroup
|
class TechDrawGuiExport QGIView : public QGraphicsItemGroup
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QGIView();
|
QGIView();
|
||||||
virtual ~QGIView() = default;
|
virtual ~QGIView() = default;
|
||||||
|
@ -79,9 +77,6 @@ public:
|
||||||
|
|
||||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * event);
|
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * event);
|
||||||
|
|
||||||
Q_SIGNALS:
|
|
||||||
void dirty();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||||
|
|
|
@ -168,4 +168,3 @@ QRectF QGIViewAnnotation::boundingRect() const
|
||||||
return childrenBoundingRect();
|
return childrenBoundingRect();
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "moc_QGIViewAnnotation.cpp"
|
|
||||||
|
|
|
@ -24,9 +24,6 @@
|
||||||
#ifndef DRAWINGGUI_QGRAPHICSITEMVIEWANNOTATION_H
|
#ifndef DRAWINGGUI_QGRAPHICSITEMVIEWANNOTATION_H
|
||||||
#define DRAWINGGUI_QGRAPHICSITEMVIEWANNOTATION_H
|
#define DRAWINGGUI_QGRAPHICSITEMVIEWANNOTATION_H
|
||||||
|
|
||||||
#include <QObject>
|
|
||||||
#include <QPainter>
|
|
||||||
|
|
||||||
#include "QGIView.h"
|
#include "QGIView.h"
|
||||||
#include "QGCustomText.h"
|
#include "QGCustomText.h"
|
||||||
|
|
||||||
|
@ -39,8 +36,6 @@ namespace TechDrawGui
|
||||||
|
|
||||||
class TechDrawGuiExport QGIViewAnnotation : public QGIView
|
class TechDrawGuiExport QGIViewAnnotation : public QGIView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
explicit QGIViewAnnotation();
|
explicit QGIViewAnnotation();
|
||||||
|
@ -57,21 +52,16 @@ public:
|
||||||
virtual void draw() override;
|
virtual void draw() override;
|
||||||
virtual QRectF boundingRect() const override;
|
virtual QRectF boundingRect() const override;
|
||||||
|
|
||||||
Q_SIGNALS:
|
|
||||||
void hover(bool state);
|
|
||||||
void selected(bool state);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void drawAnnotation();
|
void drawAnnotation();
|
||||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||||
|
|
||||||
protected:
|
|
||||||
QGCustomText *m_textItem;
|
QGCustomText *m_textItem;
|
||||||
QColor m_colNormal;
|
QColor m_colNormal;
|
||||||
QColor m_colSel;
|
QColor m_colSel;
|
||||||
QColor m_colPre;
|
QColor m_colPre;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace MDIViewPageGui
|
} // end namespace TechDrawGui
|
||||||
|
|
||||||
#endif // DRAWINGGUI_QGRAPHICSITEMVIEWANNOTATION_H
|
#endif // DRAWINGGUI_QGRAPHICSITEMVIEWANNOTATION_H
|
||||||
|
|
|
@ -190,4 +190,3 @@ QRectF QGIViewClip::boundingRect() const
|
||||||
return childrenBoundingRect();
|
return childrenBoundingRect();
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "moc_QGIViewClip.cpp"
|
|
||||||
|
|
|
@ -39,8 +39,6 @@ namespace TechDrawGui
|
||||||
|
|
||||||
class TechDrawGuiExport QGIViewClip : public QGIView
|
class TechDrawGuiExport QGIViewClip : public QGIView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
QGIViewClip();
|
QGIViewClip();
|
||||||
|
@ -54,10 +52,6 @@ public:
|
||||||
virtual void draw() override;
|
virtual void draw() override;
|
||||||
virtual QRectF boundingRect() const override;
|
virtual QRectF boundingRect() const override;
|
||||||
|
|
||||||
Q_SIGNALS:
|
|
||||||
void selected(bool state);
|
|
||||||
void dirty();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void drawClip();
|
void drawClip();
|
||||||
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||||
|
|
|
@ -80,4 +80,3 @@ void QGIViewCollection::updateView(bool update)
|
||||||
return QGIView::updateView(update);
|
return QGIView::updateView(update);
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "moc_QGIViewCollection.cpp"
|
|
||||||
|
|
|
@ -44,8 +44,6 @@ namespace TechDrawGui
|
||||||
|
|
||||||
class TechDrawGuiExport QGIViewCollection : public QGIView
|
class TechDrawGuiExport QGIViewCollection : public QGIView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QGIViewCollection();
|
QGIViewCollection();
|
||||||
~QGIViewCollection() = default;
|
~QGIViewCollection() = default;
|
||||||
|
@ -56,9 +54,6 @@ public:
|
||||||
virtual void updateView(bool update = false);
|
virtual void updateView(bool update = false);
|
||||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * event);
|
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * event);
|
||||||
|
|
||||||
Q_SIGNALS:
|
|
||||||
void dirty();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ private:
|
||||||
QColor m_colSel;
|
QColor m_colSel;
|
||||||
};
|
};
|
||||||
|
|
||||||
class TechDrawGuiExport QGIViewDimension : public QGIView
|
class TechDrawGuiExport QGIViewDimension : public QObject, public QGIView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|
|
@ -636,5 +636,3 @@ void _dumpPath(const char* text,QPainterPath path)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#include "moc_QGIViewPart.cpp"
|
|
||||||
|
|
|
@ -44,8 +44,6 @@ namespace TechDrawGui
|
||||||
|
|
||||||
class TechDrawGuiExport QGIViewPart : public QGIView
|
class TechDrawGuiExport QGIViewPart : public QGIView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
explicit QGIViewPart();
|
explicit QGIViewPart();
|
||||||
|
@ -65,10 +63,6 @@ public:
|
||||||
virtual void draw() override;
|
virtual void draw() override;
|
||||||
virtual QRectF boundingRect() const override;
|
virtual QRectF boundingRect() const override;
|
||||||
|
|
||||||
Q_SIGNALS:
|
|
||||||
void selected(bool state);
|
|
||||||
void dirty();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// Helper for pathArc()
|
/// Helper for pathArc()
|
||||||
/*!
|
/*!
|
||||||
|
|
|
@ -105,4 +105,3 @@ void QGIViewSection::updateView(bool update)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "moc_QGIViewSection.cpp"
|
|
||||||
|
|
|
@ -25,21 +25,11 @@
|
||||||
|
|
||||||
#include "QGIViewPart.h"
|
#include "QGIViewPart.h"
|
||||||
|
|
||||||
namespace TechDraw {
|
|
||||||
class DrawViewSection;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace TechDrawGeometry {
|
|
||||||
class BaseGeom;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace TechDrawGui
|
namespace TechDrawGui
|
||||||
{
|
{
|
||||||
|
|
||||||
class TechDrawGuiExport QGIViewSection : public QGIViewPart
|
class TechDrawGuiExport QGIViewSection : public QGIViewPart
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
QGIViewSection() = default;
|
QGIViewSection() = default;
|
||||||
|
@ -57,6 +47,6 @@ protected:
|
||||||
void drawSectionFace();
|
void drawSectionFace();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace MDIViewPageGui
|
} // end namespace TechDrawGui
|
||||||
|
|
||||||
#endif // DRAWINGGUI_QGRAPHICSITEMVIEWPART_H
|
#endif // #ifndef DRAWINGGUI_QGRAPHICSITEMVIEWSECTION_H
|
||||||
|
|
|
@ -22,24 +22,8 @@
|
||||||
|
|
||||||
#include "PreCompiled.h"
|
#include "PreCompiled.h"
|
||||||
#ifndef _PreComp_
|
#ifndef _PreComp_
|
||||||
#include <cmath>
|
|
||||||
#include <QGraphicsItem>
|
|
||||||
#include <QGraphicsScene>
|
|
||||||
#include <QGraphicsSceneHoverEvent>
|
|
||||||
#include <QMenu>
|
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QString>
|
|
||||||
#include <sstream>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <qmath.h>
|
|
||||||
|
|
||||||
#include <App/Application.h>
|
|
||||||
#include <App/Material.h>
|
|
||||||
#include <Base/Console.h>
|
|
||||||
#include <Base/Parameter.h>
|
|
||||||
|
|
||||||
#include "../App/DrawView.h"
|
|
||||||
#include "../App/DrawViewSpreadsheet.h"
|
#include "../App/DrawViewSpreadsheet.h"
|
||||||
#include "QGIViewSpreadsheet.h"
|
#include "QGIViewSpreadsheet.h"
|
||||||
|
|
||||||
|
@ -60,5 +44,3 @@ void QGIViewSpreadsheet::setViewFeature(TechDraw::DrawViewSpreadsheet *obj)
|
||||||
QGIView::setViewFeature(static_cast<TechDraw::DrawView *>(obj));
|
QGIView::setViewFeature(static_cast<TechDraw::DrawView *>(obj));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#include "moc_QGIViewSpreadsheet.cpp"
|
|
||||||
|
|
|
@ -23,15 +23,7 @@
|
||||||
#ifndef DRAWINGGUI_QGRAPHICSITEMVIEWSPREADSHEET_H
|
#ifndef DRAWINGGUI_QGRAPHICSITEMVIEWSPREADSHEET_H
|
||||||
#define DRAWINGGUI_QGRAPHICSITEMVIEWSPREADSHEET_H
|
#define DRAWINGGUI_QGRAPHICSITEMVIEWSPREADSHEET_H
|
||||||
|
|
||||||
#include <QObject>
|
|
||||||
#include <QPainter>
|
|
||||||
#include <QString>
|
|
||||||
#include <QByteArray>
|
|
||||||
#include <QSvgRenderer>
|
|
||||||
#include <QGraphicsSvgItem>
|
|
||||||
|
|
||||||
#include "QGIViewSymbol.h"
|
#include "QGIViewSymbol.h"
|
||||||
#include "QGIView.h"
|
|
||||||
|
|
||||||
namespace TechDraw {
|
namespace TechDraw {
|
||||||
class DrawViewSpreadsheet;
|
class DrawViewSpreadsheet;
|
||||||
|
@ -42,24 +34,17 @@ namespace TechDrawGui
|
||||||
|
|
||||||
class TechDrawGuiExport QGIViewSpreadsheet : public QGIViewSymbol
|
class TechDrawGuiExport QGIViewSpreadsheet : public QGIViewSymbol
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QGIViewSpreadsheet();
|
QGIViewSpreadsheet();
|
||||||
~QGIViewSpreadsheet() = default;
|
~QGIViewSpreadsheet() = default;
|
||||||
|
|
||||||
enum {Type = QGraphicsItem::UserType + 124};
|
enum {Type = QGraphicsItem::UserType + 124};
|
||||||
int type() const { return Type;}
|
int type() const override { return Type;}
|
||||||
|
|
||||||
//void updateView(bool update = false);
|
|
||||||
void setViewFeature(TechDraw::DrawViewSpreadsheet *obj);
|
void setViewFeature(TechDraw::DrawViewSpreadsheet *obj);
|
||||||
|
|
||||||
protected:
|
|
||||||
//void drawSvg();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace MDIViewPageGui
|
} // end namespace TechDrawGui
|
||||||
|
|
||||||
#endif // DRAWINGGUI_QGRAPHICSITEMVIEWSPREADSHEET_H
|
#endif // DRAWINGGUI_QGRAPHICSITEMVIEWSPREADSHEET_H
|
||||||
|
|
|
@ -148,4 +148,3 @@ bool QGIViewSymbol::load(QByteArray *svgBytes)
|
||||||
return(success);
|
return(success);
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "moc_QGIViewSymbol.cpp"
|
|
||||||
|
|
|
@ -43,8 +43,6 @@ namespace TechDrawGui
|
||||||
|
|
||||||
class TechDrawGuiExport QGIViewSymbol : public QGIView
|
class TechDrawGuiExport QGIViewSymbol : public QGIView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QGIViewSymbol();
|
QGIViewSymbol();
|
||||||
~QGIViewSymbol();
|
~QGIViewSymbol();
|
||||||
|
@ -58,10 +56,6 @@ public:
|
||||||
virtual void draw() override;
|
virtual void draw() override;
|
||||||
virtual QRectF boundingRect() const override;
|
virtual QRectF boundingRect() const override;
|
||||||
|
|
||||||
Q_SIGNALS:
|
|
||||||
void hover(bool state);
|
|
||||||
void selected(bool state);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool load(QByteArray *svgString);
|
bool load(QByteArray *svgString);
|
||||||
virtual void drawSvg();
|
virtual void drawSvg();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user