Isis 3 Programmer Reference
|
#include <Workspace.h>
Public Slots | |
void | addCubeViewport (QString cubename) |
Method adds the name of a cube into Workspace as a CubeViewport. | |
void | addCubeViewportFromList (QString cubelist) |
Method adds cubes into Workspace as a CubeViewport from a list of cubes. | |
MdiCubeViewport * | addCubeViewport (Cube *cube) |
Method adds a cube into the Workspace as a CubeViewport. | |
void | addBrowseView (QString cube) |
Method is called to add a Cube from BrowseView. | |
Signals | |
void | cubeViewportAdded (MdiCubeViewport *) |
Signal triggered when a Cube is added to the Workspace. | |
void | cubeViewportActivated (MdiCubeViewport *) |
Signal triggered when a Cube is activated in the Workspace. | |
Public Member Functions | |
Workspace (bool selfContained, QWidget *parent=0) | |
Constructor for Workspace. | |
Workspace (const Workspace &other) | |
Constructor for Workspace. | |
virtual | ~Workspace () |
Deconstructor. | |
QVector< MdiCubeViewport * > * | cubeViewportList () |
This method returns a Vector of MdiCubeViewports. | |
Workspace & | operator= (Workspace other) |
Is equal to comparsion. | |
void | addImages (ImageList *images) |
Adds a list of Images to a viewport. | |
bool | confirmClose () |
Confirms that the user wishes toc lose the Workspace. | |
QWidget * | cubeToMdiWidget (Cube *cube) |
Converts a cube to an MdiWidget. | |
QMdiArea * | mdiArea () |
This method returns the QMdiArea. | |
Protected Slots | |
void | activateViewport (QMdiSubWindow *w) |
This method activates the Viewport. | |
Private Attributes | |
QPointer< QMdiArea > | m_mdi |
The mdi area. | |
QVector< MdiCubeViewport * > * | m_cubeViewportList |
List of cube viewports. | |
ToolList * | m_tools |
List of all of the tools. | |
2007-03-21 Tracie Sucharski - Changed call from fitScale to fitScaleMinDimension so that the minimum cube dimension is displayed in its entirety.
2008-05-27 Noah Hilt - Now allows cubes to be opened with additional arguments read by the CubeAttributeInput class, specifically to open certain bands as well as open 3 bands in RGB mode.
2008-12-04 Jeannie Walldren - Fixed bug in addCubeViewport(cubename). Added exception catch to addCubeViewport(cube) to close the CubeViewport from the ViewportMainWindow if it cannot be shown.
2009-03-27 Noah Hilt, Steven Lambright - Changed parent class from QWorkspace to QMdiArea since QWorkspace is now an obsolete class. Also changed how CubeViewports are created.
2010-04-08 Steven Lambright and Eric Hyer - Added progress bar
2010-06-26 Eric Hyer - Now uses MdiCubeViewport instead of CubeViewport. Also fixed include issues.
2010-11-18 Eric Hyer - addBrowseView now deletes the last viewport in the subWindowList instead of the first one
2011-09-19 Steven Lambright - Fixed addBrowseView to actually close the old viewports instead of hiding them. Fixes #418
2012-05-29 Steven Lambright - Now utilizes ViewportMdiSubWindow instead of QMdiSubWindow. References #854.
2012-09-18 Steven Lambright - Added the selfContained option to the constructor. This allows us to show a work space without handling the tool and status areas externally. No longer inherits from QMdiArea because of the need to place widgets around the mdi area.
2015-05-13 Ian Humphrey - Modified addCubeViewport(QString) to handle any exceptions that are thrown within the slot. This prevents undefined behavior when an exception is not handled within a connected slot. References #2210.
2016-09-08 Tracie Sucharski - Changed imageToMdiWidget to cubeToMdiWidget. Workspace deals with cubes. Since Image contains a cube, simply pass in cube instead of Image. This was done to handle the new IPCE container class, Shape, which also contains a cube, but not an Image.
2017-09-11 Adam Goins - Added the ability to accept cubelists under any file format. Fixes #5099.
2018-04-13 Christopher Combs - Added .lbl files to the list of single-cube file-extensions to check before reading a cube list in addCubeViewport. Fixes #5350.
2018-09-12 Adam Goins - Modified logic to attempt to open the file as a cube or detached label first, if that fails attempt to open it as a cube list and if that fails, throw an error to the user. This allows cubes and cube lists to be saved under any extension and opened. Fixes #5439, Fixes #5476.
Definition at line 78 of file Workspace.h.
Isis::Workspace::Workspace | ( | bool | selfContained, |
QWidget * | parent = 0 ) |
Constructor for Workspace.
Workspace constructor.
selfContained | if this Workspace should be self contained or note |
parent | The parent QWidget, defaults to 0 |
parent |
Definition at line 58 of file Workspace.cpp.
References activateViewport(), Isis::Tool::addTo(), m_cubeViewportList, m_mdi, and m_tools.
Isis::Workspace::Workspace | ( | const Workspace & | other | ) |
Constructor for Workspace.
other | The other Workspace to load from. |
Definition at line 202 of file Workspace.cpp.
References m_cubeViewportList.
|
virtual |
Deconstructor.
Definition at line 208 of file Workspace.cpp.
References m_cubeViewportList, and m_tools.
|
protectedslot |
This method activates the Viewport.
This gets called when a window is activated or the workspace loses focus.
w | The subwindow to activate |
w |
Definition at line 222 of file Workspace.cpp.
References cubeViewportActivated(), and m_mdi.
Referenced by Workspace().
|
slot |
Method is called to add a Cube from BrowseView.
cube | The cube being browsed |
Definition at line 490 of file Workspace.cpp.
References addCubeViewport(), and m_mdi.
|
slot |
Method adds a cube into the Workspace as a CubeViewport.
Add a cubeViewport to the workspace.
2007-04-13 Tracie Sucharski - Load entire image instead of fitting smallest dimension.
2008-05-27 Noah Hilt - Now returns a MdiCubeViewport in order for the addCubeViewport(QString cubename) method to modify the MdiCubeViewport.
2008-08-20 Stacy Alley - Changed the setScale call to match the zoomTool's fit in view
2008-12-04 Jeannie Walldren - Added try/catch to close the MdiCubeViewport if showCube() is not successful.
Definition at line 464 of file Workspace.cpp.
References cubeViewportAdded(), Isis::Cube::fileName(), m_mdi, and Isis::IException::Programmer.
|
slot |
Method adds the name of a cube into Workspace as a CubeViewport.
Add a cubeViewport to the workspace, open the cube.
cubename | The cube to be added to the Workspace |
cubename | (QString) cubename |
2006-06-12 Tracie Sucharski, Clear errors after catching when attempting to open cube.
2007-02-13 Tracie Sucharski, Open cube read, not read/write. Opening read/write was done to accomodate the EditTool. EditTool will now reopen the cube read/write.
2008-05-27 Noah Hilt, When opening a cube now if a user specifies extra arguments to the cube name, the cube will be opened using a CubeAttributeInput specifically for the number and index of bands to be opened. Additionally, if a cube is opened with 3 bands it will be opened in RGB mode with red, green, and blue set to the 3 bands respectively.
2008-12-04 Jeannie Walldren - Removed "delete cube" since this was causing a segfault and this deallocation is already taking place in addCubeViewport(cube).
2015-05-13 Ian Humphrey - Caught exception now handled by sending a QMessageBox to the Workspace. This prevents undefined behavior caused by not handling an exception within a connected slot.
2017-08-17 Adam Goins - Added the ability for this method to receive a cubelist file as input to qview, parse out the .cub files from the cubelist and then attempt to add each one into their own viewport.
2017-10-12 Kristin Berry - Reverted to using relative instead of full file paths, as this caused errors when working with cubelists that contained relative paths. Fixes # 5177
2018-09-12 Adam Goins - Modified logic to attempt to open the file as a cube or detached label first, if that fails attempt to open it as a cube list and if that fails, throw an error to the user. This allows cubes and cube lists to be saved under any extension and opened. Fixes #5439, Fixes #5476.
Definition at line 339 of file Workspace.cpp.
References addCubeViewport(), addCubeViewportFromList(), Isis::Cube::open(), Isis::Cube::setVirtualBands(), and Isis::IException::User.
Referenced by addBrowseView(), addCubeViewport(), addCubeViewportFromList(), addImages(), and Isis::CubeDnView::onItemAdded().
|
slot |
Method adds cubes into Workspace as a CubeViewport from a list of cubes.
cubename | The name of the cube list file. |
Definition at line 391 of file Workspace.cpp.
References addCubeViewport(), Isis::Cube::open(), Isis::Cube::setVirtualBands(), and Isis::IException::User.
Referenced by addCubeViewport().
void Isis::Workspace::addImages | ( | ImageList * | images | ) |
Adds a list of Images to a viewport.
Definition at line 260 of file Workspace.cpp.
References addCubeViewport(), and Isis::Image::cube().
bool Isis::Workspace::confirmClose | ( | ) |
Confirms that the user wishes toc lose the Workspace.
Definition at line 267 of file Workspace.cpp.
References cubeViewportList().
Referenced by Isis::ViewportMainWindow::closeEvent().
Converts a cube to an MdiWidget.
cube | The cube to reference |
Definition at line 280 of file Workspace.cpp.
References Isis::CubeViewport::cube(), and m_cubeViewportList.
Referenced by Isis::CubeDnView::onItemAdded(), and Isis::CubeDnView::setWorkspaceActiveCube().
|
signal |
Signal triggered when a Cube is activated in the Workspace.
Referenced by activateViewport().
|
signal |
Signal triggered when a Cube is added to the Workspace.
Referenced by addCubeViewport().
QVector< MdiCubeViewport * > * Isis::Workspace::cubeViewportList | ( | ) |
This method returns a Vector of MdiCubeViewports.
Repopulates the list of MdiCubeViewports and returns a pointer to this list.
Ownership is not given to the caller.
Definition at line 238 of file Workspace.cpp.
References m_cubeViewportList, and m_mdi.
Referenced by confirmClose(), Isis::Tool::cubeViewportList(), Isis::QnetFileTool::loadImage(), Isis::ScatterPlotConfigDialog::refreshWidgetStates(), Isis::ScatterPlotConfigDialog::xAxisCubeViewport(), and Isis::ScatterPlotConfigDialog::yAxisCubeViewport().
QMdiArea * Isis::Workspace::mdiArea | ( | ) |
This method returns the QMdiArea.
Definition at line 295 of file Workspace.cpp.
References m_mdi.
Referenced by Isis::CubeDnView::CubeDnView(), Isis::QnetFileTool::loadImage(), and Isis::CubeDnView::workspaceActiveCube().
Is equal to comparsion.
other | The Workspace to compare against |
Definition at line 250 of file Workspace.cpp.
References m_cubeViewportList.
|
private |
List of cube viewports.
Definition at line 204 of file Workspace.h.
Referenced by cubeToMdiWidget(), cubeViewportList(), operator=(), Workspace(), Workspace(), and ~Workspace().
|
private |
The mdi area.
Definition at line 202 of file Workspace.h.
Referenced by activateViewport(), addBrowseView(), addCubeViewport(), cubeViewportList(), mdiArea(), and Workspace().
|
private |
List of all of the tools.
Definition at line 206 of file Workspace.h.
Referenced by Workspace(), and ~Workspace().