Cleaning up compile warnings.

This commit is contained in:
Ian Rees
2016-05-29 15:25:30 +12:00
committed by wmayer
parent 88515df45a
commit 839a51ef08
10 changed files with 25 additions and 30 deletions

View File

@@ -77,7 +77,6 @@ protected:
private:
float strokeWidth;
float strokeScale;
QPen m_pen;
QColor m_colCurrent;
QColor m_colNormal;

View File

@@ -44,11 +44,7 @@
using namespace TechDrawGui;
QGIFace::QGIFace(int ref) :
reference(ref),
m_fill(Qt::NoBrush)
//m_fill(Qt::CrossPattern)
//m_fill(Qt::Dense3Pattern)
//m_fill(Qt::Dense6Pattern)
reference(ref)
{
setCacheMode(QGraphicsItem::NoCache);
setAcceptHoverEvents(true);

View File

@@ -71,7 +71,6 @@ private:
QColor m_colNormal;
QColor m_colPre;
QColor m_colSel;
Qt::BrushStyle m_fill;
};
} // namespace MDIViewPageGui

View File

@@ -47,13 +47,13 @@ public:
~QGIViewAnnotation();
enum {Type = QGraphicsItem::UserType + 120};
int type() const { return Type;}
int type() const override { return Type;}
void updateView(bool update = false);
void updateView(bool update = false) override;
void setViewAnnoFeature(TechDraw::DrawViewAnnotation *obj);
virtual void draw() override;
virtual QRectF boundingRect() const;
virtual QRectF boundingRect() const override;
Q_SIGNALS:
void hover(bool state);
@@ -61,7 +61,7 @@ Q_SIGNALS:
protected:
void drawAnnotation();
QVariant itemChange(GraphicsItemChange change, const QVariant &value);
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
protected:
QGCustomText *m_textItem;

View File

@@ -47,12 +47,12 @@ public:
~QGIViewClip();
enum {Type = QGraphicsItem::UserType + 123};
int type() const { return Type;}
int type() const override { return Type;}
virtual void updateView(bool update = false);
virtual void updateView(bool update = false) override;
virtual void draw() override;
virtual QRectF boundingRect() const;
virtual QRectF boundingRect() const override;
Q_SIGNALS:
void selected(bool state);
@@ -60,7 +60,7 @@ Q_SIGNALS:
protected:
void drawClip();
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
QGIView* getQGIVByName(std::string name);
private:

View File

@@ -43,6 +43,7 @@ namespace TechDrawGui
class QGIDatumLabel : public QGCustomText
{
Q_OBJECT
public:
explicit QGIDatumLabel(int ref = -1, QGraphicsScene *scene = 0 );
~QGIDatumLabel() {}
@@ -69,13 +70,11 @@ protected:
// Selection detection
QVariant itemChange(GraphicsItemChange change, const QVariant &value);
protected:
int reference;
double posX;
double posY;
private:
int strokeWidth;
QPen m_pen;
QColor m_colNormal;
QColor m_colPre;

View File

@@ -52,18 +52,18 @@ public:
~QGIViewPart();
enum {Type = QGraphicsItem::UserType + 102};
int type() const { return Type;}
int type() const override { return Type;}
void toggleCache(bool state);
void toggleCache(bool state) override;
void toggleCosmeticLines(bool state);
void toggleVertices(bool state);
void setViewPartFeature(TechDraw::DrawViewPart *obj);
virtual void updateView(bool update = false);
virtual void updateView(bool update = false) override;
void tidy();
virtual void draw() override;
virtual QRectF boundingRect() const;
virtual QRectF boundingRect() const override;
Q_SIGNALS:
void selected(bool state);
@@ -91,9 +91,8 @@ protected:
void drawViewPart();
QGIFace* drawFace(TechDrawGeometry::Face* f);
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
protected:
QColor m_colHid;
private:

View File

@@ -46,9 +46,9 @@ public:
~QGIViewSection();
virtual void draw() override;
void updateView(bool update = false);
void updateView(bool update = false) override;
enum {Type = QGraphicsItem::UserType + 108};
int type() const { return Type;}
int type() const override { return Type;}
Q_SIGNALS:
void dirty();

View File

@@ -50,13 +50,13 @@ public:
~QGIViewSymbol();
enum {Type = QGraphicsItem::UserType + 121};
int type() const { return Type;}
int type() const override { return Type;}
void updateView(bool update = false);
void updateView(bool update = false) override;
void setViewSymbolFeature(TechDraw::DrawViewSymbol *obj);
virtual void draw() override;
virtual QRectF boundingRect() const;
virtual QRectF boundingRect() const override;
Q_SIGNALS:
void hover(bool state);
@@ -66,7 +66,7 @@ protected:
bool load(QByteArray *svgString);
virtual void drawSvg();
void symbolToSvg(QString qs);
QVariant itemChange(GraphicsItemChange change, const QVariant &value);
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
QGCustomSvg *m_svgItem;
QSvgRenderer *m_svgRender;

View File

@@ -524,7 +524,10 @@ void QGVPage::saveSvg(QString filename)
// resize all textItem before export?
// postprocess generated file to mult all font-size attrib by 2.835 to get pts?
// duplicate all textItems and only show the appropriate one for screen/print vs export?
svgGen.setResolution(25.4000508); // mm/inch?? docs say this is DPI
// TODO: Was svgGen.setResolution(25.4000508); // mm/inch?? docs say this is DPI
svgGen.setResolution(25); // mm/inch?? docs say this is DPI
//svgGen.setResolution(600); // resulting page is ~12.5x9mm
//svgGen.setResolution(96); // page is ~78x55mm
svgGen.setTitle(QObject::tr("FreeCAD SVG Export"));