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

Adam Treat treat at kde.org
Thu May 24 01:35:22 CEST 2007


SVN commit 667792 by treat:

* Some stubbed files


 A             CMakeLists.txt  
 M  +11 -7     kstapplication.cpp  
 M  +5 -4      kstapplication.h  
 A             kstmainwindow.cpp   [License: no copyright]
 A             kstmainwindow.h   [License: no copyright]
 A             kstplotcommand.cpp   [License: no copyright]
 A             kstplotcommand.h   [License: no copyright]
 A             kstplotview.cpp   [License: no copyright]
 A             kstplotview.h   [License: no copyright]


--- branches/work/kst/portto4/kst/src/libkstapp/kstapplication.cpp #667791:667792
@@ -2,22 +2,26 @@
 
 KstApplication::KstApplication(int &argc, char **argv)
     : QApplication(argc, argv) {
-    QCoreApplication::setApplicationName("Kst");
 
-    m_mainWindow = new QMainWindow;
-    m_mainWindow->show();
+  QCoreApplication::setApplicationName("Kst");
+
+  _mainWindow = new KstMainWindow;
+  connect(this, SIGNAL(aboutToQuit()), _mainWindow, SLOT(aboutToQuit()));
+
+  _mainWindow->show();
 }
 
 
 KstApplication::~KstApplication() {
-    if (m_mainWindow)
-        delete m_mainWindow;
+  if (_mainWindow)
+      delete _mainWindow;
 }
 
 
-QMainWindow *KstApplication::mainWindow() const {
-    return m_mainWindow;
+KstMainWindow *KstApplication::mainWindow() const {
+  return _mainWindow;
 }
 
 #include "kstapplication.moc"
+
 // vim: ts=2 sw=2 et
--- branches/work/kst/portto4/kst/src/libkstapp/kstapplication.h #667791:667792
@@ -3,12 +3,12 @@
 
 #include <QPointer>
 #include <QApplication>
-#include <QMainWindow>
 
 #include "kst_export.h"
+#include "kstmainwindow.h"
 
 #define kstApp \
-  (static_cast<QCode*>(QCoreApplication::instance()))
+  (static_cast<KstApplication*>(QCoreApplication::instance()))
 
 class KST_EXPORT KstApplication : public QApplication
 {
@@ -17,11 +17,12 @@
   KstApplication(int &argc, char **argv);
   virtual ~KstApplication();
 
-  QMainWindow *mainWindow() const;
+  KstMainWindow *mainWindow() const;
 
 private:
-  QPointer<QMainWindow> m_mainWindow;
+  QPointer<KstMainWindow> _mainWindow;
 };
 
 #endif
+
 // vim: ts=2 sw=2 et


More information about the Kst mailing list