[Kst] branches/work/kst/portto4/kst

Barth Netterfield netterfield at astro.utoronto.ca
Sat May 16 05:58:21 CEST 2009


SVN commit 968549 by netterfield:

Fix a couple more bugs.
Report another bug.



 M  +9 -25     devel-docs/Kst2Specs/Bugs  
 M  +18 -0     devel-docs/Kst2Specs/FixedBugs  
 M  +2 -1      src/libkst/datamatrix.cpp  
 M  +2 -1      src/libkst/datascalar.cpp  
 M  +2 -1      src/libkst/datastring.cpp  
 M  +2 -1      src/libkst/datavector.cpp  
 M  +4 -4      src/widgets/labelbuilder.cpp  
 M  +33 -35    src/widgets/labelbuilder.ui  


--- branches/work/kst/portto4/kst/devel-docs/Kst2Specs/Bugs #968548:968549
@@ -1,14 +1,11 @@
+Legends don't appear to work:
+  With the data wizard, create a plot, and select to create a legend.
+    No legend.
+  Edit a plot.  In the label tab, select having a legend.  Apply
+    No legend...
 
-Auto-labels, and '_' in field names:
-When plots are using name-based auto-labels, any '_' in field names gets interpreted as a subscript.
-There needs to be an option to somehow escape these when using them in a label.
-  -need escapedName() to supplement name().
-  -the name will be stored with escapes.  Name() will remove them.
+----------
 
-*cbn*
-
----------
-
 Tooltips/whats this where helpful.
 
 ---------
@@ -39,12 +36,6 @@
 
 ------------
 
-Layout issues in data object dialogs:
-  some dialogs, like histogram, lines up nicely, while others, like image
-  is excessivly indented.  I can't see any difference in their implementation.,
-
-------------
-
 Shared axis zoom usage problem:
 Create a shared axis zoom box with multiple plots in a column.
   -there is no option to indicate or change whether the plots are tied.
@@ -61,12 +52,7 @@
 ---------------------------
 
 Bugs Reported by D.V. Wiebe
-(all appear valid)
 
-I haven't tried packaging it up yet, but here's a few things I noticed
-while running it in-situ and attempting to re-create a paper plot made
-in kst 1.x.  This list ranges from bugs through wishes to just comments.
-
 1. data source text box in first panel of data wizard inevitably moves
 the text cursor to the end of the input after entering a character,
 making it difficult to edit in the middle of a path
@@ -122,12 +108,10 @@
 
 15. The text label behaviour is un-intuitive.  The typical interface is
 to choose a position first, and then input some text.
+   ** -a possible justification for the current order is that it could allow us to 
+      drag around the label once we have defined it, for more precision placement.
+      not sure yet if we should change anything. **
 
-16. Text labels have to be entered in a tiny little text box, making
-decent sized labels frustrating to edit.  Furthermore lines, in a label
-are separated by "\n" now?
-
 17. There appears to be no way to change the colour of the plot border
 and tick marks from black.  I though the brush colour under "Stroke"
 might do it, but nope.
-
--- branches/work/kst/portto4/kst/devel-docs/Kst2Specs/FixedBugs #968548:968549
@@ -604,3 +604,21 @@
 12. Changing the value of the fixed range limits doesn't active the
 "Apply" button.
 
+------------
+
+Layout issues in data object dialogs:
+  some dialogs, like histogram, lines up nicely, while others, like image
+  is excessivly indented.  I can't see any difference in their implementation.,
+
+------------
+
+16. Text labels have to be entered in a tiny little text box, making
+decent sized labels frustrating to edit.  Furthermore lines, in a label
+are separated by "\n" now?
+
+---------
+
+Auto-labels, and '_' in field names:
+When plots are using name-based auto-labels, any '_' in field names gets interpreted as a subscript.
+  'solution'.  Append a \_ to _ in field names so the appear correctly in labels.  
+  Down side: they are less nice looking in tag names.  This is acceptable (unless we end up really board).
--- branches/work/kst/portto4/kst/src/libkst/datamatrix.cpp #968548:968549
@@ -555,7 +555,8 @@
 }
 
 QString DataMatrix::_automaticDescriptiveName() const{
-  return field();
+  QString name = field();
+  return name.replace("_", "\\_");
 }
 
 QString DataMatrix::descriptionTip() const {
--- branches/work/kst/portto4/kst/src/libkst/datascalar.cpp #968548:968549
@@ -46,7 +46,8 @@
 
 
 QString DataScalar::_automaticDescriptiveName() const {
-  return field();
+  QString name = field();
+  return name.replace("_", "\\_");
 }
 
 
--- branches/work/kst/portto4/kst/src/libkst/datastring.cpp #968548:968549
@@ -46,7 +46,8 @@
 
 
 QString DataString::_automaticDescriptiveName() const {
-  return field();
+  QString name = field();
+  return name.replace("_", "\\_");
 }
 
 
--- branches/work/kst/portto4/kst/src/libkst/datavector.cpp #968548:968549
@@ -757,7 +757,8 @@
 }
 
 QString DataVector::_automaticDescriptiveName() const {
-  return field();
+  QString name = field();
+  return name.replace("_", "\\_");
 }
 
 QString DataVector::descriptionTip() const {
--- branches/work/kst/portto4/kst/src/widgets/labelbuilder.cpp #968548:968549
@@ -38,19 +38,19 @@
 
 
 QString LabelBuilder::labelText() const {
-  return _label->text();
+  return _label->toPlainText();
 }
 
 
 void LabelBuilder::setLabelText(const QString &label) {
-  _label->setText(label);
+  _label->setPlainText(label);
 }
 
 
 void LabelBuilder::labelUpdate(const QString& string) {
-  QString label = _label->text();
+  QString label = _label->toPlainText();
   label += "[" + string + "]";
-  _label->setText(label); 
+  _label->setPlainText(label);
 }
 
 }
