[Kst] branches/work/kst/portto4/kst/src/libkstapp
George Staikos
staikos at kde.org
Mon May 28 19:29:11 CEST 2007
SVN commit 669161 by staikos:
add box items
M +1 -0 CMakeLists.txt
A boxitem.cpp [License: GPL (v2+)]
A boxitem.h [License: GPL (v2+)]
M +14 -2 kstmainwindow.cpp
M +2 -0 kstmainwindow.h
--- branches/work/kst/portto4/kst/src/libkstapp/CMakeLists.txt #669160:669161
@@ -5,6 +5,7 @@
kstmainwindow.cpp
view.cpp
viewitem.cpp
+ boxitem.cpp
lineitem.cpp
labelitem.cpp
viewcommand.cpp
--- branches/work/kst/portto4/kst/src/libkstapp/kstmainwindow.cpp #669160:669161
@@ -12,6 +12,7 @@
#include "kstmainwindow.h"
#include "kstapplication.h"
#include "view.h"
+#include "boxitem.h"
#include "labelitem.h"
#include "lineitem.h"
@@ -98,6 +99,12 @@
}
+void KstMainWindow::createBox() {
+ CreateBoxCommand *cmd = new CreateBoxCommand;
+ cmd->createItem();
+}
+
+
void KstMainWindow::createLabel() {
CreateLabelCommand *cmd = new CreateLabelCommand;
cmd->createItem();
@@ -117,11 +124,15 @@
_redoAct->setShortcut(tr("Ctrl+Shift+Z"));
_createLabelAct = new QAction(tr("&Create label"), this);
- _createLabelAct->setStatusTip(tr("Create a label for the current plot"));
+ _createLabelAct->setStatusTip(tr("Create a label for the current view"));
connect(_createLabelAct, SIGNAL(triggered()), this, SLOT(createLabel()));
+ _createBoxAct = new QAction(tr("&Create box"), this);
+ _createBoxAct->setStatusTip(tr("Create a box for the current view"));
+ connect(_createBoxAct, SIGNAL(triggered()), this, SLOT(createBox()));
+
_createLineAct = new QAction(tr("&Create line"), this);
- _createLineAct->setStatusTip(tr("Create a line for the current plot"));
+ _createLineAct->setStatusTip(tr("Create a line for the current view"));
connect(_createLineAct, SIGNAL(triggered()), this, SLOT(createLine()));
_exitAct = new QAction(tr("E&xit"), this);
@@ -149,6 +160,7 @@
_plotMenu = menuBar()->addMenu(tr("&Plot"));
_plotMenu->addAction(_createLabelAct);
+ _plotMenu->addAction(_createBoxAct);
_plotMenu->addAction(_createLineAct);
_settingsMenu = menuBar()->addMenu(tr("&Settings"));
--- branches/work/kst/portto4/kst/src/libkstapp/kstmainwindow.h #669160:669161
@@ -43,6 +43,7 @@
void plotViewDestroyed(QObject *object);
void createLabel();
+ void createBox();
void createLine();
private:
@@ -70,6 +71,7 @@
QAction *_undoAct;
QAction *_redoAct;
QAction *_createLabelAct;
+ QAction *_createBoxAct;
QAction *_createLineAct;
QAction *_exitAct;
More information about the Kst
mailing list