[Kst] branches/work/kst/portto4/kst/src/libkstapp
Mike Fenton
mike at staikos.net
Tue Oct 30 15:15:31 CET 2007
SVN commit 731036 by fenton:
Addition of StringEditorDialog and StringModel/StringTableModel.
M +7 -0 libkstapp.pro
M +15 -0 mainwindow.cpp
M +4 -0 mainwindow.h
A stringeditordialog.cpp [License: GPL (v2+)]
A stringeditordialog.h [License: GPL (v2+)]
A stringeditordialog.ui
A stringmodel.cpp [License: GPL (v2+)]
A stringmodel.h [License: GPL (v2+)]
A stringtablemodel.cpp [License: GPL (v2+)]
A stringtablemodel.h [License: GPL (v2+)]
--- branches/work/kst/portto4/kst/src/libkstapp/libkstapp.pro #731035:731036
@@ -87,6 +87,9 @@
scene.cpp \
selectionrect.cpp \
sessionmodel.cpp \
+ stringmodel.cpp \
+ stringtablemodel.cpp \
+ stringeditordialog.cpp \
stroketab.cpp \
svgitem.cpp \
tabwidget.cpp \
@@ -170,6 +173,9 @@
scene.h \
selectionrect.h \
sessionmodel.h \
+ stringmodel.h \
+ stringtablemodel.h \
+ stringeditordialog.h \
svgitem.h \
stroketab.h \
tabwidget.h \
@@ -213,6 +219,7 @@
powerspectrumtab.ui \
scalareditordialog.ui \
scalartab.ui \
+ stringeditordialog.ui \
stroketab.ui \
vectoreditordialog.ui \
vectortab.ui \
--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.cpp #731035:731036
@@ -31,6 +31,7 @@
#include "vectoreditordialog.h"
#include "scalareditordialog.h"
#include "matrixeditordialog.h"
+#include "stringeditordialog.h"
#include "view.h"
#include "viewmanager.h"
@@ -55,6 +56,8 @@
_exportGraphics = 0;
_vectorEditor = 0;
_scalarEditor = 0;
+ _stringEditor = 0;
+ _matrixEditor = 0;
_viewManager = 0;
_doc = new Document(this);
_tabWidget = new TabWidget(this);
@@ -517,6 +520,10 @@
_scalarEditorAct->setStatusTip(tr("Show all scalars in a spreadsheet"));
connect(_scalarEditorAct, SIGNAL(triggered()), this, SLOT(showScalarEditor()));
+ _stringEditorAct = new QAction(tr("Edit S&trings..."), this);
+ _stringEditorAct->setStatusTip(tr("Show all strings in a spreadsheet"));
+ connect(_stringEditorAct, SIGNAL(triggered()), this, SLOT(showStringEditor()));
+
_matrixEditorAct = new QAction(tr("Edit &Matrix..."), this);
_matrixEditorAct->setStatusTip(tr("Show all matrix in a spreadsheet"));
connect(_matrixEditorAct, SIGNAL(triggered()), this, SLOT(showMatrixEditor()));
@@ -579,6 +586,7 @@
_dataMenu->addAction(_vectorEditorAct);
_dataMenu->addAction(_scalarEditorAct);
_dataMenu->addAction(_matrixEditorAct);
+ _dataMenu->addAction(_stringEditorAct);
_viewMenu = menuBar()->addMenu(tr("&View"));
_viewMenu->addAction(_viewManagerAct);
@@ -708,6 +716,13 @@
}
+void MainWindow::showStringEditor() {
+ if (!_stringEditor) {
+ _stringEditor = new StringEditorDialog(this);
+ }
+ _stringEditor->show();
+}
+
void MainWindow::showMatrixEditor() {
if (!_matrixEditor) {
_matrixEditor = new MatrixEditorDialog(this, _doc);
--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.h #731035:731036
@@ -28,6 +28,7 @@
class ExportGraphicsDialog;
class MatrixEditorDialog;
class ScalarEditorDialog;
+class StringEditorDialog;
class TabWidget;
class VectorEditorDialog;
class View;
@@ -52,6 +53,7 @@
void showVectorEditor();
void showScalarEditor();
void showMatrixEditor();
+ void showStringEditor();
void showViewManager();
void showSettingsDialog();
void showDifferentiateCurvesDialog();
@@ -111,6 +113,7 @@
ExportGraphicsDialog *_exportGraphics;
VectorEditorDialog *_vectorEditor;
ScalarEditorDialog *_scalarEditor;
+ StringEditorDialog * _stringEditor;
MatrixEditorDialog *_matrixEditor;
ViewManager *_viewManager;
@@ -158,6 +161,7 @@
QAction *_scalarEditorAct;
QAction *_vectorEditorAct;
QAction *_matrixEditorAct;
+ QAction *_stringEditorAct;
QAction *_viewManagerAct;
QAction *_layoutModeAct;
More information about the Kst
mailing list