[Kst] branches/work/kst/1.6/kst/src/libkstapp

Andrew Walker arwalker at sumusltd.com
Thu Dec 13 20:38:19 CET 2007


SVN commit 748173 by arwalker:

handle redrawing of the marker line-style combobox on a resize correctly

 M  +0 -1      kst2dplot.cpp  
 M  +5 -8      kst2dplotwidget_i.cpp  
 M  +3 -2      kst2dplotwidget_i.h  


--- branches/work/kst/1.6/kst/src/libkstapp/kst2dplot.cpp #748172:748173
@@ -7323,7 +7323,6 @@
   connect( widget->_checkBoxDefaultMarkerColor, SIGNAL( stateChanged(int) ), parent, SLOT(modified()));
   connect( widget->_comboMarkerLineStyle, SIGNAL( activated(int) ), parent, SLOT(modified()));
   connect( widget->_spinBoxMarkerLineWidth, SIGNAL( valueChanged(int) ), parent, SLOT(modified()));
-
 }
 
 void Kst2DPlot::createScalars() {
--- branches/work/kst/1.6/kst/src/libkstapp/kst2dplotwidget_i.cpp #748172:748173
@@ -203,6 +203,11 @@
 Kst2dPlotWidget::~Kst2dPlotWidget() {
 }
 
+void Kst2dPlotWidget::resizeEvent(QResizeEvent *event) {
+  fillMarkerLineCombo();
+  View2DPlotWidget::resizeEvent(event);
+}
+
 void Kst2dPlotWidget::generateDefaultLabels() {
   if (_plot) {
     _plot->generateDefaultLabels();
@@ -290,7 +295,6 @@
   _colorMarker->setEnabled(_checkBoxDefaultMarkerColor->state() != QButton::On);
 }
 
-
 void Kst2dPlotWidget::addDisplayedCurve() {
   uint count = AvailableCurveList->count();
   if (count > 0) {
@@ -305,7 +309,6 @@
   }
 }
 
-
 void Kst2dPlotWidget::removeDisplayedCurve() {
   uint count = DisplayedCurveList->count();
   if (count > 0) {
@@ -320,21 +323,18 @@
   }
 }
 
-
 void Kst2dPlotWidget::upDisplayedCurve() {
   if (DisplayedCurveList->up()) {
     emit changed();
   }
 }
 
-
 void Kst2dPlotWidget::downDisplayedCurve() {
   if (DisplayedCurveList->down()) {
     emit changed();
   }
 }
 
-
 void Kst2dPlotWidget::fillMarkerLineCombo() {
   QRect rect = _comboMarkerLineStyle->style().querySubControlMetrics(QStyle::CC_ComboBox, _comboMarkerLineStyle, QStyle::SC_ComboBoxEditField);
   rect.setLeft(rect.left() + 2);
@@ -342,7 +342,6 @@
   rect.setTop(rect.top() + 2);
   rect.setBottom(rect.bottom() - 2);
 
-  // fill the point type dialog with point types
   QPixmap ppix(rect.width(), rect.height());
   QPainter pp(&ppix);
   QPen pen(QColor("black"), 0);
@@ -361,7 +360,6 @@
   _comboMarkerLineStyle->setCurrentItem(currentItem);
 }
 
-
 void Kst2dPlotWidget::updateAxesButtons() {
   bool major = _xMajorGrid->isChecked() || _yMajorGrid->isChecked();
   bool minor = _xMinorGrid->isChecked() || _yMinorGrid->isChecked();
@@ -380,7 +378,6 @@
   _yMinorTicks->setEnabled(_yMinorTicksAuto->state() != QButton::On);
 }
 
-
 void Kst2dPlotWidget::updateScalarCombo() {
   ScalarList->clear();
   scalarSelectorX1->clear();
--- branches/work/kst/1.6/kst/src/libkstapp/kst2dplotwidget_i.h #748172:748173
@@ -64,6 +64,9 @@
     void insertXExpressionMax(const QString&);
     void insertYExpressionMax(const QString&);
 
+  protected:
+    virtual void resizeEvent(QResizeEvent*);
+
   private:
     void populateEditMultiple(QRadioButton *radioButtonWidget);
     void populateEditMultiple(QComboBox *comboWidget);
@@ -75,8 +78,6 @@
     Kst2DPlotPtr _plot;
     QLineEdit *_scalarDest;
     bool _editMultipleMode;
-
-  protected:
 };
 
 #endif


More information about the Kst mailing list