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

Mike Fenton mike at staikos.net
Wed Feb 27 20:07:03 CET 2008


SVN commit 779995 by fenton:

Add MarkersTab as PlotRenderItemDialog option.


 M  +2 -2      axistab.ui  
 M  +3 -0      libkstapp.pro  
 A             markerstab.cpp   [License: GPL (v2+)]
 A             markerstab.h   [License: GPL (v2+)]
 A             markerstab.ui  
 M  +22 -0     plotrenderitemdialog.cpp  
 M  +3 -0      plotrenderitemdialog.h  


--- branches/work/kst/portto4/kst/src/libkstapp/axistab.ui #779994:779995
@@ -64,9 +64,9 @@
     </widget>
    </item>
    <item row="1" column="0" >
-    <widget class="QGroupBox" name="_plotMarkerGroup" >
+    <widget class="QGroupBox" name="_axisDetailsGroup" >
      <property name="title" >
-      <string>Axis Plot Markers</string>
+      <string>Axis Details</string>
      </property>
      <layout class="QGridLayout" >
       <item row="0" column="0" >
--- branches/work/kst/portto4/kst/src/libkstapp/libkstapp.pro #779994:779995
@@ -73,6 +73,7 @@
     layouttab.cpp \
     lineitem.cpp \
     mainwindow.cpp \
+    markerstab.cpp \
     matrixdialog.cpp \
     matrixeditordialog.cpp \
     matrixmodel.cpp \
@@ -159,6 +160,7 @@
     layouttab.h \
     lineitem.h \
     mainwindow.h \
+    markerstab.h \
     matrixdialog.h \
     matrixeditordialog.h \
     matrixmodel.h \
@@ -221,6 +223,7 @@
     imagetab.ui \
     labeltab.ui \
     layouttab.ui \
+    markerstab.ui \
     matrixeditordialog.ui \
     matrixtab.ui \
     powerspectrumtab.ui \
--- branches/work/kst/portto4/kst/src/libkstapp/plotrenderitemdialog.cpp #779994:779995
@@ -13,6 +13,7 @@
 
 #include "contenttab.h"
 #include "axistab.h"
+#include "markerstab.h"
 #include "labeltab.h"
 #include "dialogpage.h"
 #include "application.h"
@@ -55,6 +56,22 @@
   addDialogPage(yAxisPage);
   connect(_yAxisTab, SIGNAL(apply()), this, SLOT(yAxisChanged()));
 
+  _xMarkersTab = new MarkersTab(this);
+  DialogPage *xMarkersPage = new DialogPage(this);
+  xMarkersPage->setPageTitle(tr("x-Axis markers"));
+  xMarkersPage->addDialogTab(_xMarkersTab);
+  addDialogPage(xMarkersPage);
+  _xMarkersTab->setObjectStore(_store);
+  connect(_xMarkersTab, SIGNAL(apply()), this, SLOT(xMarkersChanged()));
+
+  _yMarkersTab = new MarkersTab(this);
+  DialogPage *yMarkersPage = new DialogPage(this);
+  yMarkersPage->setPageTitle(tr("y-Axis markers"));
+  yMarkersPage->addDialogTab(_yMarkersTab);
+  addDialogPage(yMarkersPage);
+  _yMarkersTab->setObjectStore(_store);
+  connect(yMarkersPage, SIGNAL(apply()), this, SLOT(yMarkersChanged()));
+
   _contentTab = new ContentTab(this);
   connect(_contentTab, SIGNAL(apply()), this, SLOT(contentChanged()));
 
@@ -130,6 +147,7 @@
 void PlotRenderItemDialog::setupContent() {
   QStringList displayedRelations;
   QStringList availableRelations;
+  QStringList allRelations;
 
   CurveList curves = _store->getObjects<Curve>();
   ImageList images = _store->getObjects<Image>();
@@ -139,12 +157,14 @@
   }
 
   foreach (CurvePtr curve, curves) {
+    allRelations.append(curve->tag().displayString());
     if (!displayedRelations.contains(curve->tag().displayString())) {
       availableRelations.append(curve->tag().displayString());
     }
   }
 
   foreach (ImagePtr image, images) {
+    allRelations.append(image->tag().displayString());
     if (!displayedRelations.contains(image->tag().displayString())) {
       availableRelations.append(image->tag().displayString());
     }
@@ -152,6 +172,8 @@
 
   _contentTab->setDisplayedRelations(displayedRelations);
   _contentTab->setAvailableRelations(availableRelations);
+  _xMarkersTab->setObjects(allRelations);
+  _yMarkersTab->setObjects(allRelations);
 }
 
 
--- branches/work/kst/portto4/kst/src/libkstapp/plotrenderitemdialog.h #779994:779995
@@ -21,6 +21,7 @@
 class ContentTab;
 class PlotMarkersTab;
 class AxisTab;
+class MarkersTab;
 class LabelTab;
 class ObjectStore;
 class PlotRenderItem;
@@ -50,6 +51,8 @@
     ContentTab *_contentTab;
     AxisTab *_xAxisTab;
     AxisTab *_yAxisTab;
+    MarkersTab *_xMarkersTab;
+    MarkersTab *_yMarkersTab;
     LabelTab *_labelTab;
     PlotMarkersTab* _plotMarkersTab;
     PlotRenderItem* _plotItem;


More information about the Kst mailing list