Isis Developer Reference
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 cubename)
 Method adds the name of a cube into Workspace as a CubeViewport. More...
 
void addCubeViewportFromList (QString cubelist)
 Method adds cubes into Workspace as a CubeViewport from a list of cubes. More...
 
MdiCubeViewportaddCubeViewport (Cube *cube)
 Method adds a cube into the Workspace as a CubeViewport. More...
 
void addBrowseView (QString cube)
 Method is called to add a Cube from BrowseView. More...
 

Signals

void cubeViewportAdded (MdiCubeViewport *)
 Signal triggered when a Cube is added to the Workspace. More...
 
void cubeViewportActivated (MdiCubeViewport *)
 Signal triggered when a Cube is activated in the Workspace. More...
 

Public Member Functions

 Workspace (bool selfContained, QWidget *parent=0)
 Constructor for Workspace. More...
 
 Workspace (const Workspace &other)
 Constructor for Workspace. More...
 
virtual ~Workspace ()
 Deconstructor. More...
 
QVector< MdiCubeViewport * > * cubeViewportList ()
 This method returns a Vector of MdiCubeViewports. More...
 
Workspaceoperator= (Workspace other)
 Is equal to comparsion. More...
 
void addImages (ImageList *images)
 Adds a list of Images to a viewport. More...
 
bool confirmClose ()
 Confirms that the user wishes toc lose the Workspace. More...
 
QWidgetcubeToMdiWidget (Cube *cube)
 Converts a cube to an MdiWidget. More...
 
QMdiArea * mdiArea ()
 This method returns the QMdiArea. More...
 

Protected Slots

void activateViewport (QMdiSubWindow *w)
 This method activates the Viewport. More...
 

Detailed Description

Author
????-??-?? Jeff Anderson

Constructor & Destructor Documentation

◆ Workspace() [1/2]

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

Constructor for Workspace.

Workspace constructor.

Parameters
selfContainedif this Workspace should be self contained or note
parentThe parent QWidget, defaults to 0
parent

References Isis::Tool::activate(), activateViewport(), Isis::Tool::addTo(), Isis::Tool::addToActive(), Isis::Tool::addToPermanent(), Isis::ToolList::append(), Isis::ToolList::count(), and Isis::Tool::menuName().

◆ Workspace() [2/2]

Isis::Workspace::Workspace ( const Workspace other)

Constructor for Workspace.

Parameters
otherThe other Workspace to load from.

◆ ~Workspace()

Isis::Workspace::~Workspace ( )
virtual

Deconstructor.

Member Function Documentation

◆ activateViewport

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

This method activates the Viewport.

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

Parameters
wThe subwindow to activate
w

References cubeViewportActivated().

Referenced by Workspace().

◆ addBrowseView

void Isis::Workspace::addBrowseView ( QString  cube)
slot

Method is called to add a Cube from BrowseView.

Parameters
cubeThe cube being browsed

References addCubeViewport().

◆ addCubeViewport [1/2]

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

Method adds a cube into the Workspace as a CubeViewport.

Add a cubeViewport to the workspace.

Parameters
cubeThe cube to be added into the Workspace.
cube(Cube *) cube information

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

◆ addCubeViewport [2/2]

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

Method adds the name of a cube into Workspace as a CubeViewport.

Add a cubeViewport to the workspace, open the cube.

Parameters
cubenameThe cube to be added to the Workspace
cubename(QString) cubename

References _FILEINFO_, addCubeViewportFromList(), Isis::CubeAttributeInput::bands(), Isis::Cube::open(), Isis::Cube::setVirtualBands(), Isis::IString::ToInteger(), Isis::IException::toString(), Isis::IException::User, and Isis::MdiCubeViewport::viewRGB().

Referenced by addBrowseView(), addCubeViewportFromList(), and addImages().

◆ addCubeViewportFromList

void Isis::Workspace::addCubeViewportFromList ( QString  cubelist)
slot

Method adds cubes into Workspace as a CubeViewport from a list of cubes.

Parameters
cubenameThe name of the cube list file.
History:
2018-09-12 Adam Goins - Added this method to attempt to open a file as a cube list. It's called by addCubeViewport() when that method attempts to open a file as a cube but fails. Fixes #5439, Fixes #5476.

References _FILEINFO_, addCubeViewport(), Isis::CubeAttributeInput::bands(), Isis::Cube::open(), Isis::Cube::setVirtualBands(), Isis::IString::ToInteger(), Isis::IException::User, and Isis::MdiCubeViewport::viewRGB().

Referenced by addCubeViewport().

◆ addImages()

void Isis::Workspace::addImages ( ImageList images)

Adds a list of Images to a viewport.

Parameters
imagesThe ImageList of images to add to the Workspace

References addCubeViewport(), and Isis::Image::cube().

◆ confirmClose()

bool Isis::Workspace::confirmClose ( )

Confirms that the user wishes toc lose the Workspace.

Returns
True of False if the user wishes to close the Workspace

References cubeViewportList().

Referenced by Isis::ViewportMainWindow::closeEvent().

◆ cubeToMdiWidget()

QWidget * Isis::Workspace::cubeToMdiWidget ( Cube cube)

Converts a cube to an MdiWidget.

Parameters
cubeThe cube to reference
Returns
QWidget The widget associated with the cube

References Isis::CubeViewport::cube().

◆ cubeViewportActivated

void Isis::Workspace::cubeViewportActivated ( MdiCubeViewport )
signal

Signal triggered when a Cube is activated in the Workspace.

Referenced by activateViewport().

◆ cubeViewportAdded

void Isis::Workspace::cubeViewportAdded ( MdiCubeViewport )
signal

Signal triggered when a Cube is added to the Workspace.

Referenced by addCubeViewport().

◆ cubeViewportList()

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

This method returns a Vector of MdiCubeViewports.

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

Returns
QVector a vector of MdiCubeViewports

Ownership is not given to the caller.

Returns
std::vector<MdiCubeViewport*>*

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

◆ mdiArea()

QMdiArea * Isis::Workspace::mdiArea ( )

This method returns the QMdiArea.

Returns
QMdiArea the Area of the mdi

Referenced by Isis::FileTool::addTo(), Isis::WindowTool::addTo(), Isis::CubeDnView::CubeDnView(), and Isis::QnetFileTool::loadImage().

◆ operator=()

Workspace & Isis::Workspace::operator= ( Workspace  other)

Is equal to comparsion.

Parameters
otherThe Workspace to compare against
Returns
bool True of False if they're equal to eachother .

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