[Kst] kdeextragear-2/kst/kst

Andrew Walker arwalker at sumusltd.com
Mon Dec 13 22:15:40 CET 2004


CVS commit by arwalker: 

Make bars honour line width and line type.
Make points honour line width.


  M +0 -7      curveappearancewidget.ui   1.25
  M +6 -11     curveappearancewidget.ui.h   1.21
  M +2 -2      kst2dplot.cpp   1.317


--- kdeextragear-2/kst/kst/curveappearancewidget.ui  #1.24:1.25
@@ -495,10 +495,4 @@
         <signal>activated(int)</signal>
         <receiver>CurveAppearanceWidget</receiver>
-        <slot>lineStyleComboChanged()</slot>
-    </connection>
-    <connection>
-        <sender>_comboLineStyle</sender>
-        <signal>activated(int)</signal>
-        <receiver>CurveAppearanceWidget</receiver>
         <slot>drawLine()</slot>
     </connection>
@@ -581,5 +575,4 @@
     <slot>redrawCombo()</slot>
     <slot access="private">fillLineStyleCombo()</slot>
-    <slot access="private">lineStyleComboChanged()</slot>
     <slot>setValue( bool hasLines, bool hasPoints, bool hasBars, const QColor &amp; c, int pointType, int lineWidth, int lineStyle, int barStyle, int pointDensity )</slot>
     <slot>enableSettings()</slot>

--- kdeextragear-2/kst/kst/curveappearancewidget.ui.h  #1.20:1.21
@@ -109,5 +109,5 @@ void CurveAppearanceWidget::drawLine()
   p.setPen(pen);
   if (_showLines->isChecked()) {
-    p.drawLine(1,pix.height()/2,pix.width()-1, pix.height()/2);
+    p.drawLine(1, pix.height()/2, pix.width()-1, pix.height()/2);
   }
 
@@ -228,11 +228,4 @@ void CurveAppearanceWidget::fillLineStyl
 
 
-void CurveAppearanceWidget::lineStyleComboChanged()
-{
-  _showLines->setChecked(true);
-  drawLine();
-}
-
-
 int CurveAppearanceWidget::lineStyle()
 {
@@ -295,7 +288,9 @@ void CurveAppearanceWidget::enableSettin
   bool enable;
   
-  enable = showLines();  
+  enable = showLines() || showBars();
   _comboLineStyle->setEnabled(enable);
   _textLabelLineStyle->setEnabled(enable);
+  
+  enable = enable || showPoints();
   _textLabelWeight->setEnabled(enable);
   _spinBoxLineWidth->setEnabled(enable);

--- kdeextragear-2/kst/kst/kst2dplot.cpp  #1.316:1.317
@@ -5362,7 +5362,7 @@ void Kst2DPlot::plotCurves(QPainter& p,
 
         if (c->barStyle() == 1) { // filled
-          p.setPen(QPen(_foregroundColor));
+          p.setPen(QPen(_foregroundColor, (c->lineWidth() < penWidth ? penWidth : c->lineWidth()), style));
         } else {
-          p.setPen(QPen(c->color()));
+          p.setPen(QPen(c->color(), (c->lineWidth() < penWidth ? penWidth : c->lineWidth()), style));
         }
 





More information about the Kst mailing list