[TD] use uniform naming for balloon outline
- in the prefs we call the outline "shape" and this describes it better than "symbol" (it is the shape of the bubble). The line end, however, has a symbol so "Shape" makes clear that is is something different.
This commit is contained in:
@@ -99,11 +99,11 @@ DrawViewBalloon::DrawViewBalloon(void)
|
||||
EndType.setEnums(ArrowPropEnum::ArrowTypeEnums);
|
||||
ADD_PROPERTY(EndType,(prefEnd()));
|
||||
|
||||
Symbol.setEnums(balloonTypeEnums);
|
||||
ADD_PROPERTY(Symbol,(prefShape()));
|
||||
Shape.setEnums(balloonTypeEnums);
|
||||
ADD_PROPERTY(Shape,(prefShape()));
|
||||
|
||||
ADD_PROPERTY_TYPE(SymbolScale,(1.0),"",(App::PropertyType)(App::Prop_None),"Balloon symbol scale");
|
||||
SymbolScale.setConstraints(&SymbolScaleRange);
|
||||
ADD_PROPERTY_TYPE(ShapeScale,(1.0),"",(App::PropertyType)(App::Prop_None),"Balloon shape scale");
|
||||
ShapeScale.setConstraints(&SymbolScaleRange);
|
||||
|
||||
ADD_PROPERTY_TYPE(TextWrapLen,(-1),"",(App::PropertyType)(App::Prop_None),"Text wrap length; -1 means no wrap");
|
||||
|
||||
@@ -127,7 +127,7 @@ void DrawViewBalloon::onChanged(const App::Property* prop)
|
||||
{
|
||||
if (!isRestoring()) {
|
||||
if ( (prop == &EndType) ||
|
||||
(prop == &Symbol) ||
|
||||
(prop == &Shape) ||
|
||||
(prop == &Text) ||
|
||||
(prop == &KinkLength) ) {
|
||||
requestPaint();
|
||||
|
||||
@@ -52,8 +52,8 @@ public:
|
||||
App::PropertyLink SourceView;
|
||||
App::PropertyString Text;
|
||||
App::PropertyEnumeration EndType;
|
||||
App::PropertyEnumeration Symbol;
|
||||
App::PropertyFloatConstraint SymbolScale;
|
||||
App::PropertyEnumeration Shape;
|
||||
App::PropertyFloatConstraint ShapeScale;
|
||||
App::PropertyDistance OriginX;
|
||||
App::PropertyDistance OriginY;
|
||||
App::PropertyBool OriginIsSet;
|
||||
|
||||
@@ -432,7 +432,7 @@ void QGIViewBalloon::updateBalloon(bool obtuse)
|
||||
balloonLabel->verticalSep = false;
|
||||
balloonLabel->seps.clear();
|
||||
|
||||
if (strcmp(balloon->Symbol.getValueAsString(), "Rectangle") == 0) {
|
||||
if (strcmp(balloon->Shape.getValueAsString(), "Rectangle") == 0) {
|
||||
while (labelText.contains(QString::fromUtf8("|"))) {
|
||||
int pos = labelText.indexOf(QString::fromUtf8("|"));
|
||||
labelText.replace(pos, 1, QString::fromUtf8(" "));
|
||||
@@ -606,9 +606,9 @@ void QGIViewBalloon::draw()
|
||||
Base::Vector3d kinkPoint;
|
||||
double kinkLength = Rez::guiX(balloon->KinkLength.getValue());
|
||||
|
||||
const char *balloonType = balloon->Symbol.getValueAsString();
|
||||
const char *balloonType = balloon->Shape.getValueAsString();
|
||||
|
||||
float scale = balloon->SymbolScale.getValue();
|
||||
float scale = balloon->ShapeScale.getValue();
|
||||
double offsetLR = 0;
|
||||
QPainterPath balloonPath;
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ TaskBalloon::TaskBalloon(QGIViewBalloon *parent) :
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
QString qs = QString::number(parent->dvBalloon->SymbolScale.getValue(), 'f', 2);
|
||||
QString qs = QString::number(parent->dvBalloon->ShapeScale.getValue(), 'f', 2);
|
||||
ui->inputScale->setText(qs);
|
||||
|
||||
std::string value = parent->dvBalloon->Text.getValue();
|
||||
@@ -80,7 +80,7 @@ TaskBalloon::TaskBalloon(QGIViewBalloon *parent) :
|
||||
i = parent->dvBalloon->EndType.getValue();
|
||||
ui->comboEndType->setCurrentIndex(i);
|
||||
|
||||
i = parent->dvBalloon->Symbol.getValue();
|
||||
i = parent->dvBalloon->Shape.getValue();
|
||||
ui->comboSymbol->setCurrentIndex(i);
|
||||
}
|
||||
|
||||
@@ -92,9 +92,9 @@ TaskBalloon::~TaskBalloon()
|
||||
bool TaskBalloon::accept()
|
||||
{
|
||||
m_parent->dvBalloon->Text.setValue(ui->inputValue->text().toUtf8().constData());
|
||||
m_parent->dvBalloon->SymbolScale.setValue(ui->inputScale->text().toDouble());
|
||||
m_parent->dvBalloon->ShapeScale.setValue(ui->inputScale->text().toDouble());
|
||||
m_parent->dvBalloon->EndType.setValue(ui->comboEndType->currentIndex());
|
||||
m_parent->dvBalloon->Symbol.setValue(ui->comboSymbol->currentIndex());
|
||||
m_parent->dvBalloon->Shape.setValue(ui->comboSymbol->currentIndex());
|
||||
m_parent->updateView(true);
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user