10#include "ShapeDisplayProperties.h"
11#include "SerialNumberList.h"
15class QXmlStreamWriter;
46 void append(
const QList<Shape *> &value);
50 iterator
erase(iterator pos);
51 iterator
erase(iterator begin, iterator end);
54 iterator
insert(iterator before,
Shape *
const & value);
64 void swap(QList<Shape *> &other);
91 void countChanged(
int newCount);
File name manipulation and expansion.
The main project for ipce.
Serial Number list generator.
This represents a shape in a project-based GUI interface.
This functor is used for copying the shapes between two projects quickly.
CopyShapeDataFunctor(const Project *project, FileName newProjectRoot)
Constructor for CopyShapeDataFunctor.
CopyShapeDataFunctor & operator=(const CopyShapeDataFunctor &rhs)
Assignment operator for CopyShapeDataFunctor.
FileName m_newProjectRoot
This stores the path to the root of the project that is going to be copied to.
void * operator()(Shape *const &shapeToCopy)
Copies the cub/ecub files for an shape into m_project.
~CopyShapeDataFunctor()
Destructor for CopyShapeDataFunctor.
const Project * m_project
This stores the name of the project that is going to be copied to.
Internalizes a list of shapes and allows for operations on the entire list.
void insert(int i, Shape *const &value)
Inserts an shape into the shape list at an index.
void append(Shape *const &value)
Appends an shape to the shape list.
void deleteFromDisk(Project *project)
Delete all of the contained Shapes from disk.
void removeAt(int i)
Removes the shape at an index.
void setName(QString newName)
Set the human-readable name of this shape list.
Shape * takeLast()
Removes and returns the last shape.
iterator erase(iterator pos)
Erases a single shape from the shape list.
SerialNumberList serialNumberList()
Creates a SerialNumberList from the shape list.
void swap(QList< Shape * > &other)
Swaps the shape list with another list of shapes.
QString m_name
This stores the shape list's name.
void clear()
Clears the shape list.
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.
void removeFirst()
Removes the shape at the front of the shape list.
void removeLast()
Removes the shape at the end of the shape list.
QString path() const
Get the path to the shapes in the shape list (relative to project root).
int removeAll(Shape *const &value)
Removes all occurances of an shape.
QString name() const
Get the human-readable name of this shape list.
void prepend(Shape *const &value)
Inserts an shape at the beginning of the shape list.
Shape * takeAt(int i)
Removes the shape at an index and returns it.
void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const
Convert this shape list into XML format for saving/restoring capabilities.
ShapeList(QString name, QString path, QObject *parent=NULL)
Creates an shape list from an shape list name and path (does not read Shapes).
void push_front(Shape *const &value)
Prepends an shape to the beginning of the shape list.
ShapeList & operator<<(const QList< Shape * > &other)
Appends a list of shapes to the end of the shape list.
bool removeOne(Shape *const &value)
Removes the first occurance of an shape.
ShapeList & operator=(const QList< Shape * > &rhs)
Assigns another list of shapes to the shape list.
void setPath(QString newPath)
Set the relative path (from the project root) to this shape list's folder.
Shape * takeFirst()
Removes and returns the first shape.
ShapeList & operator+=(const QList< Shape * > &other)
Appends a list of shapes to the end of the shape list.
This is free and unencumbered software released into the public domain.
This is free and unencumbered software released into the public domain.