[Uml-devel] branches/work/soc-umbrello/umbrello/widgets
Gopala Krishna A
krishna.ggk at gmail.com
Tue Aug 18 04:10:27 UTC 2009
SVN commit 1012799 by gopala:
* WidgetBase: getFillColour() now returns Qt::transparent if the brush
represents a gradient or a texture.
M +2 -1 classifierwidget.cpp
M +10 -0 widgetbase.cpp
M +1 -1 widgetbase.h
--- branches/work/soc-umbrello/umbrello/widgets/classifierwidget.cpp #1012798:1012799
@@ -346,8 +346,9 @@
*/
bool ClassifierWidget::loadFromXMI(QDomElement & qElement)
{
- if (!UMLWidget::loadFromXMI(qElement))
+ if (!UMLWidget::loadFromXMI(qElement)) {
return false;
+ }
// Determine str
QString defaultSigType = QString::number(Uml::st_NoSig);
--- branches/work/soc-umbrello/umbrello/widgets/widgetbase.cpp #1012798:1012799
@@ -1190,4 +1190,14 @@
}
}
+QColor WidgetBase::getFillColour() const
+{
+ QBrush b = brush();
+ if (b.gradient() || b.style() == Qt::TexturePattern || b.style() == Qt::NoBrush) {
+ return QColor(Qt::transparent);
+ }
+ return b.color();
+}
+
+
#include "widgetbase.moc"
--- branches/work/soc-umbrello/umbrello/widgets/widgetbase.h #1012798:1012799
@@ -215,7 +215,7 @@
void updateComponentSize();
void setLineColorcmd(const QColor& col) { setLineColor(col); }
- QColor getFillColour() const { return brush().color(); }
+ QColor getFillColour() const;
QColor getFillColor() const { return getFillColour(); }
void setFillColour(const QColor& col) { setBrush(QBrush(col)); }
More information about the umbrello-devel
mailing list