Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rectangle correction to have coincidence with point/line selected for the first point...
[modules/shaper.git]
/
src
/
ModuleBase
/
ModuleBase_WidgetBoolValue.cpp
diff --git
a/src/ModuleBase/ModuleBase_WidgetBoolValue.cpp
b/src/ModuleBase/ModuleBase_WidgetBoolValue.cpp
index af2e7ee0ef3b79879863c3f61a17f8470133a47d..f260939e540c9a26a2c522e1a48d85322eb5f9d7 100644
(file)
--- a/
src/ModuleBase/ModuleBase_WidgetBoolValue.cpp
+++ b/
src/ModuleBase/ModuleBase_WidgetBoolValue.cpp
@@
-1,10
+1,11
@@
// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-// File: ModuleBase_Widget
s.h
+// File: ModuleBase_Widget
BoolValue.cpp
// Created: 04 June 2014
// Author: Vitaly Smetannikov
#include <ModuleBase_WidgetBoolValue.h>
// Created: 04 June 2014
// Author: Vitaly Smetannikov
#include <ModuleBase_WidgetBoolValue.h>
+#include <ModuleBase_Tools.h>
#include <ModelAPI_AttributeBoolean.h>
#include <ModelAPI_Data.h>
#include <ModelAPI_AttributeBoolean.h>
#include <ModelAPI_Data.h>
@@
-28,10
+29,15
@@
ModuleBase_WidgetBoolValue::ModuleBase_WidgetBoolValue(QWidget* theParent,
QString aToolTip = QString::fromStdString(theData->widgetTooltip());
bool isChecked = theData->getBooleanAttribute(ATTR_DEFAULT, false);
QString aToolTip = QString::fromStdString(theData->widgetTooltip());
bool isChecked = theData->getBooleanAttribute(ATTR_DEFAULT, false);
- myCheckBox = new QCheckBox(aText, th
eParent
);
+ myCheckBox = new QCheckBox(aText, th
is
);
myCheckBox->setToolTip(aToolTip);
myCheckBox->setChecked(isChecked);
myCheckBox->setToolTip(aToolTip);
myCheckBox->setChecked(isChecked);
+ QVBoxLayout* aMainLayout = new QVBoxLayout(this);
+ ModuleBase_Tools::adjustMargins(aMainLayout);
+ aMainLayout->addWidget(myCheckBox);
+ setLayout(aMainLayout);
+
connect(myCheckBox, SIGNAL(toggled(bool)), this, SIGNAL(valuesChanged()));
}
connect(myCheckBox, SIGNAL(toggled(bool)), this, SIGNAL(valuesChanged()));
}
@@
-39,11
+45,6
@@
ModuleBase_WidgetBoolValue::~ModuleBase_WidgetBoolValue()
{
}
{
}
-QWidget* ModuleBase_WidgetBoolValue::getControl() const
-{
- return myCheckBox;
-}
-
bool ModuleBase_WidgetBoolValue::storeValueCustom() const
{
DataPtr aData = myFeature->data();
bool ModuleBase_WidgetBoolValue::storeValueCustom() const
{
DataPtr aData = myFeature->data();
@@
-53,7
+54,7
@@
bool ModuleBase_WidgetBoolValue::storeValueCustom() const
return true;
}
return true;
}
-bool ModuleBase_WidgetBoolValue::restoreValue()
+bool ModuleBase_WidgetBoolValue::restoreValue
Custom
()
{
DataPtr aData = myFeature->data();
std::shared_ptr<ModelAPI_AttributeBoolean> aRef = aData->boolean(attributeID());
{
DataPtr aData = myFeature->data();
std::shared_ptr<ModelAPI_AttributeBoolean> aRef = aData->boolean(attributeID());
@@
-71,3
+72,8
@@
QList<QWidget*> ModuleBase_WidgetBoolValue::getControls() const
aList.append(myCheckBox);
return aList;
}
aList.append(myCheckBox);
return aList;
}
+
+void ModuleBase_WidgetBoolValue::setHighlighted(bool)
+{
+ return;
+}