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 @@
#ifndef UBGRAPHICSPROTRACTOR_H_
#define UBGRAPHICSPROTRACTOR_H_
#include <QtGui>
//#include <QtGui>
#include <QtWidgets>
#include <QtWidgets/QGraphicsItem>
#include <QtWidgets/QGraphicsView>
#include <QtSvg>
#include "core/UB.h"
#include "tools/UBAbstractDrawRuler.h"
#include "domain/UBItem.h"
#include "frameworks/UBGeometryUtils.h"
class UBGraphicsScene;
class UBGraphicsProtractor : public UBAbstractDrawRuler, public QGraphicsEllipseItem, public UBItem
......@@ -74,7 +81,8 @@ class UBGraphicsProtractor : public UBAbstractDrawRuler, public QGraphicsEllipse
virtual void hoverMoveEvent (QGraphicsSceneHoverEvent *event);
virtual QPainterPath shape() const;
QRectF boundingRect() const;
void paintGraduations(QPainter *painter);
void paintGraduations(QPainter *painter);
private:
// Helpers
......@@ -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 markerSizeReference () const{return QSizeF(radius() / 10, mMarkerSvgItem->boundingRect().height() * radius()/(10 * mMarkerSvgItem->boundingRect().width()));}
QRectF resetButtonRect () const;
QRectF closeButtonRect () const;
QRectF resizeButtonRect () const;
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