Isis 3.0 Object Programmers' Reference |
Home |
#include <Directory.h>
Classes | |
class | XmlHandler |
Public Slots | |
void | cleanupCnetEditorViewWidgets () |
void | cleanupCubeDnViewWidgets () |
void | cleanupFileListWidgets () |
void | cleanupFootprint2DViewWidgets () |
void | imagesAddedToProject (ImageList *images) |
Signals | |
void | newWidgetAvailable (QWidget *newWidget, Qt::DockWidgetArea area, Qt::Orientation orientation) |
Public Member Functions | |
Directory (QObject *parent=0) | |
void | populateMainMenu (QMenuBar *) |
void | setHistoryContainer (QDockWidget *historyContainer) |
void | setWarningContainer (QDockWidget *warningContainer) |
CnetEditorWidget * | addCnetEditorView (Control *network) |
Workspace * | addCubeDnView () |
MosaicSceneWidget * | addFootprint2DView () |
ImageFileListWidget * | addImageFileListView () |
QWidget * | projectTreeWidget () |
Project * | project () const |
QList< CnetEditorWidget * > | cnetEditorViews () |
QList< Workspace * > | cubeDnViews () |
QList< MosaicSceneWidget * > | footprint2DViews () |
QList< ImageFileListWidget * > | imageFileListViews () |
QList< QProgressBar * > | progressBars () |
template<typename DataType > | |
QList< QAction * > | supportedActions (DataType data) |
void | showWarning (QString text) |
template<typename Data > | |
void | showWarning (QString text, Data data) |
QWidget * | warningWidget () |
QAction * | redoAction () |
QAction * | undoAction () |
void | load (XmlStackedHandlerReader *xmlReader) |
void | save (QXmlStreamWriter &stream, FileName newProjectRoot) const |
Private Member Functions | |
Directory (const Directory &other) | |
Directory & | operator= (const Directory &rhs) |
template<typename WorkOrderType > | |
WorkOrderType * | createWorkOrder () |
Create a work order, append it to m_workOrders, and return it. | |
Static Private Member Functions | |
static QList< QAction * > | restructureActions (QList< QPair< QString, QList< QAction * > > >) |
Reformat actionPairings to be user friendly for use in menus. | |
static bool | actionTextLessThan (QAction *lhs, QAction *rhs) |
Private Attributes | |
QPointer< ProjectTreeWidget > | m_projectTreeWidget |
QPointer< HistoryTreeWidget > | m_historyTreeWidget |
QPointer< Project > | m_project |
QPointer< WarningTreeWidget > | m_warningTreeWidget |
QList< QPointer < CnetEditorWidget > > | m_cnetEditorViewWidgets |
QList< QPointer< Workspace > > | m_cubeDnViewWidgets |
QList< QPointer < ImageFileListWidget > > | m_fileListWidgets |
QList< QPointer < MosaicSceneWidget > > | m_footprint2DViewWidgets |
QList< QPointer< WorkOrder > > | m_workOrders |
QPointer< WorkOrder > | m_exportControlNetWorkOrder |
QPointer< WorkOrder > | m_exportImagesWorkOrder |
QPointer< WorkOrder > | m_importControlNetWorkOrder |
QPointer< WorkOrder > | m_importImagesWorkOrder |
QPointer< WorkOrder > | m_openProjectWorkOrder |
QPointer< WorkOrder > | m_saveProjectWorkOrder |
QPointer< WorkOrder > | m_saveProjectAsWorkOrder |
QPointer< WorkOrder > | m_renameProjectWorkOrder |
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()
Definition at line 74 of file Directory.h.
|
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.
Definition at line 185 of file Directory.h.
|
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
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.
Definition at line 531 of file Directory.cpp.