//Auto-generated by kalyptus. DO NOT EDIT. package org.kde.koala; import org.kde.qt.Qt; import org.kde.qt.TQMetaObject; import org.kde.qt.QtSupport; import org.kde.qt.TQObject; /** 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(). See {@link ReadWritePartSignals} for signals emitted by ReadWritePart @short Base class for an "editor" part. */ public class ReadWritePart extends ReadOnlyPart { protected ReadWritePart(Class dummy){super((Class) null);} public native TQMetaObject metaObject(); public native String className(); /** Constructor. See parent constructor for instructions. @short Constructor. */ /** @return true if the part is in read-write mode @short */ public native boolean isReadWrite(); /** Changes the behavior of this part to readonly or readwrite. @param readwrite set to true to enable readwrite mode @short Changes the behavior of this part to readonly or readwrite. */ public native void setReadWrite(boolean readwrite); public native void setReadWrite(); /** @return true if the document has been modified. @short */ public native boolean isModified(); /** If the document has been modified, ask the user to save changes. This method is meant to be called from KMainWindow.queryClose(). It will also be called from closeURL(). @return true if closeURL() can be called without the user losing important data, false if the user chooses to cancel. @short If the document has been modified, ask the user to save changes. */ public native boolean queryClose(); /** 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. If isModified(), queryClose() will be called. @return false on cancel @short Called when closing the current url (e. */ public native boolean closeURL(); /** Call this method instead of the above if you need control if the save prompt is shown. For example, if you call queryClose() from KMainWindow.queryClose(), you would not want to prompt again when closing the url. Equivalent to promptToSave ? closeURL() : ReadOnlyPart.closeURL() @short Call this method instead of the above if you need control if the save prompt is shown. */ public native boolean closeURL(boolean promptToSave); /** Save the file to a new location. Calls save(), no need to reimplement @short Save the file to a new location. */ public native boolean saveAs(KURL url); /** Sets the modified flag of the part. @short Sets the modified flag of the part. */ public native void setModified(boolean modified); /** Call setModified() whenever the contents get modified. This is a slot for convenience, so that you can connect it to a signal, like textChanged(). @short Call setModified() whenever the contents get modified. */ public native void setModified(); /** 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. @short Save the file in the location from which it was opened. */ public native boolean save(); /** Waits for any pending upload job to finish and returns whether the last save() action was successful. @short Waits for any pending upload job to finish and returns whether the last save() action was successful. */ public native boolean waitSaveComplete(); }