USGS

Isis 3.0 Developer's Reference (API)

Home

MosaicTreeWidget.h

Go to the documentation of this file.
00001 #ifndef MosaicTreeWidget_H
00002 #define MosaicTreeWidget_H
00003 
00004 #include <QTreeWidget>
00005 
00006 class QProgressBar;
00007 
00008 namespace Isis {
00009   class CubeDisplayProperties;
00010   class MosaicTreeWidgetItem;
00011   class ProgressBar;
00012 
00018   class MosaicTreeWidget : public QTreeWidget {
00019       Q_OBJECT
00020 
00021     public:
00022       MosaicTreeWidget(QWidget *parent = 0);
00023       virtual ~MosaicTreeWidget();
00024       void addCubes(QList<CubeDisplayProperties *> cubes);
00025       QTreeWidgetItem *addGroup(QString groupName, int index = -1);
00026       void refit();
00027 
00028       QProgressBar *getProgress();
00029       void disableSort();
00030 
00031       QList<QAction *> getViewActions();
00032       void updateViewActs();
00033 
00034     public slots:
00035 
00036     protected:
00037       void dropEvent(QDropEvent *event);
00038       void mousePressEvent(QMouseEvent *event);
00039       void contextMenuEvent(QContextMenuEvent *event);
00040 
00041     private slots:
00042       QTreeWidgetItem *addGroup();
00043       void cubeChanged(CubeDisplayProperties *);
00044       void cubeDeleted(QObject *cubeDisplay);
00045       void deleteSelectedGroups();
00046       void onItemChanged(QTreeWidgetItem *, int);
00047       void onSelectionChanged();
00048       void renameSelectedGroup();
00049       void requestCloseSelected();
00050       void toggleColumnVisible();
00051       void updateDragAndDropability();
00052 
00053     private:
00054       MosaicTreeWidgetItem *prepCube(CubeDisplayProperties *cube);
00055       bool groupInList(QList<QTreeWidgetItem *>);
00056       bool mosaicItemInList(QList<QTreeWidgetItem *>);
00057       QList<CubeDisplayProperties *> selectedDisplays();
00058 
00059       MosaicTreeWidgetItem *treeItem(CubeDisplayProperties *);
00060       ProgressBar *p_progress;
00061 
00062       QList<QAction *> p_viewActs;
00063   };
00064 };
00065 
00066 #endif
00067