[Kst] [Bug 124090] Add plot manager to Kst

Andrew Walker arwalker at sumusltd.com
Mon Apr 3 20:36:11 CEST 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=124090         




------- Additional Comments From arwalker sumusltd com  2006-04-03 20:36 -------
SVN commit 526060 by arwalker:

CCBUG:124090 Continue adding plot manager

 M  +38 -7     kst.cpp  
 M  +11 -4     kst.h  


--- trunk/extragear/graphics/kst/src/libkstapp/kst.cpp #526059:526060
 @ -43,7 +43,6  @
 #include <qdatetime.h>
 
 // application specific includes
-#include "datawizard.h"
 #include "extensiondlg.h"
 #include "extensionmgr.h"
 #include "kst.h"
 @ -56,6 +55,7  @
 #include "kstcsddialog_i.h"
 #include "kstdatamanager_i.h"
 #include "kstdatanotifier.h"
+#include "kstdatawizard_i.h"
 #include "kstdebugdialog_i.h"
 #include "kstdebugnotifier.h"
 #include "kstdoc.h"
 @ -82,6 +82,7  @
 #include "kstuinames.h"
 #include "kstvectordefaults.h"
 #include "kstvectordialog_i.h"
+#include "kstviewmanager_i.h"
 #include "kstviewscalarsdialog_i.h"
 #include "kstviewvectorsdialog_i.h"
 #include "kstviewmatricesdialog_i.h"
 @ -144,6 +145,7  @
   debugDialog = new KstDebugDialogI(this);
   _plotDialog = new KstPlotDialogI(doc, this);
   dataManager = new KstDataManagerI(doc, this);
+  viewManager = new KstViewManagerI(doc, this);
   viewScalarsDialog = new KstViewScalarsDialogI(this);
   viewVectorsDialog = new KstViewVectorsDialogI(this);
   viewMatricesDialog = new KstViewMatricesDialogI(this);
 @ -505,6 +507,13  @
                                        "to manage data."));
 
   /************/
+  ViewManagerAction = new KAction(i18n("&View Manager"), "kst_viewmanager", 0,
+                                  viewManager, SLOT(show_I()),
+                                  actionCollection(), "viewmanager_action");
+  ViewManagerAction->setWhatsThis(i18n("Bring up a dialog box\n"
+                                       "to manage views."));
+  
+  /************/
   VectorDialogAction = new KAction(i18n("New &Vector..."), "kst_vectornew", 0,
                                  KstVectorDialogI::globalInstance(),
                                  SLOT(show()), actionCollection(),
 @ -1985,6 +1994,11  @
 }
 
 
+void KstApp::showViewManager() {
+  viewManager->show_I();
+}
+
+
 void KstApp::showViewScalarsDialog() {
   viewScalarsDialog->showViewScalarsDialog();
 }
 @ -2066,7 +2080,7  @
 }
 
 
-void KstApp::updateDataDialogs(bool dm) {
+void KstApp::updateDataDialogs(bool dm, bool vm) {
   if (!viewScalarsDialog->isHidden()) {
     viewScalarsDialog->updateViewScalarsDialog();
   }
 @ -2083,7 +2097,10  @
   if (dm) {
     dataManager->updateContents();
   }
-
+  if (vm) {
+    viewManager->updateContents();
+  }
+  
   updateMemoryStatus();
 }
 
 @ -2154,9 +2171,8  @
     if (!onlyVisible || vectorSaveDialog->isShown()) {
       vectorSaveDialog->init();
     }
-    if (!onlyVisible || dataManager->isShown()) {
-      dataManager->update();
-    }
+    updateDataManager(onlyVisible);
+    updateViewManager(onlyVisible);
     kstdDebug() << "Dialogs updated in " << t.elapsed() << "ms" << endl;
   }
 }
 @ -2170,12 +2186,27  @
     KstPsdDialogI::globalInstance()->updateWindow();
     KstCurveDialogI::globalInstance()->updateWindow();
     KstImageDialogI::globalInstance()->updateWindow();
-    dataManager->update();
+    updateDataManager(false);
+    updateViewManager(false);
     _plotDialog->updateWindow();
   }
 }
 
 
+void KstApp::updateDataManager(bool onlyVisible) {
+  if (!onlyVisible || dataManager->isShown()) {
+    dataManager->update();
+  }
+}
+
+
+void KstApp::updateViewManager(bool onlyVisible) {
+  if (!onlyVisible || viewManager->isShown()) {
+    viewManager->update();
+  }
+}
+
+
 void KstApp::showPluginManager() {
   PluginManager *pm = new PluginManager(this, "Plugin Manager");
   pm->exec();
--- trunk/extragear/graphics/kst/src/libkstapp/kst.h #526059:526060
 @ -59,6 +59,7  @
 class KstQuickStartDialogI;
 class KstTopLevelView;
 class KstViewFitsDialogI;
+class KstViewManagerI;
 class KstViewMatricesDialogI;
 class KstViewScalarsDialogI;
 class KstViewVectorsDialogI;
 @ -305,7 +306,8  @
 
     /** just calls dataManager->show_I(0) */
     void showDataManager();
-
+    void showViewManager();
+    
     /** just calls changeFileDialog->showChangeFileDialog(0) */
     void showChangeFileDialog();
     
 @ -367,10 +369,12  @
     void updateVisibleDialogs();
     // is there ever a reason to update hidden dialogs?
     void updateDialogs(bool onlyVisible = true);
-    void updateDataDialogs(bool dataManager = true);
+    void updateDataDialogs(bool dataManager = true, bool viewManager = true);
     void updateDialogsForWindow();
     void updateDataNotifier();
-
+    void updateDataManager(bool onlyVisible);
+    void updateViewManager(bool onlyVisible);
+    
     /*** shows doc as modified, updates doc and dialogs */
     void registerDocChange();
 
 @ -436,7 +440,8  @
     
     /* Dialog for looking at data */
     KstDataManagerI *dataManager;
-
+    KstViewManagerI *viewManager;
+    
     /* Dialog for looking at debug information */
     KstDebugDialogI *debugDialog;
 
 @ -498,6 +503,8  @
     KAction *PsdDialogAction;
     /* Data Manager Action */
     KAction *DataManagerAction;
+    /* View Manager Action */    
+    KAction *ViewManagerAction;
     /* Plugin Plot Edit Action */
     KAction *PluginDialogAction;
     /* Vector Save Action */


More information about the Kst mailing list