Commit 9784b5c2 authored by Ken Edmundson's avatar Ken Edmundson
Browse files

tree widget items additions

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@5919 41f8697f-d340-4b68-9986-7bafba869bb8
parent d0052e5f
Loading
Loading
Loading
Loading
+43 −0
Original line number Diff line number Diff line
#include "BundleResultsTreeWidgetItem.h"

#include <QDebug>

#include "BundleResults.h"
//#include "BundleResultsDisplayProperties.h"

namespace Isis {

  /**
   * BundleResultsTreeWidgetItem constructor.
   * BundleResultsTreeWidgetItem is derived from QTreeWidgetItem
   *
   *
   * @param parent
   */
  BundleResultsTreeWidgetItem::BundleResultsTreeWidgetItem(BundleResults *bundleResults,
      QTreeWidget *parent) : QTreeWidgetItem(parent, UserType) {
    m_bundleResults = bundleResults;

//  setText(0, m_control->displayProperties()->displayName());
    setText(0, m_bundleResults->runTime());
    setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
    setIcon(0, QIcon(":results"));

    connect(m_bundleResults, SIGNAL(destroyed(QObject *)), this, SLOT(deleteLater()));
  }


  BundleResultsTreeWidgetItem::~BundleResultsTreeWidgetItem() {
    m_bundleResults = NULL;
  }


  BundleResults *BundleResultsTreeWidgetItem::bundleResults() {
    return m_bundleResults;
  }


  void BundleResultsTreeWidgetItem::selectionChanged() {
//    m_control->displayProperties()->setSelected(isSelected());
  }
}
+35 −0
Original line number Diff line number Diff line
#ifndef BundleResultsTreeWidgetItem_H
#define BundleResultsTreeWidgetItem_H

#include <QObject>
#include <QTreeWidgetItem>


namespace Isis {
  class BundleResults;

  /**
   * @brief A control in the project tree widget
   *
   * This class visualizes a BundleResults * from the project in the project tree widget.
   *
   * @author 2014-07-22 Ken Edmundson
   *
   * @internal
   */
  class BundleResultsTreeWidgetItem : public QObject, public QTreeWidgetItem {
    Q_OBJECT
    public:
      BundleResultsTreeWidgetItem(BundleResults *bundleResults, QTreeWidget *parent = 0);
      virtual ~BundleResultsTreeWidgetItem();

      BundleResults *bundleResults();
      void selectionChanged();

    private:
      BundleResults *m_bundleResults;
  };
}

#endif
+42 −0
Original line number Diff line number Diff line
#include "BundleSettingsTreeWidgetItem.h"

#include <QDebug>

#include "BundleSettings.h"
//#include "BundleResultsDisplayProperties.h"

namespace Isis {

  /**
   * BundleSettingsTreeWidgetItem constructor.
   * BundleSettingsTreeWidgetItem is derived from QTreeWidgetItem
   *
   *
   * @param parent
   */
  BundleSettingsTreeWidgetItem::BundleSettingsTreeWidgetItem(BundleSettings *bundleSettings,
      QTreeWidget *parent) : QTreeWidgetItem(parent, UserType) {
    m_bundleSettings = bundleSettings;

    setText(0, "Settings");
    setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
    setIcon(0, QIcon(":settings"));

    connect(m_bundleSettings, SIGNAL(destroyed(QObject *)), this, SLOT(deleteLater()));
  }


  BundleSettingsTreeWidgetItem::~BundleSettingsTreeWidgetItem() {
    m_bundleSettings = NULL;
  }


  BundleSettings *BundleSettingsTreeWidgetItem::bundleSettings() {
    return m_bundleSettings;
  }


  void BundleSettingsTreeWidgetItem::selectionChanged() {
//    m_control->displayProperties()->setSelected(isSelected());
  }
}
+35 −0
Original line number Diff line number Diff line
#ifndef BundleSettingsTreeWidgetItem_H
#define BundleSettingsTreeWidgetItem_H

#include <QObject>
#include <QTreeWidgetItem>


namespace Isis {
  class BundleSettings;

  /**
   * @brief A control in the project tree widget
   *
   * This class visualizes a BundleSettings * from the project in the project tree widget.
   *
   * @author 2014-07-23 Ken Edmundson
   *
   * @internal
   */
  class BundleSettingsTreeWidgetItem : public QObject, public QTreeWidgetItem {
    Q_OBJECT
    public:
      BundleSettingsTreeWidgetItem(BundleSettings *bundleSettings, QTreeWidget *parent = 0);
      virtual ~BundleSettingsTreeWidgetItem();

      BundleSettings *bundleSettings();
      void selectionChanged();

    private:
      BundleSettings *m_bundleSettings;
  };
}

#endif
+42 −0
Original line number Diff line number Diff line
#include "BundleStatisticsTreeWidgetItem.h"

#include <QDebug>

#include "BundleStatistics.h"
//#include "BundleResultsDisplayProperties.h"

namespace Isis {

  /**
   * BundleStatisticsTreeWidgetItem constructor.
   * BundleStatisticsTreeWidgetItem is derived from QTreeWidgetItem
   *
   *
   * @param parent
   */
  BundleStatisticsTreeWidgetItem::BundleStatisticsTreeWidgetItem(BundleStatistics *bundleStatistics,
      QTreeWidget *parent) : QTreeWidgetItem(parent, UserType) {
    m_bundleStatistics = bundleStatistics;

    setText(0, "Statistics");
    setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
    setIcon(0, QIcon(":statistics"));

    connect(m_bundleStatistics, SIGNAL(destroyed(QObject *)), this, SLOT(deleteLater()));
  }


  BundleStatisticsTreeWidgetItem::~BundleStatisticsTreeWidgetItem() {
    m_bundleStatistics = NULL;
  }


  BundleStatistics *BundleStatisticsTreeWidgetItem::bundleStatistics() {
    return m_bundleStatistics;
  }


  void BundleStatisticsTreeWidgetItem::selectionChanged() {
//    m_control->displayProperties()->setSelected(isSelected());
  }
}
Loading