File failed to load: https://isis.astrogeology.usgs.gov/3.9.0/Object/assets/jax/output/NativeMML/config.js
Isis 3 Developer Reference
GuiEditFile.h
Go to the documentation of this file.
1 #ifndef _GuiEditFile_h_
2 #define _GuiEditFile_h_
3 
4 #include <QAction>
5 #include <QFile>
6 #include <QObject>
7 #include <QMainWindow>
8 #include <QString>
9 #include <QTextEdit>
10 #include <QWidget>
11 
31 namespace Isis {
32  class UserInterface;
49  class GuiEditFile : public QObject {
50  Q_OBJECT
51  public:
53  static void EditFile(UserInterface & pUI, QString psFile="");
54 
56  void showWindow(QString psFile="");
57 
59  ~GuiEditFile();
60 
62  void clearFile();
63 
64  public slots:
65  void open();
66  void OpenFile(QString);
67  void setTextChanged();
68  void saveAs();
69  void saveAsFile(QString);
70  void saveFile();
71  void closeFile();
72  void closeWin();
73 
74  private:
76  GuiEditFile(UserInterface & pUI, QString psFile="");
77  void windowTitle(QString & psfile);
78 
79  static GuiEditFile* m_instance;
80  QWidget *m_parent;
81  QString m_fileName;
82  QMainWindow *m_editWin;
83  QTextEdit *m_txtEdit;
84  QFile *m_editFile;
85  bool m_textChanged;
86 
88  QAction *m_open;
89  QAction *m_save;
90  QAction *m_saveAs;
91  QAction *m_close;
92  QAction *m_exit;
93  };
94 
95 };
96 #endif
97 
void OpenFile(QString)
To display the contents of an opened file.
Definition: GuiEditFile.cpp:233
void saveFile()
For action File->Save.
Definition: GuiEditFile.cpp:271
void setTextChanged()
Indicator that the text has changed.
Definition: GuiEditFile.cpp:178
void closeWin()
For action Exit (close the window)
Definition: GuiEditFile.cpp:168
void saveAs()
For action File->Save As.
Definition: GuiEditFile.cpp:285
static void EditFile(UserInterface &pUI, QString psFile="")
Creates a single instance of the GuiEditFile.
Definition: GuiEditFile.cpp:32
void open()
For action File->Open.
Definition: GuiEditFile.cpp:187
~GuiEditFile()
Destructor.
Definition: GuiEditFile.cpp:149
void clearFile()
Delete the contents of a file.
Definition: GuiEditFile.cpp:323
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Command Line and Xml loader, validation, and access.
Definition: UserInterface.h:155
Opens a window in Gui Application to be able to edit, save and create text files. ...
Definition: GuiEditFile.h:49
void showWindow(QString psFile="")
If there is already an instance of this object, then display the window.
Definition: GuiEditFile.cpp:48
void saveAsFile(QString)
Save the contents of text editor to another file.
Definition: GuiEditFile.cpp:308
void closeFile()
For action File->Close.
Definition: GuiEditFile.cpp:212

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/12/2023 23:19:33