Isis Developer Reference
TemplateEditorWidget.h
Go to the documentation of this file.
1 #ifndef TemplateEditorWidget_H
2 #define TemplateEditorWidget_H
3 
4 #include <QFile>
5 #include <QFrame>
6 #include <QPushButton>
7 #include <QString>
8 #include <QTextEdit>
9 #include <QTextStream>
10 
11 namespace Ui {
12  class TemplateEditorWidget;
13 }
14 
15 namespace Isis {
16  class Directory;
17  class Template;
18 
35  class TemplateEditorWidget : public QFrame {
36  Q_OBJECT
37 
38  public:
39  explicit TemplateEditorWidget(Template * currentTemplate, Directory *directory, QWidget *parent = 0);
40 
42 
43  public slots:
44  void saveText();
45  void saveAsText();
46  void saveOption();
47  void textChanged();
48 
49  private:
50  Ui::TemplateEditorWidget *m_ui;
51 
52  Directory *m_directory; // The directory of the open project
53  Template *m_template; // The template being modified
54  QString m_fileType; // The file type of the template ("Maps" or "Registrations")
55  bool m_textChanged; // Whether the text in the widget has been changed since last save
56  };
57 }
58 
59 
60 
61 #endif
QWidget
Isis::IException::Io
@ Io
A type of error that occurred when performing an actual I/O operation.
Definition: IException.h:155
Isis::Directory
Definition: Directory.h:271
Isis::TemplateEditorWidget::TemplateEditorWidget
TemplateEditorWidget(Template *currentTemplate, Directory *directory, QWidget *parent=0)
Definition: TemplateEditorWidget.cpp:17
QFileDialog
Directory.h
Isis::TemplateEditorWidget::saveText
void saveText()
Called when a user clicks the "Save" button.
Definition: TemplateEditorWidget.cpp:50
Isis::TemplateList
Definition: TemplateList.h:35
Isis::Directory::project
Project * project() const
Gets the Project for this directory.
Definition: Directory.cpp:1311
Isis::Project::addTemplates
void addTemplates(TemplateList *templateFiles)
Add new templates to m_mapTemplates or m_regTemplates and update project item model.
Definition: Project.cpp:1113
Isis::TemplateEditorWidget::~TemplateEditorWidget
~TemplateEditorWidget()
Definition: TemplateEditorWidget.cpp:38
TemplateEditorWidget.h
Isis::TemplateEditorWidget::saveAsText
void saveAsText()
Called when a user clicks the "Save As" button.
Definition: TemplateEditorWidget.cpp:68
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Isis::Template::fileName
QString fileName() const
Get the file name that this Template represents.
Definition: Template.cpp:50
Isis::Template
Definition: Template.h:30
Isis::TemplateEditorWidget::saveOption
void saveOption()
This slot is called when the widget is closed (either via the widget itself or on project close).
Definition: TemplateEditorWidget.cpp:161
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::Template::templateType
QString templateType() const
Get the type of template.
Definition: Template.cpp:59
Ui
Definition: JigsawRunWidget.h:15
IException.h
QFrame
Template.h
Isis::Project::addTemplateFolder
QDir addTemplateFolder(QString prefix)
Create and navigate to the appropriate template type folder in the project directory.
Definition: Project.cpp:1134
Isis::TemplateEditorWidget
Widget for displaying information about a target.
Definition: TemplateEditorWidget.h:35
Isis::Project::setClean
void setClean(bool value)
Function to change the clean state of the project.
Definition: Project.cpp:1595
Isis::TemplateEditorWidget::textChanged
void textChanged()
Slot called when text within widget has been changed.
Definition: TemplateEditorWidget.cpp:151
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16