Isis Developer Reference
ImageTreeWidget.h
Go to the documentation of this file.
1#ifndef ImageTreeWidget_H
2#define ImageTreeWidget_H
3
4#include <QPointer>
5#include <QTreeWidget>
6
7class QProgressBar;
8
9namespace Isis {
10 class Directory;
11 class DisplayProperties;
12 class Image;
13 class ImageList;
14 class ImageTreeWidgetItem;
15 class ProgressBar;
16
43 Q_OBJECT
44
45 public:
46
51
52 ImageTreeWidget(Directory *directory = 0, QWidget *parent = 0);
53 virtual ~ImageTreeWidget();
54
55 QList<QAction *> actions();
56
57 QTreeWidgetItem *addGroup(QString imageListName, QString groupName = "", int index = -1);
58
59 QTreeWidgetItem *createGroup(QTreeWidgetItem *imageListItem, QString groupName = "",
60 int index = -1);
62
63 void refit();
64
65 void disableSort();
67
68 QList<QAction *> getViewActions();
69 bool groupInList(QList<QTreeWidgetItem *>);
70 void updateViewActs();
71
72 ImageTreeWidgetItem *prepCube(ImageList *imageList, Image *image);
73
75
76 public:
83 public:
85 ImagePosition(int outerIndex, int innerIndex);
86 ImagePosition(const ImagePosition &other);
87
88 virtual ~ImagePosition();
89
90 void setPosition(int outerIndex, int innerIndex);
91
92 int group() const;
93 int index() const;
94 bool isValid() const;
95
96 void swap(ImagePosition &other);
97
98 bool operator<(const ImagePosition &rhs);
100
101 private:
102 void init();
103
104 private:
105 int m_group;
106 int m_index;
107 };
108
109 signals:
112
113 protected:
114 void dropEvent(QDropEvent *event);
115 void mousePressEvent(QMouseEvent *event);
116 void contextMenuEvent(QContextMenuEvent *event);
117
118 private slots:
120 void deleteSelectedGroups();
121 void imageDeleted(QObject *image);
122 void onItemChanged(QTreeWidgetItem *, int);
123 void onSelectionChanged();
124 void onQueuedReadDisplayProperties();
125 void onQueuedSelectionChanged();
126 void propertiesChanged(DisplayProperties *);
127 void renameSelectedGroup();
128 void requestCloseSelected();
129 void toggleColumnVisible();
130 void updateDragAndDropability();
131 void setDefaultFileListCols();
132
133 private:
134 bool mosaicItemInList(QList<QTreeWidgetItem *>);
135 ImageList selectedDisplays();
136
137 QTreeWidgetItem *imageListTreeItem(QString imageListName);
139 ImageTreeWidgetItem *treeItem(Image *);
140
141 Directory *m_directory;
142 QList<QAction *> m_viewActs;
143 QPointer<QAction> m_setFileListColsAct;
144 QMap<DisplayProperties *, ImageTreeWidgetItem *> m_displayPropsToTreeItemLookup;
145 bool m_queuedSelectionChanged;
146
147 QList<ImageTreeWidgetItem *> m_queuedReadDisplayPropertiesItems;
148 };
149};
150
151#endif
152
Definition Directory.h:271
Definition DisplayProperties.h:32
This represents a cube in a project-based GUI interface.
Definition Image.h:105
Internalizes a list of images and allows for operations on the entire list.
Definition ImageList.h:53
Definition ImageTreeWidget.h:82
bool operator<(const ImagePosition &rhs)
Definition ImageTreeWidget.cpp:395
virtual ~ImagePosition()
Definition ImageTreeWidget.cpp:358
bool isValid() const
Definition ImageTreeWidget.cpp:384
void swap(ImagePosition &other)
Definition ImageTreeWidget.cpp:389
ImagePosition()
Definition ImageTreeWidget.cpp:341
ImagePosition & operator=(const ImagePosition &rhs)
Definition ImageTreeWidget.cpp:408
void setPosition(int outerIndex, int innerIndex)
Definition ImageTreeWidget.cpp:363
int index() const
Definition ImageTreeWidget.cpp:379
int group() const
Definition ImageTreeWidget.cpp:374
Definition ImageTreeWidget.h:42
QTreeWidgetItem * addGroup(QString imageListName, QString groupName="", int index=-1)
Definition ImageTreeWidget.cpp:129
ImageList imagesInView()
Definition ImageTreeWidget.cpp:321
virtual ~ImageTreeWidget()
Definition ImageTreeWidget.cpp:105
void mousePressEvent(QMouseEvent *event)
This is why we needed to subclass the QTreeWidget class.
Definition ImageTreeWidget.cpp:597
QTreeWidgetItem * createImageListNameItem(QString name)
Definition ImageTreeWidget.cpp:173
QList< QAction * > getViewActions()
Definition ImageTreeWidget.cpp:223
bool groupInList(QList< QTreeWidgetItem * >)
Definition ImageTreeWidget.cpp:870
QList< QAction * > actions()
Definition ImageTreeWidget.cpp:113
void enqueueReadDisplayProperties(ImageTreeWidgetItem *)
Definition ImageTreeWidget.cpp:214
void queueReadDisplayProperties()
void contextMenuEvent(QContextMenuEvent *event)
Definition ImageTreeWidget.cpp:615
TreeItemContainerType
Definition ImageTreeWidget.h:47
@ ImageGroupType
Definition ImageTreeWidget.h:48
@ ImageListNameType
Definition ImageTreeWidget.h:49
void refit()
Definition ImageTreeWidget.cpp:183
void dropEvent(QDropEvent *event)
Definition ImageTreeWidget.cpp:422
void updateViewActs()
Definition ImageTreeWidget.cpp:247
ImageTreeWidgetItem * prepCube(ImageList *imageList, Image *image)
Definition ImageTreeWidget.cpp:300
QTreeWidgetItem * createGroup(QTreeWidgetItem *imageListItem, QString groupName="", int index=-1)
Definition ImageTreeWidget.cpp:141
void disableSort()
Definition ImageTreeWidget.cpp:209
ImageTreeWidget(Directory *directory=0, QWidget *parent=0)
ImageTreeWidget constructor.
Definition ImageTreeWidget.cpp:32
Definition ImageTreeWidgetItem.h:20
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16