App::Property: add methods to get/set read-onlyness

This commit is contained in:
DeepSOIC
2016-08-08 21:47:45 +03:00
parent 2ed484c508
commit c74a7b5010
2 changed files with 20 additions and 6 deletions

View File

@@ -32,6 +32,7 @@
#include "ObjectIdentifier.h"
#include "PropertyContainer.h"
#include <Base/Exception.h>
#include "Application.h"
using namespace App;
@@ -110,6 +111,14 @@ void Property::touch()
StatusBits.set(0);
}
void Property::setReadOnly(bool readOnly)
{
unsigned long status = this->getStatus();
this->setStatus(App::Property::ReadOnly, readOnly);
if (status != this->getStatus())
App::GetApplication().signalChangePropertyEditor(*this);
}
void Property::hasSetValue(void)
{
if (father)