Bug 120325 - Default curve width in kst settings
Summary: Default curve width in kst settings
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Solaris
: HI wishlist
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-17 16:49 UTC by Nicolas Brisset
Modified: 2006-05-04 18:59 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Proposed patch. (39.46 KB, patch)
2006-03-22 21:31 UTC, Andrew Walker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Brisset 2006-01-17 16:49:56 UTC
Version:           1.2.0_devel (using KDE 3.4.0, compiled sources)
Compiler:          gcc version 3.4.3
OS:                SunOS (sun4u) release 5.8

Many users seem to ask for the possibility of setting default curve width values > 1. This is somehow linked with the fact that axes/grid lines are currently drawn on top of curves, which are however separate problems... Still, this option may have some uses.
Comment 1 Andrew Walker 2006-01-26 19:51:18 UTC
Should be fixed for 1.2.1 release
Comment 2 Andrew Walker 2006-03-22 21:16:17 UTC
SVN commit 521550 by arwalker:

CCBUG:120325 Add setting for default line weight.

 M  +15 -2     kstsettings.cpp  
 M  +3 -0      kstsettings.h  


--- trunk/extragear/graphics/kst/src/libkstmath/kstsettings.cpp #521549:521550
@@ -20,9 +20,8 @@
 #include <kemailsettings.h>
 #include <kprinter.h>
 #include <kstaticdeleter.h>
+#include "ksttimezones.h"
 
-#include <ksttimezones.h>
-
 // application specific includes
 #include "kstsettings.h"
 
@@ -33,6 +32,7 @@
   foregroundColor = QColor(0,0,0); // black
   promptWindowClose = true;
   showQuickStart = true;
+  tiedZoomGlobal = false;
   curveColorSequencePalette = "Kst Colors";
   
   xMajor = false;
@@ -51,6 +51,8 @@
   yAxisInterpretation = AXIS_INTERP_CTIME;
   yAxisDisplay = AXIS_DISPLAY_QTLOCALDATEHHMMSS_SS;
   
+  defaultLineWeight = 0;
+  
   emailSMTPPort = 25;
   emailRequiresAuthentication = false;
   emailEncryption = EMailEncryptionNone;
@@ -75,6 +77,7 @@
   foregroundColor = x.foregroundColor;
   promptWindowClose = x.promptWindowClose;
   showQuickStart = x.showQuickStart;
+  tiedZoomGlobal = x.tiedZoomGlobal;
   curveColorSequencePalette = x.curveColorSequencePalette;
   
   timezone = x.timezone;
@@ -96,6 +99,8 @@
   yAxisInterpretation = x.yAxisInterpretation;
   yAxisDisplay = x.yAxisDisplay;
 
+  defaultLineWeight = x.defaultLineWeight;
+  
   emailSender = x.emailSender;
   emailSMTPServer = x.emailSMTPServer;
   emailSMTPPort = x.emailSMTPPort;
@@ -158,6 +163,7 @@
   cfg.writeEntry("Foreground Color", foregroundColor);
   cfg.writeEntry("Prompt on Window Close", promptWindowClose);
   cfg.writeEntry("Show QuickStart", showQuickStart);
+  cfg.writeEntry("Tied-zoom Global", tiedZoomGlobal);
   cfg.writeEntry("Curve Color Sequence", curveColorSequencePalette);
   
   cfg.writeEntry("Timezone", timezone);
@@ -182,6 +188,9 @@
   cfg.writeEntry("Interpretation", yAxisInterpretation);
   cfg.writeEntry("Display", yAxisDisplay);
 
+  cfg.setGroup("Curve");
+  cfg.writeEntry("DefaultLineWeight", defaultLineWeight);
+  
   cfg.setGroup("EMail");
   cfg.writeEntry("Sender", emailSender);
   cfg.writeEntry("Server", emailSMTPServer);
@@ -227,6 +236,7 @@
   foregroundColor = cfg.readColorEntry("Foreground Color", &foregroundColor);
   promptWindowClose = cfg.readBoolEntry("Prompt on Window Close", true);
   showQuickStart = cfg.readBoolEntry("Show QuickStart", true);
+  tiedZoomGlobal = cfg.readBoolEntry("Tied-zoom Global", true);
   curveColorSequencePalette = cfg.readEntry("Curve Color Sequence", "Kst Colors");
   
   timezone = cfg.readEntry("Timezone", "UTC");
