Commit 6c5941aa authored by Jesse Mapel's avatar Jesse Mapel
Browse files

--dry-run

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@6815 41f8697f-d340-4b68-9986-7bafba869bb8
parent da7500d6
Loading
Loading
Loading
Loading
+145 −7
Original line number Diff line number Diff line
@@ -34,10 +34,10 @@
#include <QXmlStreamWriter>

#include "FileName.h"
#include "GuiCamera.h"
#include "IException.h"
#include "IString.h"
#include "Project.h"
#include "GuiCamera.h"
#include "XmlStackedHandlerReader.h"

namespace Isis {
@@ -124,6 +124,10 @@ namespace Isis {


  /**
   * Appends a single GuiCamera to the list.
   * 
   * @param value The GuiCamera to be appened
   * 
   * @see QList<GuiCameraQsp>::append()
   */
  void GuiCameraList::append(GuiCameraQsp const &value) {
@@ -133,6 +137,10 @@ namespace Isis {


  /**
   * Appends another GuiCameraList to the list.
   * 
   * @param value The GuiCameraList to be appened
   * 
   * @see QList<GuiCameraQsp>::append()
   */
  void GuiCameraList::append(const QList<GuiCameraQsp> &value) {
@@ -142,6 +150,8 @@ namespace Isis {


  /**
   * Clears the list.
   * 
   * @see QList<GuiCameraQsp>::clear()
   */
  void GuiCameraList::clear() {
@@ -154,6 +164,13 @@ namespace Isis {


  /**
   * Removes the GuiCamera associated with an iterator.
   * Returns an iterator associated with the next GuiCamera in the list.
   * 
   * @param pos An iterator associated with the GuiCamera to be erased
   * 
   * @return @b QList<GuiCameraQsq>::iteraror Iterator associated with the next GuiCamera
   * 
   * @see QList<GuiCameraQsp>::erase()
   */
  QList<GuiCameraQsp>::iterator GuiCameraList::erase(iterator pos) {
@@ -164,6 +181,15 @@ namespace Isis {


  /**
   * Removes all GuiCameras from begin up to, but not inclusing end.
   * Returns an iterator associated with GuiCamera that was associated with end.
   * 
   * @param begin An iterator associated with the first GuiCamera to be removed
   * @param end An iterator associated with the GuiCamera after the last GuiCamera to be removed
   * 
   * @return @b QList<GuiCameraQsp>::iteraror Iterator associated with the GuiCamera that was
   *                                              associated with end.
   * 
   * @see QList<GuiCameraQsp>::erase()
   */
  QList<GuiCameraQsp>::iterator GuiCameraList::erase(iterator begin, iterator end) {
@@ -174,6 +200,11 @@ namespace Isis {


  /**
   * Inserts a GuiCamera into the list at a given index.
   * 
   * @param i The index the GuiCamera will be inserted at
   * @param value The GuiCamera to be inserted
   * 
   * @see QList<GuiCameraQsp>::insert()
   */
  void GuiCameraList::insert(int i, GuiCameraQsp const &value) {
@@ -184,6 +215,14 @@ namespace Isis {


  /**
   * Inserts a GuiCamera in front of the GuiCamera associated with an iterator.
   * Returns an iterator associated with the inserted GuiCamera.
   * 
   * @param before An iterator associated with the GuiCamera that value will be inserted in front of
   * @param value The GuiCamera to be inserted.
   * 
   * @return @b QList<GuiCameraQsp>::iterator Iterator associated with the inserted GuiCamera
   * 
   * @see QList<GuiCameraQsp>::insert()
   */
  QList<GuiCameraQsp>::iterator GuiCameraList::insert(iterator before, GuiCameraQsp const & value) {
@@ -194,6 +233,10 @@ namespace Isis {


  /**
   * Inserts a GuiCamera at the beginning of the list.
   * 
   * @param value The GuiCamera to be inserted.
   * 
   * @see QList<GuiCameraQsp>::prepend()
   */
  void GuiCameraList::prepend(GuiCameraQsp const &value) {
@@ -203,6 +246,11 @@ namespace Isis {


  /**
   * Inserts a GuiCamera at the end of the list.
   * Equivalent to append.
   * 
   * @param value The GuiCamera to be inserted.
   * 
   * @see QList<GuiCameraQsp>::push_back()
   */
  void GuiCameraList::push_back(GuiCameraQsp const &value) {
@@ -212,6 +260,11 @@ namespace Isis {


  /**
   * Inserts a GuiCamera at the front of the list.
   * Equivalent to prepend.
   * 
   * @param value The GuiCamera to be inserted.
   * 
   * @see QList<GuiCameraQsp>::push_front()
   */
  void GuiCameraList::push_front(GuiCameraQsp const &value) {
@@ -221,6 +274,13 @@ namespace Isis {


  /**
   * Removes all occurances of a GuiCamera from the list.
   * Returns the number removed.
   * 
   * @param value The GuiCamera to be removed
   * 
   * @return @b int The number of GuiCameras removed
   * 
   * @see QList<GuiCameraQsp>::removeAll()
   */
  int GuiCameraList::removeAll(GuiCameraQsp const &value) {
@@ -235,6 +295,10 @@ namespace Isis {


  /**
   * Removes the GuiCamera at a specific index.
   * 
   * @param i The index of the GuiCamera to be removed
   * 
   * @see QList<GuiCameraQsp>::removeAt()
   */
  void GuiCameraList::removeAt(int i) {
@@ -244,6 +308,8 @@ namespace Isis {


  /**
   * Removes the first GuiCamera in the list.
   * 
   * @see QList<GuiCameraQsp>::removeFirst()
   */
  void GuiCameraList::removeFirst() {
@@ -253,6 +319,8 @@ namespace Isis {


  /**
   * Removes the last GuiCamera in the list.
   * 
   * @see QList<GuiCameraQsp>::removeLast()
   */
  void GuiCameraList::removeLast() {
@@ -262,6 +330,13 @@ namespace Isis {


  /**
   * Removes the first occurance of a GuiCamera from the list.
   * Returns whether or not it succeeded.
   * 
   * @param value The GuiCamera to be removed
   * 
   * @return @b bool True if successful
   * 
   * @see QList<GuiCameraQsp>::removeOne()
   */
  bool GuiCameraList::removeOne(GuiCameraQsp const &value) {
@@ -276,6 +351,10 @@ namespace Isis {


  /**
   * Swaps the list with another GuiCameraList.
   * 
   * @param other The GuiCameraList to swap with
   * 
   * @see QList<GuiCameraQsp>::swap()
   */
  void GuiCameraList::swap(QList<GuiCameraQsp> &other) {
@@ -288,6 +367,12 @@ namespace Isis {


  /**
   * Removes and returns the GuiCamera at a specific index.
   * 
   * @param i The index of GuiCamera to be removed
   * 
   * @return @b QuiCameraQsp The GuiCamera removed
   * 
   * @see QList<GuiCameraQsp>::takeAt()
   */
  GuiCameraQsp GuiCameraList::takeAt(int i) {
@@ -298,6 +383,10 @@ namespace Isis {


  /**
   * Removes and returns the first GuiCamera in the list.
   * 
   * @return @b GuiCameraQsp The GuiCamera removed
   * 
   * @see QList<GuiCameraQsp>::takeFirst()
   */
  GuiCameraQsp GuiCameraList::takeFirst() {
@@ -308,6 +397,10 @@ namespace Isis {


  /**
   * Removes and returns the last GuiCamera in the list.
   * 
   * @return @b GuiCameraQsp The GuiCamera removed
   * 
   * @see QList<GuiCameraQsp>::takeLast()
   */
  GuiCameraQsp GuiCameraList::takeLast() {
@@ -318,6 +411,12 @@ namespace Isis {


  /**
   * Appends another GuiCameraList to the list and returns a reference to this.
   * 
   * @param other The GuiCameraList to be appended
   * 
   * @return @b QuiCameraList & A reference to this
   * 
   * @see QList<GuiCameraQsp>::operator+=()
   */
  GuiCameraList &GuiCameraList::operator+=(const QList<GuiCameraQsp> &other) {
@@ -332,6 +431,12 @@ namespace Isis {


  /**
   * Appends a GuiCamera to the list and returns a reference to this.
   * 
   * @param other The GuiCamera to be appended
   * 
   * @return @b GuiCameraList & A reference to this
   * 
   * @see QList<GuiCameraQsp>::operator+=()
   */
  GuiCameraList &GuiCameraList::operator+=(GuiCameraQsp const &other) {
@@ -342,6 +447,12 @@ namespace Isis {


  /**
   * Appends another GuiVameraList to the list and returns a reference to this.
   * 
   * @param other The GuiCameraList to be appened
   * 
   * @return @b GuiCameraList & A reference to this
   * 
   * @see QList<GuiCameraQsp>::operator<<()
   */
  GuiCameraList &GuiCameraList::operator<<(const QList<GuiCameraQsp> &other) {
@@ -356,6 +467,12 @@ namespace Isis {


  /**
   * Appends a GuiCamera to the list and returns a reference to this.
   * 
   * @param other The GuiCamera to be appended
   * 
   * @return @b GuiCameraList & A reference to this
   * 
   * @see QList<GuiCameraQsp>::operator<<()
   */
  GuiCameraList &GuiCameraList::operator<<(GuiCameraQsp const &other) {
@@ -366,6 +483,13 @@ namespace Isis {


  /**
   * Assigns a list of GuiCameras to the list.
   * Does not modify m_name or m_path.
   * 
   * @param rhs the list being assigned from
   * 
   * @returns @b GuiCameraList & A reference to this
   * 
   * @see QList<GuiCameraQsp>::operator=()
   */
  GuiCameraList &GuiCameraList::operator=(const QList<GuiCameraQsp> &rhs) {
@@ -384,7 +508,8 @@ namespace Isis {
   * Assignment operator
   *
   * @param rhs The right hand side of the '=' operator
   * @return *this
   * 
   * @return @b GuiCameraList & A reference to this
   */
  GuiCameraList &GuiCameraList::operator=(const GuiCameraList &rhs) {
    bool countChanging = (rhs.count() != count());
@@ -553,7 +678,7 @@ namespace Isis {
   * Set the relative path (from the project root) to this gui camera list's folder. This is really
   *  only useful for project gui camera lists (not anonymous temporary ones).
   *
   * @param newPath The path to the gui camera objects in this gui cameray list
   * @param newPath The path to the gui camera objects in this gui camera list
   */
  void GuiCameraList::setPath(QString newPath) {
    m_path = newPath;
@@ -563,7 +688,7 @@ namespace Isis {
  /**
   * Get the human-readable name of this gui cameray list
   *
   * @return The name of the gui camera list (or an empty string if anonymous).
   * @return @b QString The name of the gui camera list (or an empty string if anonymous).
   */
  QString GuiCameraList::name() const {
    return m_name;
@@ -574,7 +699,7 @@ namespace Isis {
   * Get the path to these gui camera objects in the list (relative to project root). This only
   *  applies to a gui camera list from the project.
   *
   * @return The path to the gui camera objects in the list (or an empty string if unknown).
   * @return @b Qstring The path to the gui camera objects in the list (or an empty string if unknown).
   */
  QString GuiCameraList::path() const {
    return m_path;
@@ -600,6 +725,7 @@ namespace Isis {

  /**
   * Convert this gui camera list into XML format for saving/restoring capabilities.
   * Not currently implemented
   *
   * This writes:
   * <pre>
@@ -760,7 +886,12 @@ namespace Isis {
   * Handle an XML start element. This expects <GuiCameraList/> and <target/> elements (it reads both
   *   the project XML and the targets.xml file).
   * 
   * @return If we should continue reading the XML (usually true).
   * @param namespaceURI ???
   * @param localName The name of the element the XmlHandler is at
   * @param qName ???
   * @param atts The attributes of the element the XmlHanler is at
   *
   * @return @b bool If we should continue reading the XML (usually true).
   */
  bool GuiCameraList::XmlHandler::startElement(const QString &namespaceURI, const QString &localName,
                                               const QString &qName, const QXmlAttributes &atts) {
@@ -791,7 +922,14 @@ namespace Isis {
   * Handle an XML end element. This handles <GuiCameraList /> by opening and reading the images.xml
   *   file.
   * 
   * @return If we should continue reading the XML (usually true).
   * @param namespaceURI ???
   * @param localName The name of the element the XmlHandler is at
   * @param qName ???
   *
   * @return @b bool If we should continue reading the XML (usually true).
   * 
   * @throws IException::Io "Unable to open with read access"
   * @throws IException::Io "Failed to open target body list XML"
   */
  bool GuiCameraList::XmlHandler::endElement(const QString &namespaceURI, const QString &localName,
                                             const QString &qName) {
+20 −2
Original line number Diff line number Diff line
@@ -2,9 +2,9 @@
#define GuiCameraList_H

#include <QDebug>
#include <QObject>
#include <QList>
#include <QMetaType>
#include <QObject>

#include "GuiCamera.h"
#include "GuiCameraDisplayProperties.h"
@@ -20,10 +20,17 @@ namespace Isis {
  class XmlStackedHandlerReader;

  /**
   * List of GuiCameras saved as QSharedPointers.  Overrides many QList methods in order to
   * emit signals about that status of the list.
   * 
   * @brief List of GuiCameras.
   * 
   * @author 2015-06-11 Ken Edmundson
   *
   * @internal 
   *   @history 2015-06-11 Ken Edmundson - original version
   *   @history 2016-06-15 Jesse Mapel - Added documentation in preparation for merge from IPCE
   *                           to ISIS.  Fixes #4005.
   */
  class GuiCameraList : public QObject, public QList<GuiCameraQsp> {
    Q_OBJECT
@@ -91,10 +98,18 @@ namespace Isis {


    signals:
      /**
       * Emitted when the number of GuiCameras in the list changes.
       * Not currently connected to anything.
       */
      void countChanged(int newCount);

    private:
      /**
       * XmlHandler used to save to xml files.
       * 
       * JAM - The save() method that uses this is currently not implemented.
       * 
       * @author 2012-07-01 Steven Lambright
       *
       * @internal
@@ -121,6 +136,9 @@ namespace Isis {
       *   to work with QtConcurrentMap, though the results are all NULL (QtConcurrentMap is much
       *   faster than many QtConcurrentRun calls).
       * 
       * JAM - This appears to have been copied from TargetBodyList.  Is this functionality needed?
       *           Is this going to be implemented at a later date?
       *
       * @author 2015-06-11 Ken Edmundson (after Steven Lambright)
       *
       * @internal
@@ -180,7 +198,7 @@ namespace Isis {
//      QStringList saveAndToggleShowOutline();

    private:
      QString m_name;
      QString m_name; //!< The disply name of the GuiCameraList.  Not used by anonymous lists.

      /**
       * This stores the directory name that contains the GuiCamera objects in this list.