[Kst] kdeextragear-2/kst/kst
Rick Chern
rchern at interchange.ubc.ca
Wed Aug 11 22:32:48 CEST 2004
CVS commit by rchern:
Add "Make Array" to context menu of vectors, and "Make Image" to context menu of arrays
M +15 -0 kstdatamanager_i.cpp 1.72
M +2 -0 kstdatamanager_i.h 1.20
--- kdeextragear-2/kst/kst/kstdatamanager_i.cpp #1.71:1.72
@@ -36,4 +36,5 @@
// application specific includes
+#include "arrayselector.h"
#include "imagedialog.h"
#include "kst.h"
@@ -205,4 +206,14 @@ void KstObjectItem::makeCurve() {
}
+void KstObjectItem::makeArray() {
+ KstArrayDialogI::globalInstance()->show_New();
+ KstArrayDialogI::globalInstance()->_zVector->setSelection(_name);
+}
+
+void KstObjectItem::makeImage() {
+ KstImageDialogI::globalInstance()->show_New();
+ KstImageDialogI::globalInstance()->_array->setSelection(_name);
+}
+
void KstObjectItem::applyFilter(int id) {
/* Replace with new filtering logic
@@ -492,7 +503,11 @@ 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 &Array..."), koi, SLOT(makeArray()));
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 &Array..."), koi, SLOT(makeArray()));
+ } else if (dynamic_cast<KstArray*>(koi->dataObject().data())) {
+ id = m->insertItem(i18n("Make &Image..."), koi, SLOT(makeImage()));
} else if ((c = dynamic_cast<KstBaseCurve*>(koi->dataObject().data()))) {
KPopupMenu *addMenu = new KPopupMenu(this);
--- kdeextragear-2/kst/kst/kstdatamanager_i.h #1.19:1.20
@@ -74,4 +74,6 @@ class KstObjectItem : public QObject, pu
void removeImageFromPlot(int);
void makeCurve();
+ void makeArray();
+ void makeImage();
void reload();
More information about the Kst
mailing list