KParts
readwritepart.cpp
KJOBWIDGETS_EXPORT void setWindow(KJob *job, QWidget *widget)
RemoveFilename
bool waitSaveComplete()
Waits for any pending upload job to finish and returns whether the last save() action was successful...
Definition: readwritepart.cpp:300
bool remove()
ExcludeUserInputEvents
void urlChanged(const QUrl &url)
Emitted by the part when url() changes.
virtual bool save()
Save the file in the location from which it was opened.
Definition: readwritepart.cpp:139
virtual bool saveAs(const QUrl &url)
Save the file to a new location.
Definition: readwritepart.cpp:155
void setModified()
Call setModified() whenever the contents get modified.
Definition: readwritepart.cpp:66
virtual bool queryClose()
If the document has been modified, ask the user to save changes.
Definition: readwritepart.cpp:71
bool isEmpty() const const
QWidget * activeWindow()
void canceled(const QString &errMsg)
Emit this if loading is canceled by the user or by an error.
void sigQueryClose(bool *handled, bool *abortClosing)
set handled to true, if you don't want the default handling set abortClosing to true, if you handled the request, but for any reason don't want to allow closing the document
void setAutoRemove(bool b)
void setWindowCaption(const QString &caption)
Emitted by the part, to set the caption of the window(s) hosting this part.
ReadWritePart(QObject *parent=nullptr)
Constructor See parent constructor for instructions.
Definition: readwritepart.cpp:33
bool isEmpty() const const
KGuiItem discard()
QUrl getSaveFileUrl(QWidget *parent, const QString &caption, const QUrl &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options, const QStringList &supportedSchemes)
virtual QString fileName() const const override
~ReadWritePart() override
Destructor Applications using a ReadWritePart should make sure, before destroying it...
Definition: readwritepart.cpp:38
QString i18n(const char *text, const TYPE &arg...)
virtual bool closeUrl()
Called when closing the current URL (for example, a document), for instance when switching to another...
Definition: readonlypart.cpp:231
bool isValid() const const
const ushort * utf16() const const
ButtonCode warningYesNoCancel(QWidget *parent, const QString &text, const QString &caption=QString(), const KGuiItem &buttonYes=KStandardGuiItem::yes(), const KGuiItem &buttonNo=KStandardGuiItem::no(), const KGuiItem &buttonCancel=KStandardGuiItem::cancel(), const QString &dontAskAgainName=QString(), Options options=Notify)
virtual void setReadWrite(bool readwrite=true)
Changes the behavior of this part to readonly or readwrite.
Definition: readwritepart.cpp:46
KGuiItem save()
QUrl url() const
Returns the URL currently opened in (or being opened by) this part.
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
bool open()
QString fileName(QUrl::ComponentFormattingOptions options) const const
QByteArray encodeName(const QString &fileName)
QUrl fromLocalFile(const QString &localFile)
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Jan 14 2021 22:56:29 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Jan 14 2021 22:56:29 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.