|
Krita Source Code Documentation
|
The KisRecoverNamedAutosaveDialog class is a dialog to recover already existing files from autosave. More...
#include <KisRecoverNamedAutosaveDialog.h>
Inheritance diagram for KisRecoverNamedAutosaveDialog:Public Types | |
| enum | ResultType { OpenAutosave , OpenMainFile , Cancel } |
| The ResultType enum represents three possible decisions for the user. More... | |
Public Member Functions | |
| KisRecoverNamedAutosaveDialog (QWidget *parent=0, QString mainFile="", QString autosaveFile="") | |
| KisRecoverNamedAutosaveDialog basic constructor. | |
| ~KisRecoverNamedAutosaveDialog () override | |
| ~KisRecoverNamedAutosaveDialog basic destructor | |
Private Slots | |
| void | slotCancelRequested () |
| slotCancelRequested sets the correct result of the dialog in case the user pressed Cancel button and closes the dialog | |
| void | slotOkRequested () |
| slotOkRequested sets the correct result of the dialog in case the user pressed OK button and closes the dialog | |
Private Attributes | |
| Ui::KisRecoverNamedAutosaveDialog * | ui |
The KisRecoverNamedAutosaveDialog class is a dialog to recover already existing files from autosave.
When the user saves a file, then works on it a bit more, and then Krita crashes or something else unexpected happens that makes it impossible to close Krita correctly, often there is an autosave left behind in the directory of the file. This dialog allows choosing whether to open the autosaved file or the original file.
Definition at line 24 of file KisRecoverNamedAutosaveDialog.h.
The ResultType enum represents three possible decisions for the user.
OpenAutosave = open the autosaved file OpenMainFile = discard the autosave and open the original file Cancel = Do nothing
| Enumerator | |
|---|---|
| OpenAutosave | |
| OpenMainFile | |
| Cancel | |
Definition at line 36 of file KisRecoverNamedAutosaveDialog.h.
|
explicit |
KisRecoverNamedAutosaveDialog basic constructor.
| parent | parent widget |
| mainFile | path to the main file (used to create a thumbnail) |
| autosaveFile | path to the autosaved file (used to create a thumbnail) |
Definition at line 19 of file KisRecoverNamedAutosaveDialog.cpp.
References connect(), KisFileIconCreator::createFileIcon(), slotCancelRequested(), slotOkRequested(), and ui.
|
override |
~KisRecoverNamedAutosaveDialog basic destructor
Definition at line 53 of file KisRecoverNamedAutosaveDialog.cpp.
References ui.
|
privateslot |
slotCancelRequested sets the correct result of the dialog in case the user pressed Cancel button and closes the dialog
This is a slot for button pressed signal for the Cancel button. It sets the result to Cancel. Then it closes the dialog.
Definition at line 64 of file KisRecoverNamedAutosaveDialog.cpp.
References Cancel.
|
privateslot |
slotOkRequested sets the correct result of the dialog in case the user pressed OK button and closes the dialog
This is a slot for button pressed signal for the OK button. It sets the result to either OpenMainFile or OpenAutosave, depending on which radio button is checked. Then it closes the dialog.
Definition at line 58 of file KisRecoverNamedAutosaveDialog.cpp.
References OpenAutosave, OpenMainFile, and ui.
|
private |
Definition at line 75 of file KisRecoverNamedAutosaveDialog.h.