8 #include <QSharedPointer>
12 #include "ImageListActionWorkOrder.h"
15 #include "XmlStackedHandler.h"
18 class QXmlStreamWriter;
22 class XmlStackedHandlerReader;
68 iterator
erase(iterator pos);
69 iterator
erase(iterator begin, iterator end);
72 iterator
insert(iterator before,
Image *
const & value);
89 ImageList &operator<<(const QList<Image *> &other);
105 QString
name()
const;
106 QString
path()
const;
109 void save(QXmlStreamWriter &stream,
const Project *project,
FileName newProjectRoot)
const;
113 void countChanged(
int newCount);
127 virtual bool startElement(
const QString &namespaceURI,
const QString &localName,
128 const QString &qName,
const QXmlAttributes &atts);
129 virtual bool endElement(
const QString &namespaceURI,
const QString &localName,
130 const QString &qName);
208 bool askAlpha(
int *alphaResult)
const;
Image * takeLast()
Removes and returns the last image.
QString path() const
Get the path to the images in the image list (relative to project root).
QStringList saveAndToggleShowDNs()
Changes the visibility of the DNs of the first image in the image list and synchronizes the visibilit...
void push_back(Image *const &value)
Appends an image to the end of the image list.
CopyImageDataFunctor(const Project *project, FileName newProjectRoot)
Constructor for CopyImageDataFunctor.
Internalizes a list of images and allows for operations on the entire list.
ImageList & operator<<(const QList< Image * > &other)
Appends a list of images to the end of the image list.
The main project for cnetsuite.
virtual bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName)
Handle an XML end element.
int removeAll(Image *const &value)
Removes all occurances of an image.
QStringList saveAndApplyRandomColor()
Sets the color values of every image to a random color.
void showRandomColor()
This applies a new semi-random color to every image's display property for every image in this image ...
This functor is used for copying the images between two projects quickly.
File name manipulation and expansion.
Work orders that can be performed on an image list that modifies internal state.
void deleteFromDisk(Project *project)
Delete all of the contained Images from disk.
Action
Type of action to be performed by the work order.
void applyShowLabel(QStringList showLabelValues)
Sets the visibility of the display names of the images in the image list based on a list of values...
QString name() const
Get the human-readable name of this image list.
QStringList saveAndToggleShowOutline()
Changes the visibility of the outline of the first image in the image list and synchronizes the visib...
void applyColors(QStringList colorValues, int column=0)
Sets the colors values of the images based on a list of values.
SerialNumberList * serialNumberList()
Creates a SerialNumberList from the image list.
ImageList * m_imageList
This stores a pointer to the image list that will be read into.
~CopyImageDataFunctor()
Destructor for CopyImageDataFunctor.
Q_DECLARE_METATYPE(Isis::Cube *)
This allows Cube *'s to be stored in a QVariant.
bool removeOne(Image *const &value)
Removes the first occurance of an image.
virtual bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
Handle an XML start element.
void removeAt(int i)
Removes the image at an index.
QString m_path
This stores the directory name that contains the images in this image list.
QAction * createWorkOrder(Project *project, ImageListActionWorkOrder::Action action)
Creates an ImageListActionWorkOrder and sets the image list as the data for the work order...
QString m_name
This stores the image list's name.
CopyImageDataFunctor & operator=(const CopyImageDataFunctor &rhs)
Assignment operator for CopyImageDataFunctor.
bool askAlpha(int *alphaResult) const
Prompts the user for an alpha value.
void prepend(Image *const &value)
Inserts an image at the beginning of the image list.
static QString qualifyString(QString unqualifiedString, ImageList *)
Determine whether a toggle action should show or hide.
QList< QAction * > supportedActions(Project *project=NULL)
Gets a list of pre-connected actions that have to do with display.
ImageList & operator+=(const QList< Image * > &other)
Appends a list of images to the end of the image list.
void push_front(Image *const &value)
Prepends an image to the beginning of the image list.
const Project * m_project
This stores the name of the project that is going to be copied to.
void swap(QList< Image * > &other)
Swaps the image list with another list of images.
void applyShowFill(QStringList showFillValues)
Sets the visibility of the fill areas of the images in the image list based on a list of values...
void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const
Convert this image list into XML format for saving/restoring capabilities.
XML Handler that parses XMLs in a stack-oriented way.
void clear()
Clears the image list.
This represents a cube in a project-based GUI interface.
void removeFirst()
Removes the image at the front of the image list.
void applyShowOutline(QStringList showOutlineValues)
Sets the visibility of the outlines of the images in the image list based on a list of values...
void setPath(QString newPath)
Set the relative path (from the project root) to this image list's folder.
QStringList saveAndApplyAlpha(int newAlpha)
Sets the alpha value of every image in the image list to a specificed value.
Image * takeAt(int i)
Removes the image at an index and returns it.
void applyAlphas(QStringList alphaValues)
Sets the alpha values of the images based on a list of values.
void append(Image *const &value)
Appends an image to the image list.
Property
This is a list of properties and actions that are possible.
void askAndUpdateColor()
Prompt the user for a new color.
void insert(int i, Image *const &value)
Inserts an image into the image list at an index.
bool askNewColor(QColor *colorResult) const
Prompts the user for color values.
Image * takeFirst()
Removes and returns the first image.
XmlHandler(ImageList *imageList, Project *project)
Create an XML Handler (reader) that can populate the Image list class data.
void applyShowDNs(QStringList showDNsValues)
Sets the visibility of the DNs of the images in the image list based on a list of values...
iterator erase(iterator pos)
Erases a single image from the image list.
This class is used to read an images.xml file into an image list.
QStringList saveAndToggleShowLabel()
Changes the visibility of the display name of the first image in the image list and synchronizes the ...
static QString toString(Action)
Convert an action to a string.
FileName m_newProjectRoot
This stores the path to the root of the project that is going to be copied to.
bool allSupport(ImageDisplayProperties::Property prop)
Check if all images in the image list support a display property.
void askAndUpdateAlpha()
Prompt the user for a new alpha value.
void removeLast()
Removes the image at the end of the image list.
ImageList(QString name, QString path, QObject *parent=NULL)
Creates an image list from an image list name and path (does not read Images).
Serial Number list generator.
ImageList & operator=(const QList< Image * > &rhs)
Assigns another list of images to the image list.
void setName(QString newName)
Set the human-readable name of this image list.
his enables stack-based XML parsing of XML files.
QStringList saveAndToggleShowFill()
Changes the visibility of the fill area of the first image in the image list and synchronizes the vis...
Project * m_project
This stores a pointer to the project that the images in the image list will be a part of...
void * operator()(Image *const &imageToCopy)
Copies the cub/ecub files for an image into m_project.
QStringList saveAndApplyColor(QColor newColor)
Sets the color values of every image to a specificed set of values.