kmail
KMail::FolderDiaTab Class Reference
This is the base class for tabs in the folder dialog. More...
#include <kmfolderdia.h>
Public Types | |
enum | AcceptStatus { Accepted, Canceled, Delayed } |
Signals | |
void | cancelAccept () |
void | changed (bool) |
void | readyForAccept () |
Public Member Functions | |
virtual AcceptStatus | accept () |
FolderDiaTab (QWidget *parent=0, const char *name=0) | |
virtual void | load ()=0 |
virtual bool | save ()=0 |
Detailed Description
This is the base class for tabs in the folder dialog.It uses the API from ConfigModuleTab (basically: it's a widget that can load and save) but it also adds support for delayed-saving: when save() needs to use async jobs (e.g. KIO) for saving, we need to delay the closing until after the jobs are finished, and to cancel the saving on error.
Feel free to rename and move this base class somewhere else if it can be useful for other dialogs.
Definition at line 70 of file kmfolderdia.h.
Member Enumeration Documentation
Constructor & Destructor Documentation
KMail::FolderDiaTab::FolderDiaTab | ( | QWidget * | parent = 0 , |
|
const char * | name = 0 | |||
) | [inline] |
Definition at line 74 of file kmfolderdia.h.
Member Function Documentation
virtual AcceptStatus KMail::FolderDiaTab::accept | ( | ) | [inline, virtual] |
Called when clicking OK.
If a module returns Delayed, the closing is cancelled for now, and the module can close the dialog later on (i.e. after an async operation like a KIO job).
Reimplemented in KMail::FolderDiaACLTab, and KMail::FolderDiaQuotaTab.
Definition at line 90 of file kmfolderdia.h.
void KMail::FolderDiaTab::cancelAccept | ( | ) | [signal] |
Emit this, i.e.
after a job had an error, to tell the dialog to cancel the closing.
void KMail::FolderDiaTab::changed | ( | bool | ) | [signal] |
Called when this module was changed [not really used yet].
virtual void KMail::FolderDiaTab::load | ( | ) | [pure virtual] |
Implemented in KMail::FolderDiaACLTab, KMail::FolderDiaQuotaTab, KMail::FolderDiaGeneralTab, and KMail::FolderDiaTemplatesTab.
void KMail::FolderDiaTab::readyForAccept | ( | ) | [signal] |
Emit this to tell the dialog that you're done with the async jobs, and that the dialog can be closed.
virtual bool KMail::FolderDiaTab::save | ( | ) | [pure virtual] |
Unlike ConfigModuleTab, we return a bool from save.
This allows to cancel closing on error. When called from the Apply button, the return value is ignored
- Returns:
- whether save succeeded
Implemented in KMail::FolderDiaACLTab, KMail::FolderDiaQuotaTab, KMail::FolderDiaGeneralTab, and KMail::FolderDiaTemplatesTab.
The documentation for this class was generated from the following file: