31    setWindowTitle(
"Configure Scatter Plot");
 
   36    QGridLayout *mainLayout = 
new QGridLayout;
 
   67    QLabel *titleLabel = 
new QLabel(
"<h2>Create Scatter Plot</h2>");
 
   68    mainLayout->addWidget(titleLabel, curRow, 0, 1, 3);
 
   71    QLabel *headerLabel = 
new QLabel(
"Choose where to gather the scatter plot " 
   72        "data from. The X and Y axes are a single band of a cube and must have " 
   73        "the same dimensions");
 
   74    headerLabel->setWordWrap(
true);
 
   75    mainLayout->addWidget(headerLabel, curRow, 0, 1, 3);
 
   78    int spacerRow = curRow;
 
   81    QLabel *configXLabel = 
new QLabel(
"Choose X Input Data");
 
   82    mainLayout->addWidget(configXLabel, curRow, 0, 1, 3);
 
   85    QLabel *xAxisCubeLabel = 
new QLabel(
"Cube");
 
   86    mainLayout->addWidget(xAxisCubeLabel, curRow, 1, 1, 1);
 
   95    QLabel *xAxisCubeBandLabel = 
new QLabel(
"Cube Band");
 
   96    mainLayout->addWidget(xAxisCubeBandLabel, curRow, 1, 1, 1);
 
  104    QLabel *xAxisBinCountLabel = 
new QLabel(
"Bin Count (resolution)");
 
  105    mainLayout->addWidget(xAxisBinCountLabel, curRow, 1, 1, 1);
 
  116    QLabel *useViewportRangesLabel = 
new QLabel(
"Use Viewport Visible Range");
 
  117    mainLayout->addWidget(useViewportRangesLabel, curRow, 1, 1, 1);
 
  125    QLabel *configYLabel = 
new QLabel(
"Choose Y Input Data");
 
  126    mainLayout->addWidget(configYLabel, curRow, 0, 1, 3);
 
  129    QLabel *yAxisCubeLabel = 
new QLabel(
"Cube");
 
  130    mainLayout->addWidget(yAxisCubeLabel, curRow, 1, 1, 1);
 
  139    QLabel *yAxisCubeBandLabel = 
new QLabel(
"Cube Band");
 
  140    mainLayout->addWidget(yAxisCubeBandLabel, curRow, 1, 1, 1);
 
  148    QLabel *yAxisBinCountLabel = 
new QLabel(
"Bin Count (resolution)");
 
  149    mainLayout->addWidget(yAxisBinCountLabel, curRow, 1, 1, 1);
 
  160    QHBoxLayout *buttonsLayout = 
new QHBoxLayout;
 
  161    buttonsLayout->addStretch();
 
  166            this, SLOT(accept()));
 
  169    QPushButton *cancelButton = 
new QPushButton(
"Cancel");
 
  170    cancelButton->setIcon(QIcon::fromTheme(
"window-close"));
 
  171    connect(cancelButton, SIGNAL(clicked()),
 
  172            this, SLOT(reject()));
 
  173    buttonsLayout->addWidget(cancelButton);
 
  176    buttonsWrapper->setLayout(buttonsLayout);
 
  177    mainLayout->addWidget(buttonsWrapper, curRow, 0, 1, 3);
 
  179    mainLayout->setColumnMinimumWidth(0, 20);
 
  180    mainLayout->setRowMinimumHeight(spacerRow, 20);
 
  181    setLayout(mainLayout);
 
  193    if (activeViewport) {
 
 
  345    QList<Cube *> listedXCubes;
 
  350    QList<Cube *> allXCubes;
 
  352      allXCubes.append(viewport->
cube());
 
  356    QList<Cube *> extraXCubes = 
removeFromList(listedXCubes, allXCubes);
 
  357    foreach (
Cube *cubeToRemove, extraXCubes) {
 
  363    QList<Cube *> missingXCubes = 
removeFromList(allXCubes, listedXCubes);
 
  364    foreach (
Cube *cubeToAdd, missingXCubes) {
 
  366        QString cubeName = QFileInfo(cubeToAdd->fileName()).baseName();
 
  381      QList<Cube *> listedYCubes;
 
  386      QList<Cube *> allYCubes;
 
  392          allYCubes.append(cube);
 
  397      QList<Cube *> extraYCubes = 
removeFromList(listedYCubes, allYCubes);
 
  398      foreach (
Cube *cubeToRemove, extraYCubes) {
 
  404      QList<Cube *> missingYCubes = 
removeFromList(allYCubes, listedYCubes);
 
  405      foreach (
Cube *cubeToAdd, missingYCubes) {
 
  407          QString cubeName = QFileInfo(cubeToAdd->fileName()).baseName();
 
  443    bool allowCreation = 
true;
 
  446      allowCreation = 
false;
 
  451        allowCreation = 
false;