Isis 3.0 Programmer Reference
Home
Isis::Directory Class Reference

#include <Directory.h>

Inheritance diagram for Isis::Directory:
Inheritance graph
Collaboration diagram for Isis::Directory:
Collaboration graph

Classes

class  XmlHandler
 

Public Slots

void cleanupCnetEditorViewWidgets ()
 Removes pointers to deleted CnetEditorWidget objects. More...
 
void cleanupCubeDnViewWidgets ()
 Removes pointers to deleted CubeDnView objects. More...
 
void cleanupFileListWidgets ()
 Reomoves pointers to deleted ImageFileListWidget objects. More...
 
void cleanupFootprint2DViewWidgets ()
 Removes pointers to deleted Footprint2DView objects. More...
 
void cleanupControlPointEditViewWidget ()
 Delete the ControlPointEditWidget and set it's pointer to NULL. More...
 
void cleanupMatrixViewWidgets ()
 Removes pointers to deleted MatrixSceneWidget objects. More...
 
void cleanupSensorInfoWidgets ()
 Removes pointers to deleted SensorInfoWidget objects. More...
 
void cleanupTargetInfoWidgets ()
 Removes pointers to deleted TargetInfoWidget objects. More...
 
void updateControlNetEditConnections ()
 Updates the SIGNAL/SLOT connections for the cotrol net editor. More...
 
void modifyControlPoint (ControlPoint *controlPoint)
 
void deleteControlPoint (ControlPoint *controlPoint)
 
void createControlPoint (double latitude, double longitude, Cube *cube=0, bool isGroundSource=false)
 
void updateRecentProjects (Project *project)
 Adds a new Project object to the list of recent projects if it has not already been added. More...
 

Signals

void newWidgetAvailable (QWidget *newWidget)
 
void controlPointAdded (QString newPointId)
 

Public Member Functions

 Directory (QObject *parent=0)
 The Constructor. More...
 
 ~Directory ()
 The Destructor. More...
 
void populateMainMenu (QMenuBar *)
 This method sets up the main menu at the top of the window (File, Settings, ...) More...
 
void setHistoryContainer (QDockWidget *historyContainer)
 Set up the history info in the history dockable widget. More...
 
void setWarningContainer (QDockWidget *warningContainer)
 Set up the warning info in the warning dockable widget. More...
 
void setRecentProjectsList (QStringList recentProjects)
 Add recent projects to the recent projects list. More...
 
QStringList recentProjectsList ()
 Public accessor for the list of recent projects. More...
 
CnetEditorWidgetaddCnetEditorView (Control *network)
 Add the widget for the cnet editor view to the window. More...
 
CubeDnViewaddCubeDnView ()
 Add the qview workspace to the window. More...
 
Footprint2DViewaddFootprint2DView ()
 Add the qmos view widget to the window. More...
 
MatrixSceneWidgetaddMatrixView ()
 Add the matrix view widget to the window. More...
 
TargetInfoWidgetaddTargetInfoView (TargetBodyQsp target)
 Add target body data view widget to the window. More...
 
SensorInfoWidgetaddSensorInfoView (GuiCameraQsp camera)
 Add sensor data view widget to the window. More...
 
ImageFileListWidgetaddImageFileListView ()
 Add an imageFileList widget to the window. More...
 
ControlPointEditViewaddControlPointEditView ()
 
ProjectItemTreeViewaddProjectItemTreeView ()
 Adds a ProjectItemTreeView to the window. More...
 
ProjectItemModelmodel ()
 Gets the ProjectItemModel for this directory. More...
 
Projectproject () const
 Gets the Project for this directory. More...
 
QList< QAction * > fileMenuActions ()
 Get the list of actions that the Directory can provide for the file menu. More...
 
QList< QAction * > projectMenuActions ()
 Get the list of actions that the Directory can provide for the project menu. More...
 
QList< QAction * > editMenuActions ()
 Get the list of actions that the Directory can provide for the edit menu. More...
 
QList< QAction * > viewMenuActions ()
 Get the list of actions that the Directory can provide for the view menu. More...
 
QList< QAction * > settingsMenuActions ()
 Get the list of actions that the Directory can provide for the settings menu. More...
 
QList< QAction * > helpMenuActions ()
 Get the list of actions that the Directory can provide for the help menu. More...
 
QList< QAction * > permToolBarActions ()
 Get the list of actions that the Directory can provide for the permanent Tool Bar. More...
 
QList< QAction * > activeToolBarActions ()
 Get the list of actions that the Directory can provide for the active Tool Bar. More...
 
QList< QAction * > toolPadActions ()
 Get the list of actions that the Directory can provide for the Tool Pad. More...
 
QList< CnetEditorWidget * > cnetEditorViews ()
 Returns a list of all the control network views for this directory. More...
 
QList< CubeDnView * > cubeDnViews ()
 Accessor for the list of CubeDnViews currently available. More...
 
QList< Footprint2DView * > footprint2DViews ()
 Accessor for the list of Footprint2DViews currently available. More...
 
