Blokkal::Ui::EditEntryWidget Class Reference
Widgets used to edit entries. More...
#include <editentrywidget.h>
Public Slots | |
void | rollBack (void) |
Signals | |
void | captionChanged (const QString &newCaption) |
void | contentsChanged (void) |
void | destroyCategory (const QString &removeCategoryId) |
void | newCategory (const QString &newCategoryString) |
Public Member Functions | |
Blokkal::Entry * | apply (void) |
QString | caption (void) const |
EditEntryWidget (Blokkal::Entry *entry, QWidget *parentWidget=0) | |
Blokkal::Entry * | entry (void) const |
Blokkal::Ui::EntryExtensionWidget * | extensionWidget (EntryExtensionWidget::ExtensionWidget extension) const |
Blokkal::Ui::FormattingBackend * | formattingBackend (void) const |
void | hideFeature (unsigned int features) |
bool | isContentLegal (void) |
void | setCaption (const QString &caption) |
~EditEntryWidget (void) | |
Protected Member Functions | |
Blokkal::Ui::HtmlEntryTextEdit * | entryTextEdit (void) const |
Friends | |
class | View |
Detailed Description
Widgets used to edit entries.This widget provides inputs for basic entry properties such as date, subject, body text and categories. The constructor calls Blog::supportedFeatures() to determine which properties are actually supported by the entry and hides/disables the corresponding widgets if necessary. The functionality of this widget may be extended by two ways: either with Blokkal::Ui::FormattingBackend or with Blokkal::Ui::EntryExtensionWidget. The latter are returned by Entry::createExtensionWidget(). The constructor calls that method and adds all returned widgets to the appropriate locations in the layout. The Blokkal::Ui::FormattingBackend returned by Blokkal::Protocol is used to add special markup tags (or other actions) to the GUI of the owning view. The Blokkal::Ui::FormattingBackend will be registered as a child KDEXMLGUIClient of this widget.
- Note:
- The internal entry is not destroyed, when the widget is destroyed.
Definition at line 57 of file editentrywidget.h.
Constructor & Destructor Documentation
Blokkal::Ui::EditEntryWidget::EditEntryWidget | ( | Blokkal::Entry * | entry, | |
QWidget * | parentWidget = 0 | |||
) |
Creates a new EditEntryWidget.
- Note:
- setInstance() will be called in this constructor with the instance of the protocol plugin.
- Parameters:
-
entry the entry to edit parentWidget the parentWidget
Definition at line 108 of file editentrywidget.cpp.
Blokkal::Ui::EditEntryWidget::~EditEntryWidget | ( | void | ) |
Destroys the widget
Definition at line 339 of file editentrywidget.cpp.
Member Function Documentation
Blokkal::Entry * Blokkal::Ui::EditEntryWidget::apply | ( | void | ) |
Applies all changes to the Entry object and returns it.
- Returns:
- the modified Blokkal::Entry object
Definition at line 356 of file editentrywidget.cpp.
void Blokkal::Ui::EditEntryWidget::captionChanged | ( | const QString & | newCaption | ) | [signal] |
This signal is emitted whenever the content of this widget has been modified in a fassion that affects the caption.
void Blokkal::Ui::EditEntryWidget::contentsChanged | ( | void | ) | [signal] |
This signal is emitted whenever the content of the widget has been modified somehow. This means, that apply() might result in a modified entry.
void Blokkal::Ui::EditEntryWidget::destroyCategory | ( | const QString & | removeCategoryId | ) | [signal] |
This signal is emitted when the user has selected a category to be removed. If your entry does not specify that it supports category removal this signal will no be emitted. When this signal is emitted it is up to you to initiate the necessary actions.
Blokkal::Entry * Blokkal::Ui::EditEntryWidget::entry | ( | void | ) | const |
Returns the entry without updating any values to the contents of the input widgets or altering it otherwise.
- Returns:
- the entry
Definition at line 351 of file editentrywidget.cpp.
Blokkal::Ui::HtmlEntryTextEdit * Blokkal::Ui::EditEntryWidget::entryTextEdit | ( | void | ) | const [protected] |
Blokkal::Ui::EntryExtensionWidget * Blokkal::Ui::EditEntryWidget::extensionWidget | ( | EntryExtensionWidget::ExtensionWidget | extension | ) | const |
Returns the specified extension widget or 0 if no such widget exists.
- Parameters:
-
extension the identifier of the wxtension widget to return
- Returns:
- the specified extension widget
Definition at line 454 of file editentrywidget.cpp.
Blokkal::Ui::FormattingBackend * Blokkal::Ui::EditEntryWidget::formattingBackend | ( | void | ) | const |
void Blokkal::Ui::EditEntryWidget::hideFeature | ( | unsigned int | features | ) |
Hides the features specified by features, which is an or'ed list of Blog::EntryFeatures values. All other features will be shown. features features to be shown
Definition at line 539 of file editentrywidget.cpp.
bool Blokkal::Ui::EditEntryWidget::isContentLegal | ( | void | ) |
This method is used to tell the view whether the entry in this widget may be posted or not
- Returns:
- TRUE if the entry may be posted
Definition at line 477 of file editentrywidget.cpp.
void Blokkal::Ui::EditEntryWidget::newCategory | ( | const QString & | newCategoryString | ) | [signal] |
This signal is emitted when the user has entered a new category. If your entry does not specify that it supports category adding this signal will no be emitted. When this signal is emitted it is up to you to initiate the necessary actions. newCategoryString may contain any string.
void Blokkal::Ui::EditEntryWidget::rollBack | ( | void | ) | [slot] |
Resets the contents of all inputs widgets to the values of the Entry object. This method does also call the rollBack() methods of all EntryExtensionWidgets.
Definition at line 505 of file editentrywidget.cpp.
The documentation for this class was generated from the following files: