[Kst] extragear/graphics/kst/kst

George Staikos staikos at kde.org
Sun Nov 27 23:29:41 CET 2005


SVN commit 483731 by staikos:

- rename the textdialog ui since it's a widget now
- add a new function to view objects to provide a custom widget
- some other minor cleanups I had lying around


 M  +1 -1      extensions/js/examples/testgraphics.js  
 M  +4 -0      kstviewlabel.cpp  
 M  +1 -0      kstviewlabel.h  
 M  +3 -7      kstviewline.cpp  
 M  +6 -3      kstviewobject.cpp  
 M  +2 -0      kstviewobject.h  
 D             textdialog.ui  
 A             viewlabelwidget.ui   textdialog.ui#483730


--- trunk/extragear/graphics/kst/kst/extensions/js/examples/testgraphics.js #483730:483731
@@ -13,7 +13,7 @@
 
 p.size = new Size(284, 261);
 p.position = new Point(73, 113);
-p.load("http://www.kubuntu.org/konqi-book2.png");
+p.load("http://www.kde.org/media/images/kde_gear_64.png");
 p.borderWidth = 3;
 p.borderColor = "blue";
 
--- trunk/extragear/graphics/kst/kst/kstviewlabel.cpp #483730:483731
@@ -685,5 +685,9 @@
 }
     
 
+QWidget *KstViewLabel::configWidget() {
+  return 0L;
+}
+
 #include "kstviewlabel.moc"
 // vim: ts=2 sw=2 et
--- trunk/extragear/graphics/kst/kst/kstviewlabel.h #483730:483731
@@ -92,6 +92,7 @@
     virtual QRegion clipRegion();
     
     virtual QMap<QString, QVariant> widgetHints(const QString& propertyName) const;
+    QWidget *configWidget();
 
   public slots:
     void adjustSizeForText(QRect w);
--- trunk/extragear/graphics/kst/kst/kstviewline.cpp #483730:483731
@@ -67,23 +67,19 @@
   QPen pen(_foregroundColor, _width);
   pen.setCapStyle(_capStyle);
   pen.setStyle(_penStyle);
-  const QPen oldPen = p.pen();
+  const QPen oldPen(p.pen());
   p.setPen(pen);
 
   const QRect geom(geometry());
   switch (_orientation) {
     case UpLeft:
+    case DownRight:
       p.drawLine(geom.bottomRight(), geom.topLeft());
       break;
     case UpRight:
+    case DownLeft:
       p.drawLine(geom.bottomLeft(), geom.topRight());
       break;
-    case DownLeft:
-      p.drawLine(geom.topRight(), geom.bottomLeft());
-      break;
-    case DownRight:
-      p.drawLine(geom.topLeft(), geom.bottomRight());
-      break;  
   }
   // paint this last
   p.setPen(oldPen);
--- trunk/extragear/graphics/kst/kst/kstviewobject.cpp #483730:483731
@@ -1560,13 +1560,11 @@
 
 
 signed int KstViewObject::directionFor(const QPoint& pos) {
-#if 0
   // no hotpoints if object is not selected - can only move it
   if (!isSelected()) {
     return NONE;  
   }
-#endif
-  
+
   signed int direction = NONE;
   
   const QRect geom(geometry());
@@ -1635,5 +1633,10 @@
   return false;
 }
 
+
+QWidget *KstViewObject::configWidget() {
+  return 0L;
+}
+
 #include "kstviewobject.moc"
 // vim: ts=2 sw=2 et
--- trunk/extragear/graphics/kst/kst/kstviewobject.h #483730:483731
@@ -108,6 +108,8 @@
 
     bool objectDirty() const; // true if this object or a child is dirty
 
+    virtual QWidget *configWidget();
+
     // can't be const due to KstViewObjectPtr?
     // I don't like this method at all, but for now it makes things work.  Maybe
     // split it into two methods eventually.  The bool is for toplevelview so


More information about the Kst mailing list