Replaces _ in parameter name with space

This commit is contained in:
amarjeet 2016-10-20 02:16:02 +05:30
parent 547715e599
commit e7426e665f
2 changed files with 9 additions and 5 deletions

View file

@ -10,6 +10,14 @@ ParameterVirtualWidget::~ParameterVirtualWidget(){
}
void ParameterVirtualWidget::setName(QString name) {
this->labelDescription->hide();
name.replace(QRegExp("([_]+)"), " ");
this->labelParameter->setText(name);
}
void ParameterVirtualWidget::setPrecision(double number){
decimalPrecision = 0;

View file

@ -24,11 +24,7 @@ protected:
int decimalPrecision;
virtual void setPrecision(double number);
virtual void setValue() = 0;
void setName(const QString& name) {
this->labelDescription->hide();
this->labelParameter->setText(name);
}
void setName(QString name);
void setDescription(const QString& description) {
if(!description.isEmpty()){
this->labelDescription->show();