Loading isis/src/qisis/objs/JigsawSetupDialog/JigsawSetupDialog.cpp +20 −17 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ #include <QPushButton> #include <QSortFilterProxyModel> #include <QStandardItemModel> #include <QItemSelection> #include "BundleSolutionInfo.h" #include "BundleSettings.h" Loading @@ -16,6 +17,7 @@ #include "IString.h" #include "MaximumLikelihoodWFunctions.h" #include "Project.h" #include "ProjectItem.h" #include "ProjectItemProxyModel.h" #include "SpecialPixel.h" #include "SubTreeProxyModel.h" Loading Loading @@ -51,6 +53,11 @@ namespace Isis { makeReadOnly(); } //connect( m_project->directory()->model(), SIGNAL(selectionChanged(QList<ProjectItem *> &)), // this, SLOT(on_projectItemSelectionChanged(const QList<ProjectItem *> &) ) ); // initializations for general tab // fill control net combo box from project Loading Loading @@ -196,6 +203,7 @@ namespace Isis { } JigsawSetupDialog::~JigsawSetupDialog() { // delete/null m_ui since we did "new" this pointers in the constructor if (m_ui) { Loading Loading @@ -1130,6 +1138,11 @@ namespace Isis { void JigsawSetupDialog::createObservationSolveSettingsTreeView() { // Proof-of- QList<ProjectItem *> selectedItems = m_project->directory()->model()->selectedItems(); foreach(ProjectItem *item,selectedItems){ qDebug() << "Selected Item: " << item->text(); } qDebug() << "JigsawSetupDialog::createObservationSolveSettingsTreeView()"; // m_ui->treeView->setModel((QAbstractItemModel*)(m_project->directory()->model())); Loading @@ -1141,33 +1154,23 @@ namespace Isis { //QModelIndex SubTreeProxyModel::mapFromSource(const QModelIndex &sourceIndex) // find the root "Images" and set it in the proxy QStandardItem *item = model->invisibleRootItem()->child(0)->child(1); qDebug() << "ITEM: " << item << ", " << item->text(); qDebug() << "PARENT: " << item->parent() << ", " << item->parent()->text(); //QStandardItem *item = model->invisibleRootItem()->child(0)->child(1); //qDebug() << "ITEM: " << item << ", " << item->text(); //qDebug() << "PARENT: " << item->parent() << ", " << item->parent()->text(); // i think source model tries to add top root item, which is invalid??? //osspm->setRoot(item); m_ui->treeView->setModel(osspm); //Set the root index to display the subtree we are interesting in. This requires //Set the root index to display the subtree we are interested in. This requires //computing the proxy index from the source model. m_ui->treeView->setRootIndex(osspm->mapFromSource(item->index() )); if (selectedItems.count() > 0) { m_ui->treeView->setRootIndex(osspm->mapFromSource(selectedItems[0]->index() )); } // Try to loop through the view here to add the "groups" so they aren't part of the model // Add apply button to the tab view // set the text to bold? } } isis/src/qisis/objs/JigsawSetupDialog/JigsawSetupDialog.h +7 −0 Original line number Diff line number Diff line Loading @@ -9,8 +9,12 @@ namespace Ui { class JigsawSetupDialog; } class QItemSelection; namespace Isis { class Project; class ProjectItem; class Control; /** Loading Loading @@ -80,6 +84,9 @@ namespace Isis { private slots: //void on_projectItemSelectionChanged(const QList<ProjectItem *> selectedItems); void on_radiusCheckBox_toggled(bool checked); //void on_outlierRejectionCheckBox_toggled(bool checked); Loading Loading
isis/src/qisis/objs/JigsawSetupDialog/JigsawSetupDialog.cpp +20 −17 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ #include <QPushButton> #include <QSortFilterProxyModel> #include <QStandardItemModel> #include <QItemSelection> #include "BundleSolutionInfo.h" #include "BundleSettings.h" Loading @@ -16,6 +17,7 @@ #include "IString.h" #include "MaximumLikelihoodWFunctions.h" #include "Project.h" #include "ProjectItem.h" #include "ProjectItemProxyModel.h" #include "SpecialPixel.h" #include "SubTreeProxyModel.h" Loading Loading @@ -51,6 +53,11 @@ namespace Isis { makeReadOnly(); } //connect( m_project->directory()->model(), SIGNAL(selectionChanged(QList<ProjectItem *> &)), // this, SLOT(on_projectItemSelectionChanged(const QList<ProjectItem *> &) ) ); // initializations for general tab // fill control net combo box from project Loading Loading @@ -196,6 +203,7 @@ namespace Isis { } JigsawSetupDialog::~JigsawSetupDialog() { // delete/null m_ui since we did "new" this pointers in the constructor if (m_ui) { Loading Loading @@ -1130,6 +1138,11 @@ namespace Isis { void JigsawSetupDialog::createObservationSolveSettingsTreeView() { // Proof-of- QList<ProjectItem *> selectedItems = m_project->directory()->model()->selectedItems(); foreach(ProjectItem *item,selectedItems){ qDebug() << "Selected Item: " << item->text(); } qDebug() << "JigsawSetupDialog::createObservationSolveSettingsTreeView()"; // m_ui->treeView->setModel((QAbstractItemModel*)(m_project->directory()->model())); Loading @@ -1141,33 +1154,23 @@ namespace Isis { //QModelIndex SubTreeProxyModel::mapFromSource(const QModelIndex &sourceIndex) // find the root "Images" and set it in the proxy QStandardItem *item = model->invisibleRootItem()->child(0)->child(1); qDebug() << "ITEM: " << item << ", " << item->text(); qDebug() << "PARENT: " << item->parent() << ", " << item->parent()->text(); //QStandardItem *item = model->invisibleRootItem()->child(0)->child(1); //qDebug() << "ITEM: " << item << ", " << item->text(); //qDebug() << "PARENT: " << item->parent() << ", " << item->parent()->text(); // i think source model tries to add top root item, which is invalid??? //osspm->setRoot(item); m_ui->treeView->setModel(osspm); //Set the root index to display the subtree we are interesting in. This requires //Set the root index to display the subtree we are interested in. This requires //computing the proxy index from the source model. m_ui->treeView->setRootIndex(osspm->mapFromSource(item->index() )); if (selectedItems.count() > 0) { m_ui->treeView->setRootIndex(osspm->mapFromSource(selectedItems[0]->index() )); } // Try to loop through the view here to add the "groups" so they aren't part of the model // Add apply button to the tab view // set the text to bold? } }
isis/src/qisis/objs/JigsawSetupDialog/JigsawSetupDialog.h +7 −0 Original line number Diff line number Diff line Loading @@ -9,8 +9,12 @@ namespace Ui { class JigsawSetupDialog; } class QItemSelection; namespace Isis { class Project; class ProjectItem; class Control; /** Loading Loading @@ -80,6 +84,9 @@ namespace Isis { private slots: //void on_projectItemSelectionChanged(const QList<ProjectItem *> selectedItems); void on_radiusCheckBox_toggled(bool checked); //void on_outlierRejectionCheckBox_toggled(bool checked); Loading