QList< MatrixSceneWidget * > matrixViews ()
 Accessor for the list of MatrixSceneWidgets currently available. More...
 
QList< SensorInfoWidget * > sensorInfoViews ()
 Accessor for the list of SensorInfoWidgets currently available. More...
 
QList< TargetInfoWidget * > targetInfoViews ()
 Accessor for the list of TargetInfoWidgets currently available. More...
 
QList< ImageFileListWidget * > imageFileListViews ()
 Accessor for the list of ImageFileListWidgets currently available. More...
 
QList< QProgressBar * > progressBars ()
 Gets the ControlNetEditor associated with this the Directory. More...
 
ControlPointEditViewcontrolPointEditView ()
 Gets the ControlPointEditWidget associated with the Directory. More...
 
ChipViewportsWidgetcontrolPointChipViewports ()
 
template<typename DataType >
QList< QAction * > supportedActions (DataType data)
 Returns a list of supported actions for a WorkOrder. More...
 
void showWarning (QString text)
 Displays a Warning. More...
 
template<typename Data >
void showWarning (QString text, Data data)
 Shows warning text for a Widget. More...
 
QWidgetwarningWidget ()
 Returns a pointer to the warning widget. More...
 
QActionredoAction ()
 Creates an Action to redo the last action. More...
 
QActionundoAction ()
 Creates an Action to undo the last action. More...
 
void load (XmlStackedHandlerReader *xmlReader)
 Loads the Directory from an XML file. More...
 
void save (QXmlStreamWriter &stream, FileName newProjectRoot) const
 Save the directory to an XML file. More...
 

Private Member Functions

 Directory (const Directory &other)
 
Directoryoperator= (const Directory &rhs)
 
template<typename WorkOrderType >
WorkOrderType * createWorkOrder ()
 Create a work order, append it to m_workOrders, and return it. More...
 
void initializeActions ()
 Initializes the actions that the Directory can provide to a main window. More...
 

Static Private Member Functions

static QList< QAction * > restructureActions (QList< QPair< QString, QList< QAction * > > >)
 Reformat actionPairings to be user friendly for use in menus. More...
 
static bool actionTextLessThan (QAction *lhs, QAction *rhs)
 This is for determining the ordering of the descriptive text of for the actions. More...
 

Private Attributes

QPointer< ProjectItemModelm_projectItemModel
 Pointer to the ProjectItemModel. More...
 
QPointer< HistoryTreeWidgetm_historyTreeWidget
 Pointer to the HistoryTreeWidget. More...
 
QPointer< Projectm_project
 Pointer to the Project. More...
 
QPointer< WarningTreeWidgetm_warningTreeWidget
 Pointer to the WarningTreeWidget. More...
 
QList< QPointer
< CnetEditorWidget > > 
m_cnetEditorViewWidgets
 List of CnetEditorWidgets. More...
 
QList< QPointer< CubeDnView > > m_cubeDnViewWidgets
 List of CubeDnCiew obs. More...
 
QList< QPointer
< ImageFileListWidget > > 
m_fileListWidgets
 List of ImageFileListWidgets. More...
 
QList< QPointer
< Footprint2DView > > 
m_footprint2DViewWidgets
 List of Footprint2DView objs. More...
 
QPointer< ControlPointEditViewm_controlPointEditViewWidget
 
QPointer< ChipViewportsWidgetm_chipViewports
 
QList< QPointer
< MatrixSceneWidget > > 
m_matrixViewWidgets
 List of MatrixSceneWidgets. More...
 
QList< QPointer
< SensorInfoWidget > > 
m_sensorInfoWidgets
 List of SensorInfoWidgets. More...
 
QList< QPointer
< TargetInfoWidget > > 
m_targetInfoWidgets
 List of TargetInfoWidgets. More...
 
QList< QPointer< WorkOrder > > m_workOrders
 List of WorkOrders. More...
 
QStringList m_recentProjects
 List of the names of recent projects. More...
 
QPointer< WorkOrderm_exportControlNetWorkOrder
 The export ControlNetwork WorkOrder. More...
 
QPointer< WorkOrderm_exportImagesWorkOrder
 The export images WorkOrder. More...
 
QPointer< WorkOrderm_importControlNetWorkOrder
 The import ControlNetwork WorkOrder. More...
 
QPointer< WorkOrderm_importImagesWorkOrder
 The import images WorkOrder. More...
 
QPointer< WorkOrderm_importShapesWorkOrder
 The import shapes WorkOrder. More...
 
QPointer< WorkOrderm_openProjectWorkOrder
 The Open Project WorkOrder. More...
 
QPointer< WorkOrderm_saveProjectWorkOrder
 The Save Project WorkOrder. More...
 
QPointer< WorkOrderm_saveProjectAsWorkOrder
 The Save Project As WorkOrder. More...
 
QPointer< WorkOrderm_openRecentProjectWorkOrder
 The Open Recent Project WorkOrder. More...
 
