#include <kshowmaildoc.h>
Public Slots | |
void | slotUpdateAllViews (KshowmailView *sender) |
Public Member Functions | |
KshowmailDoc (QWidget *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 KApplication and KMainWindow. 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.
Definition at line 45 of file kshowmaildoc.h.
KshowmailDoc::KshowmailDoc | ( | QWidget * | parent, | |
const char * | name = 0 | |||
) |
Constructor for the fileclass of the application
Definition at line 35 of file kshowmaildoc.cpp.
KshowmailDoc::~KshowmailDoc | ( | ) |
Destructor for the fileclass of the application
Definition at line 39 of file kshowmaildoc.cpp.
void KshowmailDoc::addView | ( | KshowmailView * | view | ) |
adds a view to the document which represents the document contents. Usually this is your main view.
Definition at line 43 of file kshowmaildoc.cpp.
References pView.
Referenced by KShowMailApp::initView().
void KshowmailDoc::removeView | ( | KshowmailView * | view | ) |
removes a view from the list of currently connected views
Definition at line 48 of file kshowmaildoc.cpp.
References pView.
bool KshowmailDoc::newDocument | ( | ) |
initializes the document generally
Definition at line 73 of file kshowmaildoc.cpp.
References doc_url.
Referenced by KShowMailApp::initDocument().
const KURL & KshowmailDoc::URL | ( | ) | const |
returns the KURL of the document
Definition at line 58 of file kshowmaildoc.cpp.
References doc_url.
void KshowmailDoc::setURL | ( | const KURL & | url | ) |
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.
Definition at line 64 of file kshowmaildoc.cpp.
References pView.
KshowmailView * KshowmailDoc::pView [static] |
the list of the views currently connected to the document
Definition at line 74 of file kshowmaildoc.h.
Referenced by addView(), removeView(), and slotUpdateAllViews().
KURL KshowmailDoc::doc_url [private] |
the modified flag of the current document
Definition at line 78 of file kshowmaildoc.h.
Referenced by newDocument(), setURL(), and URL().