Commit 2148d2c7 authored by Ralf Habacker's avatar Ralf Habacker

Add support for non resizable widgets and apply to combined state widgets

CCBUG:53369
parent 48af0104
......@@ -41,9 +41,8 @@
StateWidget::StateWidget(UMLScene * scene, StateType stateType, Uml::ID::Type id)
: UMLWidget(scene, WidgetBase::wt_State, id)
{
m_stateType = stateType;
setStateType(stateType);
m_drawVertical = true;
setAspectRatioMode();
m_Text = QLatin1String("State");
QSizeF size = minimumSize();
setSize(size.width(), size.height());
......@@ -421,6 +420,10 @@ void StateWidget::setStateType(StateType stateType)
{
m_stateType = stateType;
setAspectRatioMode();
if (stateType == Combined) {
setAutoResize(false);
setResizable(false);
}
}
/**
......@@ -570,7 +573,7 @@ bool StateWidget::loadFromXMI1(QDomElement & qElement)
m_Text = qElement.attribute(QLatin1String("statename"));
m_Doc = qElement.attribute(QLatin1String("documentation"));
QString type = qElement.attribute(QLatin1String("statetype"), QLatin1String("1"));
m_stateType = (StateType)type.toInt();
setStateType((StateType)type.toInt());
if (m_stateType == Combined) {
QString linkID = qElement.attribute(QLatin1String("diagramlinkid"));
m_diagramLinkId = Uml::ID::fromString(linkID);
......
......@@ -211,6 +211,14 @@ public:
m_fixedAspectRatio = state;
}
bool resizable() const {
return m_resizable;
}
void setResizable(bool state) {
m_resizable = state;
}
typedef enum {
FT_NORMAL = 0,
FT_BOLD = 1,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment