[Uml-devel] branches/work/soc-umbrello/umbrello/widgets
Ralf Habacker
ralf.habacker at gmail.com
Tue Apr 3 06:47:21 UTC 2012
SVN commit 1288056 by habacker:
Reduced differences to trunk.
M +4 -4 umlwidget.cpp
M +9 -9 umlwidget.h
--- branches/work/soc-umbrello/umbrello/widgets/umlwidget.cpp #1288055:1288056
@@ -150,9 +150,9 @@
*
* @param size The new size (minimumSize < size < maximumSize)
*/
-void UMLWidget::setSize(const QSizeF &size)
+void UMLWidget::setSize(const UMLSceneSize &size)
{
- const QSizeF oldSize = m_size;
+ const UMLSceneSize oldSize = m_size;
// Satisfy (minimumSize < size < maximumSize) requirement.
m_size = minimumSize().expandedTo(size);
@@ -310,7 +310,7 @@
m_loadData.insert("id", qElement.attribute("xmi.id", "-1"));
- QSizeF size;
+ UMLSceneSize size;
size.setWidth(qElement.attribute("width", "0").toDouble());
size.setHeight(qElement.attribute("height", "0").toDouble());
m_loadData.insert("size", size);
@@ -330,7 +330,7 @@
WidgetBase::saveToXMI(qDoc, qElement);
qElement.setAttribute("xmi.id", ID2STR(id()));
- const QSizeF sz = size();
+ const UMLSceneSize sz = size();
qElement.setAttribute("width", sz.width());
qElement.setAttribute("height", sz.height());
qElement.setAttribute("isinstance", m_isInstance);
--- branches/work/soc-umbrello/umbrello/widgets/umlwidget.h #1288055:1288056
@@ -42,9 +42,9 @@
class UMLWidget : public WidgetBase
{
Q_OBJECT
- Q_PROPERTY(QSizeF minimumSize READ minimumSize WRITE setMinimumSize DESIGNABLE false)
- Q_PROPERTY(QSizeF maximumSize READ maximumSize WRITE setMaximumSize DESIGNABLE false)
- Q_PROPERTY(QSizeF size READ size WRITE setSize)
+ Q_PROPERTY(UMLSceneSize minimumSize READ minimumSize WRITE setMinimumSize DESIGNABLE false)
+ Q_PROPERTY(UMLSceneSize maximumSize READ maximumSize WRITE setMaximumSize DESIGNABLE false)
+ Q_PROPERTY(UMLSceneSize size READ size WRITE setSize)
Q_PROPERTY(bool resizable READ isResizable WRITE setResizable DESIGNABLE false)
Q_PROPERTY(QRectF rect READ rect DESIGNABLE false)
Q_PROPERTY(double margin READ margin WRITE setMargin)
@@ -81,12 +81,12 @@
void setMaximumSize(const UMLSceneSize& newSize, SizeHintOption option = DontAddMargin);
/// @return The current size of this widget.
- QSizeF size() const {
+ UMLSceneSize size() const {
return m_size;
}
- void setSize(const QSizeF &size);
+ void setSize(const UMLSceneSize &size);
void setSize(qreal width, qreal height) {
- setSize(QSizeF(width, height));
+ setSize(UMLSceneSize(width, height));
}
/// @return Height of widget.
@@ -188,10 +188,10 @@
private:
/// Current size of the widget.
- QSizeF m_size;
+ UMLSceneSize m_size;
- QSizeF m_minimumSize;
- QSizeF m_maximumSize;
+ UMLSceneSize m_minimumSize;
+ UMLSceneSize m_maximumSize;
/// Margin for this widget.
qreal m_margin;
More information about the umbrello-devel
mailing list