#include <kshowmaildoc.h>
Public Slots | |
void | slotUpdateAllViews (KshowmailView *sender) |
Public Member Functions | |
KshowmailDoc (TQWidget *parent, const char *name=0) | |
~KshowmailDoc () | |
void | addView (KshowmailView *view) |
void | removeView (KshowmailView *view) |
bool | newDocument () |
const KURL & | URL () const |
void | setURL (const KURL &url) |
Static Public Attributes | |
static KshowmailView * | pView |
Private Attributes | |
KURL | doc_url |
The KshowmailDoc class provides a document object that can be used in conjunction with the classes KshowmailApp and KshowmailView to create a document-view model for standard KDE applications based on TDEApplication and TDEMainWindow. Thereby, the document object is created by the KshowmailApp instance and contains the document structure with the according methods for manipulation of the document data by KshowmailView objects. Also, KshowmailDoc contains the methods for serialization of the document data from and to files.
KshowmailDoc::KshowmailDoc | ( | TQWidget * | parent, | |
const char * | name = 0 | |||
) |
Constructor for the fileclass of the application
KshowmailDoc::~KshowmailDoc | ( | ) |
Destructor for the fileclass of the application
void KshowmailDoc::addView | ( | KshowmailView * | view | ) |
adds a view to the document which represents the document contents. Usually this is your main view.
void KshowmailDoc::removeView | ( | KshowmailView * | view | ) |
removes a view from the list of currently connected views
bool KshowmailDoc::newDocument | ( | ) |
initializes the document generally
const KURL & KshowmailDoc::URL | ( | ) | const |
returns the KURL of the document
void KshowmailDoc::setURL | ( | const KURL & | url | ) |
sets the URL of the document
void KshowmailDoc::slotUpdateAllViews | ( | KshowmailView * | sender | ) | [slot] |
calls repaint() on all views connected to the document object and is called by the view by which the document has been changed. As this view normally repaints itself, it is excluded from the paintEvent.
KshowmailView * KshowmailDoc::pView [static] |
the list of the views currently connected to the document
KURL KshowmailDoc::doc_url [private] |
the modified flag of the current document