|
|
// -*- c++ -*- #ifndef DOCUMENT_H #define DOCUMENT_H #include#include #include class DocType; /** * Represents a single document. * * @author Richard Moore, rich@kde.org * @version $Id: document_h.html,v 1.1.1.1 2001/11/29 18:18:34 rich Exp $ */ class Document : public QObject { Q_OBJECT public: /** Creates a null document. */ Document( QObject *parent=0, const char *name=0 ); /** Creates a document for the content of the specified URL. */ Document( const KURL &url, QObject *parent=0, const char *name=0 ); ~Document(); /** Location of this document. */ KURL url() const { return docurl; } /** Load the url of this document. */ bool openURL( const KURL &url ); /** Returns true iff the document is null. */ bool isNull() const { return nulldocument; } /** Returns true iff this document differs from the on-disk copy. */ bool isModified() const { return modified; } /** Set the modified state of this document. */ void setModified( bool changed = true ); /** Returns DocType of this document, or 0 if the document is null. */ DocType *docType() const { return doctype; } /** Returns the MIME type of this document. */ KMimeType::Ptr mimeType() const { return mime; } /** Returns the document text. */ QString text() const; signals: /** Emitted when the modified flag changes. */ void modifiedChanged( bool ); private: bool nulldocument; KURL docurl; bool modified; KMimeType::Ptr mime; DocType *doctype; }; #endif // DOCUMENT_H // Local Variables: // c-basic-offset: 4 // End:
Generated by: rich on pegasus on Fri Nov 9 01:30:42 2001, using kdoc 2.0a53. |