@@ -251,6 +261,9 @@
   yAxisInterpretation = (KstAxisInterpretation)cfg.readNumEntry("Interpretation", AXIS_INTERP_CTIME);
   yAxisDisplay = (KstAxisDisplay)cfg.readNumEntry("Display", AXIS_DISPLAY_QTLOCALDATEHHMMSS_SS);
 
+  cfg.setGroup("Curve");
+  defaultLineWeight = cfg.readNumEntry("DefaultLineWeight", 0);
+  
   cfg.setGroup("EMail");
   KEMailSettings es;
   emailSender = cfg.readEntry("Sender", es.getSetting(KEMailSettings::EmailAddress));
--- trunk/extragear/graphics/kst/src/libkstmath/kstsettings.h #521549:521550
@@ -61,6 +61,7 @@
     
     bool promptWindowClose : 1;
     bool showQuickStart : 1;
+    bool tiedZoomGlobal : 1;
     bool xMajor : 1;
     bool yMajor : 1;
     bool xMinor : 1;
@@ -78,6 +79,8 @@
     KstAxisInterpretation yAxisInterpretation;
     KstAxisDisplay yAxisDisplay;
 
+    int defaultLineWeight;
+    
     QString emailSender;
     QString emailSMTPServer;
     QString emailUsername;
Comment 3 Andrew Walker 2006-03-22 21:31:01 UTC
Created attachment 15261 [details]
Proposed patch.

I suspect that at some point we're going to want to re-organize the General tab
of the Settings dialog. Do we want to do it now, or wait until later? This
patch assumes the latter.
Comment 4 Andrew Walker 2006-03-23 02:19:48 UTC
SVN commit 521636 by arwalker:

CCBUG:120325 UI changes

 M  +390 -204  kstsettingsdlg.ui  
 M  +5 -0      kstsettingsdlg.ui.h  
Comment 5 Andrew Walker 2006-03-23 02:24:06 UTC
SVN commit 521637 by arwalker:

CCBUG:120325 Set default line weight in curve appearance widget. Still need to set in data wizard and possibly other places where curves can be created without going through the UI.

 M  +1 -1      curveappearancewidget.ui.h  


--- trunk/extragear/graphics/kst/src/widgets/curveappearancewidget.ui.h #521636:521637
@@ -139,7 +139,7 @@
     _showBars->setChecked(false);
     _barStyle->setCurrentItem(1);
     _color->setColor(newColor);
-    _spinBoxLineWidth->setValue(0);
+    _spinBoxLineWidth->setValue(KstSettings::globalSettings()->defaultLineWeight);
     _comboPointDensity->setCurrentItem(0);
     fillLineStyleCombo();
     fillCombo();
Comment 6 Andrew Walker 2006-05-04 18:59:23 UTC
SVN commit 537382 by arwalker:

BUG:120325 Set default line width from data wizard.

 M  +2 -1      datawizard.ui  
 M  +2 -0      datawizard.ui.h  


--- trunk/extragear/graphics/kst/src/libkstapp/datawizard.ui #537381:537382
@@ -1,4 +1,4 @@
-<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
 <class>DataWizard</class>
 <widget class="QWizard">
     <property name="name">
@@ -1488,6 +1488,7 @@
 </tabstops>
 <includes>
     <include location="local" impldecl="in implementation">qaccel.h</include>
+    <include location="local" impldecl="in implementation">kstsettings.h</include>
     <include location="local" impldecl="in implementation">kstcolorsequence.h</include>
     <include location="local" impldecl="in implementation">kstvcurve.h</include>
     <include location="local" impldecl="in implementation">kstuinames.h</include>
--- trunk/extragear/graphics/kst/src/libkstapp/datawizard.ui.h #537381:537382
@@ -775,6 +775,7 @@
 	    }
 	    colors.append(color);
 	    KstVCurvePtr c = new KstVCurve(name, xv, *it, 0L, 0L, 0L, 0L, color);
+            c->setLineWidth(KstSettings::globalSettings()->defaultLineWeight);
 	    if (_drawBoth->isChecked()) {
 		c->setHasPoints(true);
 		c->pointType = ptype++ % KSTPOINT_MAXTYPE;
@@ -858,6 +859,7 @@
 		    c = new KstVCurve(KST::suggestCurveName(name, true), p->vX(), p->vY(), 0L, 0L, 0L, 0L, colors[indexColor]);
 		    indexColor++;
 		}
+                c->setLineWidth(KstSettings::globalSettings()->defaultLineWeight);
 		if (_drawBoth->isChecked()) {
 		    c->setHasPoints(true);
 		    c->pointType = ptype++ % KSTPOINT_MAXTYPE;