[Kst] branches/work/kst/1.5/kst/src/libkstapp

Andrew Walker arwalker at sumusltd.com
Fri Aug 31 18:39:13 CEST 2007


SVN commit 706958 by arwalker:

format changes

 M  +19 -15    kstviewbox.cpp  
 M  +2 -2      kstviewbox.h  
 M  +3 -3      kstviewellipse.cpp  
 M  +8 -15     kstviewellipse.h  


--- branches/work/kst/1.5/kst/src/libkstapp/kstviewbox.cpp #706957:706958
@@ -45,18 +45,18 @@
 
 KstViewBox::KstViewBox(const QDomElement& e)
 : KstViewObject(e), _borderColor(QColor(0, 0, 0)), _borderWidth(0) {
-  
+
   QDomNode n = e.firstChild();
   while (!n.isNull()) {
     QDomElement el = n.toElement(); 
     if (!el.isNull()) {
       if (metaObject()->findProperty(el.tagName().latin1(), true) > -1) {
-        setProperty(el.tagName().latin1(), QVariant(el.text()));  
-      }  
+        setProperty(el.tagName().latin1(), QVariant(el.text()));
+      }
     }
-    n = n.nextSibling();      
+    n = n.nextSibling();
   }
-  
+
   // these always have these values
   _type = "Box";
   _editTitle = i18n("Edit Box");
@@ -77,7 +77,7 @@
   _borderColor = box._borderColor;
   _borderWidth = box._borderWidth;
   _transparentFill = box._transparentFill;
-  
+
   // these always have these values
   _type = "Box";
 }
@@ -124,7 +124,7 @@
   if (bw > _geom.height()) {
     bw = _geom.height() / 2;
   }
-  
+
   QPen pen(borderColor(), bw);
   pen.setJoinStyle(_cornerStyle);
   if (bw == 0) {
@@ -132,7 +132,7 @@
   }
   p.setPen(pen);
   if (_transparentFill) {
-    p.setBrush(Qt::NoBrush);  
+    p.setBrush(Qt::NoBrush);
   } else {
     p.setBrush(_foregroundColor);
   }
@@ -156,13 +156,15 @@
 
 void KstViewBox::setXRound(int rnd) {
   int crnd;
+
   if (rnd < 0) {
-    crnd = 0;  
+    crnd = 0;
   } else if (rnd > 99) {
-    crnd = 99;  
+    crnd = 99;
   } else {
-    crnd = rnd;  
+    crnd = rnd;
   }
+
   if (_xRound != crnd) {
     setDirty();
     _xRound = crnd;
@@ -172,13 +174,15 @@
 
 void KstViewBox::setYRound(int rnd) {
   int crnd;
+
   if (rnd < 0) {
-    crnd = 0;  
+    crnd = 0;
   } else if (rnd > 99) {
-    crnd = 99;  
+    crnd = 99;
   } else {
-    crnd = rnd;  
+    crnd = rnd;
   }
+
   if (_yRound != crnd) {
     setDirty();
     _yRound = crnd;
@@ -316,4 +320,4 @@
 
 
 #include "kstviewbox.moc"
-// vim: ts=2 sw=2 et
+
--- branches/work/kst/1.5/kst/src/libkstapp/kstviewbox.h #706957:706958
@@ -68,7 +68,7 @@
 
   public:
     void save(QTextStream& ts, const QString& indent = QString::null);
-    
+
     QMap<QString, QVariant > widgetHints(const QString& propertyName) const;
 
   private:
@@ -83,4 +83,4 @@
 
 
 #endif
-// vim: ts=2 sw=2 et
+
--- branches/work/kst/1.5/kst/src/libkstapp/kstviewellipse.cpp #706957:706958
@@ -20,12 +20,12 @@
 #include "kstviewellipse.h"
 #include "kstviewobjectfactory.h"
 
-#include <klocale.h>
-
 #include <qmetaobject.h>
 #include <qpainter.h>
 #include <qvariant.h>
 
+#include <klocale.h>
+
 KstViewEllipse::KstViewEllipse()
 : KstViewObject("Ellipse"), _borderWidth(1) {
   _editTitle = i18n("Edit Ellipse");
@@ -196,7 +196,7 @@
   signed int direction = KstViewObject::directionFor(pos);
 
   if (direction != 0) {
-    direction |= CENTEREDRESIZE;  
+    direction |= CENTEREDRESIZE;
   }
   return direction;
 }
--- branches/work/kst/1.5/kst/src/libkstapp/kstviewellipse.h #706957:706958
@@ -41,26 +41,19 @@
     virtual QColor borderColor() const;
     virtual void setBorderWidth(int width);
     virtual int borderWidth() const;
-    
+    virtual void drawShadow(KstPainter& p, const QPoint& pos);
+    virtual void paintSelf(KstPainter& p, const QRegion& bounds);
+    virtual void save(QTextStream& ts, const QString& indent = QString::null);
+    virtual QMap<QString, QVariant> widgetHints(const QString& propertyName) const; 
+    virtual signed int directionFor(const QPoint& pos);
+
     // can't have Q_PROPERTY in KstViewObject?
     virtual void setForegroundColor(const QColor& color);
     virtual QColor foregroundColor() const;
-    
+
     bool transparentFill() const;
     void setTransparentFill(bool yes);
 
-    
-    virtual void drawShadow(KstPainter& p, const QPoint& pos);
-
-    virtual void paintSelf(KstPainter& p, const QRegion& bounds);
-
-  public:
-    virtual void save(QTextStream& ts, const QString& indent = QString::null);
-    
-    virtual QMap<QString, QVariant> widgetHints(const QString& propertyName) const; 
-    
-    virtual signed int directionFor(const QPoint& pos);
-    
   private:
     int _borderWidth;
     QColor _borderColor;
@@ -71,4 +64,4 @@
 
 
 #endif
-// vim: ts=2 sw=2 et
+


More information about the Kst mailing list