31 #include "RubberBandTool.h" 40 MdiCubeViewport::MdiCubeViewport(Cube *cube, CubeDataThread * cdt,
41 QWidget *parent) : CubeViewport(cube, cdt, parent) {
44 QString unlinkedIcon = FileName(
"$base/icons/unlinked.png").expanded();
45 static QIcon unlinked(unlinkedIcon);
46 parentWidget()->setWindowIcon(unlinked);
50 MdiCubeViewport::~MdiCubeViewport() {
60 p_toolList.push_back(tool);
71 if(!parentWidget() || !parentWidget()->parentWidget())
75 static QIcon unlinked(unlinkedIcon);
77 static QIcon linked(linkedIcon);
85 parentWidget()->parentWidget()->setWindowIcon(linked);
88 parentWidget()->parentWidget()->setWindowIcon(unlinked);
109 QPainter painter(viewport());
114 for(
int i = 0; i < p_toolList.size(); i++) {
115 p_toolList[i]->paintViewport(
this, &painter);
122 void MdiCubeViewport::viewGray(
int band) {
125 for(
int i = 0; i < p_toolList.size(); i++)
126 p_toolList[i]->updateTool();
130 void MdiCubeViewport::viewRGB(
int rband,
int gband,
int bband) {
133 for(
int i = 0; i < p_toolList.size(); i++)
134 p_toolList[i]->updateTool();
ViewportBuffer * grayBuffer()
Returns the gray viewport buffer (Will be NULL if in RGB mode.)
void viewportUpdated()
Emitted when viewport updated.
Reads and stores visible DN values.
QPixmap p_pixmap
The qpixmap.
void registerTool(Tool *tool)
Registers the tool given tool.
ViewportBuffer * redBuffer()
Returns the red viewport buffer (Will be NULL if in Gray mode.)
File name manipulation and expansion.
Namespace for the standard library.
virtual void viewRGB(int redBand, int greenBand, int blueBand)
View cube as color.
void restretch(ViewportBuffer *buffer)
This is called by internal viewport buffers when a stretch action should be performed.
void setLinked(bool b)
Change the linked state of the viewport.
void paintEvent(QPaintEvent *e)
Repaint the viewport.
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
virtual void viewGray(int band)
View cube as gray.
ViewportBuffer * blueBuffer()
Returns the blue viewport buffer (Will be NULL if in Gray mode.)
Namespace for ISIS/Bullet specific routines.
virtual void paintEvent(QPaintEvent *e)
Repaint the viewport.
ViewportBuffer * greenBuffer()
Returns the green viewport buffer (Will be NULL if in Gray mode.)