|
|
Base class for an "editor" part.
This class handles network transparency for you. Anything that can open a URL, allow modifications, and save (to the same URL or a different one).
A read-write part can be set to read-only mode, using setReadWrite.
Part writers : Any part inheriting ReadWritePart should check isReadWrite before allowing any action that modifies the part. The part probably wants to reimplement setReadWrite, disable those actions. Don't forget to call the parent setReadWrite.
|
Constructor See parent constructor for instructions.
~ |
[virtual]
Destructor Applications using a ReadWritePart should make sure, before destroying it, to call closeURL(). In queryClose, for instance, they should allow closing only if the return value of closeURL was true. This allows to cancel.
bool |
[virtual]
Returns: true if the part is in read-write mode
void |
[virtual]
Changes the behaviour of this part to readonly or readwrite.
Parameters:
readwrite | set to true to enable readwrite mode |
bool |
[const virtual]
Returns: true if the document has been modified.
bool |
[virtual]
Called when closing the current url (e.g. document), for instance when switching to another url (note that openURL calls it automatically in this case). If the current URL is not fully loaded yet, aborts loading. Reimplemented from ReadOnlyPart, to handle modified parts (and suggest saving in this case, with yes/no/cancel).
Returns: false on cancel
Reimplemented from ReadOnlyPart
bool |
[virtual]
Save the file to a new location.
Calls save(), no need to reimplement
void |
[virtual]
Sets the modified flag of the part.
void |
[virtual slot]
Call setModified() whenever the contents get modified. This is a slot for convenience, so that you can connect it to a signal, like textChanged().
bool |
[virtual slot]
Save the file in the location from which it was opened. You can connect this to the "save" action. Calls saveFile and saveToURL, no need to reimplement.
bool |
[protected pure virtual]
Save to a local file.
You need to implement it, to save to m_file
.
The framework takes care of re-uploading afterwards.
bool |
[protected virtual]
Save the file.
Uploads the file, if m_url
is remote.
This will emit started(), and either completed() or canceled(),
in case you want to provide feedback.
Generated by: dfaure@faure on Sun Mar 26 14:24:54 2000, using kdoc 2.0a35. |