[Kst] extragear/graphics/kst/kst

Andrew Walker arwalker at sumusltd.com
Thu Oct 6 22:36:49 CEST 2005


SVN commit 467917 by arwalker:

fix compiler warnings and indentation

 M  +68 -68    curveappearancewidget.ui.h  


--- trunk/extragear/graphics/kst/kst/curveappearancewidget.ui.h #467916:467917
@@ -38,9 +38,9 @@
     bool keepBlank = _combo->count() > 0 && _combo->text(0) == " ";
     
     QRect rect = _combo->style().querySubControlMetrics(
-	    QStyle::CC_ComboBox,
-	    _combo,
-	    QStyle::SC_ComboBoxEditField );
+            QStyle::CC_ComboBox,
+            _combo,
+            QStyle::SC_ComboBoxEditField );
     rect.setLeft( rect.left() + 2 );
     rect.setRight( rect.right() - 2 );
     rect.setTop( rect.top() + 2 );
@@ -59,10 +59,10 @@
     }
     
     for (int ptype = 0; ptype < KSTPOINT_MAXTYPE; ptype++) {
-	pp.fillRect( pp.window(), QColor("white"));
-	tmppoint.setType(ptype);
-	tmppoint.draw( &pp, ppix.width()/2, ppix.height()/2, 0, 600 );
-	_combo->insertItem(ppix);
+        pp.fillRect( pp.window(), QColor("white"));
+        tmppoint.setType(ptype);
+        tmppoint.draw( &pp, ppix.width()/2, ppix.height()/2, 0, 600 );
+        _combo->insertItem(ppix);
     }
 
     _combo->setCurrentItem( currentItem );
@@ -92,30 +92,30 @@
     p.fillRect(p.window(), QColor("white"));
 
     if (showBars()) {
-	QRect rectBar((pix.width()-pix.height())/2,
-		pix.height()/2,
-		pix.height(),
-		(pix.height()/2)+1);
+        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);
+        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);
+        p.drawLine(1, pix.height()/2, pix.width()-1, pix.height()/2);
     }
 
     if (_showPoints->isChecked()) {
-	pen.setStyle(Qt::SolidLine);
-	p.setPen(pen);
-  tmppoint.setType(pointType());
-	tmppoint.draw(&p, pix.width()/2, pix.height()/2, lineWidth(), 600);
+        pen.setStyle(Qt::SolidLine);
+        p.setPen(pen);
+        tmppoint.setType(pointType());
+        tmppoint.draw(&p, pix.width()/2, pix.height()/2, lineWidth(), 600);
     }
 
     _label->setPixmap(pix);
@@ -124,11 +124,11 @@
 
 int CurveAppearanceWidget::pointType()
 {
-  if (_combo->count() > 0 && _combo->text(0) == " ") {
-    return _combo->currentItem() - 1;
-  } else {
-    return _combo->currentItem();
-  }
+    if (_combo->count() > 0 && _combo->text(0) == " ") {
+        return _combo->currentItem() - 1;
+    } else {
+        return _combo->currentItem();
+    }
 }
 
 
@@ -168,8 +168,8 @@
     _combo->setEnabled(usePoints);
     _textLabelPointStyle->setEnabled(usePoints);
     if (!usePoints && _showPoints->isChecked()) {
-	_showPoints->setChecked(false);
-	drawLine();
+        _showPoints->setChecked(false);
+        drawLine();
     }
 }
 
@@ -178,13 +178,13 @@
 {
     _showLines->setEnabled(!bMustUseLines);
     if (bMustUseLines) {
-	_showLines->setChecked(true);
-	_showLines->hide();
-	_textLabelLineStyle->setText(i18n("Line type:"));
-	drawLine();
+        _showLines->setChecked(true);
+        _showLines->hide();
+        _textLabelLineStyle->setText(i18n("Line type:"));
+        drawLine();
     } else {
-	_showLines->show();
-	_textLabelLineStyle->setText(i18n("Type:"));
+        _showLines->show();
+        _textLabelLineStyle->setText(i18n("Type:"));
     }
 }
 