QPointer< WorkOrderm_closeProjectWorkOrder
 The Close Project WorkOrder. More...
 
QPointer< WorkOrderm_runJigsawWorkOrder
 The Run Jigsaw WorkOrder. More...
 
QPointer< WorkOrderm_renameProjectWorkOrder
 The Rename Project WorkOrder. More...
 
QList< QAction * > m_fileMenuActions
 List of file menu actions. More...
 
QList< QAction * > m_projectMenuActions
 List of project menu actions. More...
 
QList< QAction * > m_editMenuActions
 List of edit menu actions. More...
 
QList< QAction * > m_viewMenuActions
 List of view menu actions. More...
 
QList< QAction * > m_settingsMenuActions
 List of menu settings actions. More...
 
QList< QAction * > m_helpMenuActions
 List of help menu actions. More...
 
QList< QAction * > m_permToolBarActions
 List of perm ToolBar actions. More...
 
QList< QAction * > m_activeToolBarActions
 List of active ToolBar actions. More...
 
QList< QAction * > m_toolPadActions
 List of ToolPad actions. More...
 

Detailed Description

Author
2012-??-?? ???
History:

2012-07-30 Steven Lambright - The save action now has enabling/disabling of state functional (as long as there are work orders in the undo stack).

2012-08-28 Tracie Sucharski - Instead of this class adding tabs to a TabWidget, it now emits a signal which is connected to cnetSuiteMainWindow to create a new dock widget. This class no longer needs the viewContainer since it is not adding tabs.

2012-09-12 Steven Lambright - Added xml save/load capabilities, removed dead code relating to having only one image list (now we have N image lists).

2012-09-19 Steven Lambright - Re-implemented workOrders(ImageList *) into a generic templated version. Added m_workOrders and createWorkOrder().

2012-10-02 Stuart Sides and Steven Lambright - Renamed workOrders() to supportedActions(). This method now asks the footprint views for their supported actions in addition to the known work orders. Added sorting/smart arranging of the actions that come from the footprint views.

2012-10-03 Steven Lambright - Added 'All' option generation in restructureActions()

2014-07-14 Kimberly Oyama - Updated to better meet programming standards. Added support for correlation matrix.

2015-10-05 Jeffrey Covington - Added a ProjectItemModel and the addProjectItemTreeView() method to start supporting Qt's model-view framework.

2016-01-04 Jeffrey Covington - Added support for CubeDnView and Footprint2DView, replacing old classes.

2016-06-17 Tyler Wilson - Added documentation for member functions/variables.

2016-07-06 Tracie Sucharski - Added ImportShapesWorkOrder, changed ControlNetEditor to ControlPointEditView.

2016-08-02 Tracie Sucharski - Added RemoveImagesWorkOrder.

2016-09-14 Tracie Sucharski - Added slots for mouse clicks on Footprint2DView and CubeDnViews for modifying, deleting and creating control points.

2016-11-07 Ian Humphrey - Restored saving and loading Footprint2DViews when saving and opening a project (modified save() and startElement()). Fixes #4486.

2016-11-10 Tracie Sucharski - Added functionality to save/restore CubeDnViews.

Definition at line 106 of file Directory.h.

Constructor & Destructor Documentation

Isis::Directory::Directory ( QObject parent = 0)
explicit
Isis::Directory::~Directory ( )

The Destructor.

Definition at line 167 of file Directory.cpp.

References m_project, and m_workOrders.

Member Function Documentation

bool Isis::Directory::actionTextLessThan ( QAction lhs,
QAction rhs 
)
staticprivate

This is for determining the ordering of the descriptive text of for the actions.

Parameters
lhsThe first QAction argument.
rhsThe second QAction argument.
Returns
bool Returns True if the text for the lhs QAction is less than the text for the rhs QAction. Returns False otherwise.

Definition at line 1362 of file Directory.cpp.

Referenced by restructureActions().

QList< QAction * > Isis::Directory::activeToolBarActions ( )

Get the list of actions that the Directory can provide for the active Tool Bar.

Returns
QList<QAction *> Returns a list of active Tool Bar actions.

Definition at line 246 of file Directory.cpp.

References m_activeToolBarActions.

CnetEditorWidget * Isis::Directory::addCnetEditorView ( Control network)

Add the widget for the cnet editor view to the window.

Parameters
networkControl net to edit.
Returns
(CnetEditorWidget *) The view to add to the window.

Definition at line 469 of file Directory.cpp.

References cleanupCnetEditorViewWidgets(), Isis::Control::controlNet(), Isis::DisplayProperties::displayName(), Isis::Control::displayProperties(), and m_cnetEditorViewWidgets.

Referenced by Isis::CnetEditorViewWorkOrder::syncRedo().

CubeDnView * Isis::Directory::addCubeDnView ( )

Add the qview workspace to the window.

Returns
(CubeDnView*) The work space to display.

Definition at line 562 of file Directory.cpp.

