DrawBalloon clean up
- resolve linker errors after merge - expose useful properties - resolve "ambiguous ancestor" messages after merge
This commit is contained in:
@@ -98,19 +98,19 @@ DrawViewBalloon::DrawViewBalloon(void)
|
||||
|
||||
ADD_PROPERTY_TYPE(TextWrapLen,(-1),"",(App::PropertyType)(App::Prop_None),"Balloon symbol scale");
|
||||
|
||||
OriginX.setStatus(App::Property::Hidden,false);
|
||||
OriginY.setStatus(App::Property::Hidden,false);
|
||||
// OriginX.setStatus(App::Property::Hidden,false);
|
||||
// OriginY.setStatus(App::Property::Hidden,false);
|
||||
OriginIsSet.setStatus(App::Property::Hidden,false);
|
||||
OriginIsSet.setStatus(App::Property::ReadOnly,true);
|
||||
|
||||
sourceView.setScope(App::LinkScope::Global);
|
||||
sourceView.setStatus(App::Property::Hidden,true);
|
||||
// sourceView.setStatus(App::Property::Hidden,true);
|
||||
Rotation.setStatus(App::Property::Hidden,true);
|
||||
ScaleType.setStatus(App::Property::Hidden,true);
|
||||
Scale.setStatus(App::Property::Hidden,true);
|
||||
// ScaleType.setStatus(App::Property::Hidden,true);
|
||||
// Scale.setStatus(App::Property::Hidden,true);
|
||||
Caption.setStatus(App::Property::Hidden,true);
|
||||
X.setStatus(App::Property::Hidden,true);
|
||||
Y.setStatus(App::Property::Hidden,true);
|
||||
// X.setStatus(App::Property::Hidden,true);
|
||||
// Y.setStatus(App::Property::Hidden,true);
|
||||
}
|
||||
|
||||
DrawViewBalloon::~DrawViewBalloon()
|
||||
|
||||
@@ -29,6 +29,7 @@ set(TechDrawGui_MOC_HDRS
|
||||
QGITemplate.h
|
||||
QGISVGTemplate.h
|
||||
QGIDrawingTemplate.h
|
||||
QGIView.h
|
||||
QGIViewDimension.h
|
||||
QGIViewBalloon.h
|
||||
TaskProjGroup.h
|
||||
|
||||
@@ -48,13 +48,11 @@
|
||||
#include <Gui/Document.h>
|
||||
#include <Gui/ViewProvider.h>
|
||||
|
||||
|
||||
#include "Rez.h"
|
||||
#include "ZVALUE.h"
|
||||
#include "DrawGuiUtil.h"
|
||||
#include "QGCustomBorder.h"
|
||||
#include "QGCustomLabel.h"
|
||||
#include "QGIView.h"
|
||||
#include "QGCustomBorder.h"
|
||||
#include "QGCustomLabel.h"
|
||||
#include "QGCustomText.h"
|
||||
@@ -71,11 +69,12 @@
|
||||
#include <Mod/TechDraw/App/DrawProjGroupItem.h>
|
||||
#include <Mod/TechDraw/App/DrawUtil.h>
|
||||
|
||||
#include "QGIView.h"
|
||||
|
||||
using namespace TechDrawGui;
|
||||
|
||||
const float labelCaptionFudge = 0.2f; // temp fiddle for devel
|
||||
|
||||
|
||||
QGIView::QGIView()
|
||||
:QGraphicsItemGroup(),
|
||||
viewObj(nullptr),
|
||||
@@ -625,3 +624,4 @@ void QGIView::makeMark(Base::Vector3d v)
|
||||
makeMark(v.x,v.y);
|
||||
}
|
||||
|
||||
#include <Mod/TechDraw/Gui/moc_QGIView.cpp>
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <QGraphicsItemGroup>
|
||||
#include <QPen>
|
||||
#include <QFont>
|
||||
#include <QObject>
|
||||
|
||||
#include <App/DocumentObject.h>
|
||||
#include <Base/Parameter.h>
|
||||
@@ -49,8 +50,9 @@ class MDIViewPage;
|
||||
class QGIViewClip;
|
||||
class QGCustomImage;
|
||||
|
||||
class TechDrawGuiExport QGIView : public QGraphicsItemGroup
|
||||
class TechDrawGuiExport QGIView : public QObject, public QGraphicsItemGroup
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QGIView();
|
||||
virtual ~QGIView();
|
||||
|
||||
@@ -152,18 +152,22 @@ void QGIViewBalloon::connect(QGIView *parent)
|
||||
|
||||
void QGIViewBalloon::parentViewMousePressed(QGIView *view, QPointF pos)
|
||||
{
|
||||
Q_UNUSED(view);
|
||||
//Base::Console().Message("%s::parentViewMousePressed from %s\n", this->getViewName(), view->getViewName());
|
||||
onAttachPointPicked(view, pos);
|
||||
}
|
||||
|
||||
void QGIViewBalloon::onAttachPointPicked(QGIView *view, QPointF pos)
|
||||
{
|
||||
Q_UNUSED(view);
|
||||
auto balloon( dynamic_cast<TechDraw::DrawViewBalloon*>(getViewObject()) );
|
||||
if( balloon == nullptr )
|
||||
return;
|
||||
|
||||
auto vp = static_cast<ViewProviderBalloon*>(getViewProvider(getViewObject()));
|
||||
if ( vp == nullptr ) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto balloon( dynamic_cast<TechDraw::DrawViewBalloon*>(getViewObject()) );
|
||||
if( balloon == nullptr )
|
||||
return;
|
||||
|
||||
auto bnd = boost::bind(&QGIViewBalloon::parentViewMousePressed, this, _1, _2);
|
||||
|
||||
if (balloon->OriginIsSet.getValue() == false) {
|
||||
|
||||
@@ -54,7 +54,7 @@ class QGIViewBalloon;
|
||||
|
||||
//*******************************************************************
|
||||
|
||||
class TechDrawGuiExport QGIViewBalloon : public QObject, public QGIView
|
||||
class TechDrawGuiExport QGIViewBalloon : public QGIView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -89,6 +89,7 @@ protected:
|
||||
void draw() override;
|
||||
virtual QVariant itemChange( GraphicsItemChange change,
|
||||
const QVariant &value ) override;
|
||||
void onAttachPointPicked(QGIView *view, QPointF pos);
|
||||
virtual void setSvgPens(void);
|
||||
virtual void setPens(void);
|
||||
QString getPrecision(void);
|
||||
|
||||
@@ -114,7 +114,7 @@ private:
|
||||
|
||||
//*******************************************************************
|
||||
|
||||
class TechDrawGuiExport QGIViewDimension : public QObject, public QGIView
|
||||
class TechDrawGuiExport QGIViewDimension : public QGIView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user