Commit b755265f authored by Kim Oyama's avatar Kim Oyama
Browse files

The footprint view widget and the control point edit widget have been...

The footprint view widget and the control point edit widget have been connected. You can modify, add, or delete a point. However, when you modify a point that already has adjusted lat/lons, the point will not move on the footprint view widget. Ken is figuring out what to do with the adjusted and apriori lat/lons. The control net editor class was also added.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@5973 41f8697f-d340-4b68-9986-7bafba869bb8
parent 64ff3816
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<bundleSettings>
    <globalSettings>
        <id>{2c061cb7-4d6c-4cc4-a2de-fd1c1fb0b6c5}</id>
        <id>{e7dc6937-2216-42f1-9d78-444fdf7cae0b}</id>
        <validateNetwork>Yes</validateNetwork>
        <solveOptions solveMethod="Sparse" solveObservationMode="Yes" solveRadius="No" updateCubeLabel="Yes" errorPropagation="Yes"/>
        <aprioriSigmas latitude="-1.0" longitude="-1.0" radius="N/A"/>
@@ -17,7 +17,7 @@
    </globalSettings>
    <observationSolveSettingsList>
        <bundleObservationSolveSettings>
            <id>{d032748a-7f65-475b-b11b-099eed78f2fb}</id>
            <id>{6c6108ad-4567-45a8-b557-f02076d235ed}</id>
            <instrumentId>Instrument1</instrumentId>
            <instrumentPointingOptions solveOption="None" solveTwist="Yes" degree="11" solveDegree="-1" numberCoefSolved="0" solveOverExisting="Yes" interpolationType="4">
                <aprioriPointingSigmas angles="N/A" angularVelocity="N/A" angularAcceleration="N/A"/>
@@ -27,7 +27,7 @@
            </instrumentPositionOptions>
        </bundleObservationSolveSettings>
        <bundleObservationSolveSettings>
            <id>{d032748a-7f65-475b-b11b-099eed78f2fb}</id>
            <id>{6c6108ad-4567-45a8-b557-f02076d235ed}</id>
            <instrumentId>Instrument2</instrumentId>
            <instrumentPointingOptions solveOption="AllPolynomialCoefficients" solveTwist="Yes" degree="21" solveDegree="1" numberCoefSolved="2" solveOverExisting="Yes" interpolationType="4">
                <aprioriPointingSigmas angles="22.0" angularVelocity="23.0" angularAcceleration="N/A"/>
+43 −24
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#include "CNetSuiteMainWindow.h"

#include <QtGui>
#include <QSettings>