References cleanupCubeDnViewWidgets(), m_cubeDnViewWidgets, m_projectItemModel, and Isis::AbstractProjectItemView::setModel().

Referenced by Isis::CubeDnViewWorkOrder::syncRedo().

Footprint2DView * Isis::Directory::addFootprint2DView ( )

Add the qmos view widget to the window.

Returns
(Footprint2DView*) A pointer to the Footprint2DView to display.

Definition at line 599 of file Directory.cpp.

References cleanupFootprint2DViewWidgets(), m_footprint2DViewWidgets, m_projectItemModel, and Isis::AbstractProjectItemView::setModel().

Referenced by Isis::Footprint2DViewWorkOrder::syncRedo().

ImageFileListWidget * Isis::Directory::addImageFileListView ( )

Add an imageFileList widget to the window.

Returns
(ImageFileListWidget *) A pointer to the widget to add to the window.

Definition at line 794 of file Directory.cpp.

References cleanupFileListWidgets(), and m_fileListWidgets.

Referenced by Isis::ImageFileListViewWorkOrder::syncRedo().

MatrixSceneWidget * Isis::Directory::addMatrixView ( )

Add the matrix view widget to the window.

Returns
(MatrixSceneWidget*) The widget to view.

Definition at line 731 of file Directory.cpp.

References cleanupMatrixViewWidgets(), and m_matrixViewWidgets.

Referenced by Isis::MatrixViewWorkOrder::syncRedo().

ProjectItemTreeView * Isis::Directory::addProjectItemTreeView ( )

Adds a ProjectItemTreeView to the window.

Returns
(ProjectItemTreeView *) The added view.

Definition at line 816 of file Directory.cpp.

References m_projectItemModel, and Isis::AbstractProjectItemView::setModel().

SensorInfoWidget * Isis::Directory::addSensorInfoView ( GuiCameraQsp  camera)

Add sensor data view widget to the window.

Returns
(SensorInfoWidget*) The widget to view.

Definition at line 773 of file Directory.cpp.

References cleanupSensorInfoWidgets(), and m_sensorInfoWidgets.

Referenced by Isis::SensorGetInfoWorkOrder::syncRedo().

TargetInfoWidget * Isis::Directory::addTargetInfoView ( TargetBodyQsp  target)

Add target body data view widget to the window.

Returns
(TargetInfoWidget*) The widget to view.

Definition at line 752 of file Directory.cpp.

References cleanupTargetInfoWidgets(), and m_targetInfoWidgets.

Referenced by Isis::TargetGetInfoWorkOrder::syncRedo().

void Isis::Directory::cleanupCnetEditorViewWidgets ( )
slot

Removes pointers to deleted CnetEditorWidget objects.

Definition at line 845 of file Directory.cpp.

References m_cnetEditorViewWidgets.

Referenced by addCnetEditorView().

void Isis::Directory::cleanupControlPointEditViewWidget ( )
slot

Delete the ControlPointEditWidget and set it's pointer to NULL.

Definition at line 878 of file Directory.cpp.

void Isis::Directory::cleanupCubeDnViewWidgets ( )
slot

Removes pointers to deleted CubeDnView objects.

Definition at line 853 of file Directory.cpp.

References m_cubeDnViewWidgets.

Referenced by addCubeDnView().

void Isis::Directory::cleanupFileListWidgets ( )
slot

Reomoves pointers to deleted ImageFileListWidget objects.

Definition at line 861 of file Directory.cpp.

References m_fileListWidgets.

Referenced by addImageFileListView().

void Isis::Directory::cleanupFootprint2DViewWidgets ( )
slot

Removes pointers to deleted Footprint2DView objects.

Definition at line 870 of file Directory.cpp.

References m_footprint2DViewWidgets.

Referenced by addFootprint2DView().

void Isis::Directory::cleanupMatrixViewWidgets ( )
slot

Removes pointers to deleted MatrixSceneWidget objects.

Definition at line 887 of file Directory.cpp.

References m_matrixViewWidgets.

Referenced by addMatrixView().

void Isis::Directory::cleanupSensorInfoWidgets ( )
slot

Removes pointers to deleted SensorInfoWidget objects.

Definition at line 895 of file Directory.cpp.

References m_sensorInfoWidgets.

Referenced by addSensorInfoView().

void Isis::Directory::cleanupTargetInfoWidgets ( )
slot

Removes pointers to deleted TargetInfoWidget objects.

Definition at line 903 of file Directory.cpp.

References m_targetInfoWidgets.

Referenced by addTargetInfoView().

QList< CnetEditorWidget * > Isis::Directory::cnetEditorViews ( )

Returns a list of all the control network views for this directory.

Returns
QList<CnetEditorWidget *> A pointer list of all the CnetEditorWidget objects.

Definition at line 932 of file Directory.cpp.

References m_cnetEditorViewWidgets.

Referenced by Isis::CnetEditorViewWorkOrder::syncUndo().

ControlPointEditView * Isis::Directory::controlPointEditView ( )

