9#include <QFileSystemModel>
12#include <QPlainTextEdit>
105 bool loadFileUtf8(
const QString& filePath, QString& outText, QString* outError)
const;
Definition file_menu_proxy.h:8
QPlainTextEdit * mEditor
Text editor used to display and edit file contents.
Definition file_menu.h:114
void fileSaved(const QString &path)
Emitted when a file has been successfully saved.
QString mRootDir
Root directory containing generated files.
Definition file_menu.h:107
QAction * mSaveAction
Action for saving the current file.
Definition file_menu.h:116
bool saveCurrent()
Saves the current file to disk.
Definition file_menu.cpp:135
QFileSystemModel * mModel
File system model backing the tree view.
Definition file_menu.h:110
bool isLikelyTextFile(const QString &filePath) const
Heuristically determines whether a file is likely a text file.
Definition file_menu.cpp:220
bool maybeSaveCurrent()
Prompts the user to save changes if the current file is modified.
Definition file_menu.cpp:118
GeneratedFilesPanel(QWidget *parent=nullptr)
Constructs the generated files panel.
Definition file_menu.cpp:12
bool loadFileUtf8(const QString &filePath, QString &outText, QString *outError) const
Loads a file as UTF-8 text.
Definition file_menu.cpp:237
void setCurrentFile(const QString &filePath)
Sets the currently active file in the editor.
Definition file_menu.cpp:215
FileTypeProxyModel * mProxy
Proxy model used for filtering/sorting file types.
Definition file_menu.h:111
void openPathInEditor(const QString &filePath)
Opens a file in the internal editor.
Definition file_menu.cpp:174
void setGenerationRoot(const QString &dir)
Sets the root directory for generated files.
Definition file_menu.cpp:92
QAction * mRevertAction
Action for reverting changes to the current file.
Definition file_menu.h:117
QString mCurrentFile
Path of the currently opened file.
Definition file_menu.h:108
void openExternallyRequested(QPlainTextEdit *textEditor)
Emitted when the user requests to open the current file externally.
QAction * mOpenExternalAction
Action for opening the file in an external editor.
Definition file_menu.h:118