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

Mike Fenton mike at staikos.net
Mon Oct 22 20:33:36 CEST 2007


SVN commit 728216 by fenton:

Add ScalarEditor dialog and ScalarTableModel/ScalarModel.


 M  +9 -2      libkstapp.pro  
 M  +16 -0     mainwindow.cpp  
 M  +4 -0      mainwindow.h  
 A             scalareditordialog.cpp   [License: GPL (v2+)]
 A             scalareditordialog.h   [License: GPL (v2+)]
 A             scalareditordialog.ui  
 A             scalarmodel.cpp   [License: GPL (v2+)]
 A             scalarmodel.h   [License: GPL (v2+)]
 A             scalartablemodel.cpp   [License: GPL (v2+)]
 A             scalartablemodel.h   [License: GPL (v2+)]


--- branches/work/kst/portto4/kst/src/libkstapp/libkstapp.pro #728215:728216
@@ -70,10 +70,13 @@
     plotrenderitem.cpp \
     powerspectrumdialog.cpp \
     qgetoptions.cpp \
+    scalardialog.cpp \
+    scalareditordialog.cpp \
+    scalarmodel.cpp \
+    scalartablemodel.cpp \
     scene.cpp \
     selectionrect.cpp \
     sessionmodel.cpp \
-    scalardialog.cpp \
     stroketab.cpp \
     svgitem.cpp \
     tabwidget.cpp \
@@ -140,10 +143,13 @@
     plotrenderitem.h \
     powerspectrumdialog.h \
     qgetoptions.h \
+    scalardialog.h \
+    scalareditordialog.h \
+    scalarmodel.h \
+    scalartablemodel.h \
     scene.h \
     selectionrect.h \
     sessionmodel.h \
-    scalardialog.h \
     svgitem.h \
     stroketab.h \
     tabwidget.h \
@@ -177,6 +183,7 @@
     layouttab.ui \
     matrixtab.ui \
     powerspectrumtab.ui \
+    scalareditordialog.ui \
     scalartab.ui \
     stroketab.ui \
     vectoreditordialog.ui \
--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.cpp #728215:728216
@@ -29,6 +29,7 @@
 #include "tabwidget.h"
 #include "ui_aboutdialog.h"
 #include "vectoreditordialog.h"
+#include "scalareditordialog.h"
 #include "view.h"
 #include "viewmanager.h"
 
@@ -48,6 +49,7 @@
   _dataManager = 0;
   _exportGraphics = 0;
   _vectorEditor = 0;
+  _scalarEditor = 0;
   _viewManager = 0;
   _doc = new Document(this);
   _tabWidget = new TabWidget(this);
@@ -506,6 +508,10 @@
   _vectorEditorAct->setStatusTip(tr("Show all vectors in a spreadsheet"));
   connect(_vectorEditorAct, SIGNAL(triggered()), this, SLOT(showVectorEditor()));
 
+  _scalarEditorAct = new QAction(tr("Edit &Scalars..."), this);
+  _scalarEditorAct->setStatusTip(tr("Show all scalars in a spreadsheet"));
+  connect(_scalarEditorAct, SIGNAL(triggered()), this, SLOT(showScalarEditor()));
+
   _exportGraphicsAct = new QAction(tr("&Export..."), this);
   _exportGraphicsAct->setStatusTip(tr("Export graphics to disk"));
   connect(_exportGraphicsAct, SIGNAL(triggered()), this, SLOT(showExportGraphicsDialog()));
@@ -545,6 +551,7 @@
   _dataMenu->addAction(_dataManagerAct);
   _dataMenu->addSeparator();
   _dataMenu->addAction(_vectorEditorAct);
+  _dataMenu->addAction(_scalarEditorAct);
 
   _viewMenu = menuBar()->addMenu(tr("&View"));
   _viewMenu->addAction(_viewManagerAct);
@@ -589,6 +596,7 @@
   _dataToolBar = addToolBar(tr("Data"));
   _dataToolBar->addAction(_dataManagerAct);
 //   _dataToolBar->addAction(_vectorEditorAct); //no icon
+//   _dataToolBar->addAction(_scalarEditorAct); //no icon
 
   _viewToolBar = addToolBar(tr("View"));
   _viewToolBar->addAction(_viewManagerAct);
@@ -658,6 +666,14 @@
 }
 
 
+void MainWindow::showScalarEditor() {
+  if (!_scalarEditor) {
+    _scalarEditor = new ScalarEditorDialog(this, _doc);
+  }
+  _scalarEditor->show();
+}
+
+
 void MainWindow::showDebugDialog() {
   if (!_debugDialog) {
     _debugDialog = new DebugDialog(this);
--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.h #728215:728216
@@ -26,6 +26,7 @@
 class DebugDialog;
 class Document;
 class ExportGraphicsDialog;
+class ScalarEditorDialog;
 class TabWidget;
 class VectorEditorDialog;
 class View;
@@ -48,6 +49,7 @@
     void showDebugDialog();
     void showExportGraphicsDialog();
     void showVectorEditor();
+    void showScalarEditor();
     void showViewManager();
     void showSettingsDialog();
 
@@ -102,6 +104,7 @@
     DebugDialog *_debugDialog;
     ExportGraphicsDialog *_exportGraphics;
     VectorEditorDialog *_vectorEditor;
+    ScalarEditorDialog *_scalarEditor;
     ViewManager *_viewManager;
 
     QPointer<QProgressBar> _progressBar;
@@ -144,6 +147,7 @@
     QAction *_printAct;
     QAction *_saveAct;
     QAction *_saveAsAct;
+    QAction *_scalarEditorAct;
     QAction *_vectorEditorAct;
 
     QAction *_viewManagerAct;


More information about the Kst mailing list