Gets the ControlPointEditWidget associated with the Directory.

Returns
(ControlPointEditWidget *) Returns a pointer to the ControlPointEditWidget.

Definition at line 1036 of file Directory.cpp.

template<typename WorkOrderType >
WorkOrderType* Isis::Directory::createWorkOrder ( )
inlineprivate

Create a work order, append it to m_workOrders, and return it.

Example: createWorkOrder<ImageFileListViewWorkOrder>(); This will create a new ImageFileListViewWorkOrder and append it to m_workOrders.

Returns
A pointer to the WorkOrder created by this function.

Definition at line 271 of file Directory.h.

References m_project, and m_workOrders.

QList< CubeDnView * > Isis::Directory::cubeDnViews ( )

Accessor for the list of CubeDnViews currently available.

Returns
QList<CubeDnView *> The list CubeDnView objects.

Definition at line 947 of file Directory.cpp.

References m_cubeDnViewWidgets.

Referenced by Isis::CubeDnViewWorkOrder::execute(), and Isis::CubeDnViewWorkOrder::syncRedo().

QList< QAction * > Isis::Directory::editMenuActions ( )

Get the list of actions that the Directory can provide for the edit menu.

Returns
QList<QAction *> Returns a list of edit menu actions.

Definition at line 201 of file Directory.cpp.

References m_editMenuActions.

QList< QAction * > Isis::Directory::fileMenuActions ( )

Get the list of actions that the Directory can provide for the file menu.

Returns
QList<QAction *> Returns a list of file menu actions.

Definition at line 183 of file Directory.cpp.

References m_fileMenuActions.

QList< Footprint2DView * > Isis::Directory::footprint2DViews ( )

Accessor for the list of Footprint2DViews currently available.

Returns
QList<Footprint2DView *> The list of MosaicSceneWidget objects.

Definition at line 1007 of file Directory.cpp.

References m_footprint2DViewWidgets.

Referenced by Isis::Footprint2DViewWorkOrder::execute(), Isis::Footprint2DViewWorkOrder::syncRedo(), and Isis::Footprint2DViewWorkOrder::syncUndo().

QList< QAction * > Isis::Directory::helpMenuActions ( )

Get the list of actions that the Directory can provide for the help menu.

Returns
QList<QAction *> Returns a list of help menu actions.

Definition at line 228 of file Directory.cpp.

References m_helpMenuActions.

QList< ImageFileListWidget * > Isis::Directory::imageFileListViews ( )

Accessor for the list of ImageFileListWidgets currently available.

Returns
QList<ImageFileListWidget *> The list of ImageFileListWidgets.

Definition at line 1022 of file Directory.cpp.

References m_fileListWidgets.

Referenced by Isis::ImageFileListViewWorkOrder::execute(), Isis::ImageFileListViewWorkOrder::syncRedo(), and Isis::ImageFileListViewWorkOrder::syncUndo().

void Isis::Directory::load ( XmlStackedHandlerReader xmlReader)

Loads the Directory from an XML file.

Parameters
xmlReaderThe reader that takes in and parses the XML file.

Definition at line 1098 of file Directory.cpp.

QList< MatrixSceneWidget * > Isis::Directory::matrixViews ( )

Accessor for the list of MatrixSceneWidgets currently available.

Returns
QList<MatrixSceneWidget *> The list of MatrixSceneWidget objects.

Definition at line 962 of file Directory.cpp.

References m_matrixViewWidgets.

Referenced by Isis::MatrixViewWorkOrder::execute(), and Isis::MatrixViewWorkOrder::syncUndo().

ProjectItemModel * Isis::Directory::model ( )

Gets the ProjectItemModel for this directory.

Returns
(ProjectItemModel *) Returns a pointer to the ProjectItemModel.

Definition at line 828 of file Directory.cpp.

References m_projectItemModel.

Referenced by Isis::RemoveImagesWorkOrder::syncRedo(), Isis::CubeDnViewWorkOrder::syncRedo(), and Isis::Footprint2DViewWorkOrder::syncRedo().

QList< QAction * > Isis::Directory::permToolBarActions ( )

Get the list of actions that the Directory can provide for the permanent Tool Bar.

Returns
QList<QAction *> Returns a list of permanent tool bar menu actions.

Definition at line 237 of file Directory.cpp.

References m_permToolBarActions.

void Isis::Directory::populateMainMenu ( QMenuBar *  menuBar)
QList< QProgressBar * > Isis::Directory::progressBars ( )

Gets the ControlNetEditor associated with this the Directory.

Returns
(ControlNetEditor *) Returns a pointer to the ControlNetEditor. Returns a list of progress bars associated with this Directory.
QList<QProgressBar *>

Definition at line 1061 of file Directory.cpp.

QList< QAction * > Isis::Directory::projectMenuActions ( )

Get the list of actions that the Directory can provide for the project menu.

Returns
QList<QAction *> Returns a list of project menu actions.

Definition at line 192 of file Directory.cpp.