--- branches/work/kst/portto4/kst/src/widgets/labelbuilder.ui #968548:968549
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>LabelBuilder</class>
- <widget class="QWidget" name="LabelBuilder" >
-  <property name="geometry" >
+ <widget class="QWidget" name="LabelBuilder">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
@@ -9,87 +10,87 @@
     <height>153</height>
    </rect>
   </property>
-  <property name="maximumSize" >
+  <property name="maximumSize">
    <size>
     <width>16777215</width>
     <height>16777215</height>
    </size>
   </property>
-  <property name="whatsThis" >
+  <property name="whatsThis">
    <string>Select a string to utilize.  If you wish to create a new string, select the icon to the right.</string>
   </property>
-  <layout class="QVBoxLayout" name="verticalLayout" >
-   <property name="margin" >
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <property name="margin">
     <number>0</number>
    </property>
    <item>
-    <layout class="QHBoxLayout" name="horizontalLayout_2" >
+    <layout class="QHBoxLayout" name="horizontalLayout_2">
      <item>
-      <widget class="QLabel" name="_Label_13" >
-       <property name="text" >
+      <widget class="QLabel" name="_Label_13">
+       <property name="text">
         <string>&amp;Label:</string>
        </property>
-       <property name="buddy" >
+       <property name="buddy">
         <cstring>_label</cstring>
        </property>
       </widget>
      </item>
      <item>
-      <widget class="QLineEdit" name="_label" />
+      <widget class="QPlainTextEdit" name="_label"/>
      </item>
     </layout>
    </item>
    <item>
-    <layout class="QGridLayout" name="gridLayout" >
-     <item row="0" column="0" >
-      <widget class="QLabel" name="TextLabel1_2_2_2" >
-       <property name="sizePolicy" >
-        <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+    <layout class="QGridLayout" name="gridLayout">
+     <item row="0" column="0">
+      <widget class="QLabel" name="TextLabel1_2_2_2">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
-       <property name="text" >
+       <property name="text">
         <string>Insert scalar in label:</string>
        </property>
-       <property name="wordWrap" >
+       <property name="wordWrap">
         <bool>false</bool>
        </property>
-       <property name="buddy" >
+       <property name="buddy">
         <cstring>_scalars</cstring>
        </property>
       </widget>
      </item>
-     <item row="0" column="1" >
-      <widget class="Kst::ScalarSelector" native="1" name="_scalars" />
+     <item row="0" column="1">
+      <widget class="Kst::ScalarSelector" name="_scalars" native="true"/>
      </item>
-     <item row="1" column="0" >
-      <widget class="QLabel" name="TextLabel1_2_2_3" >
-       <property name="sizePolicy" >
-        <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+     <item row="1" column="0">
+      <widget class="QLabel" name="TextLabel1_2_2_3">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
-       <property name="text" >
+       <property name="text">
         <string>Insert string in label:</string>
        </property>
-       <property name="wordWrap" >
+       <property name="wordWrap">
         <bool>false</bool>
        </property>
-       <property name="buddy" >
+       <property name="buddy">
         <cstring>_scalars</cstring>
        </property>
       </widget>
      </item>
-     <item row="1" column="1" >
-      <widget class="Kst::StringSelector" native="1" name="_strings" />
+     <item row="1" column="1">
+      <widget class="Kst::StringSelector" name="_strings" native="true"/>
      </item>
     </layout>
    </item>
   </layout>
  </widget>
- <layoutdefault spacing="6" margin="11" />
+ <layoutdefault spacing="6" margin="11"/>
  <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
  <customwidgets>
   <customwidget>
@@ -103,9 +104,6 @@
    <header>stringselector.h</header>
   </customwidget>
  </customwidgets>
- <tabstops>
-  <tabstop>_label</tabstop>
- </tabstops>
  <resources/>
  <connections/>
 </ui>


More information about the Kst mailing list