Isis 3.0 Programmer Reference
Back | Home
Isis::Workspace Class Reference

#include <Workspace.h>

Inheritance diagram for Isis::Workspace:
Inheritance graph
Collaboration diagram for Isis::Workspace:
Collaboration graph

Public Slots

void addCubeViewport (QString cube)
 Add a cubeViewport to the workspace, open the cube. More...
 
MdiCubeViewportaddCubeViewport (Cube *cube)
 Add a cubeViewport to the workspace. More...
 
void addBrowseView (QString cube)
 

Signals

void cubeViewportAdded (MdiCubeViewport *)
 
void cubeViewportActivated (MdiCubeViewport *)
 

Public Member Functions

 Workspace (bool selfContained, QWidget *parent=0)
 Workspace constructor. More...
 
 Workspace (const Workspace &other)
 
QVector< MdiCubeViewport * > * cubeViewportList ()
 Repopulates the list of MdiCubeViewports and returns a pointer to this list. More...
 
Workspaceoperator= (Workspace other)
 
void addImages (ImageList *images)
 
bool confirmClose ()
 
QWidgetcubeToMdiWidget (Cube *cube)
 
QMdiArea * mdiArea ()
 

Protected Slots

void activateViewport (QMdiSubWindow *w)
 This gets called when a window is activated or the workspace loses focus. More...
 

Private Attributes

QPointer< QMdiArea > m_mdi
 
QVector< MdiCubeViewport * > * m_cubeViewportList
 
ToolListm_tools
 

Detailed Description

Author
????-??-?? Jeff Anderson
History:

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.

Definition at line 81 of file Workspace.h.

Constructor & Destructor Documentation

Isis::Workspace::Workspace ( bool  selfContained,
QWidget parent = 0 
)

Member Function Documentation

void Isis::Workspace::activateViewport ( QMdiSubWindow w)
protectedslot

This gets called when a window is activated or the workspace loses focus.

Parameters
w

Definition at line 221 of file Workspace.cpp.

Referenced by Workspace().

void Isis::Workspace::addCubeViewport ( QString  cubename)
slot

Add a cubeViewport to the workspace, open the cube.

Parameters
cubename[in](QString) cube name
History:

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.

Definition at line 326 of file Workspace.cpp.

References Isis::CubeAttributeInput::bands(), Isis::Cube::open(), Isis::Cube::setVirtualBands(), Isis::IString::ToInteger(), and Isis::IException::toString().

Referenced by Isis::CubeDnView::onItemAdded().

MdiCubeViewport * Isis::Workspace::addCubeViewport ( Cube cube)
slot

Add a cubeViewport to the workspace.

Parameters
cube[in](Cube *) cube information
History:

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 376 of file Workspace.cpp.

References _FILEINFO_, Isis::Cube::fileName(), and Isis::IException::Programmer.

QVector< MdiCubeViewport * > * Isis::Workspace::cubeViewportList ( )

Repopulates the list of MdiCubeViewports and returns a pointer to this list.

Ownership is not given to the caller.

Returns
std::vector<MdiCubeViewport*>*

Definition at line 237 of file Workspace.cpp.

Referenced by Isis::Tool::cubeViewportList(), Isis::QnetFileTool::loadImage(), Isis::ScatterPlotConfigDialog::refreshWidgetStates(), Isis::ScatterPlotConfigDialog::xAxisCubeViewport(), and Isis::ScatterPlotConfigDialog::yAxisCubeViewport().


The documentation for this class was generated from the following files:

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/13/2023 00:24:08