References m_projectMenuActions.

QStringList Isis::Directory::recentProjectsList ( )

Public accessor for the list of recent projects.

Returns
QStringList List of recent projects.

Definition at line 459 of file Directory.cpp.

References m_recentProjects.

QAction * Isis::Directory::redoAction ( )

Creates an Action to redo the last action.

Returns
(QAction *) Returns an action pointer to redo the last action.

Definition at line 1080 of file Directory.cpp.

References project().

QList< QAction * > Isis::Directory::restructureActions ( QList< QPair< QString, QList< QAction * > > >  actionPairings)
staticprivate

Reformat actionPairings to be user friendly for use in menus.

actionPairings is: Widget A -> Action 1 Action 2 Action 3 Widget B -> Action 1 Action 3 NULL Action 4 ...

We convert this into a list of actions, that when added to a menu, looks like: Action 1 -> Widget A Widget B Action 2 on Widget A Action 3 -> Widget A

Widget B

Action 4 on Widget B

The NULL separators aren't 100% yet, but work a good part of the time.

This works by doing a data transformation and then using the resulting data structures to populate the menu.

actionPairings is transformed into: restructuredData: Action 1 -> (Widget A, QAction *) (Widget B, QAction *) Action 2 -> (Widget A, QAction *) Action 3 -> (Widget A, QAction *) (Widget B, QAction *) Action 4 -> (Widget B, QAction *)

and

sortedActionTexts - A list of unique (if not empty) strings: "Action 1" "Action 2" "Action 3" "" "Action 4"

This transformation is done by looping linearly through actionPairings and for each action in the pairings we add to the restructured data and append the action's text to sortedActionTexts.

We loop through sortedActionTexts and populate the menu based based on the current (sorted) action text. If the action text is NULL (we saw a separator in the input), we add a NULL (separator) to the resulting list of actions. If it isn't NULL, we create a menu or utilize the action directly depending on if there are multiple actions with the same text.

Parameters
actionPairingsA list of action pairings.
Returns
QList<QAction *> A list of actions that can be added to a menu.

Definition at line 1262 of file Directory.cpp.

References actionTextLessThan().

void Isis::Directory::save ( QXmlStreamWriter &  stream,
FileName  newProjectRoot 
) const

Save the directory to an XML file.

Parameters
streamThe XML stream writer
newProjectRootThe FileName of the project this Directory is attached to.
History:
2016-11-07 Ian Humphrey - Restored saving of footprints (footprint2view). References #4486.

Definition at line 1112 of file Directory.cpp.

References m_cubeDnViewWidgets, m_fileListWidgets, m_footprint2DViewWidgets, project(), and Isis::ImageFileListWidget::save().

QList< SensorInfoWidget * > Isis::Directory::sensorInfoViews ( )

Accessor for the list of SensorInfoWidgets currently available.

Returns
QList<SensorInfoWidget *> The list of SensorInfoWidget objects.

Definition at line 977 of file Directory.cpp.

References m_sensorInfoWidgets.

Referenced by Isis::SensorGetInfoWorkOrder::isExecutable().

void Isis::Directory::setHistoryContainer ( QDockWidget *  historyContainer)

Set up the history info in the history dockable widget.

Parameters
historyContainerThe widget to fill.

Definition at line 426 of file Directory.cpp.

References m_historyTreeWidget, and project().

void Isis::Directory::setRecentProjectsList ( QStringList  recentProjects)

Add recent projects to the recent projects list.

Parameters
recentProjectsList of projects to add to list.

Definition at line 450 of file Directory.cpp.

References m_recentProjects.

QList< QAction * > Isis::Directory::settingsMenuActions ( )

Get the list of actions that the Directory can provide for the settings menu.

Returns
QList<QAction *> Returns a list of menu actions for the settings.

Definition at line 219 of file Directory.cpp.

References m_settingsMenuActions.

void Isis::Directory::setWarningContainer ( QDockWidget *  warningContainer)

Set up the warning info in the warning dockable widget.

Parameters
warningContainerThe widget to fill.

Definition at line 438 of file Directory.cpp.

References m_warningTreeWidget.

void Isis::Directory::showWarning ( QString  text)

Displays a Warning.

Parameters
textThe text to be displayed as a warning.

Definition at line 1071 of file Directory.cpp.

References m_warningTreeWidget.

Referenced by Isis::Project::open().

template<typename Data >
void Isis::Directory::showWarning ( QString  text,
Data  data 
)
inline

Shows warning text for a Widget.

Parameters
textThe warning text.
DataThe Widget object we are passing the warning to.

Definition at line 200 of file Directory.h.

template<typename DataType >
QList<QAction *> Isis::Directory::supportedActions ( DataType  data)
inline

Returns a list of supported actions for a WorkOrder.

Parameters
dataThe WorkOrder type we are using.
Returns
QList<QAction *> A list of supported actions.

Definition at line 164 of file Directory.h.

