Skip to content

Commit

Permalink
refs #6133. Remove 3D Plot Toolbar.
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenArnold committed Jan 25, 2013
1 parent 2cf1167 commit 18bcf75
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 49 deletions.
48 changes: 1 addition & 47 deletions Code/Mantid/MantidPlot/src/ApplicationWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1069,35 +1069,6 @@ void ApplicationWindow::initToolBars()

insertToolBarBreak (displayBar);

plotMatrixBar = new QToolBar( tr( "Matrix Plot" ), this);
plotMatrixBar->setObjectName("plotMatrixBar");
addToolBar(Qt::BottomToolBarArea, plotMatrixBar);

actionPlot3DWireFrame->addTo(plotMatrixBar);
actionPlot3DHiddenLine->addTo(plotMatrixBar);

actionPlot3DPolygons->addTo(plotMatrixBar);
actionPlot3DWireSurface->addTo(plotMatrixBar);

plotMatrixBar->addSeparator();

actionPlot3DBars->addTo(plotMatrixBar);
actionPlot3DScatter->addTo(plotMatrixBar);

plotMatrixBar->addSeparator();
actionColorMap->addTo(plotMatrixBar);
actionContourMap->addTo(plotMatrixBar);
actionGrayMap->addTo(plotMatrixBar);
actionImagePlot->addTo(plotMatrixBar);
//actionPlotHistogram->addTo(plotMatrixBar);
plotMatrixBar->addSeparator();
actionSetMatrixValues->addTo(plotMatrixBar);
actionFlipMatrixHorizontally->addTo(plotMatrixBar);
actionFlipMatrixVertically->addTo(plotMatrixBar);
actionRotateMatrix->addTo(plotMatrixBar);
actionRotateMatrixMinus->addTo(plotMatrixBar);
plotMatrixBar->hide();

formatToolBar = new QToolBar(tr( "Format" ), this);
formatToolBar->setObjectName("formatToolBar");
addToolBar(Qt::TopToolBarArea, formatToolBar);
Expand Down Expand Up @@ -1147,7 +1118,6 @@ void ApplicationWindow::insertTranslatedStrings()
plotTools->setWindowTitle(tr("Plot"));
fileTools->setWindowTitle(tr("File"));
editTools->setWindowTitle(tr("Edit"));
plotMatrixBar->setWindowTitle(tr("Matrix Plot"));
plot3DTools->setWindowTitle(tr("3D Surface"));
formatToolBar->setWindowTitle(tr("Format"));

Expand Down Expand Up @@ -1720,10 +1690,6 @@ void ApplicationWindow::customToolBars(MdiSubWindow* w)
formatToolBar->setEnabled (true);
formatToolBar->show();
}
} else if ((w->isA("Matrix") || w->isA("MantidMatrix")) && d_matrix_tool_bar){
if(!plotMatrixBar->isVisible())
plotMatrixBar->show();
plotMatrixBar->setEnabled (true);
} else if (w->isA("Graph3D") && d_plot3D_tool_bar){
if(!plot3DTools->isVisible())
plot3DTools->show();
Expand All @@ -1740,7 +1706,6 @@ void ApplicationWindow::disableToolbars()
{
plotTools->setEnabled(false);
plot3DTools->setEnabled(false);
plotMatrixBar->setEnabled(false);
}

void ApplicationWindow::hideToolbars()
Expand All @@ -1750,7 +1715,6 @@ void ApplicationWindow::hideToolbars()
editTools->setVisible(false);
plotTools->setVisible(false);
plot3DTools->setVisible(false);
plotMatrixBar->setVisible(false);
formatToolBar->setVisible(false);
}

Expand All @@ -1761,7 +1725,6 @@ void ApplicationWindow::showToolbars()
editTools->setVisible(true);
plotTools->setVisible(true);
//plot3DTools->setVisible(true);
plotMatrixBar->setVisible(true);
formatToolBar->setVisible(true);
}

Expand Down Expand Up @@ -16774,12 +16737,6 @@ void ApplicationWindow::showToolBarsMenu()
connect(actionPlotTools, SIGNAL(toggled(bool)), plotTools, SLOT(setVisible(bool)));
toolBarsMenu.addAction(actionPlotTools);

QAction *actionMatrixTools = new QAction(plotMatrixBar->windowTitle(), this);
actionMatrixTools->setCheckable(true);
actionMatrixTools->setChecked(plotMatrixBar->isVisible());
connect(actionMatrixTools, SIGNAL(toggled(bool)), plotMatrixBar, SLOT(setVisible(bool)));
toolBarsMenu.addAction(actionMatrixTools);

QAction *actionPlot3DTools = new QAction(plot3DTools->windowTitle(), this);
actionPlot3DTools->setCheckable(true);
actionPlot3DTools->setChecked(plot3DTools->isVisible());
Expand All @@ -16804,10 +16761,7 @@ void ApplicationWindow::showToolBarsMenu()

MdiSubWindow *w = activeWindow();

if (action->text() == plotMatrixBar->windowTitle()){
d_matrix_tool_bar = action->isChecked();
plotMatrixBar->setEnabled(w && w->isA("Matrix"));
} else if (action->text() == plotTools->windowTitle()){
if (action->text() == plotTools->windowTitle()){
d_plot_tool_bar = action->isChecked();
plotTools->setEnabled(w && w->isA("MultiLayer"));
} else if (action->text() == plot3DTools->windowTitle()){
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/MantidPlot/src/ApplicationWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -1395,7 +1395,7 @@ public slots:
CommandLineInterpreter *m_scriptInterpreter;
QMdiArea *d_workspace;

QToolBar *fileTools, *plotTools, *plot3DTools, *displayBar, *editTools, *plotMatrixBar;
QToolBar *fileTools, *plotTools, *plot3DTools, *displayBar, *editTools;
QToolBar *formatToolBar;
QToolButton *btnResults;
QWidgetList *hiddenWindows;
Expand Down
1 change: 0 additions & 1 deletion Code/Mantid/MantidPlot/src/Mantid/MantidUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@ bool MantidUI::menuAboutToShow(MdiSubWindow *w)
appWindow()->actionCopySelection->setEnabled(true);
appWindow()->actionPasteSelection->setEnabled(false);
appWindow()->actionClearSelection->setEnabled(false);
appWindow()->plotMatrixBar->setEnabled (true);

appWindow()->myMenuBar()->insertItem(tr("&Workspace"),menuMantidMatrix);
return true;
Expand Down

0 comments on commit 18bcf75

Please sign in to comment.