[Kst] branches/work/kst/portto4/kst/src
Mike Fenton
mike at staikos.net
Tue Dec 23 22:19:10 CET 2008
SVN commit 900877 by fenton:
Add initial version of SharedAxisBoxItem allowing for basic drawing and existing layout application.
M +1 -0 images/images.qrc
AM images/kst_gfx_sharedaxisbox.png
M +2 -0 libkstapp/libkstapp.pro
M +18 -1 libkstapp/mainwindow.cpp
M +2 -0 libkstapp/mainwindow.h
A libkstapp/sharedaxisboxitem.cpp [License: GPL (v2+)]
A libkstapp/sharedaxisboxitem.h [License: GPL (v2+)]
M +1 -0 libkstapp/viewitemzorder.h
--- branches/work/kst/portto4/kst/src/images/images.qrc #900876:900877
@@ -37,6 +37,7 @@
<file>kst_gfx_rectangle.png</file>
<file>kst_gfx_rounded_rectangle.png</file>
<file>kst_gfx_layout.png</file>
+ <file>kst_gfx_sharedaxisbox.png</file>
<file>kst_gfx_breaklayout.png</file>
<file>kst_graphfile.png</file>
<file>kst_graphics.png</file>
** branches/work/kst/portto4/kst/src/images/kst_gfx_sharedaxisbox.png #property svn:mime-type
+ application/octet-stream
--- branches/work/kst/portto4/kst/src/libkstapp/libkstapp.pro #900876:900877
@@ -105,6 +105,7 @@
scene.cpp \
selectionrect.cpp \
sessionmodel.cpp \
+ sharedaxisboxitem.cpp \
stringdialog.cpp \
stringmodel.cpp \
stroketab.cpp \
@@ -210,6 +211,7 @@
scene.h \
selectionrect.h \
sessionmodel.h \
+ sharedaxisboxitem.h \
stringdialog.h \
stringmodel.h \
svgitem.h \
--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.cpp #900876:900877
@@ -30,6 +30,7 @@
#include "plotitemmanager.h"
#include "svgitem.h"
#include "tabwidget.h"
+#include "sharedaxisboxitem.h"
#include "ui_aboutdialog.h"
#include "viewvectordialog.h"
#include "viewmatrixdialog.h"
@@ -341,6 +342,13 @@
}
+
+void MainWindow::createSharedAxisBox() {
+ CreateSharedAxisBoxCommand *cmd = new CreateSharedAxisBoxCommand;
+ cmd->createItem();
+}
+
+
void MainWindow::createCircle() {
CreateCircleCommand *cmd = new CreateCircleCommand;
cmd->createItem();
@@ -482,9 +490,15 @@
_createLayoutAct = new QAction(tr("&Create layout"), this);
_createLayoutAct->setStatusTip(tr("Create a layout for the current item"));
_createLayoutAct->setIcon(QPixmap(":kst_gfx_layout.png"));
- _createLayoutAct->setEnabled(false);
+// _createLayoutAct->setEnabled(false);
connect(_createLayoutAct, SIGNAL(triggered()), this, SLOT(createLayout()));
+ _createSharedAxisBoxAct = new QAction(tr("&Create Shared Axis Box"), this);
+ _createSharedAxisBoxAct->setStatusTip(tr("Create a shared axis box for the current item"));
+ _createSharedAxisBoxAct->setIcon(QPixmap(":kst_gfx_sharedaxisbox.png"));
+// _createSharedAxisBoxAct->setEnabled(false);
+ connect(_createSharedAxisBoxAct, SIGNAL(triggered()), this, SLOT(createSharedAxisBox()));
+
// ****************************************************************************** //
// ********************* Object Dialog Actions ********************************** //
@@ -673,6 +687,7 @@
_viewMenu->addAction(_createPictureAct);
_viewMenu->addAction(_createPlotAct);
_viewMenu->addAction(_createSvgAct);
+ _viewMenu->addAction(_createSharedAxisBoxAct);
_toolsMenu = menuBar()->addMenu(tr("&Tools"));
_toolsMenu->addAction(_dataWizardAct);
@@ -730,7 +745,9 @@
_layoutToolBar->addAction(_createPictureAct);
_layoutToolBar->addAction(_createPlotAct);
// _layoutToolBar->addAction(_createSvgAct); //no icon
+ _layoutToolBar->addAction(_createSharedAxisBoxAct);
+
_layoutToolBar->addSeparator();
_layoutToolBar->addAction(_createLayoutAct);
--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.h #900876:900877
@@ -87,6 +87,7 @@
void createPlot();
void createSvg();
void createLayout();
+ void createSharedAxisBox();
void demoModel();
@@ -146,6 +147,7 @@
QAction *_createPlotAct;
QAction *_createSvgAct;
QAction *_createLayoutAct;
+ QAction *_createSharedAxisBoxAct;
QAction *_aboutAct;
QAction *_closeTabAct;
--- branches/work/kst/portto4/kst/src/libkstapp/viewitemzorder.h #900876:900877
@@ -22,5 +22,6 @@
#define LEGEND_ZVALUE 8
#define LINE_ZVALUE 9
#define ARROW_ZVALUE 9
+#define SHAREDAXISBOX_ZVALUE 10
// vim: ts=2 sw=2 et
More information about the Kst
mailing list