#include "Directory.h"
#include "FileName.h"
@@ -42,7 +43,6 @@ namespace Isis {
  CNetSuiteMainWindow::CNetSuiteMainWindow(QWidget *parent) :
      QMainWindow(parent) {
    m_maxThreadCount = -1;
    m_maxRecentProjectFiles = 5;

    QWidget *centralWidget = new QWidget;
//  centralWidget->hide();
@@ -55,30 +55,47 @@ namespace Isis {
//          this, SLOT(removeCentralWidgetTab(int)));

    setCentralWidget(centralWidget);
    setDockNestingEnabled(true);

    // TLS 2013-07-23 Comment out to see if the behaviour improves
//  setDockNestingEnabled(true);

    try {
      //qDebug()<<"CNetSuiteMainWindow::CNetSuiteMainWindow  before create Directory";
      m_directory = new Directory(this);
      //qDebug()<<"CNetSuiteMainWindow::CNetSuiteMainWindow  after create Directory";
      connect(m_directory,
              SIGNAL(newWidgetAvailable(QWidget *, Qt::DockWidgetArea, Qt::Orientation)),
              this,
              SLOT(addDock(QWidget *, Qt::DockWidgetArea, Qt::Orientation)));
              this, SLOT(addDock(QWidget *, Qt::DockWidgetArea, Qt::Orientation)));
      //qDebug()<<"CNetSuiteMainWindow::CNetSuiteMainWindow before projectLoaded connection";
      connect(m_directory->project(), SIGNAL(projectLoaded(Project *)),
              this, SLOT(readSettings(Project *)));
      //qDebug()<<"CNetSuiteMainWindow::CNetSuiteMainWindow after projectLoaded connection";
//    connect(m_directory->project(), SIGNAL(restoreWindow(
    }
    catch (IException &e) {
      throw IException(e, IException::Programmer,
          "Could not create Directory.", _FILEINFO_);
    }

    readSettings();
    QStringList args = QCoreApplication::arguments();

    if (args.count() == 2) {
//    connect(this, SIGNAL(openProjectFromCommandLine(QString)),
//            project, SLOT(open(QString)), Qt::QueuedConnection);
//    emit openProjectFromCommandLine(args.last());
      m_directory->project()->open(args.last());
    }

    //qDebug()<<"CNetSuiteMainWindow::CNetSuiteMainWindow  before createMenus";
    createMenus();

    //qDebug()<<"CNetSuiteMainWindow::CNetSuiteMainWindow  before docks";
    QDockWidget *projectDock = new QDockWidget("Project", this, Qt::SubWindow);
    projectDock->setObjectName("projectDock");
    projectDock->setFeatures(QDockWidget::DockWidgetMovable |
                              QDockWidget::DockWidgetFloatable);
    projectDock->setWidget(m_directory->projectTreeWidget());
    addDockWidget(Qt::LeftDockWidgetArea, projectDock);
    addDockWidget(Qt::LeftDockWidgetArea, projectDock, Qt::Horizontal);

    QDockWidget *warningsDock = new QDockWidget("Warnings", this, Qt::SubWindow);
    warningsDock->setObjectName("warningsDock");
@@ -110,6 +127,7 @@ namespace Isis {
    tabifyDockWidget(historyDock, progressDock);

    warningsDock->raise();
    //qDebug()<<"CNetSuiteMainWindow::CNetSuiteMainWindow  after docks";

//  readSettings();

@@ -119,8 +137,6 @@ namespace Isis {
    foreach (QProgressBar *progressBar, m_directory->progressBars()) {
      statusBar()->addWidget(progressBar);
    }

    setAnimated(false);
  }


@@ -129,6 +145,7 @@ namespace Isis {

    QDockWidget *dock = new QDockWidget(newWidgetForDock->windowTitle());
    dock->setWidget(newWidgetForDock);
    //qDebug()<<"CNetSuiteMainWindow::addDock objectName = "<<newWidgetForDock->objectName();
    dock->setObjectName(newWidgetForDock->objectName());

    // This needs to eventually be a work order...
@@ -177,9 +194,9 @@ namespace Isis {
    m_directory->populateMainMenu(menuBar());

    QAction *exitAction = fileMenu->addAction(tr("E&xit"));
    exitAction->setIcon(QIcon(":close"));
    connect(exitAction, SIGNAL(triggered()), this, SLOT(close()));


    QMenu *editMenu = menuBar()->addMenu(tr("&Edit"));
    editMenu->setObjectName("editMenu");

@@ -209,8 +226,7 @@ namespace Isis {
        QPixmap(FileName("$base/icons/contexthelp.png").expanded()));
    activateWhatsThisAct->setToolTip("Activate What's This and click on parts "
        "this program to see more information about them");
    connect(activateWhatsThisAct, SIGNAL(activated()),
            this, SLOT(enterWhatsThisMode()));
    connect(activateWhatsThisAct, SIGNAL(activated()), this, SLOT(enterWhatsThisMode()));

    helpMenu->addAction(activateWhatsThisAct);
  }
@@ -223,21 +239,20 @@ namespace Isis {
   * The config file used is $HOME/.Isis/$APPNAME/$APPNAME.config
   */
  void CNetSuiteMainWindow::writeSettings() {
    //qDebug()<<"CNetSuiteMainwindow::writeSettings";
    QString appName = QApplication::applicationName();
    QSettings settings(
        FileName("$HOME/.Isis/" + appName + "/" + appName + ".config")
          .expanded(),
        QSettings::NativeFormat);

    settings.beginGroup("MainWindow");
//    settings.beginGroup("MainWindow");
    settings.setValue("geometry", saveGeometry());
    settings.setValue("windowState", saveState());
    settings.setValue("size", size());
    settings.setValue("pos", pos());

    settings.setValue("maxThreadCount", m_maxThreadCount);

    settings.setValue("maxRecentProjectFiles", m_maxRecentProjectFiles);

    settings.setValue("recentProjectFilesList", m_directory->recentProjectsList());
  }


@@ -246,24 +261,27 @@ namespace Isis {
   *
   * The config file read is $HOME/.Isis/$APPNAME/$APPNAME.config
   */
  void CNetSuiteMainWindow::readSettings() {
  void CNetSuiteMainWindow::readSettings(Project *) {
    //qDebug()<<"CNetSuiteMainwindow::readSettings";
    QString appName = QApplication::applicationName();
    QSettings settings(
        FileName("$HOME/.Isis/" + appName + "/" + appName + ".config")
          .expanded(),
        QSettings::NativeFormat);

    settings.beginGroup("MainWindow");
//    settings.beginGroup("MainWindow");
    restoreGeometry(settings.value("geometry").toByteArray());
    restoreState(settings.value("windowState").toByteArray());

    // The geom/state isn't enough for main windows to correctly remember
    //   their position and size, so let's restore those on top of
    //   the geom and state.
    if (!settings.value("pos").toPoint().isNull())
      move(settings.value("pos").toPoint());

    resize(settings.value("size", QSize(800, 600)).toSize());
    m_maxThreadCount = settings.value("maxThreadCount", m_maxThreadCount).toInt();
    applyMaxThreadCount();

    m_maxRecentProjectFiles = settings.value("maxRecentProjectFiles", m_maxRecentProjectFiles).toInt();
    QStringList recentFiles = settings.value("recentProjectFilesList").toStringList();
    if (recentFiles.size() > 0)
      m_directory->setRecentProjectsList(recentFiles);
  }


@@ -272,13 +290,14 @@ namespace Isis {
   *   forwarding the event to the QMainWindow.
   */
  void CNetSuiteMainWindow::closeEvent(QCloseEvent *event) {
    //qDebug()<<"CNetSuiteMainWindow::closeEvent";
    writeSettings();
    QMainWindow::closeEvent(event);
  }


  /**
   * Ask the user how many threads to use in this program. This includes the GUI thread.
   * Ask te user how many threads to use in this program. This includes the GUI thread.
   */
  void CNetSuiteMainWindow::configureThreadLimit() {
    bool ok = false;
+2 −7
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@

namespace Isis {
  class Directory;
  class Project;

  /**
   * @author 2012-??-?? Steven Lambright and Stuart Sides
@@ -55,6 +56,7 @@ namespace Isis {
    public slots:
      void addDock(QWidget *newWidgetForDock, Qt::DockWidgetArea area,
                   Qt::Orientation orientation);
      void readSettings(Project *);

    protected:
      void closeEvent(QCloseEvent *event);
@@ -70,7 +72,6 @@ namespace Isis {
      void applyMaxThreadCount();
      void createMenus();
      void writeSettings();
      void readSettings();

    private:
      /**
@@ -86,12 +87,6 @@ namespace Isis {
       *   should perform a best-guess for best perfomance.
       */
      int m_maxThreadCount;

      /**
       * Maximum number of recently opened projects
       *   This number and any recently opened projects should be stored in application settings
       */
      int m_maxRecentProjectFiles;
  };
}

+3 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
 */
#include "IsisDebug.h"

#include <QDebug>
#include <QLocale>
#include <QTranslator>

@@ -43,7 +44,9 @@ int main(int argc, char *argv[]) {

    CNetSuiteMainWindow *mainWindow = new CNetSuiteMainWindow();

    qDebug()<<"   BEFORE SHOW";
    mainWindow->show();
    qDebug()<<"   AFTER SHOW";

    int status = app->exec();

+4 −1
Original line number Diff line number Diff line
@@ -37,7 +37,9 @@ namespace Isis {
    p_chipCube = NULL;
    p_matchChip = NULL;
    p_matchChipCube = NULL;
    p_image = NULL;
//  p_image = NULL;
    p_image = new QImage(512, 512, QImage::Format_RGB32);
    p_image->fill(Qt::black);
    p_controlNet = NULL;
    p_stretchLocked = false;
    p_stretch = NULL;
@@ -222,6 +224,7 @@ namespace Isis {
   *                          this cube, return.
   */
  void ChipViewport::paintEvent(QPaintEvent *e) {

    QPainter painter(this); 

    if (p_tempView != NULL) {
Loading