[Kst] kdeextragear-2/kst/kst

Andrew Walker arwalker at sumusltd.com
Fri Nov 12 03:27:39 CET 2004


CVS commit by arwalker: 

Draw bars if they are selected.

CCMAIL: 93039-done at bugs.kde.org


  M +14 -0     curveappearancewidget.ui   1.20
  M +16 -2     curveappearancewidget.ui.h   1.17


--- kdeextragear-2/kst/kst/curveappearancewidget.ui  #1.19:1.20
@@ -487,4 +487,16 @@
         <slot>setEnabled(bool)</slot>
     </connection>
+    <connection>
+        <sender>_showBars</sender>
+        <signal>toggled(bool)</signal>
+        <receiver>CurveAppearanceWidget</receiver>
+        <slot>drawLine()</slot>
+    </connection>
+    <connection>
+        <sender>_barStyle</sender>
+        <signal>activated(int)</signal>
+        <receiver>CurveAppearanceWidget</receiver>
+        <slot>drawLine()</slot>
+    </connection>
 </connections>
 <tabstops>
@@ -495,4 +507,6 @@
     <tabstop>_comboLineStyle</tabstop>
     <tabstop>_spinBoxLineWidth</tabstop>
+    <tabstop>_showBars</tabstop>
+    <tabstop>_barStyle</tabstop>
 </tabstops>
 <includes>

--- kdeextragear-2/kst/kst/curveappearancewidget.ui.h  #1.16:1.17
@@ -95,6 +94,21 @@ void CurveAppearanceWidget::drawLine()
 
   p.fillRect(p.window(), QColor("white"));
+
+  if (showBars()) {
+    QRect rectBar((pix.width()-pix.height())/2,
+                  pix.height()/2,
+                  pix.height(),
+                  (pix.height()/2)+1);
+
+    if (barStyle() == 1) {
+      p.fillRect(rectBar,QBrush(QColor(color())));
+      p.setPen(QPen(QColor("black"),lineWidth(),KstLineStyle[lineStyle()]));
+    } else {
   p.setPen(pen);
+    }
+    p.drawRect(rectBar);
+  }
 
+  p.setPen(pen);
   if (_showLines->isChecked()) {
     p.drawLine(1,pix.height()/2,pix.width()-1, pix.height()/2);





More information about the Kst mailing list