Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Isis Developer Reference
GuiCameraList.h
Go to the documentation of this file.
1#ifndef GuiCameraList_H
2#define GuiCameraList_H
3
4#include <QDebug>
5#include <QList>
6#include <QMetaType>
7#include <QObject>
8
9#include "GuiCamera.h"
11//#include "GuiCameraListActionWorkOrder.h" TODO - will we need this?
12#include "WorkOrder.h"
13
14class QXmlStreamWriter;
15
16namespace Isis {
17 class FileName;
18
32 class GuiCameraList : public QObject, public QList<GuiCameraQsp> {
33 Q_OBJECT
34
35 public:
36// friend class GuiCameraListActionWorkOrder;
37
38 GuiCameraList(QString name, QString path, QObject *parent = NULL);
39 explicit GuiCameraList(QObject *parent = NULL);
40 explicit GuiCameraList(QList<GuiCameraQsp>, QObject *parent = NULL);
41// explicit GuiCameraList(QStringList &);
44
45 // These are overridden (-ish) in order to add notifications to the list changing
46 void append(GuiCameraQsp const & value);
47 void append(const QList<GuiCameraQsp> &value);
48
49 void clear();
50
52 iterator erase(iterator begin, iterator end);
53
54 void insert(int i, GuiCameraQsp const & value);
55 iterator insert(iterator before, GuiCameraQsp const & value);
56
57 void prepend(GuiCameraQsp const & value);
58 void push_back(GuiCameraQsp const & value);
59 void push_front(GuiCameraQsp const & value);
60 int removeAll(GuiCameraQsp const & value);
61 void removeAt(int i);
62 void removeFirst();
63 void removeLast();
64 bool removeOne(GuiCameraQsp const & value);
65 void swap(QList<GuiCameraQsp> &other);
66 GuiCameraQsp takeAt(int i);
69
75
76 // This is our own assignment, but it needs to notify just like the operator=(QList)
78
79 // Done overriding (-ish)
80
81
84
85 void setName(QString newName);
86 void setPath(QString newPath);
87
88 QString name() const;
89 QString path() const;
90
91// void deleteFromDisk(Project *project);
92 void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const;
93
94
95 signals:
100 void countChanged(int newCount);
101
114// class CopyTargetBodyDataFunctor : public std::unary_function<TargetBodyQsp const &, void *> {
115// public:
116// CopyTargetBodyDataFunctor(const Project *project, FileName newProjectRoot);
117// CopyTargetBodyDataFunctor(const CopyTargetBodyDataFunctor &other);
118// ~CopyTargetBodyDataFunctor();
119
120// void *operator()(TargetBodyQsp const &imageToCopy);
121
122// CopyTargetBodyDataFunctor &operator=(const CopyTargetBodyDataFunctor &rhs);
123
124// private:
125// const Project *m_project;
126// FileName m_newProjectRoot;
127// };
128
129 private:
130// QAction *createWorkOrder(Project *project, GuiCameraListActionWorkOrder::Action action) {
131// QAction *result = NULL;
132
133// if (project) {
134// result = new GuiCameraListActionWorkOrder(action, project);
135// ((GuiCameraListActionWorkOrder *)result)->setData(this);
136// }
137// else {
138// result = new QAction(
139// GuiCameraListActionWorkOrder::qualifyString(GuiCameraListActionWorkOrder::toString(action),
140// this),
141// this);
142// }
143
144// return result;
145// }
146
147// void applyAlphas(QStringList alphaValues);
148// void applyColors(QStringList colorValues, int column = 0);
149// void applyShowLabel(QStringList showLabelValues);
150// void applyShowFill(QStringList showFillValues);
151// void applyShowDNs(QStringList showDNsValues);
152// void applyShowOutline(QStringList showOutlineValues);
153// bool askAlpha(int *alphaResult) const;
154// bool askNewColor(QColor *colorResult) const;
155// QStringList saveAndApplyAlpha(int newAlpha);
156// QStringList saveAndApplyColor(QColor newColor);
157// QStringList saveAndApplyRandomColor();
158
159 private slots:
160// void askAndUpdateAlpha();
161// void askAndUpdateColor();
162// void showRandomColor();
163// QStringList saveAndToggleShowDNs();
164// QStringList saveAndToggleShowFill();
165// QStringList saveAndToggleShowLabel();
166// QStringList saveAndToggleShowOutline();
167
168 private:
169 QString m_name;
170
181 QString m_path;
182 };
183 // TODO: add QDataStream >> and << ???
184}
185
187
188#endif
Q_DECLARE_METATYPE(Isis::GuiCameraList *)
Property
This is a list of properties and actions that are possible.
Definition GuiCameraDisplayProperties.h:80
List of GuiCameras saved as QSharedPointers.
Definition GuiCameraList.h:32
GuiCameraQsp takeFirst()
Removes and returns the first GuiCamera in the list.
Definition GuiCameraList.cpp:378
void removeFirst()
Removes the first GuiCamera in the list.
Definition GuiCameraList.cpp:301
void clear()
Clears the list.
Definition GuiCameraList.cpp:143
void setName(QString newName)
Gets a list of pre-connected actions that have to do with display, such as color, alpha,...
Definition GuiCameraList.cpp:658
GuiCameraList(QString name, QString path, QObject *parent=NULL)
Create an gui camera list from a gui camera list name and path (does not read GuiCamera objects).
Definition GuiCameraList.cpp:51
QString name() const
Get the human-readable name of this gui cameray list.
Definition GuiCameraList.cpp:679
void push_back(GuiCameraQsp const &value)
Inserts a GuiCamera at the end of the list.
Definition GuiCameraList.cpp:242
void insert(int i, GuiCameraQsp const &value)
Inserts a GuiCamera into the list at a given index.
Definition GuiCameraList.cpp:196
GuiCameraQsp takeLast()
Removes and returns the last GuiCamera in the list.
Definition GuiCameraList.cpp:392
int removeAll(GuiCameraQsp const &value)
Removes all occurances of a GuiCamera from the list.
Definition GuiCameraList.cpp:272
bool allSupport(GuiCameraDisplayProperties::Property prop)
bool removeOne(GuiCameraQsp const &value)
Removes the first occurance of a GuiCamera from the list.
Definition GuiCameraList.cpp:328
void countChanged(int newCount)
Emitted when the number of GuiCameras in the list changes.
GuiCameraQsp takeAt(int i)
Removes and returns the GuiCamera at a specific index.
Definition GuiCameraList.cpp:364
void removeAt(int i)
Removes the GuiCamera at a specific index.
Definition GuiCameraList.cpp:290
void removeLast()
Removes the last GuiCamera in the list.
Definition GuiCameraList.cpp:312
void prepend(GuiCameraQsp const &value)
Inserts a GuiCamera at the beginning of the list.
Definition GuiCameraList.cpp:228
void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const
Delete all of the contained GuiCamera objects from disk (see GuiCamera::deleteFromDisk())
Definition GuiCameraList.cpp:730
void append(GuiCameraQsp const &value)
Appends a single GuiCamera to the list.
Definition GuiCameraList.cpp:119
QString path() const
Get the path to these gui camera objects in the list (relative to project root).
Definition GuiCameraList.cpp:690
QList< QAction * > supportedActions(Project *project=NULL)
iterator erase(iterator pos)
Removes the GuiCamera associated with an iterator.
Definition GuiCameraList.cpp:162
void swap(QList< GuiCameraQsp > &other)
Swaps the list with another GuiCameraList.
Definition GuiCameraList.cpp:346
~GuiCameraList()
Create a gui camera list from a list of gui camera file names.
Definition GuiCameraList.cpp:108
void setPath(QString newPath)
Set the relative path (from the project root) to this gui camera list's folder.
Definition GuiCameraList.cpp:669
GuiCameraList & operator<<(const QList< GuiCameraQsp > &other)
Appends another GuiVameraList to the list and returns a reference to this.
Definition GuiCameraList.cpp:444
void push_front(GuiCameraQsp const &value)
Inserts a GuiCamera at the front of the list.
Definition GuiCameraList.cpp:256
GuiCameraList & operator=(const QList< GuiCameraQsp > &rhs)
Assigns a list of GuiCameras to the list.
Definition GuiCameraList.cpp:481
GuiCameraList & operator+=(const QList< GuiCameraQsp > &other)
Appends another GuiCameraList to the list and returns a reference to this.
Definition GuiCameraList.cpp:408
The main project for ipce.
Definition Project.h:287
This is free and unencumbered software released into the public domain.
Definition BoxcarCachingAlgorithm.h:13
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
QSharedPointer< GuiCamera > GuiCameraQsp
GuiCameraQsp Represents a smart pointer to a GuiCamera object.
Definition GuiCamera.h:156