[Kst] extragear/graphics/kst/kst
George Staikos
staikos at kde.org
Thu Dec 8 07:38:58 CET 2005
SVN commit 486616 by staikos:
add missing properties margin and padding. we need to fix them someday, so
let's get them in (and see if anyone complains). remove trailing whitespace.
M +17 -9 kstborderedviewobject.cpp
M +2 -0 kstborderedviewobject.h
--- trunk/extragear/graphics/kst/kst/kstborderedviewobject.cpp #486615:486616
@@ -90,7 +90,7 @@
}
-void KstBorderedViewObject::setBorderColor(const QColor& c) {
+void KstBorderedViewObject::setBorderColor(const QColor& c) {
if (_borderColor != c) {
setDirty();
}
@@ -180,17 +180,25 @@
QMap<QString, QVariant> KstBorderedViewObject::widgetHints(const QString& propertyName) const {
QMap<QString, QVariant> map = KstViewObject::widgetHints(propertyName);
if (!map.empty()) {
- return map;
+ return map;
}
-
+
if (propertyName == "borderColor") {
map.insert(QString("_kst_widgetType"), QString("KColorButton"));
- map.insert(QString("_kst_label"), i18n("Border color"));
+ map.insert(QString("_kst_label"), i18n("Border color"));
} else if (propertyName == "borderWidth") {
map.insert(QString("_kst_widgetType"), QString("QSpinBox"));
map.insert(QString("_kst_label"), i18n("Border width"));
- map.insert(QString("minValue"), 0);
- }
+ map.insert(QString("minValue"), 0);
+ } else if (propertyName == "padding") {
+ map.insert(QString("_kst_widgetType"), QString("QSpinBox"));
+ map.insert(QString("_kst_label"), i18n("Padding"));
+ map.insert(QString("minValue"), 0);
+ } else if (propertyName == "margin") {
+ map.insert(QString("_kst_widgetType"), QString("QSpinBox"));
+ map.insert(QString("_kst_label"), i18n("Margin"));
+ map.insert(QString("minValue"), 0);
+ }
return map;
}
@@ -203,15 +211,15 @@
QColor KstBorderedViewObject::backgroundColor() const {
return KstViewObject::backgroundColor();
}
-
-
+
+
void KstBorderedViewObject::setForegroundColor(const QColor& color) {
KstViewObject::setForegroundColor(color);
}
QColor KstBorderedViewObject::foregroundColor() const {
- return KstViewObject::foregroundColor();
+ return KstViewObject::foregroundColor();
}
--- trunk/extragear/graphics/kst/kst/kstborderedviewobject.h #486615:486616
@@ -63,6 +63,8 @@
Q_PROPERTY(int borderWidth READ borderWidth WRITE setBorderWidth)
Q_PROPERTY(QColor foregroundColor READ foregroundColor WRITE setForegroundColor)
Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor)
+ Q_PROPERTY(int margin READ margin WRITE setMargin)
+ Q_PROPERTY(int padding READ padding WRITE setPadding)
protected:
KstBorderedViewObject(const QString& type);
public:
More information about the Kst
mailing list