13 #include "XmlStackedHandler.h" 16 class QXmlStreamWriter;
20 class XmlStackedHandlerReader;
54 iterator
erase(iterator pos);
55 iterator
erase(iterator begin, iterator end);
58 iterator
insert(iterator before,
Shape *
const & value);
75 ShapeList &operator<<(const QList<Shape *> &other);
95 void countChanged(
int newCount);
109 virtual bool startElement(
const QString &namespaceURI,
const QString &localName,
110 const QString &qName,
const QXmlAttributes &atts);
111 virtual bool endElement(
const QString &namespaceURI,
const QString &localName,
112 const QString &qName);
ShapeList & operator+=(const QList< Shape *> &other)
Appends a list of shapes to the end of the shape list.
Internalizes a list of shapes and allows for operations on the entire list.
QString path() const
Get the path to the shapes in the shape list (relative to project root).
The main project for ipce.
ShapeList & operator<<(const QList< Shape *> &other)
Appends a list of shapes to the end of the shape list.
File name manipulation and expansion.
void prepend(Shape *const &value)
Inserts an shape at the beginning of the shape list.
void deleteFromDisk(Project *project)
Delete all of the contained Shapes from disk.
void setPath(QString newPath)
Set the relative path (from the project root) to this shape list's folder.
CopyShapeDataFunctor(const Project *project, FileName newProjectRoot)
Constructor for CopyShapeDataFunctor.
void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const
Convert this shape list into XML format for saving/restoring capabilities.
Q_DECLARE_METATYPE(Isis::Cube *)
This allows Cube *'s to be stored in a QVariant.
This functor is used for copying the shapes between two projects quickly.
const Project * m_project
This stores the name of the project that is going to be copied to.
This class is used to read an shapes.xml file into an shape list.
void setName(QString newName)
Set the human-readable name of this shape list.
void clear()
Clears the shape list.
FileName m_newProjectRoot
This stores the path to the root of the project that is going to be copied to.
Project * m_project
This stores a pointer to the project that the shapes in the shape list will be a part of...
void removeLast()
Removes the shape at the end of the shape list.
void removeFirst()
Removes the shape at the front of the shape list.
ShapeList * m_shapeList
This stores a pointer to the shape list that will be read into.
ShapeList & operator=(const QList< Shape *> &rhs)
Assigns another list of shapes to the shape list.
void swap(QList< Shape *> &other)
Swaps the shape list with another list of shapes.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
void removeAt(int i)
Removes the shape at an index.
void append(Shape *const &value)
Appends an shape to the shape list.
XML Handler that parses XMLs in a stack-oriented way.
SerialNumberList serialNumberList()
Creates a SerialNumberList from the shape list.
XmlHandler(ShapeList *shapeList, Project *project)
Create an XML Handler (reader) that can populate the Shape list class data.
ShapeList(QString name, QString path, QObject *parent=NULL)
Creates an shape list from an shape list name and path (does not read Shapes).
QString m_path
This stores the directory name that contains the shapes in this shape list.
void push_back(Shape *const &value)
Appends an shape to the end of the shape list.
bool removeOne(Shape *const &value)
Removes the first occurance of an shape.
This represents a shape in a project-based GUI interface.
Shape * takeFirst()
Removes and returns the first shape.
virtual bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
Handle an XML start element.
Shape * takeLast()
Removes and returns the last shape.
~CopyShapeDataFunctor()
Destructor for CopyShapeDataFunctor.
Namespace for ISIS/Bullet specific routines.
QString name() const
Get the human-readable name of this shape list.
void * operator()(Shape *const &shapeToCopy)
Copies the cub/ecub files for an shape into m_project.
Serial Number list generator.
virtual bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName)
Handle an XML end element.
Manage a stack of content handlers for reading XML files.
void insert(int i, Shape *const &value)
Inserts an shape into the shape list at an index.
int removeAll(Shape *const &value)
Removes all occurances of an shape.
Shape * takeAt(int i)
Removes the shape at an index and returns it.
QString m_name
This stores the shape list's name.
void push_front(Shape *const &value)
Prepends an shape to the beginning of the shape list.
CopyShapeDataFunctor & operator=(const CopyShapeDataFunctor &rhs)
Assignment operator for CopyShapeDataFunctor.
iterator erase(iterator pos)
Erases a single shape from the shape list.