[Kst] branches/work/kst/portto4/kst/src/libkstapp

George Staikos staikos at kde.org
Thu May 31 04:00:40 CEST 2007


SVN commit 670006 by staikos:

add a stub export graphics dialog


 M  +2 -0      CMakeLists.txt  
 A             exportgraphicsdialog.cpp   [License: GPL (v2+)]
 A             exportgraphicsdialog.h   [License: GPL (v2+)]
 M  +15 -0     mainwindow.cpp  
 M  +4 -0      mainwindow.h  


--- branches/work/kst/portto4/kst/src/libkstapp/CMakeLists.txt #670005:670006
@@ -6,6 +6,7 @@
    datamanager.cpp
    document.cpp
    ellipseitem.cpp
+   exportgraphicsdialog.cpp
    kstapplication.cpp
    labelitem.cpp
    labelrenderer.cpp
@@ -27,6 +28,7 @@
 
 kde4_add_ui_files(kstapp_LIB_SRCS
    datamanager.ui
+   exportgraphicsdialog.ui
    vectoreditordialog.ui
    )
 
--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.cpp #670005:670006
@@ -14,6 +14,7 @@
 #include "datamanager.h"
 #include "document.h"
 #include "ellipseitem.h"
+#include "exportgraphicsdialog.h"
 #include "kstapplication.h"
 #include "labelitem.h"
 #include "lineitem.h"
@@ -37,6 +38,7 @@
 
 MainWindow::MainWindow() {
   _dataManager = 0;
+  _exportGraphics = 0;
   _vectorEditor = 0;
   _doc = new Document;
   _tabWidget = new TabWidget(this);
@@ -337,6 +339,10 @@
   _vectorEditorAct->setStatusTip(tr("Show all vectors in a spreadsheet"));
   connect(_vectorEditorAct, SIGNAL(triggered()), this, SLOT(showVectorEditor()));
 
+  _exportGraphicsAct = new QAction(tr("&Export..."), this);
+  _exportGraphicsAct->setStatusTip(tr("Export graphics to disk"));
+  connect(_exportGraphicsAct, SIGNAL(triggered()), this, SLOT(showExportGraphicsDialog()));
+
   _aboutAct = new QAction(tr("&About"), this);
   _aboutAct->setStatusTip(tr("Show Kst's About box"));
   connect(_aboutAct, SIGNAL(triggered()), this, SLOT(about()));
@@ -354,6 +360,7 @@
   _fileMenu->addAction(_openAct);
   _fileMenu->addSeparator();
   _fileMenu->addAction(_printAct);
+  _fileMenu->addAction(_exportGraphicsAct);
   _fileMenu->addSeparator();
   _fileMenu->addAction(_closeTabAct);
   _fileMenu->addAction(_exitAct);
@@ -427,6 +434,14 @@
 }
 
 
+void MainWindow::showExportGraphicsDialog() {
+  if (!_exportGraphics) {
+    _exportGraphics = new ExportGraphicsDialog(this);
+  }
+  _exportGraphics->show();
+}
+
+
 void MainWindow::readSettings() {
   QSettings settings;
   QPoint pos = settings.value("pos", QPoint(20, 20)).toPoint();
--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.h #670005:670006
@@ -24,6 +24,7 @@
 
 class DataManager;
 class Document;
+class ExportGraphicsDialog;
 class TabWidget;
 class VectorEditorDialog;
 class View;
@@ -42,6 +43,7 @@
 
   public Q_SLOTS:
     void showDataManager();
+    void showExportGraphicsDialog();
     void showVectorEditor();
 
     void save();
@@ -85,6 +87,7 @@
 
     DataManager *_dataManager;
     VectorEditorDialog *_vectorEditor;
+    ExportGraphicsDialog *_exportGraphics;
 
     QPointer<QProgressBar> _progressBar;
 
@@ -119,6 +122,7 @@
     QAction *_exitAct;
     QAction *_dataManagerAct;
     QAction *_vectorEditorAct;
+    QAction *_exportGraphicsAct;
     QAction *_aboutAct;
     QAction *_aboutQtAct;
 };


More information about the Kst mailing list