References Isis::WorkOrder::isExecutable(), m_workOrders, and Isis::WorkOrder::setData().

Referenced by Isis::MosaicSceneItem::contextMenuEvent(), and Isis::MosaicSceneWidget::contextMenuEvent().

QList< TargetInfoWidget * > Isis::Directory::targetInfoViews ( )

Accessor for the list of TargetInfoWidgets currently available.

Returns
QList<TargetInfoWidget *> The list of TargetInfoWidget objects.

Definition at line 992 of file Directory.cpp.

References m_targetInfoWidgets.

Referenced by Isis::TargetGetInfoWorkOrder::isExecutable().

QList< QAction * > Isis::Directory::toolPadActions ( )

Get the list of actions that the Directory can provide for the Tool Pad.

Returns
QList<QAction *> Returns a list of Tool Pad actions.

Definition at line 255 of file Directory.cpp.

References m_toolPadActions.

QAction * Isis::Directory::undoAction ( )

Creates an Action to undo the last action.

Returns
(QAction *) Returns an action pointer to undo the last action.

Definition at line 1089 of file Directory.cpp.

References project().

void Isis::Directory::updateControlNetEditConnections ( )
slot

Updates the SIGNAL/SLOT connections for the cotrol net editor.

Definition at line 1371 of file Directory.cpp.

References m_footprint2DViewWidgets.

void Isis::Directory::updateRecentProjects ( Project project)
slot

Adds a new Project object to the list of recent projects if it has not already been added.

Parameters
projectA pointer to the Project to add.

Definition at line 913 of file Directory.cpp.

References m_recentProjects, and Isis::Project::projectRoot().

QList< QAction * > Isis::Directory::viewMenuActions ( )

Get the list of actions that the Directory can provide for the view menu.

Returns
QList<QAction *> Returns a list of view menu actions.

Definition at line 210 of file Directory.cpp.

References m_viewMenuActions.

QWidget * Isis::Directory::warningWidget ( )

Returns a pointer to the warning widget.

Returns
(QWidget *) The WarningTreeWidget pointer.

Definition at line 837 of file Directory.cpp.

References m_warningTreeWidget.

Member Data Documentation

QList<QAction *> Isis::Directory::m_activeToolBarActions
private

List of active ToolBar actions.

Definition at line 327 of file Directory.h.

Referenced by activeToolBarActions().

QPointer<WorkOrder> Isis::Directory::m_closeProjectWorkOrder
private

The Close Project WorkOrder.

Definition at line 314 of file Directory.h.

Referenced by Directory(), initializeActions(), and populateMainMenu().

QList< QPointer<CnetEditorWidget> > Isis::Directory::m_cnetEditorViewWidgets
private

List of CnetEditorWidgets.

Definition at line 289 of file Directory.h.

Referenced by addCnetEditorView(), cleanupCnetEditorViewWidgets(), and cnetEditorViews().

QList< QPointer<CubeDnView> > Isis::Directory::m_cubeDnViewWidgets
private

List of CubeDnCiew obs.

Definition at line 290 of file Directory.h.

Referenced by addCubeDnView(), cleanupCubeDnViewWidgets(), cubeDnViews(), and save().

QList<QAction *> Isis::Directory::m_editMenuActions
private

List of edit menu actions.

Definition at line 321 of file Directory.h.

Referenced by editMenuActions(), and initializeActions().

QPointer<WorkOrder> Isis::Directory::m_exportControlNetWorkOrder
private

The export ControlNetwork WorkOrder.

Definition at line 305 of file Directory.h.

Referenced by Directory(), initializeActions(), and populateMainMenu().

QPointer<WorkOrder> Isis::Directory::m_exportImagesWorkOrder
private

The export images WorkOrder.

Definition at line 306 of file Directory.h.

Referenced by Directory(), initializeActions(), and populateMainMenu().

QList< QPointer<ImageFileListWidget> > Isis::Directory::m_fileListWidgets
private

List of ImageFileListWidgets.

Definition at line 291 of file Directory.h.

Referenced by addImageFileListView(), cleanupFileListWidgets(), imageFileListViews(), and save().

QList<QAction *> Isis::Directory::m_fileMenuActions
private

List of file menu actions.

Definition at line 319 of file Directory.h.

Referenced by fileMenuActions(), and initializeActions().

QList< QPointer<Footprint2DView> > Isis::Directory::m_footprint2DViewWidgets
private
QList<QAction *> Isis::Directory::m_helpMenuActions
private

List of help menu actions.

Definition at line 324 of file Directory.h.

Referenced by helpMenuActions(), and initializeActions().

QPointer<HistoryTreeWidget> Isis::Directory::m_historyTreeWidget
private

Pointer to the HistoryTreeWidget.

Definition at line 285 of file Directory.h.

Referenced by setHistoryContainer().

QPointer<WorkOrder> Isis::Directory::m_importControlNetWorkOrder
private

The import ControlNetwork WorkOrder.

Definition at line 307 of file Directory.h.

