|
Krita Source Code Documentation
|
The dialog that shows information about the document. More...
#include <KoDocumentInfoDlg.h>
Inheritance diagram for KoDocumentInfoDlg:Classes | |
| class | KoDocumentInfoDlgPrivate |
Public Slots | |
| void | accept () override |
Signals | |
| void | saveRequested () |
Public Member Functions | |
| void | addPageItem (KoPageWidgetItem *item) |
| bool | isDocumentSaved () |
| KoDocumentInfoDlg (QWidget *parent, KoDocumentInfo *docInfo) | |
| QList< KPageWidgetItem * > | pages () const |
| void | setReadOnly (bool ro) |
| ~KoDocumentInfoDlg () override | |
Protected Member Functions | |
| void | hideEvent (QHideEvent *event) override |
Private Slots | |
| void | slotResetMetaData () |
Private Member Functions | |
| void | initAboutTab () |
| void | initAuthorTab () |
| void | saveAboutData () |
| void | updateEditingTime () |
Private Attributes | |
| KoDocumentInfoDlgPrivate *const | d |
The dialog that shows information about the document.
This dialog is invoked by KoMainWindow and shows the content of the given KoDocumentInfo class. It consists of several pages, one showing general information about the document and another showing information about the author. This dialog implements only things that are stored in the OASIS meta.xml file and therefore available through the KoDocumentInfo class. The widgets shown in the tabs are koDocumentInfoAboutWidget and koDocumentInfoAuthorWidget. This class here is derived from KPageDialog and uses the face type Tabbed.
Definition at line 39 of file KoDocumentInfoDlg.h.
| KoDocumentInfoDlg::KoDocumentInfoDlg | ( | QWidget * | parent, |
| KoDocumentInfo * | docInfo ) |
The constructor
| parent | a pointer to the parent widget |
| docInfo | a pointer to the shown KoDocumentInfo |
Definition at line 67 of file KoDocumentInfoDlg.cpp.
References KoDocumentInfoDlg::KoDocumentInfoDlgPrivate::aboutUi, KoDocumentInfoDlg::KoDocumentInfoDlgPrivate::authorUi, button(), d, KisMimeDatabase::iconNameForMimeType(), KoDocumentInfoDlg::KoDocumentInfoDlgPrivate::info, initAboutTab(), initAuthorTab(), koIcon, KisIconUtils::loadIcon(), KisDocument::mimeType, and KoDocumentInfoDlg::KoDocumentInfoDlgPrivate::pages.
|
override |
The destructor
Definition at line 123 of file KoDocumentInfoDlg.cpp.
References KoDocumentInfoDlg::KoDocumentInfoDlgPrivate::aboutUi, KoDocumentInfoDlg::KoDocumentInfoDlgPrivate::authorUi, and d.
|
overrideslot |
Definition at line 130 of file KoDocumentInfoDlg.cpp.
References KoPageWidgetItemAdapter::apply(), d, KoDocumentInfoDlg::KoDocumentInfoDlgPrivate::pages, saveAboutData(), and KoPageWidgetItemAdapter::shouldDialogCloseBeVetoed().
| void KoDocumentInfoDlg::addPageItem | ( | KoPageWidgetItem * | item | ) |
Definition at line 274 of file KoDocumentInfoDlg.cpp.
References d, and KoDocumentInfoDlg::KoDocumentInfoDlgPrivate::pages.
|
overrideprotected |
Definition at line 229 of file KoDocumentInfoDlg.cpp.
|
private |
Sets up the aboutWidget and fills the widgets with content
Definition at line 159 of file KoDocumentInfoDlg.cpp.
References KoDocumentInfo::aboutInfo(), KoDocumentInfoDlg::KoDocumentInfoDlgPrivate::aboutUi, KoDocumentInfo::authorInfo(), connect(), d, KisMimeDatabase::descriptionForMimeType(), KoDocumentInfoDlg::KoDocumentInfoDlgPrivate::info, KisDocument::localFilePath(), KisDocument::mimeType, slotResetMetaData(), and updateEditingTime().
|
private |
Sets up the authorWidget and fills the widgets with content
Definition at line 203 of file KoDocumentInfoDlg.cpp.
References KoDocumentInfo::authorContactInfo(), KoDocumentInfo::authorInfo(), KoDocumentInfoDlg::KoDocumentInfoDlgPrivate::authorUi, d, and KoDocumentInfoDlg::KoDocumentInfoDlgPrivate::info.
| bool KoDocumentInfoDlg::isDocumentSaved | ( | ) |
Returns true if the document was saved when the dialog was closed
Definition at line 154 of file KoDocumentInfoDlg.cpp.
References d, and KoDocumentInfoDlg::KoDocumentInfoDlgPrivate::documentSaved.
| QList< KPageWidgetItem * > KoDocumentInfoDlg::pages | ( | ) | const |
Definition at line 255 of file KoDocumentInfoDlg.cpp.
References d, and KoDocumentInfoDlg::KoDocumentInfoDlgPrivate::pages.
|
private |
Saves the changed data back to the KoDocumentInfo class
Definition at line 220 of file KoDocumentInfoDlg.cpp.
References KoDocumentInfoDlg::KoDocumentInfoDlgPrivate::aboutUi, d, KoDocumentInfoDlg::KoDocumentInfoDlgPrivate::info, and KoDocumentInfo::setAboutInfo().
|
signal |
| void KoDocumentInfoDlg::setReadOnly | ( | bool | ro | ) |
Sets all fields to read-only mode. Used by the property dialog.
Definition at line 260 of file KoDocumentInfoDlg.cpp.
References KoDocumentInfoDlg::KoDocumentInfoDlgPrivate::aboutUi, d, and KoDocumentInfoDlg::KoDocumentInfoDlgPrivate::pages.
|
privateslot |
Connected with clicked() from pbReset - Reset parts of the metadata
Definition at line 234 of file KoDocumentInfoDlg.cpp.
References KoDocumentInfo::aboutInfo(), KoDocumentInfoDlg::KoDocumentInfoDlgPrivate::aboutUi, KoDocumentInfo::authorInfo(), d, KoDocumentInfoDlg::KoDocumentInfoDlgPrivate::info, and KoDocumentInfo::resetMetaData().
|
private |
Definition at line 282 of file KoDocumentInfoDlg.cpp.
References KoDocumentInfo::aboutInfo(), KoDocumentInfoDlg::KoDocumentInfoDlgPrivate::aboutUi, d, and KoDocumentInfoDlg::KoDocumentInfoDlgPrivate::info.
|
private |
Definition at line 88 of file KoDocumentInfoDlg.h.