[TechDraw] Remove uneeded redefinitions of inherited functions
This commit is contained in:
committed by
WandererFan
parent
2f49a93292
commit
9905e17ba1
@@ -119,12 +119,3 @@ QPainterPath QGIEdge::shape() const
|
||||
outline = stroker.createStroke(path());
|
||||
return outline;
|
||||
}
|
||||
|
||||
void QGIEdge::paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget) {
|
||||
QStyleOptionGraphicsItem myOption(*option);
|
||||
myOption.state &= ~QStyle::State_Selected;
|
||||
|
||||
//~ painter->drawRect(boundingRect()); //good for debugging
|
||||
|
||||
QGIPrimPath::paint (painter, &myOption, widget);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,6 @@ public:
|
||||
int type() const override { return Type;}
|
||||
virtual QRectF boundingRect() const override;
|
||||
virtual QPainterPath shape() const override;
|
||||
virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) override;
|
||||
|
||||
int getProjIndex() const { return projIndex; }
|
||||
|
||||
|
||||
@@ -734,12 +734,3 @@ QPainterPath QGIFace::shape() const
|
||||
{
|
||||
return path();
|
||||
}
|
||||
|
||||
void QGIFace::paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget) {
|
||||
QStyleOptionGraphicsItem myOption(*option);
|
||||
myOption.state &= ~QStyle::State_Selected;
|
||||
// painter->drawRect(boundingRect()); //good for debugging
|
||||
|
||||
QGIPrimPath::paint (painter, &myOption, widget);
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,6 @@ public:
|
||||
int type() const override { return Type;}
|
||||
QRectF boundingRect() const override;
|
||||
QPainterPath shape() const override;
|
||||
void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) override;
|
||||
|
||||
public:
|
||||
enum fillMode {
|
||||
|
||||
@@ -69,14 +69,6 @@ QGIGhostHighlight::~QGIGhostHighlight()
|
||||
|
||||
}
|
||||
|
||||
QVariant QGIGhostHighlight::itemChange(GraphicsItemChange change, const QVariant &value)
|
||||
{
|
||||
if (change == ItemPositionHasChanged && scene()) {
|
||||
// nothing to do here?
|
||||
}
|
||||
return QGIHighlight::itemChange(change, value);
|
||||
}
|
||||
|
||||
void QGIGhostHighlight::mousePressEvent(QGraphicsSceneMouseEvent * event)
|
||||
{
|
||||
// Base::Console().Message("QGIGhostHighlight::mousePress() - %X\n", this);
|
||||
|
||||
@@ -52,7 +52,6 @@ Q_SIGNALS:
|
||||
void positionChange(QPointF p);
|
||||
|
||||
protected:
|
||||
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
|
||||
@@ -164,11 +164,6 @@ void QGILeaderLine::mousePressEvent(QGraphicsSceneMouseEvent * event)
|
||||
QGraphicsItem::mousePressEvent(event);
|
||||
}
|
||||
|
||||
//void QGILeaderLine::mouseMoveEvent(QGraphicsSceneMouseEvent * event)
|
||||
//{
|
||||
// QGraphicsItem::mouseMoveEvent(event);
|
||||
//}
|
||||
|
||||
//QGILL isn't draggable so skip QGIV::mouseRelease
|
||||
void QGILeaderLine::mouseReleaseEvent(QGraphicsSceneMouseEvent * event)
|
||||
{
|
||||
@@ -606,11 +601,6 @@ QRectF QGILeaderLine::boundingRect() const
|
||||
return childrenBoundingRect();
|
||||
}
|
||||
|
||||
QPainterPath QGILeaderLine::shape() const
|
||||
{
|
||||
return QGraphicsItemGroup::shape();
|
||||
}
|
||||
|
||||
void QGILeaderLine::paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget) {
|
||||
QStyleOptionGraphicsItem myOption(*option);
|
||||
myOption.state &= ~QStyle::State_Selected;
|
||||
|
||||
@@ -64,7 +64,6 @@ public:
|
||||
const QStyleOptionGraphicsItem * option,
|
||||
QWidget * widget = nullptr ) override;
|
||||
QRectF boundingRect() const override;
|
||||
QPainterPath shape() const override;
|
||||
|
||||
void drawBorder() override;
|
||||
void updateView(bool update = false) override;
|
||||
@@ -81,7 +80,6 @@ public:
|
||||
double getEdgeFuzz() const;
|
||||
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent * event) override;
|
||||
//void mouseMoveEvent(QGraphicsSceneMouseEvent * event) override;
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent * event) override;
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
|
||||
@@ -196,11 +196,6 @@ QGIView * QGIProjGroup::getAnchorQItem() const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void QGIProjGroup::updateView(bool update)
|
||||
{
|
||||
return QGIViewCollection::updateView(update);
|
||||
}
|
||||
|
||||
//QGIPG does not rotate. Only individual views rotate
|
||||
void QGIProjGroup::rotateView()
|
||||
{
|
||||
|
||||
@@ -33,6 +33,10 @@ class QGraphicsSceneMouseEvent;
|
||||
class QEvent;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace TechDraw {
|
||||
class DrawProjGroup;
|
||||
}
|
||||
|
||||
namespace TechDrawGui
|
||||
{
|
||||
|
||||
@@ -49,7 +53,6 @@ public:
|
||||
|
||||
void alignTo(QGIProjGroup *, const QString &alignment);
|
||||
|
||||
void updateView(bool update = false) override;
|
||||
void rotateView() override;
|
||||
|
||||
void drawBorder() override;
|
||||
@@ -65,7 +68,7 @@ protected:
|
||||
|
||||
private:
|
||||
/// Convenience function
|
||||
TechDraw::DrawProjGroup * getDrawView() const;
|
||||
TechDraw::DrawProjGroup* getDrawView() const;
|
||||
|
||||
QGraphicsItem* m_origin;
|
||||
QPoint mousePos;
|
||||
|
||||
@@ -120,16 +120,6 @@ QGIRichAnno::QGIRichAnno(QGraphicsItem* myParent,
|
||||
|
||||
}
|
||||
|
||||
QVariant QGIRichAnno::itemChange(GraphicsItemChange change, const QVariant &value)
|
||||
{
|
||||
if (change == ItemSelectedHasChanged && scene()) {
|
||||
//There's nothing special for QGIRA to do when selection changes!
|
||||
} else if(change == ItemSceneChange && scene()) {
|
||||
// nothing special!
|
||||
}
|
||||
return QGIView::itemChange(change, value);
|
||||
}
|
||||
|
||||
//void QGIRichAnno::select(bool state)
|
||||
//{
|
||||
// setSelected(state);
|
||||
@@ -303,11 +293,6 @@ QRectF QGIRichAnno::boundingRect() const
|
||||
return rect.adjusted(-10.,-10.,10.,10.);
|
||||
}
|
||||
|
||||
QPainterPath QGIRichAnno::shape() const
|
||||
{
|
||||
return QGraphicsItemGroup::shape();
|
||||
}
|
||||
|
||||
void QGIRichAnno::paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget) {
|
||||
QStyleOptionGraphicsItem myOption(*option);
|
||||
myOption.state &= ~QStyle::State_Selected;
|
||||
|
||||
@@ -64,7 +64,6 @@ public:
|
||||
const QStyleOptionGraphicsItem * option,
|
||||
QWidget * widget = nullptr ) override;
|
||||
virtual QRectF boundingRect() const override;
|
||||
virtual QPainterPath shape(void) const override;
|
||||
|
||||
virtual void drawBorder() override;
|
||||
virtual void updateView(bool update = false) override;
|
||||
@@ -86,8 +85,6 @@ public Q_SLOTS:
|
||||
|
||||
protected:
|
||||
virtual void draw() override;
|
||||
virtual QVariant itemChange( GraphicsItemChange change,
|
||||
const QVariant &value ) override;
|
||||
void setLineSpacing(int lineSpacing);
|
||||
double prefPointSize(void);
|
||||
QFont prefFont(void);
|
||||
|
||||
@@ -79,13 +79,6 @@ QGISVGTemplate::~QGISVGTemplate()
|
||||
delete m_svgRender;
|
||||
}
|
||||
|
||||
QVariant QGISVGTemplate::itemChange(GraphicsItemChange change,
|
||||
const QVariant &value)
|
||||
{
|
||||
return QGraphicsItemGroup::itemChange(change, value);
|
||||
}
|
||||
|
||||
|
||||
void QGISVGTemplate::openFile(const QFile &file)
|
||||
{
|
||||
Q_UNUSED(file);
|
||||
|
||||
@@ -66,7 +66,6 @@ protected:
|
||||
bool firstTime;
|
||||
QGraphicsSvgItem *m_svgItem;
|
||||
QSvgRenderer *m_svgRender;
|
||||
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||
}; // class QGISVGTemplate
|
||||
|
||||
}
|
||||
|
||||
@@ -52,11 +52,6 @@ QGITemplate::~QGITemplate()
|
||||
pageTemplate = nullptr;
|
||||
}
|
||||
|
||||
QVariant QGITemplate::itemChange(GraphicsItemChange change, const QVariant &value)
|
||||
{
|
||||
return QGraphicsItemGroup::itemChange(change, value);
|
||||
}
|
||||
|
||||
void QGITemplate::setTemplate(TechDraw::DrawTemplate *obj)
|
||||
{
|
||||
if (!obj)
|
||||
|
||||
@@ -64,7 +64,6 @@ public:
|
||||
virtual void draw() = 0;
|
||||
|
||||
protected:
|
||||
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||
TechDraw::DrawTemplate *pageTemplate;
|
||||
|
||||
std::vector<TemplateTextField *> textFields;
|
||||
|
||||
@@ -103,12 +103,6 @@ QGITile::~QGITile()
|
||||
|
||||
}
|
||||
|
||||
QVariant QGITile::itemChange(GraphicsItemChange change, const QVariant &value)
|
||||
{
|
||||
// Base::Console().Message("QGIT::itemChange(%d)\n", change);
|
||||
return QGIDecoration::itemChange(change, value);
|
||||
}
|
||||
|
||||
void QGITile::draw()
|
||||
{
|
||||
// Base::Console().Message("QGIT::draw()\n");
|
||||
@@ -390,16 +384,6 @@ QString QGITile::prefTextFont() const
|
||||
return Preferences::labelFontQString();
|
||||
}
|
||||
|
||||
void QGITile::paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget) {
|
||||
QStyleOptionGraphicsItem myOption(*option);
|
||||
myOption.state &= ~QStyle::State_Selected;
|
||||
|
||||
// painter->setPen(Qt::magenta);
|
||||
// painter->drawRect(boundingRect()); //good for debugging
|
||||
|
||||
QGIDecoration::paint (painter, &myOption, widget);
|
||||
}
|
||||
|
||||
QRectF QGITile::boundingRect() const
|
||||
{
|
||||
return childrenBoundingRect();
|
||||
|
||||
@@ -23,16 +23,15 @@
|
||||
#ifndef TECHDRAWGUI_QGITILE_H
|
||||
#define TECHDRAWGUI_QGITILE_H
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <QColor>
|
||||
#include <QFont>
|
||||
#include <QGraphicsColorizeEffect>
|
||||
#include <QPointF>
|
||||
|
||||
#include "QGCustomText.h"
|
||||
#include "QGCustomSvg.h"
|
||||
#include "QGIDecoration.h"
|
||||
|
||||
|
||||
namespace TechDraw {
|
||||
class DrawTile;
|
||||
class DrawTileWeld;
|
||||
@@ -40,6 +39,8 @@ class DrawTileWeld;
|
||||
|
||||
namespace TechDrawGui
|
||||
{
|
||||
class QGCustomSvg;
|
||||
class QGCustomText;
|
||||
class QGIWeldSymbol;
|
||||
|
||||
class TechDrawGuiExport QGITile : public QGIDecoration
|
||||
@@ -51,7 +52,6 @@ public:
|
||||
enum {Type = QGraphicsItem::UserType + 325};
|
||||
int type(void) const { return Type;}
|
||||
|
||||
virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr );
|
||||
virtual QRectF boundingRect() const;
|
||||
|
||||
void setTileTextLeft(std::string s);
|
||||
@@ -68,8 +68,6 @@ public:
|
||||
virtual void draw(void);
|
||||
|
||||
protected:
|
||||
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||
|
||||
QColor getTileColor(void) const;
|
||||
void setPrettyNormal();
|
||||
void setPrettyPre();
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <boost_signals2.hpp>
|
||||
|
||||
#include <QColor>
|
||||
#include <QFont>
|
||||
#include <QGraphicsItemGroup>
|
||||
|
||||
@@ -81,12 +81,6 @@ QGIViewAnnotation::QGIViewAnnotation()
|
||||
|
||||
}
|
||||
|
||||
|
||||
QVariant QGIViewAnnotation::itemChange(GraphicsItemChange change, const QVariant &value)
|
||||
{
|
||||
return QGIView::itemChange(change, value);
|
||||
}
|
||||
|
||||
void QGIViewAnnotation::setViewAnnoFeature(TechDraw::DrawViewAnnotation *obj)
|
||||
{
|
||||
// called from QGVPage. (once)
|
||||
|
||||
@@ -54,7 +54,6 @@ public:
|
||||
|
||||
protected:
|
||||
void drawAnnotation();
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
|
||||
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
|
||||
@@ -132,11 +132,6 @@ void QGIBalloonLabel::mousePressEvent(QGraphicsSceneMouseEvent * event)
|
||||
QGraphicsItem::mousePressEvent(event);
|
||||
}
|
||||
|
||||
void QGIBalloonLabel::mouseMoveEvent(QGraphicsSceneMouseEvent * event)
|
||||
{
|
||||
QGraphicsItem::mouseMoveEvent(event);
|
||||
}
|
||||
|
||||
void QGIBalloonLabel::mouseReleaseEvent(QGraphicsSceneMouseEvent * event)
|
||||
{
|
||||
if (QLineF(event->screenPos(), event->buttonDownScreenPos(Qt::LeftButton))
|
||||
@@ -348,25 +343,6 @@ QVariant QGIViewBalloon::itemChange(GraphicsItemChange change, const QVariant &v
|
||||
return QGIView::itemChange(change, value);
|
||||
}
|
||||
|
||||
//QGIViewBalloon does not behave the same as other QGIView derived classes
|
||||
//and so mouse events need to be ignored. Only the QGIBalloonLabel mouse events are relevant.
|
||||
void QGIViewBalloon::mousePressEvent(QGraphicsSceneMouseEvent * event)
|
||||
{
|
||||
// Base::Console().Message("QGIVB::mousePressEvent() - %s\n",getViewName());
|
||||
QGraphicsItem::mousePressEvent(event);
|
||||
}
|
||||
|
||||
void QGIViewBalloon::mouseMoveEvent(QGraphicsSceneMouseEvent * event)
|
||||
{
|
||||
QGraphicsItem::mouseMoveEvent(event);
|
||||
}
|
||||
|
||||
void QGIViewBalloon::mouseReleaseEvent(QGraphicsSceneMouseEvent * event)
|
||||
{
|
||||
// Base::Console().Message("QGIVB::mouseReleaseEvent() - %s\n",getViewName());
|
||||
QGraphicsItem::mouseReleaseEvent(event);
|
||||
}
|
||||
|
||||
//Set selection state for this and it's children
|
||||
void QGIViewBalloon::setGroupSelection(bool b)
|
||||
{
|
||||
|
||||
@@ -101,12 +101,10 @@ Q_SIGNALS:
|
||||
|
||||
protected:
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
// virtual void mouseReleaseEvent( QGraphicsSceneMouseEvent * event) override;
|
||||
|
||||
QGCustomText* m_labelText;
|
||||
QColor m_colNormal;
|
||||
@@ -163,10 +161,6 @@ public Q_SLOTS:
|
||||
void updateBalloon(bool obtuse = false);
|
||||
|
||||
protected:
|
||||
void mousePressEvent( QGraphicsSceneMouseEvent * event) override;
|
||||
void mouseMoveEvent( QGraphicsSceneMouseEvent * event) override;
|
||||
void mouseReleaseEvent( QGraphicsSceneMouseEvent * event) override;
|
||||
|
||||
void draw() override;
|
||||
void drawBalloon(bool dragged = false);
|
||||
QVariant itemChange( GraphicsItemChange change,
|
||||
|
||||
@@ -61,12 +61,6 @@ QGIViewClip::QGIViewClip()
|
||||
m_frame->setRect(0.,0.,Rez::guiX(5.),Rez::guiX(5.));
|
||||
}
|
||||
|
||||
|
||||
QVariant QGIViewClip::itemChange(GraphicsItemChange change, const QVariant &value)
|
||||
{
|
||||
return QGIView::itemChange(change, value);
|
||||
}
|
||||
|
||||
void QGIViewClip::updateView(bool update)
|
||||
{
|
||||
auto viewClip( dynamic_cast<TechDraw::DrawViewClip *>(getViewObject()) );
|
||||
|
||||
@@ -48,7 +48,6 @@ public:
|
||||
|
||||
protected:
|
||||
void drawClip();
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
|
||||
private:
|
||||
QGCustomRect* m_frame;
|
||||
|
||||
@@ -52,21 +52,3 @@ QGIViewCollection::QGIViewCollection()
|
||||
setAcceptHoverEvents(true);
|
||||
setFlag(QGraphicsItem::ItemIsMovable, true);
|
||||
}
|
||||
|
||||
|
||||
QVariant QGIViewCollection::itemChange(GraphicsItemChange change, const QVariant &value)
|
||||
{
|
||||
|
||||
return QGIView::itemChange(change, value);
|
||||
}
|
||||
|
||||
void QGIViewCollection::mouseReleaseEvent(QGraphicsSceneMouseEvent * event)
|
||||
{
|
||||
//TODO: should MouseMove logic go here instead of QGIView?
|
||||
QGIView::mouseReleaseEvent(event);
|
||||
}
|
||||
|
||||
void QGIViewCollection::updateView(bool update)
|
||||
{
|
||||
return QGIView::updateView(update);
|
||||
}
|
||||
|
||||
@@ -41,13 +41,6 @@ public:
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 110};
|
||||
int type() const override { return Type;}
|
||||
|
||||
void updateView(bool update = false) override;
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent * event) override;
|
||||
|
||||
protected:
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
|
||||
};
|
||||
|
||||
} // namespace MDIViewPageGui
|
||||
|
||||
@@ -168,11 +168,6 @@ void QGIDatumLabel::mousePressEvent(QGraphicsSceneMouseEvent * event)
|
||||
QGraphicsItem::mousePressEvent(event);
|
||||
}
|
||||
|
||||
void QGIDatumLabel::mouseMoveEvent(QGraphicsSceneMouseEvent * event)
|
||||
{
|
||||
QGraphicsItem::mouseMoveEvent(event);
|
||||
}
|
||||
|
||||
void QGIDatumLabel::mouseReleaseEvent(QGraphicsSceneMouseEvent * event)
|
||||
{
|
||||
// Base::Console().Message("QGIDL::mouseReleaseEvent()\n");
|
||||
|
||||
@@ -116,12 +116,10 @@ Q_SIGNALS:
|
||||
|
||||
protected:
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) override;
|
||||
// virtual void mouseReleaseEvent( QGraphicsSceneMouseEvent * event) override;
|
||||
|
||||
QGCustomText* m_dimText;
|
||||
QGCustomText* m_tolTextOver;
|
||||
|
||||
@@ -76,12 +76,6 @@ QGIViewImage::~QGIViewImage()
|
||||
// m_imageItem belongs to this group and will be deleted by Qt
|
||||
}
|
||||
|
||||
QVariant QGIViewImage::itemChange(GraphicsItemChange change, const QVariant &value)
|
||||
{
|
||||
|
||||
return QGIView::itemChange(change, value);
|
||||
}
|
||||
|
||||
void QGIViewImage::setViewImageFeature(TechDraw::DrawViewImage *obj)
|
||||
{
|
||||
setViewFeature(static_cast<TechDraw::DrawView *>(obj));
|
||||
|
||||
@@ -51,7 +51,6 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void drawImage();
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
|
||||
QGCustomImage* m_imageItem;
|
||||
QGCustomClip* m_cliparea;
|
||||
|
||||
@@ -76,12 +76,6 @@ QGIViewSymbol::~QGIViewSymbol()
|
||||
// m_svgItem belongs to this group and will be deleted by Qt
|
||||
}
|
||||
|
||||
QVariant QGIViewSymbol::itemChange(GraphicsItemChange change, const QVariant &value)
|
||||
{
|
||||
|
||||
return QGIView::itemChange(change, value);
|
||||
}
|
||||
|
||||
void QGIViewSymbol::setViewSymbolFeature(TechDraw::DrawViewSymbol *obj)
|
||||
{
|
||||
// called from QGVPage. (once)
|
||||
|
||||
@@ -57,7 +57,6 @@ public:
|
||||
protected:
|
||||
virtual void drawSvg();
|
||||
void symbolToSvg(QByteArray qba);
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
|
||||
QGDisplayArea* m_displayArea;
|
||||
QGCustomSvg *m_svgItem;
|
||||
|
||||
@@ -54,19 +54,6 @@ QVariant QGMText::itemChange(GraphicsItemChange change, const QVariant &value)
|
||||
return QGCustomText::itemChange(change, value);
|
||||
}
|
||||
|
||||
void QGMText::mousePressEvent(QGraphicsSceneMouseEvent * event)
|
||||
{
|
||||
// if(scene() && this == scene()->mouseGrabberItem()) { //why would we get even if not mousegrabber?
|
||||
// Q_EMIT dragging();
|
||||
// }
|
||||
QGCustomText::mousePressEvent(event);
|
||||
}
|
||||
|
||||
void QGMText::mouseMoveEvent(QGraphicsSceneMouseEvent * event)
|
||||
{
|
||||
QGCustomText::mouseMoveEvent(event);
|
||||
}
|
||||
|
||||
void QGMText::mouseReleaseEvent(QGraphicsSceneMouseEvent * event)
|
||||
{
|
||||
if(scene() && this == scene()->mouseGrabberItem()) {
|
||||
@@ -78,18 +65,12 @@ void QGMText::mouseReleaseEvent(QGraphicsSceneMouseEvent * event)
|
||||
void QGMText::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
Q_EMIT hover(true);
|
||||
if (!isSelected()) {
|
||||
setPrettyPre();
|
||||
}
|
||||
QGCustomText::hoverEnterEvent(event);
|
||||
}
|
||||
|
||||
void QGMText::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
Q_EMIT hover(false);
|
||||
if (!isSelected()) {
|
||||
setPrettyNormal();
|
||||
}
|
||||
QGCustomText::hoverLeaveEvent(event);
|
||||
}
|
||||
|
||||
|
||||
@@ -69,8 +69,6 @@ Q_SIGNALS:
|
||||
|
||||
protected:
|
||||
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
|
||||
|
||||
@@ -106,11 +106,6 @@ QGTracker::~QGTracker()
|
||||
{
|
||||
}
|
||||
|
||||
QVariant QGTracker::itemChange(GraphicsItemChange change, const QVariant &value)
|
||||
{
|
||||
return QGIPrimPath::itemChange(change, value);
|
||||
}
|
||||
|
||||
void QGTracker::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||
{
|
||||
QPointF myScenePos = event->scenePos();
|
||||
@@ -157,16 +152,6 @@ void QGTracker::mouseDoubleClickEvent(QGraphicsSceneMouseEvent * event)
|
||||
QGIPrimPath::mouseDoubleClickEvent(event);
|
||||
}
|
||||
|
||||
void QGTracker::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
QGIPrimPath::hoverEnterEvent(event);
|
||||
}
|
||||
|
||||
void QGTracker::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
QGIPrimPath::hoverLeaveEvent(event);
|
||||
}
|
||||
|
||||
void QGTracker::hoverMoveEvent(QGraphicsSceneHoverEvent* event)
|
||||
{
|
||||
if (!m_sleep) {
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <Mod/TechDraw/TechDrawGlobal.h>
|
||||
|
||||
#include <QGraphicsItem>
|
||||
#include <QPen>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QPainter;
|
||||
@@ -85,12 +86,11 @@ protected:
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
void hoverMoveEvent(QGraphicsSceneHoverEvent* event) override;
|
||||
void keyPressEvent(QKeyEvent * event) override;
|
||||
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
|
||||
void getPickedQGIV(QPointF pos);
|
||||
|
||||
QColor getTrackerColor();
|
||||
|
||||
Reference in New Issue
Block a user