Commit 01678f03 authored by Adam Goins's avatar Adam Goins
Browse files

Added the ability for qview to copy the names of open cubes, export open cubes...

Added the ability for qview to copy the names of open cubes, export open cubes to a cube list, and accept cubelists under any extension. #Fixes 5097, 5098, 5099

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@8110 41f8697f-d340-4b68-9986-7bafba869bb8
parent 556ca197
Loading
Loading
Loading
Loading
+28 −13
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#include <iomanip>
#include <iostream>
#include <QApplication>
#include <QClipboard>
#include <QCloseEvent>
#include <QCursor>
#include <QDebug>
@@ -228,7 +229,7 @@ namespace Isis {
   * This method is called to initially show the viewport. It will set the
   * scale to show the entire cube and enable the gray buffer.
   *
   * @param QShowEvent *event Show event being received.
   * @param event Show event being received.
   *
   * @see http://doc.qt.io/qt-5/qwidget.html#showEvent
   */
@@ -451,7 +452,7 @@ namespace Isis {
   * changes in cube DN values.
   *
   * @param cubeId Cube that the changed brick belongs to
   * @param data New data
   * @param * data New data
   */
  void CubeViewport::cubeDataChanged(int cubeId, const Brick *data) {
    if(cubeId == p_cubeId) {
@@ -1459,7 +1460,7 @@ namespace Isis {
   *
   * @author Sharmila Prasad (4/5/2011)
   *
   * @param PvlKeyword& pFilterNameKey - FilterName keyword containing the
   * @param pFilterNameKey - FilterName keyword containing the
   *              corresponding keyword from the Isis Cube label
   */
  void CubeViewport::getBandFilterName(PvlKeyword & pFilterNameKey)
@@ -1742,6 +1743,10 @@ namespace Isis {
   *
   *
   * @param e
   *
   * @history  2017-08-11 Adam Goins - Added the ability to ctrl + c to copy the filename
   *                             of the current cube into the system's clipboard.
   *                             Fixes #5098.
   */
  void CubeViewport::keyPressEvent(QKeyEvent *e) {
    if(e->key() == Qt::Key_Plus) {
@@ -1770,6 +1775,16 @@ namespace Isis {
      moveCursor(1, 0);
      e->accept();
    }
    else if ((e->key() == Qt::Key_C) &&
             QApplication::keyboardModifiers() &&
             Qt::ControlModifier) {

        QString fileName = p_cube->fileName();
    
        // Grabs the clipboard and copies the file name into it.
        QClipboard *clipboard = QApplication::clipboard();
        clipboard->setText(fileName);
    }
    else {
      QAbstractScrollArea::keyPressEvent(e);
    }
@@ -2090,7 +2105,7 @@ namespace Isis {
  /**
   * Apply stretch pairs to red bands
   *
   * @param stretch
   * @param string The stretch
   */
  void CubeViewport::stretchRed(const QString &string) {
    Stretch stretch;
@@ -2102,7 +2117,7 @@ namespace Isis {
  /**
   * Apply stretch pairs to green bands
   *
   * @param stretch
   * @param string the stretch
   */
  void CubeViewport::stretchGreen(const QString &string) {
    Stretch stretch;
@@ -2114,7 +2129,7 @@ namespace Isis {
  /**
   * Apply stretch pairs to blue bands
   *
   * @param stretch
   * @param string
   */
  void CubeViewport::stretchBlue(const QString &string) {
    Stretch stretch;
@@ -2281,17 +2296,17 @@ namespace Isis {
  /**
   * Cube changed, repaint given area
   *
   * @param[in] cubeRect (QRect rect)  Rectange containing portion of cube
   * @param rect Rectangle containing portion of cube
   *                                  (sample/line) that changed.
   *
   */
  void CubeViewport::cubeContentsChanged(QRect cubeRect) {
  void CubeViewport::cubeContentsChanged(QRect rect) {
    //start sample/line and end sample/line
    double ss, sl, es, el;
    ss = (double)(cubeRect.left()) - 1.;
    sl = (double)(cubeRect.top()) - 1.;
    es = (double)(cubeRect.right()) + 1.;
    el = (double)(cubeRect.bottom()) + 1.;
    ss = (double)(rect.left()) - 1.;
    sl = (double)(rect.top()) - 1.;
    es = (double)(rect.right()) + 1.;
    el = (double)(rect.bottom()) + 1.;
    if(ss < 1){
      ss = 0.5;
    }
+130 −16
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@
// parent of this class
#include <QAbstractScrollArea>


class QPaintEvent;

namespace Isis {
@@ -123,12 +122,27 @@ namespace Isis {
   *                          cubeToContents x,y by 1. This was causing some images to be
   *                          off-centered by 1 pixel (the bottom and right side of viewport would
   *                          be a thin strip of non-pixel space). Fixes #4756.
   *  @history 2017-08-11 Adam Goins - Added the ability to ctrl + c to copy the filename
   *                          of the current cube into the system's clipboard.
   *                          Fixes #5098.
   */
  class CubeViewport : public QAbstractScrollArea {
      Q_OBJECT

    public:
      /**
       * Constructor for the CubeViewport
       * 
       * @param cube The cube to load into a CubeViewport
       * @param cubeData The Cube Data Thread
       * @param parent The parent widget to this Viewport
       * 
       */
      CubeViewport(Cube *cube, CubeDataThread * cdt = 0, QWidget *parent = 0);
      
      /**
       * Deconstructor for the Cubeviewport
       */
      virtual ~CubeViewport();


@@ -140,112 +154,209 @@ namespace Isis {
      class BandInfo {
        public:
          BandInfo();
          //! @param other The other BandInfo
          BandInfo(const BandInfo &other);
          //! Deconstructor
          ~BandInfo();
          
          /**
           * The BandInfo for the Cube
           *
           * @param other The other BandInfo
           * @return The BandInfo
           */
          const BandInfo &operator=(BandInfo other);
          
          //! @return The Stretch
          Stretch getStretch() const;
          //! @param newStretch The new Stretch value
          void setStretch(const Stretch &newStretch);
          //! The band
          int band;
        private:
          //! The Stretch
          Stretch *stretch;
      };

      //! @param cube The cube to set the CubeViewport window to
      void setCube(Cube *cube);
      //! @return The number of samples in the cube
      int cubeSamples() const;
      //! @return The number of lines in the cube
      int cubeLines() const;
      //! @return The number of bands in the cube
      int cubeBands() const;

      //! Is the viewport shown in 3-band color
      //! @return Is the viewport shown in 3-band color
      bool isColor() const {
        return p_color;
      };

      //! Is the viewport shown in gray / b&w
      //! @return Is the viewport shown in gray / b&w
      bool isGray() const {
        return !p_color;
      };

      //! Return the gray band currently viewed
      //! @return the gray band currently viewed
      int grayBand() const {
        return p_gray.band;
      };

      //! Return the red band currently viewed
      //! @return the red band currently viewed
      int redBand() const {
        return p_red.band;
      };

      //! Return the green band currently viewed
      //! @return the green band currently viewed
      int greenBand() const {
        return p_green.band;
      };

      //! Return the blue band currently viewed
      //! @return the blue band currently viewed
      int blueBand() const {
        return p_blue.band;
      };

      //! Return the scale
      //! @return the scale
      double scale() const {
        return p_scale;
      };

      //! Return if the cube is visible
      //! @return if the cube is visible
      bool cubeShown() const {
        return p_cubeShown;
      };

      //! Return the BandBin combo box count
      //! @return the BandBin combo box count
      int comboCount() const {
        return p_comboCount;
      };

      //! Return the BandBin combo box index
      //! @return the BandBin combo box index
      int comboIndex() const {
        return p_comboIndex;
      }

      /**
       * Calle dhwen the contents of the cube changes
       * 
       * @param rect The QRect
       */
      void cubeContentsChanged(QRect rect);

      //! @return The fitScale of the Viewport
      double fitScale() const;
      //! @return The width of the Viewport
      double fitScaleWidth() const;
      //! @return The height of the Viewport/
      double fitScaleHeight() const;

      /**
       * Turns a viewport into a cube
       * 
       * @param x
       * @param y
       * @param sample
       * @param line
       */
      void viewportToCube(int x, int y,
                          double &sample, double &line) const;
                          
       /**
       * Turns a cube into a viewport
       * 
       * @param x
       * @param y
       * @param sample
       * @param line
       */             
      void cubeToViewport(double sample, double line,
                          int &x, int &y) const;
       /**
       * Turns contents to a cube
       * 
       * @param x
       * @param y
       * @param sample
       * @param line
       */
      void contentsToCube(int x, int y,
                          double &sample, double &line) const;
       /**
       * Turns a cube into contents
       * 
       * @param x
       * @param y
       * @param sample
       * @param line
       */
      void cubeToContents(double sample, double line,
                          int &x, int &y) const;

      /**
       * Gets the red pixel
       * 
       * @param sample The sample
       * @param line The line
       * 
       * @return The redPixel value
       */
      double redPixel(int sample, int line);
      
      /**
       * Gets the green pixel
       * 
       * @param sample The sample
       * @param line The line
       * 
       * @return The greenPixel value
       */
      double greenPixel(int sample, int line);
       
      /**
       * Gets the blue pixel
       * 
       * @param sample The sample
       * @param line The line
       * 
       * @return The bluePixel value
       */
      double bluePixel(int sample, int line);
      double grayPixel(int sample, int line);
      
      /**
       * Gets the gray pixel
       * 
       * @param sample The sample
       * @param line The line
       * 
       * @return The grayPixel value
       */
      double grayPixel(int sample, int line);
      //! @return The gray Stretch
      Stretch grayStretch() const;
      //! @return The red Stretch
      Stretch redStretch() const;
      //! @return The green Stretch
      Stretch greenStretch() const;
      //! @return The blue Strech
      Stretch blueStretch() const;

      //! Return the cube associated with viewport
      //! @return The cube associated with viewport
      Cube *cube() const {
        return p_cube;
      };

      //! Return the projection associated with cube (NULL implies none)
      //! @return The projection associated with cube (NULL implies none)
      Projection *projection() const {
        return p_projection;
      };

      //! Return the camera associated with the cube (NULL implies none)
      //! @return The camera associated with the cube (NULL implies none)
      Camera *camera() const {
        return p_camera;
      };

      //! Return the universal ground map associated with the cube (NULL implies none)
      //! @return the universal ground map associated with the cube (NULL implies none)
      UniversalGroundMap *universalGroundMap() const {
        return p_groundMap;
      };
@@ -421,6 +532,9 @@ namespace Isis {
       * Emitted with current progress (0 to 100) when working
       */
      void progressChanged(int);
      /**
       * Emitted when the current progress is complete (100)
       */
      void progressComplete();

      /**
+101 −8
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@
#include "Reduce.h"
#include "SaveAsDialog.h"
#include "SubArea.h"
#include "ViewportMainWindow.h"
#include "Workspace.h"

namespace Isis {
@@ -112,6 +113,17 @@ namespace Isis {
    connect(p_exportView, SIGNAL(triggered()), this, SLOT(exportView()));
    p_exportView->setEnabled(false);

    p_exportToList = new QAction(parent);
    p_exportToList->setText("Export to List");
    p_exportToList->setIcon(QPixmap(toolIconDir() + "/fileexport.png"));
    p_exportToList->setToolTip("Export active cubes to a .lis file");
    whatsThis =
      "<b>Function:</b> Save all open cubes \
       to a .lis file containing their file names";
    p_exportToList->setWhatsThis(whatsThis);
    connect(p_exportToList, SIGNAL(triggered()), this, SLOT(exportToList()));
    p_exportToList->setEnabled(false);

    p_print = new QAction(parent);
    p_print->setText("&Print...");
    p_print->setShortcut(Qt::CTRL + Qt::Key_P);
@@ -147,6 +159,7 @@ namespace Isis {
    activate(true);
  }

  
  /**
   * Adds the file tool's actions to the menu
   *
@@ -159,11 +172,13 @@ namespace Isis {
    menu->addAction(p_saveAs);
    menu->addAction(p_saveInfo);
    menu->addAction(p_exportView);
    menu->addAction(p_exportToList);
    menu->addAction(p_print);
    menu->addAction(p_closeAll);
    menu->addAction(p_exit);
  }

  
  /**
   * Connects the fileSelected signal to the workspace's addCubeViewport slot
   *
@@ -178,6 +193,7 @@ namespace Isis {
    connect(p_closeAll, SIGNAL(triggered()), ws->mdiArea(), SLOT(closeAllSubWindows()));
  }

  
  /**
   * Adds the file tool's actions to the permanent toolbar
   *
@@ -190,6 +206,7 @@ namespace Isis {
    perm->addAction(p_exit);
  }

  
  /**
   * This method allows the user to navigate and open a cube with a file dialog.
   *
@@ -210,6 +227,7 @@ namespace Isis {
            p_workSpace, SLOT(addCubeViewport(QString)));
  }

  
  /**
   * This method allows the user to navigate and browse cubes with a file dialog .
   *
@@ -229,6 +247,7 @@ namespace Isis {
            p_workSpace, SLOT(addBrowseView(QString)));
  }

  
  /**
   * This method saves any changes made to the current cube, these
   * changes are finalized! There is no undoing once a save has
@@ -248,6 +267,7 @@ namespace Isis {
    cubeViewport()->cube()->reopen("rw");
  }

  
  /**
   * SaveAs Action - Displays the FileDialog with the filterlist (*.cub) to select
   * the output cube. This dialog additionally displays radio buttons for choices
@@ -284,6 +304,7 @@ namespace Isis {
    p_saveAsDialog->show();
  }

  
  /**
   * Save input image as a cube into specified output file as FullImage or
   * ExportAsIs or ExportFullRes option
@@ -374,14 +395,15 @@ namespace Isis {
    p_lastDir = psOutFile;
  }

  
  /**
   * For AsIs option, save the enlarged input image visible in the viewport window
   * using the Enlarge functionality
   *
   * @author Sharmila Prasad (4/26/2011)
   *
   * @param pInCube - Input Cube
   * @param pOutCube - Output Cube
   * @param icube - Input Cube
   * @param psOutFile - Output Cube
   *
   */
  void FileTool::saveAsEnlargedCube(Cube *icube, const QString & psOutFile) {
@@ -424,13 +446,14 @@ namespace Isis {
    }
  }

  
  /**
   * For AsIs option, save the reduced input image visible in the viewport window
   * using the Reduce functionality
   *
   * @author Sharmila Prasad (4/26/2011)
   *
   * @param pInCube - Input Cube
   * @param icube - Input Cube
   * @param psOutFile - Output filename
   */
  void FileTool::saveAsReducedCube(Cube *icube, const QString & psOutFile) {
@@ -489,13 +512,14 @@ namespace Isis {
    }
  }

  
  /**
   * AsIs option, save the input image visible in the viewport window Enlarged/Reduced
   *
   * @author Sharmila Prasad (4/26/2011)
   *
   * @param pInCube - Input Cube
   * @param pOutCube - Output Cube
   * @param icube - Input Cube
   * @param psOutFile - Output Cube
   */
  void FileTool::saveAs_AsIs(Cube *icube, const QString & psOutFile) {
    double dScale = p_lastViewport->scale();
@@ -509,13 +533,14 @@ namespace Isis {
    }
  }

  
  /**
   * Copy input image details into the output given output images's dimension.
   * Info like instrument, history are transferred to output image
   *
   * @param icube        - input image
   * @param ocube        - output image
   * @param outAtt       - output cube attributes
   * @param psOutFile      - output cube attributes
   * @param piNumSamples - out samples
   * @param piNumLines   - out lines
   * @param piNumBands   - out bands
@@ -621,6 +646,7 @@ namespace Isis {
    }
  }

  
  /**
   * This method essentially creates a new cube, copies the
   * current cube (and any changes made to it) to the new cube,
@@ -628,8 +654,8 @@ namespace Isis {
   * it. Finally it sets the cubeviewport's cube to the new saved
   * cube.
   *
   * @param pInCube  - input image
   * @param pOutCube - output image
   * @param icube  - input image
   * @param ocube - output image
   */
  void FileTool::saveAsFullImage(Cube *icube, Cube *ocube) {
    //Start the copy process line by line
@@ -657,6 +683,7 @@ namespace Isis {
    }
  }

  
  /**
   * Full Resolution option, save the input image visible in the viewport window
   * Enlarged/Reduced in full resolution
@@ -709,6 +736,7 @@ namespace Isis {
    }
  }

  
  /**
   * Saves the whatsthis info of the cubeviewport to
   * user specified output file
@@ -742,6 +770,7 @@ namespace Isis {
    whatsThisPvl.write(output);
  }

  
  /**
   * This method copies from the input buffer to the output buffer
   *
@@ -752,6 +781,7 @@ namespace Isis {
    out.Copy(in);
  }

  
  /**
   * This slot emits a signal to discard all changes to the
   * current viewport
@@ -761,6 +791,7 @@ namespace Isis {
    emit discardChanges(cubeViewport());
  }

  
  /**
   * This method allows the user to export the current view as an image file.
   *
@@ -808,6 +839,64 @@ namespace Isis {
    }
  }

  
  /**
   * @brief FileTool::exportToList
   *
   * This method exports the file names of all active cubes into a .lis file by looping through
   * The ViewportMainWindow and grabbing the file names from the active child CubeViewports.
   *
   * @author Adam Goins
   */
  void FileTool::exportToList() {
      if (cubeViewport() == NULL) {
        QMessageBox::information((QWidget *)parent(), "Error", "No active cubes to export");
        return;
      }

      // The ViewportMainWindow is the parent container to the FileTool.
      // We need to grab that object so that we can loop through it's children 
      // To find the active cube viewports.
      ViewportMainWindow* window = dynamic_cast<ViewportMainWindow*>(parent());
      
      if (window == NULL) {
        QMessageBox::critical((QWidget *)parent(), "Error", "There was an error reading the viewport window.");
        return;
      }

      QList<CubeViewport*> openCubes = window->findChildren<CubeViewport*>();
      QList<QString> cubeFilePaths;

      for (int i = 0; i < openCubes.size(); i++) {

          CubeViewport* cubeViewport = openCubes.value(i);

          QString cubeFileName(cubeViewport->cube()->fileName());
          cubeFilePaths.append(cubeFileName);
      }

      QString fileName = QFileDialog::getSaveFileName((QWidget *) parent(),
                                                      "Export to cube list",
                                                      ".",
                                                      "Cube List (*.lis)");

      if (!fileName.contains(".lis")) {
          fileName.append(".lis");
      }

      QFile outputFile(fileName);
      outputFile.open(QIODevice::WriteOnly | QIODevice::Text);

      QTextStream out(&outputFile);

      // Write each cube filename onto it's own line inside of that file.
      for (int i = 0; i < cubeFilePaths.size(); i++){
          out << cubeFilePaths.value(i) << "\n";
      }
      outputFile.close();
  }

  
  /**
   * This method allows the user to print the current viewport.
   *
@@ -844,6 +933,7 @@ namespace Isis {
    }
  }

  
  /**
   * Try to close all open cubes and save/discard if necessary.
   */
@@ -866,6 +956,7 @@ namespace Isis {
    return true;
  }

  
  /**
   * Exit the program, this slot called when the exit is chosen from the File menu
   *
@@ -902,6 +993,7 @@ namespace Isis {
      p_print->setEnabled(false);
      p_save->setEnabled(false);
      p_exportView->setEnabled(false);
      p_exportToList->setEnabled(false);
      p_saveAs->setEnabled(false);
      p_saveInfo->setEnabled(false);
    }
@@ -931,6 +1023,7 @@ namespace Isis {
      }
      p_print->setEnabled(true);
      p_exportView->setEnabled(true);
      p_exportToList->setEnabled(true);
      p_saveAs->setEnabled(true);
      p_saveInfo->setEnabled(true);
    }
+51 −14
Original line number Diff line number Diff line
@@ -52,6 +52,9 @@ namespace Isis {
   *                           References #4304.
   *   @history 2017-06-07 Christopher Combs - Changed saveAsEnlargedCube's catch block to stack
   *                           errors and give a more accurate error message.
   *   @history 2017-09-11 Adam Goins - Added the ExportToList menu item to allow all open cubes
   *                           to be exported into a cubelist. References #5097
   * 
   */
  class FileTool : public Tool {
      Q_OBJECT
@@ -61,11 +64,11 @@ namespace Isis {
      void addTo(QMenu *menu);
      void addTo(Workspace *ws);
      void addToPermanent(QToolBar *perm);
      //! Returns the open action
      //! @return the open action
      QPointer<QAction> openAction() {
        return p_open;
      };
      //! Returns the save as action
      //! @return the save as action
      QPointer<QAction> saveAction() {
        return p_saveAs;
      };
@@ -74,7 +77,7 @@ namespace Isis {
      QStringList p_fileList;   //!< File list


      //! Returns the menu name for the file tool
      //! @return the menu name for the file tool
      QString menuName() const {
        return "&File";
      }
@@ -102,6 +105,7 @@ namespace Isis {
      virtual void saveAs();
      virtual void saveInfo(); //!< Saves the whatsthis info of the cubeviewport
      virtual void exportView();
      virtual void exportToList();
      virtual bool closeAll();
      virtual void exit();
      void enableSave(bool enable);
@@ -121,6 +125,7 @@ namespace Isis {
      QPointer<QAction> p_saveAs; //!< Action save the current cube as a user specified file
      QPointer<QAction> p_saveInfo;     //!< Action to save the current cube's Whatsthis info
      QPointer<QAction> p_exportView;   //!< Action to export the view as a picture
      QPointer<QAction> p_exportToList; //!< Action to export active cubes to a cube list
      QPointer<QAction> p_closeAll;     //!< Action to close all windows
      QPointer<QAction> p_exit;         //!< Action to exit qview
      QPointer<QWidget> p_parent;       //!< The parent widget of this object
@@ -129,24 +134,56 @@ namespace Isis {
      QPointer<MdiCubeViewport> p_lastViewport; //!< The last cubeviewport that was used
      QPointer<SaveAsDialog> p_saveAsDialog;    //!< SaveAs Dialog with different save options

      //! Save Image in its entirety to an output file
      /**
       * Saves the cube as a full image
       * 
       * @param icube The input Cube
       * @param ocube The output Cube
       */
      void saveAsFullImage(Cube *icube, Cube *ocube);

      //! Copy input cube details into output file given its dimensions
      /** Copy input cube details into output file given its dimensions
       * 
       * 
       * @param psOutFile The psFileName
       * @param icube The input cube
       * @param ocube The output cube
       * @param piNumSamples The number samples
       * @param piNumLines The number of lines
       * @param piNumBands The number of bands
       */
      void copyCubeDetails(const QString & psFileName, Cube *icube,
           Cube *ocube, int piNumSamples, int piNumLines, int piNumBands);

      //! Save image AsIs (As viewed in the viewport window) into output file
      /** Save image AsIs (As viewed in the viewport window) into output file
       * 
       * @param icube The input Cube
       * @param psOutFile The output file
       */
      void saveAs_AsIs(Cube *icube, const QString & psOutFile);

      //! Save image Full Resolution (image viewed in the viewport window) into output
      /** Save image Full Resolution (image viewed in the viewport window) into output
       * 
       * @param pInCube The input cube.
       * @param pOutCube The output cube.
       * @param pNumSamples The number of samples
       * @param pNumLines The number of lines
       */
      void saveAs_FullResolution(Cube *pInCube, Cube *pOutCube,
                                 int pNumSamples, int pNumLines);

      //! Save image AsIs Enlarged into output
      /** Save image AsIs Enlarged into output
       * 
       * @param icube The input cube
       * @param psOutFile The output file 
       */
      void saveAsEnlargedCube(Cube *icube, const QString & psOutFile);

      //! Save image AsIs Reduced into output
      /**
       * 
       * @param icube The input cube
       * @param psOutFile The output file 
       */
      void saveAsReducedCube (Cube *icube, const QString & psOutFile);
  };
};
+31 −0
Original line number Diff line number Diff line
@@ -26,21 +26,52 @@ namespace Isis {
      Q_OBJECT

    public:
      
      /**
       * Constrctor for the ViewportMdiSubWindow
       * 
       * @param cubeToView The cube to open
       * @param parent The parent container
       */ 
      ViewportMdiSubWindow(Cube *cubeToView, QWidget *parent = NULL);
      
      //! Deconstructor for ViewportMdiSubWindow
      ~ViewportMdiSubWindow();

      /**
       * Grabs the viewport
       * 
       * @return the viewport to return
       * 
       */
      MdiCubeViewport *viewport();

    signals:
      /**
       * This method closes the viewport
       * 
       * @param vp The viewport to close.
       */
      void closeViewport(CubeViewport *vp);

    protected:
      /**
       * This method is called as the closeEvent
       * 
       * @param e The closeEvent
       * 
       */
      virtual void closeEvent(QCloseEvent *e);

    private:
      /**
       * Disables copy 
       * 
       */
      Q_DISABLE_COPY(ViewportMdiSubWindow);

    private:
      //! Pointer to the MdiCubeViewports
      QPointer<MdiCubeViewport> m_viewport;
  };
};
Loading