ReadOnlyFilesDialog Class
class Core::ReadOnlyFilesDialogThe ReadOnlyFilesDialog class implements a dialog to show a set of files that are classified as not writable. More...
Header: | #include <ReadOnlyFilesDialog> |
Inherits: | QDialog |
Public Types
enum | ReadOnlyResult { RO_Cancel, RO_OpenVCS, RO_MakeWritable, RO_SaveAs } |
Public Functions
void | setMessage(const QString &message) |
void | setShowFailWarning(bool show, const QString &warning = QString()) |
Reimplemented Public Functions
virtual int | exec() override |
Detailed Description
\inmodule
QtCreator \internal
Automatically checks which operations are allowed to make the file writable. These operations are MakeWritable
(RO_MakeWritable), which tries to set the file permissions in the file system, OpenWithVCS
(RO_OpenVCS) if the open operation is allowed by the version control system, and SaveAs
(RO_SaveAs), which is used to save the changes to a document under another file name.
Member Type Documentation
enum ReadOnlyFilesDialog::ReadOnlyResult
This enum holds the operations that are allowed to make the file writable.
Constant | Value | Description |
---|---|---|
Core::ReadOnlyFilesDialog::RO_Cancel | -1 | Cancels the operation. |
Core::ReadOnlyFilesDialog::RO_OpenVCS | OpenWithVCS | Opens the file under control of the version control system. |
Core::ReadOnlyFilesDialog::RO_MakeWritable | MakeWritable | Sets the file permissions in the file system. |
Core::ReadOnlyFilesDialog::RO_SaveAs | SaveAs | Saves changes to a document under another file name. |
Member Function Documentation
[override virtual]
int ReadOnlyFilesDialog::exec()
Reimplements: QDialog::exec().
Executes the ReadOnlyFilesDialog dialog. Returns ReadOnlyResult to provide information about the operation that was used to make the files writable.
\internal
Also displays an error dialog when some operations cannot be executed and the function setShowFailWarning()
was called.
void ReadOnlyFilesDialog::setMessage(const QString &message)
Sets a user defined message in the dialog. \internal
void ReadOnlyFilesDialog::setShowFailWarning(bool show, const QString &warning = QString())
Enables the error output to the user via a message box. warning should show the possible consequences if the file is still read only. \internal