9 #include "MdiCubeViewport.h"
19 #include "RubberBandTool.h"
20 #include "StretchTool.h"
28 MdiCubeViewport::MdiCubeViewport(Cube *cube, CubeDataThread * cdt,
29 QWidget *parent) : CubeViewport(cube, cdt, parent) {
32 QString unlinkedIcon = FileName(
"$ISISROOT/appdata/images/icons/unlinked.png").expanded();
33 static QIcon unlinked(unlinkedIcon);
34 parentWidget()->setWindowIcon(unlinked);
38 MdiCubeViewport::~MdiCubeViewport() {
48 p_toolList.push_back(tool);
59 if(!parentWidget() || !parentWidget()->parentWidget())
62 QString unlinkedIcon =
FileName(
"$ISISROOT/appdata/images/icons/unlinked.png").
expanded();
63 static QIcon unlinked(unlinkedIcon);
64 QString linkedIcon =
FileName(
"$ISISROOT/appdata/images/icons/linked.png").
expanded();
65 static QIcon linked(linkedIcon);
73 parentWidget()->parentWidget()->setWindowIcon(linked);
76 parentWidget()->parentWidget()->setWindowIcon(unlinked);
97 QPainter painter(viewport());
102 for(
int i = 0; i < p_toolList.size(); i++) {
103 p_toolList[i]->paintViewport(
this, &painter);
110 void MdiCubeViewport::viewGray(
int band) {
113 for(
int i = 0; i < p_toolList.size(); i++)
114 p_toolList[i]->updateTool();
118 void MdiCubeViewport::viewRGB(
int rband,
int gband,
int bband) {
121 for(
int i = 0; i < p_toolList.size(); i++)
122 p_toolList[i]->updateTool();