Isis Developer Reference
Control.h
Go to the documentation of this file.
1#ifndef Control_H
2#define Control_H
3
10/* SPDX-License-Identifier: CC0-1.0 */
11
12#include <QObject> // parent
13#include <QString>
14
15#include "FileName.h"
16
17class QMutex;
18class QUuid;
19class QXmlStreamWriter;
20
21namespace Isis {
22 class ControlDisplayProperties;
23 class ControlNet;
24 class FileName;
25 class Project;
26 class PvlObject;
27
65 class Control : public QObject {
66 Q_OBJECT
67 public:
70 explicit Control(QString cnetFileName, QObject *parent = 0);
71 explicit Control(Project *project, QString cnetFileName, QObject *parent = 0);
72 explicit Control(ControlNet *controlNet, QString cnetFileName, QObject *parent = 0);
73 ~Control();
74
76 void openControlNet();
79 QString fileName() const;
80
81 QString id() const;
82
83 bool isModified();
84 void setModified(bool modified = true);
85 bool write();
86
87 void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const;
88 void copyToNewProjectRoot(const Project *project, FileName newProjectRoot);
89 void deleteFromDisk();
90
91 public slots:
92 void updateFileName(Project *);
93 void closeControlNet();
94
95 private:
96 Control(const Control &other);
97 Control &operator=(const Control &rhs);
98
99 bool m_modified;
100
101 ControlDisplayProperties *m_displayProperties;
103 Project *m_project;
104 QString m_fileName;
110 QUuid *m_id;
111 };
112}
113
115
116#endif // Control_H
Q_DECLARE_METATYPE(Isis::Control *)
This is the GUI communication mechanism for cubes.
Definition ControlDisplayProperties.h:57
This represents an ISIS control net in a project-based GUI interface.
Definition Control.h:65
QString id() const
Access the unique ID associated with this Control.
Definition Control.cpp:262
ControlNet * controlNet()
Open and return a pointer to the ControlNet for this Control.
Definition Control.cpp:130
ControlDisplayProperties * displayProperties()
Access a pointer to the display properties for the control network.
Definition Control.cpp:232
void deleteFromDisk()
Delete the control net from disk.
Definition Control.cpp:314
Control(QString cnetFileName, QObject *parent=0)
Create a Control from control net located on disk.
Definition Control.cpp:34
bool write()
@description Write control net to disk.
Definition Control.cpp:171
void copyToNewProjectRoot(const Project *project, FileName newProjectRoot)
Copies the files of the given Project to the given location.
Definition Control.cpp:274
void setModified(bool modified=true)
@description Sets the modification state of this control.
Definition Control.cpp:221
ControlNet * m_controlNet
A pointer to the ControlNet object associated with this Control object.
Definition Control.h:68
bool isModified()
@description Has this control been modified?
Definition Control.cpp:209
~Control()
Destroys Control object.
Definition Control.cpp:106
void updateFileName(Project *)
Change the on-disk file name for this control to be where the control ought to be in the given projec...
Definition Control.cpp:335
void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const
Method to write this Control object's member data to an XML stream.
Definition Control.cpp:353
void openControlNet()
Sets the ControlNet from the control net file name provided in the constructor.
Definition Control.cpp:145
QString fileName() const
Access the name of the control network file associated with this Control.
Definition Control.cpp:252
void closeControlNet()
Cleans up the ControlNet pointer.
Definition Control.cpp:194
a control network
Definition ControlNet.h:258
File name manipulation and expansion.
Definition FileName.h:100
The main project for ipce.
Definition Project.h:287
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16