[Kst] branches/work/kst/portto4/kst/src/libkstapp
George Staikos
staikos at kde.org
Thu Jul 19 10:06:29 CEST 2007
SVN commit 689811 by staikos:
Add a view manager dialog with no model or real UI yet. Also add an about
dialog (needs a handler for the URLs)
M +0 -3 TODO
A aboutdialog.ui
M +11 -6 libkstapp.pro
M +43 -2 mainwindow.cpp
M +15 -11 mainwindow.h
A viewmanager.cpp [License: GPL (v2+)]
A viewmanager.h [License: GPL (v2+)]
A viewmanager.ui
--- branches/work/kst/portto4/kst/src/libkstapp/TODO #689810:689811
@@ -41,14 +41,11 @@
Document
--------
-- Save
-- Open
- Move data collections into here somehow?
MainWindow
----------
-- Toolbar
- Mouse modes
--- branches/work/kst/portto4/kst/src/libkstapp/libkstapp.pro #689810:689811
@@ -20,6 +20,7 @@
SOURCES += \
applicationsettings.cpp \
+ axis.cpp \
boxitem.cpp \
builtingraphics.cpp \
datamanager.cpp \
@@ -38,6 +39,9 @@
memorywidget.cpp \
pictureitem.cpp \
plotitem.cpp \
+ plotrenderer2d.cpp \
+ qgetoptions.cpp \
+ render2dcartesian.cpp \
sessionmodel.cpp \
svgitem.cpp \
tabwidget.cpp \
@@ -48,10 +52,7 @@
view.cpp \
viewitem.cpp \
viewitemdialog.cpp \
- axis.cpp \
- plotrenderer2d.cpp \
- render2dcartesian.cpp \
- qgetoptions.cpp
+ viewmanager.cpp
HEADERS += \
applicationsettings.h \
@@ -76,6 +77,7 @@
pictureitem.h \
plotitem.h \
plotrenderer2d.h \
+ qgetoptions.h \
render2dcartesian.h \
sessionmodel.h \
svgitem.h \
@@ -87,10 +89,13 @@
view.h \
viewitemdialog.h \
viewitem.h \
- qgetoptions.h
+ viewmanager.h
FORMS += \
+ aboutdialog.ui \
datamanager.ui \
debugdialog.ui \
exportgraphicsdialog.ui \
- vectoreditordialog.ui
+ vectoreditordialog.ui \
+ viewmanager.ui
+
--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.cpp #689810:689811
@@ -26,8 +26,10 @@
#include "plotitem.h"
#include "svgitem.h"
#include "tabwidget.h"
+#include "ui_aboutdialog.h"
#include "vectoreditordialog.h"
#include "view.h"
+#include "viewmanager.h"
#include <QtGui>
@@ -71,6 +73,8 @@
_vectorEditor = 0;
delete _dataManager;
_dataManager = 0;
+ delete _viewManager;
+ _viewManager = 0;
delete _doc;
_doc = 0;
}
@@ -232,8 +236,30 @@
void MainWindow::about() {
- //FIXME Build a proper about box...
- QMessageBox::about(this, tr("About Kst"), tr("FIXME."));
+ QDialog dlg;
+ Ui::AboutDialog ui;
+ ui.setupUi(&dlg);
+ // Sorted alphabetically, first group is 2.0 contributors
+ const QString msg = tr(
+ "<qt><h2>Kst 2.0 - A data viewing program.</h2>\n<hr>\n"
+ "Copyright © 2000-2007 Barth Netterfield<br>"
+ "<a href=\"http://kst.kde.org/\">http://kst.kde.org/</a><br>"
+ "Please report bugs to: <a href=\"http://bugs.kde.org/\">http://bugs.kde.org/</a><br>"
+ "Authors:<ul>"
+ "<li>Barth Netterfield</li>"
+ "<li><a href=\"http://www.staikos.net/\">Staikos Computing Services Inc.</a></li>"
+ "<li>Ted Kisner</li>"
+ "<li>The University of Toronto</li>"
+ "</ul><ul>"
+ "<li>Matthew Truch</li>"
+ "<li>Nicolas Brisset</li>"
+ "<li>Rick Chern</li>"
+ "<li>Sumus Technology Limited</li>"
+ "<li>The University of British Columbia</li>"
+ "</ul>"
+ );
+ ui.text->setText(msg);
+ dlg.exec();
}
@@ -379,6 +405,11 @@
_dataManagerAct->setIcon(QPixmap(":kst_datamanager.png"));
connect(_dataManagerAct, SIGNAL(triggered()), this, SLOT(showDataManager()));
+ _viewManagerAct = new QAction(tr("View &Manager..."), this);
+ _viewManagerAct->setStatusTip(tr("Show Kst's view manager window"));
+ _viewManagerAct->setIcon(QPixmap(":kst_viewmanager.png"));
+ connect(_viewManagerAct, SIGNAL(triggered()), this, SLOT(showViewManager()));
+
_vectorEditorAct = new QAction(tr("&Vectors..."), this);
_vectorEditorAct->setStatusTip(tr("Show all vectors in a spreadsheet"));
connect(_vectorEditorAct, SIGNAL(triggered()), this, SLOT(showVectorEditor()));
@@ -419,6 +450,7 @@
_dataMenu->addAction(_vectorEditorAct);
_plotMenu = menuBar()->addMenu(tr("&Plot"));
+ _plotMenu->addAction(_viewManagerAct);
_plotMenu->addAction(_createLabelAct);
_plotMenu->addAction(_createBoxAct);
_plotMenu->addAction(_createEllipseAct);
@@ -450,6 +482,7 @@
// Hook up the kst toolbar
_kstToolBar->addAction(_dataManagerAct);
+ _kstToolBar->addAction(_viewManagerAct);
}
@@ -481,6 +514,14 @@
}
+void MainWindow::showViewManager() {
+ if (!_viewManager) {
+ _viewManager = new ViewManager(this);
+ }
+ _viewManager->show();
+}
+
+
void MainWindow::showVectorEditor() {
if (!_vectorEditor) {
_vectorEditor = new VectorEditorDialog(this, _doc);
--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.h #689810:689811
@@ -29,6 +29,7 @@
class TabWidget;
class VectorEditorDialog;
class View;
+class ViewManager;
class MainWindow : public QMainWindow
{
@@ -47,6 +48,7 @@
void showDebugDialog();
void showExportGraphicsDialog();
void showVectorEditor();
+ void showViewManager();
void save();
void saveAs();
@@ -59,13 +61,13 @@
void about();
void currentViewChanged();
- void createLabel();
void createBox();
void createEllipse();
+ void createLabel();
void createLine();
void createPicture();
+ void createPlot();
void createSvg();
- void createPlot();
void demoModel();
@@ -78,8 +80,8 @@
private:
void createActions();
void createMenus();
+ void createStatusBar();
void createToolBars();
- void createStatusBar();
void readSettings();
void writeSettings();
@@ -94,6 +96,7 @@
DebugDialog *_debugDialog;
ExportGraphicsDialog *_exportGraphics;
VectorEditorDialog *_vectorEditor;
+ ViewManager *_viewManager;
QPointer<QProgressBar> _progressBar;
@@ -121,18 +124,19 @@
QAction *_createPlotAct;
QAction *_createSvgAct;
+ QAction *_aboutAct;
+ QAction *_closeTabAct;
+ QAction *_dataManagerAct;
+ QAction *_debugDialogAct;
+ QAction *_exitAct;
+ QAction *_exportGraphicsAct;
QAction *_newTabAct;
+ QAction *_openAct;
+ QAction *_printAct;
QAction *_saveAct;
QAction *_saveAsAct;
- QAction *_openAct;
- QAction *_printAct;
- QAction *_closeTabAct;
- QAction *_exitAct;
- QAction *_dataManagerAct;
QAction *_vectorEditorAct;
- QAction *_exportGraphicsAct;
- QAction *_debugDialogAct;
- QAction *_aboutAct;
+ QAction *_viewManagerAct;
};
}
More information about the Kst
mailing list