[Kst] kst_hfi_calib_branch: kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Wed Nov 10 11:37:40 CET 2004


CVS commit by staikos: 

Add "Make Histogram..." and "Make Power Spectrum..." to the context menu of
vectors.


  M +14 -0     kstdatamanager_i.cpp   1.88.2.1
  M +2 -0      kstdatamanager_i.h   1.28.2.1


--- kdeextragear-2/kst/kst/kstdatamanager_i.h  #1.28:1.28.2.1
@@ -77,4 +77,6 @@ class KstObjectItem : public QObject, pu
     void removeImageFromPlot(int);
     void makeCurve();
+    void makeHistogram();
+    void makePSD();
     void makeMatrix();
     void makeImage();

--- kdeextragear-2/kst/kst/kstdatamanager_i.cpp  #1.88:1.88.2.1
@@ -200,4 +200,14 @@ void KstObjectItem::makeCurve() {
 }
 
+void KstObjectItem::makePSD() {
+  KstPsdDialogI::globalInstance()->show_New();
+  KstPsdDialogI::globalInstance()->_vector->setSelection(_name);
+}
+
+void KstObjectItem::makeHistogram() {
+  KstHsDialogI::globalInstance()->show_New();
+  KstHsDialogI::globalInstance()->_vector->setSelection(_name);
+}
+
 void KstObjectItem::makeMatrix() {
   KstMatrixDialogI::globalInstance()->show_New();
@@ -588,8 +598,12 @@ void KstDataManagerI::contextMenu(QListV
   if (koi->rtti() == RTTI_OBJ_DATA_VECTOR) {
     id = m->insertItem(i18n("&Make Curve..."), koi, SLOT(makeCurve()));
+    id = m->insertItem(i18n("Make &Power Spectrum..."), koi, SLOT(makePSD()));
+    id = m->insertItem(i18n("Make &Histogram..."), koi, SLOT(makeHistogram()));
     id = m->insertItem(i18n("Make M&atrix..."), koi, SLOT(makeMatrix()));
     id = m->insertItem(i18n("&Reload"), koi, SLOT(reload()));
   } else if (koi->rtti() == RTTI_OBJ_VECTOR) {
     id = m->insertItem(i18n("&Make Curve..."), koi, SLOT(makeCurve()));
+    id = m->insertItem(i18n("Make &Power Spectrum..."), koi, SLOT(makePSD()));
+    id = m->insertItem(i18n("Make &Histogram..."), koi, SLOT(makeHistogram()));
     id = m->insertItem(i18n("Make M&atrix..."), koi, SLOT(makeMatrix()));
   } else if (kst_cast<KstMatrix>(koi->dataObject())) {





More information about the Kst mailing list