[TD]SymbolScale property to FloatConstaint
This commit is contained in:
@@ -62,6 +62,10 @@
|
||||
|
||||
using namespace TechDraw;
|
||||
|
||||
App::PropertyFloatConstraint::Constraints DrawViewBalloon::SymbolScaleRange = { Precision::Confusion(),
|
||||
std::numeric_limits<double>::max(),
|
||||
(1.0) };
|
||||
|
||||
//===========================================================================
|
||||
// DrawViewBalloon
|
||||
//===========================================================================
|
||||
@@ -75,30 +79,6 @@ using namespace TechDraw;
|
||||
|
||||
PROPERTY_SOURCE(TechDraw::DrawViewBalloon, TechDraw::DrawView)
|
||||
|
||||
//const char* DrawViewBalloon::ArrowTypeEnums[]= { "NONE",
|
||||
// "FILLED_ARROW",
|
||||
// "OPEN_ARROW",
|
||||
// "TICK",
|
||||
// "DOT",
|
||||
// "OPEN_CIRCLE",
|
||||
// "FORK",
|
||||
// "FILLED_TRIANGLE",
|
||||
// NULL};
|
||||
|
||||
//const char* DrawViewBalloon::endTypeEnums[]= { "FILLED_TRIANGLE",
|
||||
// "OPEN_ARROW",
|
||||
// "HASH_MARK",
|
||||
// "DOT",
|
||||
// "OPEN_CIRCLE",
|
||||
// "FORK",
|
||||
// "PYRAMID",
|
||||
// "NONE",
|
||||
// NULL};
|
||||
|
||||
////const char* DrawViewBalloon::endTypeEnums[]= {"Arrow",
|
||||
//// "Dot",
|
||||
//// NULL};
|
||||
|
||||
const char* DrawViewBalloon::balloonTypeEnums[]= {"Circular",
|
||||
"None",
|
||||
"Triangle",
|
||||
@@ -116,14 +96,14 @@ DrawViewBalloon::DrawViewBalloon(void)
|
||||
ADD_PROPERTY_TYPE(OriginY,(0),"",(App::PropertyType)(App::Prop_None),"Balloon origin y");
|
||||
ADD_PROPERTY_TYPE(OriginIsSet, (false), "",(App::PropertyType)(App::Prop_None),"Balloon origin is set");
|
||||
|
||||
// EndType.setEnums(endTypeEnums);
|
||||
EndType.setEnums(ArrowPropEnum::ArrowTypeEnums);
|
||||
ADD_PROPERTY(EndType,(prefEnd()));
|
||||
|
||||
Symbol.setEnums(balloonTypeEnums);
|
||||
ADD_PROPERTY(Symbol,(prefShape()));
|
||||
|
||||
ADD_PROPERTY_TYPE(SymbolScale,(1),"",(App::PropertyType)(App::Prop_None),"Balloon symbol scale");
|
||||
ADD_PROPERTY_TYPE(SymbolScale,(1.0),"",(App::PropertyType)(App::Prop_None),"Balloon symbol scale");
|
||||
SymbolScale.setConstraints(&SymbolScaleRange);
|
||||
|
||||
ADD_PROPERTY_TYPE(TextWrapLen,(-1),"",(App::PropertyType)(App::Prop_None),"Balloon symbol scale");
|
||||
|
||||
@@ -204,7 +184,6 @@ void DrawViewBalloon::handleChangedPropertyType(Base::XMLReader &reader, const c
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
short DrawViewBalloon::mustExecute() const
|
||||
{
|
||||
bool result = 0;
|
||||
|
||||
@@ -49,12 +49,11 @@ public:
|
||||
DrawViewBalloon();
|
||||
virtual ~DrawViewBalloon();
|
||||
|
||||
/* App::PropertyLink sourceView;*/
|
||||
App::PropertyLink SourceView;
|
||||
App::PropertyString Text;
|
||||
App::PropertyEnumeration EndType;
|
||||
App::PropertyEnumeration Symbol;
|
||||
App::PropertyFloat SymbolScale;
|
||||
App::PropertyFloatConstraint SymbolScale;
|
||||
App::PropertyDistance OriginX;
|
||||
App::PropertyDistance OriginY;
|
||||
App::PropertyBool OriginIsSet;
|
||||
@@ -76,8 +75,6 @@ public:
|
||||
}
|
||||
|
||||
static const char* balloonTypeEnums[];
|
||||
/* static const char* endTypeEnums[];*/
|
||||
static const char* ArrowTypeEnums[];
|
||||
|
||||
void handleXYLock(void) override;
|
||||
|
||||
@@ -98,10 +95,7 @@ protected:
|
||||
const char *PropName) override;
|
||||
|
||||
private:
|
||||
/* static const char* ArrowTypeEnums[];*/
|
||||
/* static const int ArrowCount;*/
|
||||
/* static const std::vector<std::string> ArrowTypeIcons;*/
|
||||
|
||||
static App::PropertyFloatConstraint::Constraints SymbolScaleRange;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user