9#include "MdiCubeViewport.h"
19#include "RubberBandTool.h"
20#include "StretchTool.h"
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) {
119 CubeViewport::viewRGB(rband, gband, bband);
121 for(
int i = 0; i < p_toolList.size(); i++)
122 p_toolList[i]->updateTool();
Encapsulation of Cube I/O with Change Notifications.
IO Handler for Isis Cubes.
Widget to display Isis cubes for qt apps.
virtual void paintEvent(QPaintEvent *e)
Repaint the viewport.
ViewportBuffer * grayBuffer()
Returns the gray viewport buffer (Will be NULL if in RGB mode.)
QPixmap p_pixmap
The qpixmap.
ViewportBuffer * greenBuffer()
Returns the green viewport buffer (Will be NULL if in Gray mode.)
virtual void viewGray(int band)
View cube as gray.
ViewportBuffer * redBuffer()
Returns the red viewport buffer (Will be NULL if in Gray mode.)
void viewportUpdated()
Emitted when viewport updated.
ViewportBuffer * blueBuffer()
Returns the blue viewport buffer (Will be NULL if in Gray mode.)
File name manipulation and expansion.
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
void setLinked(bool b)
Change the linked state of the viewport.
void restretch(ViewportBuffer *buffer)
This is called by internal viewport buffers when a stretch action should be performed.
void paintEvent(QPaintEvent *e)
Repaint the viewport.
void registerTool(Tool *tool)
Registers the tool given tool.
Reads and stores visible DN values.
This is free and unencumbered software released into the public domain.
Namespace for the standard library.