[Kst] branches/work/kst/portto4/kst/src/libkstapp
George Staikos
staikos at kde.org
Tue May 29 19:11:40 CEST 2007
SVN commit 669552 by staikos:
add picture support
M +1 -0 CMakeLists.txt
M +13 -2 mainwindow.cpp
M +2 -0 mainwindow.h
A pictureitem.cpp [License: GPL (v2+)]
A pictureitem.h [License: GPL (v2+)]
--- branches/work/kst/portto4/kst/src/libkstapp/CMakeLists.txt #669551:669552
@@ -10,6 +10,7 @@
labelitem.cpp
lineitem.cpp
mainwindow.cpp
+ pictureitem.cpp
sessionmodel.cpp
tabwidget.cpp
vectormodel.cpp
--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.cpp #669551:669552
@@ -17,6 +17,7 @@
#include "kstapplication.h"
#include "labelitem.h"
#include "lineitem.h"
+#include "pictureitem.h"
#include "tabwidget.h"
#include "view.h"
@@ -84,11 +85,16 @@
void MainWindow::about() {
//FIXME Build a proper about box...
- QMessageBox::about(this, tr("About Kst"),
- tr("FIXME."));
+ QMessageBox::about(this, tr("About Kst"), tr("FIXME."));
}
+void MainWindow::createPicture() {
+ CreatePictureCommand *cmd = new CreatePictureCommand;
+ cmd->createItem();
+}
+
+
void MainWindow::createBox() {
CreateBoxCommand *cmd = new CreateBoxCommand;
cmd->createItem();
@@ -155,6 +161,10 @@
_createBoxAct->setStatusTip(tr("Create a box for the current view"));
connect(_createBoxAct, SIGNAL(triggered()), this, SLOT(createBox()));
+ _createPictureAct = new QAction(tr("&Create picture"), this);
+ _createPictureAct->setStatusTip(tr("Create a picture for the current view"));
+ connect(_createPictureAct, SIGNAL(triggered()), this, SLOT(createPicture()));
+
_createEllipseAct = new QAction(tr("&Create ellipse"), this);
_createEllipseAct->setStatusTip(tr("Create an ellipse for the current view"));
connect(_createEllipseAct, SIGNAL(triggered()), this, SLOT(createEllipse()));
@@ -229,6 +239,7 @@
_plotMenu->addAction(_createBoxAct);
_plotMenu->addAction(_createEllipseAct);
_plotMenu->addAction(_createLineAct);
+ _plotMenu->addAction(_createPictureAct);
_settingsMenu = menuBar()->addMenu(tr("&Settings"));
--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.h #669551:669552
@@ -48,6 +48,7 @@
void createBox();
void createEllipse();
void createLine();
+ void createPicture();
void demoModel();
@@ -86,6 +87,7 @@
QAction *_createBoxAct;
QAction *_createEllipseAct;
QAction *_createLineAct;
+ QAction *_createPictureAct;
QAction *_newTabAct;
QAction *_saveAct;
More information about the Kst
mailing list