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

Adam Treat treat at kde.org
Thu Aug 30 15:05:55 CEST 2007


SVN commit 706450 by treat:

* Rename and reorganize the menus/toolbars to fit
the new spec better.


 M  +23 -15    mainwindow.cpp  
 M  +4 -6      mainwindow.h  
 M  +1 -1      tabwidget.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.cpp #706449:706450
@@ -473,15 +473,15 @@
   _dataMenu->addAction(_dataManagerAct);
   _dataMenu->addAction(_vectorEditorAct);
 
-  _plotMenu = menuBar()->addMenu(tr("&Plot"));
-  _plotMenu->addAction(_viewManagerAct);
-  _plotMenu->addAction(_createLabelAct);
-  _plotMenu->addAction(_createBoxAct);
-  _plotMenu->addAction(_createEllipseAct);
-  _plotMenu->addAction(_createLineAct);
-  _plotMenu->addAction(_createPictureAct);
-  _plotMenu->addAction(_createPlotAct);
-  _plotMenu->addAction(_createSvgAct);
+  _viewMenu = menuBar()->addMenu(tr("&View"));
+  _viewMenu->addAction(_viewManagerAct);
+  _viewMenu->addAction(_createLabelAct);
+  _viewMenu->addAction(_createBoxAct);
+  _viewMenu->addAction(_createEllipseAct);
+  _viewMenu->addAction(_createLineAct);
+  _viewMenu->addAction(_createPictureAct);
+  _viewMenu->addAction(_createPlotAct);
+  _viewMenu->addAction(_createSvgAct);
 
   _settingsMenu = menuBar()->addMenu(tr("&Settings"));
 
@@ -505,13 +505,21 @@
 
 
 void MainWindow::createToolBars() {
-  _fileToolBar = addToolBar(tr("File"));
-  _editToolBar = addToolBar(tr("Edit"));
-  _kstToolBar = addToolBar(tr("Kst"));
+  setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
 
-  // Hook up the kst toolbar
-  _kstToolBar->addAction(_dataManagerAct);
-  _kstToolBar->addAction(_viewManagerAct);
+  _dataToolBar = addToolBar(tr("Data"));
+  _dataToolBar->addAction(_dataManagerAct);
+//   _dataToolBar->addAction(_vectorEditorAct); //no icon
+
+  _viewToolBar = addToolBar(tr("View"));
+  _viewToolBar->addAction(_viewManagerAct);
+//  _viewToolBar->addAction(_createLabelAct); //no icon
+  _viewToolBar->addAction(_createBoxAct);
+  _viewToolBar->addAction(_createEllipseAct);
+  _viewToolBar->addAction(_createLineAct);
+  _viewToolBar->addAction(_createPictureAct);
+  _viewToolBar->addAction(_createPlotAct);
+//  _viewToolBar->addAction(_createSvgAct); //no icon
 }
 
 
--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.h #706449:706450
@@ -103,16 +103,14 @@
 
     // Do we need these?  I don't think so...
     QMenu *_fileMenu;
-    QMenu *_dataMenu;
     QMenu *_editMenu;
-    QMenu *_plotMenu;
+    QMenu *_dataMenu;
+    QMenu *_viewMenu;
     QMenu *_settingsMenu;
     QMenu *_helpMenu;
 
-    // Do we need these?  I don't think so...
-    QToolBar *_fileToolBar;
-    QToolBar *_editToolBar;
-    QToolBar *_kstToolBar;
+    QToolBar *_dataToolBar;
+    QToolBar *_viewToolBar;
 
     QAction *_undoAct;
     QAction *_redoAct;
--- branches/work/kst/portto4/kst/src/libkstapp/tabwidget.cpp #706449:706450
@@ -42,7 +42,7 @@
 
   static int cnt = 1;
   QString label = view->objectName().isEmpty() ?
-                  tr("Plot %1").arg(cnt++) :
+                  tr("View %1").arg(cnt++) :
                   view->objectName();
 
   addTab(view, label);


More information about the Kst mailing list