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

Nicolas Brisset nicolas.brisset at eurocopter.com
Fri Oct 1 01:23:02 CEST 2010


SVN commit 1181416 by brisset:

Oops, there was no easy way to create the basic types any longer (the small buttons in other dialogs don't really count, do they?). I think I forgot them when moving creation stuff from the data manager to the "Create" menu.
Now they're back :-)

CCBUG: 249799


 M  +41 -1     mainwindow.cpp  
 M  +8 -0      mainwindow.h  


--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.cpp #1181415:1181416
@@ -529,7 +529,30 @@
   }
 }
 
+void MainWindow::createVector() {
+  QString tmp;
+  DialogLauncher::self()->showVectorDialog(tmp);
+}
 
+
+void MainWindow::createMatrix() {
+  QString tmp;
+  DialogLauncher::self()->showMatrixDialog(tmp);
+}
+
+
+void MainWindow::createScalar() {
+  QString scalarName;
+  DialogLauncher::self()->showScalarDialog(scalarName);
+}
+
+
+void MainWindow::createString() {
+  QString stringName;
+  DialogLauncher::self()->showStringDialog(stringName);
+}
+
+
 void MainWindow::createCircle() {
   if (_createCircleAct->isChecked()) {
     clearDrawingMarker();
@@ -769,6 +792,18 @@
   _createPlotAct->setCheckable(true);
   connect(_createPlotAct, SIGNAL(triggered()), this, SLOT(createPlot()));
 
+  _newScalarAct = new QAction(tr("&Scalar"), this);
+  connect(_newScalarAct, SIGNAL(triggered()), this, SLOT(createScalar()));
+
+  _newVectorAct = new QAction(tr("&Vector"), this);
+  connect(_newVectorAct, SIGNAL(triggered()), this, SLOT(createVector()));
+
+  _newMatrixAct = new QAction(tr("&Matrix"), this);
+  connect(_newMatrixAct, SIGNAL(triggered()), this, SLOT(createMatrix()));
+
+  _newStringAct = new QAction(tr("Strin&g"), this);
+  connect(_newStringAct, SIGNAL(triggered()), this, SLOT(createString()));
+
   _newCurveAct = new QAction(tr("&Curve"), this);
   connect(_newCurveAct, SIGNAL(triggered()), this, SLOT(createCurve()));
 
@@ -1005,6 +1040,12 @@
   _createMenu->addAction(_createPlotAct);
   _createMenu->addAction(_createSharedAxisBoxAct);
   _createMenu->addSeparator();
+  // Primitives
+  _createMenu->addAction(_newScalarAct);
+  _createMenu->addAction(_newVectorAct);
+  _createMenu->addAction(_newMatrixAct);
+  _createMenu->addAction(_newStringAct);
+  _createMenu->addSeparator();
   // Data objects
   _createMenu->addAction(_newCurveAct);
   _createMenu->addAction(_newEquationAct);
@@ -1429,7 +1470,6 @@
   _bugReportWizard->show();
 }
 
-
 void MainWindow::showChangeFileDialog() {
   if (!_changeFileDialog) {
     _changeFileDialog = new ChangeFileDialog(this);
--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.h #1181415:1181416
@@ -112,6 +112,10 @@
     void createSvg();
     void createSharedAxisBox();
 
+    void createScalar();
+    void createVector();
+    void createMatrix();
+    void createString();
     void createCurve();
     void createPSD();
     void createEquation();
@@ -237,6 +241,10 @@
     QAction *_forwardAct;
     QAction *_reloadAct;
 
+    QAction *_newScalarAct;
+    QAction *_newVectorAct;
+    QAction *_newMatrixAct;
+    QAction *_newStringAct;
     QAction *_newCurveAct;
     QAction *_newEquationAct;
     QAction *_newPSDAct;


More information about the Kst mailing list