Referenced by Directory(), initializeActions(), and populateMainMenu().

QPointer<WorkOrder> Isis::Directory::m_importImagesWorkOrder
private

The import images WorkOrder.

Definition at line 308 of file Directory.h.

Referenced by Directory(), initializeActions(), and populateMainMenu().

QPointer<WorkOrder> Isis::Directory::m_importShapesWorkOrder
private

The import shapes WorkOrder.

Definition at line 309 of file Directory.h.

Referenced by Directory(), initializeActions(), and populateMainMenu().

QList< QPointer<MatrixSceneWidget> > Isis::Directory::m_matrixViewWidgets
private

List of MatrixSceneWidgets.

Definition at line 295 of file Directory.h.

Referenced by addMatrixView(), cleanupMatrixViewWidgets(), and matrixViews().

QPointer<WorkOrder> Isis::Directory::m_openProjectWorkOrder
private

The Open Project WorkOrder.

Definition at line 310 of file Directory.h.

Referenced by Directory(), initializeActions(), and populateMainMenu().

QPointer<WorkOrder> Isis::Directory::m_openRecentProjectWorkOrder
private

The Open Recent Project WorkOrder.

Definition at line 313 of file Directory.h.

Referenced by Directory(), initializeActions(), and populateMainMenu().

QList<QAction *> Isis::Directory::m_permToolBarActions
private

List of perm ToolBar actions.

Definition at line 326 of file Directory.h.

Referenced by initializeActions(), permToolBarActions(), and populateMainMenu().

QPointer<Project> Isis::Directory::m_project
private

Pointer to the Project.

Definition at line 286 of file Directory.h.

Referenced by createWorkOrder(), Directory(), project(), and ~Directory().

QPointer<ProjectItemModel> Isis::Directory::m_projectItemModel
private

Pointer to the ProjectItemModel.

Definition at line 282 of file Directory.h.

Referenced by addCubeDnView(), addFootprint2DView(), addProjectItemTreeView(), Directory(), and model().

QList<QAction *> Isis::Directory::m_projectMenuActions
private

List of project menu actions.

Definition at line 320 of file Directory.h.

Referenced by initializeActions(), and projectMenuActions().

QStringList Isis::Directory::m_recentProjects
private

List of the names of recent projects.

Definition at line 301 of file Directory.h.

Referenced by initializeActions(), populateMainMenu(), recentProjectsList(), setRecentProjectsList(), and updateRecentProjects().

QPointer<WorkOrder> Isis::Directory::m_renameProjectWorkOrder
private

The Rename Project WorkOrder.

Definition at line 317 of file Directory.h.

Referenced by Directory(), initializeActions(), and populateMainMenu().

QPointer<WorkOrder> Isis::Directory::m_runJigsawWorkOrder
private

The Run Jigsaw WorkOrder.

Definition at line 316 of file Directory.h.

Referenced by Directory(), initializeActions(), and populateMainMenu().

QPointer<WorkOrder> Isis::Directory::m_saveProjectAsWorkOrder
private

The Save Project As WorkOrder.

Definition at line 312 of file Directory.h.

Referenced by Directory(), initializeActions(), and populateMainMenu().

QPointer<WorkOrder> Isis::Directory::m_saveProjectWorkOrder
private

The Save Project WorkOrder.

Definition at line 311 of file Directory.h.

Referenced by Directory(), initializeActions(), and populateMainMenu().

QList< QPointer<SensorInfoWidget> > Isis::Directory::m_sensorInfoWidgets
private

List of SensorInfoWidgets.

Definition at line 296 of file Directory.h.

Referenced by addSensorInfoView(), cleanupSensorInfoWidgets(), and sensorInfoViews().

QList<QAction *> Isis::Directory::m_settingsMenuActions
private

List of menu settings actions.

Definition at line 323 of file Directory.h.

Referenced by initializeActions(), and settingsMenuActions().

QList< QPointer<TargetInfoWidget> > Isis::Directory::m_targetInfoWidgets
private

List of TargetInfoWidgets.

Definition at line 297 of file Directory.h.

Referenced by addTargetInfoView(), cleanupTargetInfoWidgets(), and targetInfoViews().

QList<QAction *> Isis::Directory::m_toolPadActions
private

List of ToolPad actions.

Definition at line 328 of file Directory.h.

Referenced by toolPadActions().

QList<QAction *> Isis::Directory::m_viewMenuActions
private

List of view menu actions.

Definition at line 322 of file Directory.h.

Referenced by initializeActions(), and viewMenuActions().

QPointer<WarningTreeWidget> Isis::Directory::m_warningTreeWidget
private

Pointer to the WarningTreeWidget.

Definition at line 287 of file Directory.h.

Referenced by setWarningContainer(), showWarning(), and warningWidget().

QList< QPointer<WorkOrder> > Isis::Directory::m_workOrders
private

List of WorkOrders.

Definition at line 299 of file Directory.h.

Referenced by createWorkOrder(), supportedActions(), and ~Directory().


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