Commit 691eb2a8 authored by agriche's avatar agriche

- Modify all paint buttons (close,reset,rotate,mark,resize buttons).

parent 411a0988
This diff is collapsed.
...@@ -28,13 +28,20 @@ ...@@ -28,13 +28,20 @@
#ifndef UBGRAPHICSPROTRACTOR_H_ #ifndef UBGRAPHICSPROTRACTOR_H_
#define UBGRAPHICSPROTRACTOR_H_ #define UBGRAPHICSPROTRACTOR_H_
#include <QtGui> //#include <QtGui>
#include <QtWidgets>
#include <QtWidgets/QGraphicsItem>
#include <QtWidgets/QGraphicsView>
#include <QtSvg> #include <QtSvg>
#include "core/UB.h" #include "core/UB.h"
#include "tools/UBAbstractDrawRuler.h" #include "tools/UBAbstractDrawRuler.h"
#include "domain/UBItem.h" #include "domain/UBItem.h"
#include "frameworks/UBGeometryUtils.h"
class UBGraphicsScene; class UBGraphicsScene;
class UBGraphicsProtractor : public UBAbstractDrawRuler, public QGraphicsEllipseItem, public UBItem class UBGraphicsProtractor : public UBAbstractDrawRuler, public QGraphicsEllipseItem, public UBItem
...@@ -76,6 +83,7 @@ class UBGraphicsProtractor : public UBAbstractDrawRuler, public QGraphicsEllipse ...@@ -76,6 +83,7 @@ class UBGraphicsProtractor : public UBAbstractDrawRuler, public QGraphicsEllipse
QRectF boundingRect() const; QRectF boundingRect() const;
void paintGraduations(QPainter *painter); void paintGraduations(QPainter *painter);
private: private:
// Helpers // Helpers
void paintButtons (QPainter *painter); void paintButtons (QPainter *painter);
...@@ -88,6 +96,7 @@ class UBGraphicsProtractor : public UBAbstractDrawRuler, public QGraphicsEllipse ...@@ -88,6 +96,7 @@ class UBGraphicsProtractor : public UBAbstractDrawRuler, public QGraphicsEllipse
QSizeF buttonSizeReference () const{return QSizeF(radius() / 10, mCloseSvgItem->boundingRect().height() * radius()/(10 * mCloseSvgItem->boundingRect().width()));} QSizeF buttonSizeReference () const{return QSizeF(radius() / 10, mCloseSvgItem->boundingRect().height() * radius()/(10 * mCloseSvgItem->boundingRect().width()));}
QSizeF markerSizeReference () const{return QSizeF(radius() / 10, mMarkerSvgItem->boundingRect().height() * radius()/(10 * mMarkerSvgItem->boundingRect().width()));} QSizeF markerSizeReference () const{return QSizeF(radius() / 10, mMarkerSvgItem->boundingRect().height() * radius()/(10 * mMarkerSvgItem->boundingRect().width()));}
QRectF resetButtonRect () const; QRectF resetButtonRect () const;
QRectF closeButtonRect () const; QRectF closeButtonRect () const;
QRectF resizeButtonRect () const; QRectF resizeButtonRect () const;
QRectF rotateButtonRect () const{return QRectF(buttonSizeReference().width() * 5.5, -buttonSizeReference().width() * 5, buttonSizeReference().width(), buttonSizeReference().width());} QRectF rotateButtonRect () const{return QRectF(buttonSizeReference().width() * 5.5, -buttonSizeReference().width() * 5, buttonSizeReference().width(), buttonSizeReference().width());}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment