Isis 3 Programmer Reference
Isis::ImageTreeWidget Class Reference

#include <ImageTreeWidget.h>

Inheritance diagram for Isis::ImageTreeWidget:
Inheritance graph
Collaboration diagram for Isis::ImageTreeWidget:
Collaboration graph

Classes

class  ImagePosition
 

Public Types

enum  TreeItemContainerType { ImageGroupType = 1, ImageListNameType }
 

Signals

void queueSelectionChanged ()
 
void queueReadDisplayProperties ()
 

Public Member Functions

 ImageTreeWidget (Directory *directory=0, QWidget *parent=0)
 ImageTreeWidget constructor. More...
 
QList< QAction * > actions ()
 
QTreeWidgetItemaddGroup (QString imageListName, QString groupName="", int index=-1)
 
QTreeWidgetItemcreateGroup (QTreeWidgetItem *imageListItem, QString groupName="", int index=-1)
 
QTreeWidgetItemcreateImageListNameItem (QString name)
 
void refit ()
 
void disableSort ()
 
void enqueueReadDisplayProperties (ImageTreeWidgetItem *)
 
QList< QAction * > getViewActions ()
 
bool groupInList (QList< QTreeWidgetItem * >)
 
void updateViewActs ()
 
ImageTreeWidgetItemprepCube (ImageList *imageList, Image *image)
 
ImageList imagesInView ()
 

Protected Member Functions

void dropEvent (QDropEvent *event)
 
void mousePressEvent (QMouseEvent *event)
 This is why we needed to subclass the QTreeWidget class. More...
 
void contextMenuEvent (QContextMenuEvent *event)
 

Private Slots

QTreeWidgetItemaddGroup ()
 
void deleteSelectedGroups ()
 
void imageDeleted (QObject *image)
 
void onItemChanged (QTreeWidgetItem *, int)
 
void onSelectionChanged ()
 
void onQueuedReadDisplayProperties ()
 
void onQueuedSelectionChanged ()
 
void propertiesChanged (DisplayProperties *)
 
void renameSelectedGroup ()
 
void requestCloseSelected ()
 
void toggleColumnVisible ()
 
void updateDragAndDropability ()
 
void setDefaultFileListCols ()
 

Private Member Functions

bool mosaicItemInList (QList< QTreeWidgetItem * >)
 
ImageList selectedDisplays ()
 
QTreeWidgetItemimageListTreeItem (QString imageListName)
 This will get the image list tree item for the given image list (by name). More...
 
ImageTreeWidgetItemtreeItem (DisplayProperties *)
 
ImageTreeWidgetItemtreeItem (Image *)
 

Private Attributes

Directorym_directory
 
QList< QAction * > m_viewActs
 
QPointer< QActionm_setFileListColsAct
 
QMap< DisplayProperties *, ImageTreeWidgetItem * > m_displayPropsToTreeItemLookup
 
bool m_queuedSelectionChanged
 
QList< ImageTreeWidgetItem * > m_queuedReadDisplayPropertiesItems
 

Detailed Description

Author
????-??-?? Unknown
History:
2012-09-12 Steven Lambright - createGroup() will no longer fail if a NULL image list item is provided, it will instead create the group at the root level.
History:
2012-09-17 Steven Lambright - Optimized for 50,000+ images. Added m_displayPropsToTreeItemLookup (changed n/2 operation to log(n)). Added queued selection changed (changed some n^2 operations to n).
History:
2013-03-19 Steven Lambright - Added setDefaultFileListCols() and set column defaults in constructor.
History:
2013-06-27 Tracie Sucharski - Fixed bug which resulted in a seg fault when attempting to add a group to the file list. This was introduced in the changes for "a.out". Fixes #1693.
History:
2013-07-02 Tracie Sucharski - Restored old qmos functionality for inserting new groups and fixed bug dragging and dropping groups. Fixes #1697.

Selection changes are very slow (time complexity in our code is delta-selected, but there is a very high constant that scales to the tree size - maybe an N complexity? making a total time complexity of [delta selected]*[items in view] – as bad as N^2). https://bugreports.qt-project.org/browse/QTBUG-26143. If we want this tree to no longer be a performance problem, we're going to have to rewrite it completely.

Definition at line 42 of file ImageTreeWidget.h.

Constructor & Destructor Documentation

◆ ImageTreeWidget()

Isis::ImageTreeWidget::ImageTreeWidget ( Directory directory = 0,
QWidget parent = 0 
)

ImageTreeWidget constructor.

ImageTreeWidget is derived from QTreeWidget

Parameters
parent

Definition at line 32 of file ImageTreeWidget.cpp.

References Isis::toBool().

Member Function Documentation

◆ addGroup

QTreeWidgetItem * Isis::ImageTreeWidget::addGroup ( )
privateslot
History:
2013-07-02 Tracie Sucharski - Returned to old qmos functionality. Fixes #1697.

Definition at line 700 of file ImageTreeWidget.cpp.

References Isis::toInt().

◆ imageListTreeItem()

QTreeWidgetItem * Isis::ImageTreeWidget::imageListTreeItem ( QString  imageListName)
private

This will get the image list tree item for the given image list (by name).

This requires unique names for the image lists. If the image list name is an empty string, this will return the invisible root item (qmos). If the image list name isn't blank, but there is no such image list item in the tree, then this will create one, add it, and return it.

Parameters
imageListNameThe name of the image list to get the tree item for

Definition at line 927 of file ImageTreeWidget.cpp.

◆ mousePressEvent()

void Isis::ImageTreeWidget::mousePressEvent ( QMouseEvent *  event)
protected

This is why we needed to subclass the QTreeWidget class.

We needed our own dropEvent for the dragging and dropping of the tree widget items.

History:
2013-07-02 Tracie Sucharski - Replaced this method with the old drop method from MosaiceTreeWidget.cpp. This method (and class) needs some refactoring to work with both qmos and a.out.

This is re-implemented to make right clicks on white space also unselect the current selection.

Definition at line 597 of file ImageTreeWidget.cpp.


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