@@ -202,9 +202,9 @@
     bool keepBlank = _comboLineStyle->count() > 0 && _comboLineStyle->text(0) == " ";
 
     QRect rect = _comboLineStyle->style().querySubControlMetrics(
-	    QStyle::CC_ComboBox,
-	    _comboLineStyle,
-	    QStyle::SC_ComboBoxEditField);
+            QStyle::CC_ComboBox,
+            _comboLineStyle,
+            QStyle::SC_ComboBoxEditField);
     rect.setLeft(rect.left() + 2);
     rect.setRight(rect.right() - 2);
     rect.setTop(rect.top() + 2);
@@ -222,12 +222,12 @@
       _comboLineStyle->insertItem(" ", 0);
     }
     
-    for (int style = 0; style < KSTLINESTYLE_MAXTYPE; style++) {
-	pen.setStyle(KstLineStyle[style]);
-	pp.setPen(pen);
-	pp.fillRect( pp.window(), QColor("white"));
-	pp.drawLine(1,ppix.height()/2,ppix.width()-1, ppix.height()/2);
-	_comboLineStyle->insertItem(ppix);
+    for (int style = 0; style < (int)KSTLINESTYLE_MAXTYPE; style++) {
+        pen.setStyle(KstLineStyle[style]);
+        pp.setPen(pen);
+        pp.fillRect( pp.window(), QColor("white"));
+        pp.drawLine(1,ppix.height()/2,ppix.width()-1, ppix.height()/2);
+        _comboLineStyle->insertItem(ppix);
     }
 
     _comboLineStyle->setCurrentItem(currentItem);
@@ -236,21 +236,21 @@
 
 int CurveAppearanceWidget::lineStyle()
 {
-  if (_comboLineStyle->count() > 0 && _comboLineStyle->text(0) == " ") {
-    return _comboLineStyle->currentItem() -1;
-  } else {
-    return _comboLineStyle->currentItem();
-  }
+    if (_comboLineStyle->count() > 0 && _comboLineStyle->text(0) == " ") {
+        return _comboLineStyle->currentItem() -1;
+    } else {
+        return _comboLineStyle->currentItem();
+    }
 }
 
 
 int CurveAppearanceWidget::lineWidth()
 {
-  if (_spinBoxLineWidth->text() == " ") {
-    return 0;
-  } else {
-    return _spinBoxLineWidth->value();
-  }
+    if (_spinBoxLineWidth->text() == " ") {
+        return 0;
+    } else {
+        return _spinBoxLineWidth->value();
+    }
 }
 
 
@@ -266,12 +266,12 @@
     _spinBoxLineWidth->setValue(lineWidth);
     _combo->setCurrentItem(pointType);
     _barStyle->setCurrentItem(barStyle);
-    if (lineStyle < 0 || lineStyle >= KSTLINESTYLE_MAXTYPE) {
-	lineStyle = 0;
+    if (lineStyle < 0 || lineStyle >= (int)KSTLINESTYLE_MAXTYPE) {
+        lineStyle = 0;
     }
     _comboLineStyle->setCurrentItem(lineStyle);
     if (pointDensity < 0 || pointDensity >= KSTPOINTDENSITY_MAXTYPE) {
-	pointDensity = 0;
+        pointDensity = 0;
     }
     _comboPointDensity->setCurrentItem(pointDensity);
     enableSettings();
@@ -288,21 +288,21 @@
 
 int CurveAppearanceWidget::barStyle()
 {
-  if (_barStyle->count() > 0 && _barStyle->text(0) == " ") {
-    return _barStyle->currentItem() - 1;
-  } else {
-    return _barStyle->currentItem();
-  }
+    if (_barStyle->count() > 0 && _barStyle->text(0) == " ") {
+        return _barStyle->currentItem() - 1;
+    } else {
+        return _barStyle->currentItem();
+    }
 }
 
 
 int CurveAppearanceWidget::pointDensity()
 {
-  if (_comboPointDensity->count() > 0 && _comboPointDensity->text(0) == " ") {
-    return _comboPointDensity->currentItem() - 1;
-  } else {
-    return _comboPointDensity->currentItem();
-  }
+    if (_comboPointDensity->count() > 0 && _comboPointDensity->text(0) == " ") {
+        return _comboPointDensity->currentItem() - 1;
+    } else {
+        return _comboPointDensity->currentItem();
+    }
 }
 
 


More information about the Kst mailing list