[Kst] extragear/graphics/kst/kst

Rick Chern rchern at interchange.ubc.ca
Thu Aug 4 23:58:27 CEST 2005


SVN commit 443093 by rchern:

Some more useful defaults before first sticky defaults take effect

 M  +7 -0      kstgfxarrowmousehandler.cpp  
 M  +6 -0      kstgfxellipsemousehandler.cpp  
 M  +8 -0      kstgfxlinemousehandler.cpp  
 M  +8 -0      kstgfxrectanglemousehandler.cpp  
 M  +1 -0      ksttoplevelview.cpp  


--- trunk/extragear/graphics/kst/kst/kstgfxarrowmousehandler.cpp #443092:443093
@@ -20,6 +20,13 @@
 KstGfxArrowMouseHandler::KstGfxArrowMouseHandler(KstTopLevelViewPtr top)
   : KstGfxMouseHandler(top) {
   _drawingArrow = 0L;
+  // initial default settings before any sticky settings
+  KstViewArrowPtr defaultArrow = new KstViewArrow();
+  defaultArrow->setHasArrow(true);
+  defaultArrow->setWidth(2);
+  defaultArrow->setPenStyle(Qt::SolidLine);
+  defaultArrow->setForegroundColor(Qt::black);
+  _defaultObject = KstViewObjectPtr(defaultArrow);
 }  
 
 
--- trunk/extragear/graphics/kst/kst/kstgfxellipsemousehandler.cpp #443092:443093
@@ -22,6 +22,12 @@
 KstGfxEllipseMouseHandler::KstGfxEllipseMouseHandler(KstTopLevelViewPtr top)
   : KstGfxMouseHandler(top) {
   _drawingEllipse = 0L;
+  // initial default settings before any sticky settings
+  KstViewEllipsePtr defaultEllipse = new KstViewEllipse();
+  defaultEllipse->setBorderWidth(2);
+  defaultEllipse->setBorderColor(Qt::black);
+  defaultEllipse->setForegroundColor(Qt::white);
+  _defaultObject = KstViewObjectPtr(defaultEllipse);
 }  
 
 
--- trunk/extragear/graphics/kst/kst/kstgfxlinemousehandler.cpp #443092:443093
@@ -20,6 +20,14 @@
 KstGfxLineMouseHandler::KstGfxLineMouseHandler(KstTopLevelViewPtr top)
   : KstGfxMouseHandler(top) {
   _drawingArrow = 0L; 
+  
+  // initial default settings before any sticky settings
+  KstViewArrowPtr defaultArrow = new KstViewArrow();
+  defaultArrow->setHasArrow(false);
+  defaultArrow->setWidth(2);
+  defaultArrow->setPenStyle(Qt::SolidLine);
+  defaultArrow->setForegroundColor(Qt::black);
+  _defaultObject = KstViewObjectPtr(defaultArrow);
 }  
 
 
--- trunk/extragear/graphics/kst/kst/kstgfxrectanglemousehandler.cpp #443092:443093
@@ -22,6 +22,14 @@
 KstGfxRectangleMouseHandler::KstGfxRectangleMouseHandler(KstTopLevelViewPtr top)
   : KstGfxMouseHandler(top) {
   _drawingRectangle = 0L; 
+  // initial default settings before any sticky settings
+  KstViewBoxPtr defaultBox = new KstViewBox();
+  defaultBox->setBorderWidth(2);
+  defaultBox->setBorderColor(Qt::black);
+  defaultBox->setForegroundColor(Qt::white);
+  defaultBox->setXRound(0);
+  defaultBox->setYRound(0);
+  _defaultObject = KstViewObjectPtr(defaultBox);
 }  
 
 
--- trunk/extragear/graphics/kst/kst/ksttoplevelview.cpp #443092:443093
@@ -325,6 +325,7 @@
 
   if (_activeMouseHandler) {
     _activeMouseHandler->handlePress(pos, shift);
+    return true;
   }
   
   _mouseMoved = false;


More information about the Kst mailing list