[Kst] branches/work/kst/portto4/kst/src/libkstapp
George Staikos
staikos at kde.org
Tue May 29 23:05:51 CEST 2007
SVN commit 669631 by staikos:
add the hook for creating plots
M +1 -0 CMakeLists.txt
M +12 -0 mainwindow.cpp
M +2 -0 mainwindow.h
A plotitem.cpp [License: GPL (v2+)]
A plotitem.h [License: GPL (v2+)]
--- branches/work/kst/portto4/kst/src/libkstapp/CMakeLists.txt #669630:669631
@@ -12,6 +12,7 @@
mainwindow.cpp
matrixmodel.cpp
pictureitem.cpp
+ plotitem.cpp
sessionmodel.cpp
tabwidget.cpp
vectormodel.cpp
--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.cpp #669630:669631
@@ -18,6 +18,7 @@
#include "labelitem.h"
#include "lineitem.h"
#include "pictureitem.h"
+#include "plotitem.h"
#include "tabwidget.h"
#include "view.h"
@@ -119,6 +120,12 @@
}
+void MainWindow::createPlot() {
+ CreatePlotCommand *cmd = new CreatePlotCommand;
+ cmd->createItem();
+}
+
+
void MainWindow::demoModel() {
QTableView *view = new QTableView;
KstVectorPtr v = new KstVector;
@@ -173,6 +180,10 @@
_createLineAct->setStatusTip(tr("Create a line for the current view"));
connect(_createLineAct, SIGNAL(triggered()), this, SLOT(createLine()));
+ _createPlotAct = new QAction(tr("&Create plot"), this);
+ _createPlotAct->setStatusTip(tr("Create a plot for the current view"));
+ connect(_createPlotAct, SIGNAL(triggered()), this, SLOT(createPlot()));
+
_newTabAct = new QAction(tr("&New tab"), this);
_newTabAct->setStatusTip(tr("Create a new tab"));
connect(_newTabAct, SIGNAL(triggered()), tabWidget(), SLOT(createView()));
@@ -240,6 +251,7 @@
_plotMenu->addAction(_createEllipseAct);
_plotMenu->addAction(_createLineAct);
_plotMenu->addAction(_createPictureAct);
+ _plotMenu->addAction(_createPlotAct);
_settingsMenu = menuBar()->addMenu(tr("&Settings"));
--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.h #669630:669631
@@ -49,6 +49,7 @@
void createEllipse();
void createLine();
void createPicture();
+ void createPlot();
void demoModel();
@@ -88,6 +89,7 @@
QAction *_createEllipseAct;
QAction *_createLineAct;
QAction *_createPictureAct;
+ QAction *_createPlotAct;
QAction *_newTabAct;
QAction *_saveAct;
More information about the Kst
mailing list