#include <klflibentryeditor.h>
Public Slots | |
void | displayEntry (const KLFLibEntry &entry) |
void | displayEntries (const QList< KLFLibEntry > &entries) |
void | setInputEnabled (bool enabled) |
void | retranslateUi (bool alsoBaseUi=true) |
Signals | |
void | metaInfoChanged (const QMap< int, QVariant > &props) |
void | restoreStyle (const KLFStyle &style) |
Public Member Functions | |
KLFLibEntryEditor (QWidget *parent=NULL) | |
virtual | ~KLFLibEntryEditor () |
void | addCategorySuggestions (const QStringList &categorylist) |
virtual bool | eventFilter (QObject *object, QEvent *event) |
bool | metaInfoModified () const |
Protected Slots | |
void | slotUpdateFromCbx (QComboBox *cbx) |
void | on_btnApplyChanges_clicked () |
void | on_btnRestoreStyle_clicked () |
void | slotApplyChanges () |
void | slotApplyChanges (bool category, bool tags) |
void | slotModified (bool modif=true) |
void | slotCbxSaveCurrentCompletion (QComboBox *cbx) |
void | slotCbxCleanUpCompletions (QComboBox *cbx) |
Definition at line 36 of file klflibentryeditor.h.
KLFLibEntryEditor::KLFLibEntryEditor | ( | QWidget * | parent = NULL | ) |
Definition at line 45 of file klflibentryeditor.cpp.
References klfconfig, KLFConfig::labelOutputFixedSize, KLFConfig::preambleEditFont, slotModified(), and KLFConfig::UI.
KLFLibEntryEditor::~KLFLibEntryEditor | ( | ) | [virtual] |
Definition at line 89 of file klflibentryeditor.cpp.
void KLFLibEntryEditor::addCategorySuggestions | ( | const QStringList & | categorylist | ) |
Definition at line 110 of file klflibentryeditor.cpp.
References slotCbxCleanUpCompletions().
void KLFLibEntryEditor::displayEntries | ( | const QList< KLFLibEntry > & | entries | ) | [slot] |
Handles the selection of multiple items properly by displaying [Multiple items selected] whenever needed.
Definition at line 122 of file klflibentryeditor.cpp.
References KLFLibEntry::category(), KLFConfig::glowEffect, KLFConfig::glowEffectColor, KLFConfig::glowEffectRadius, QString::isEmpty(), klfconfig, KLFLibEntry::latex(), KLFLibEntry::preview(), QList::size(), slotModified(), QWidget::style(), KLFLibEntry::style(), KLFLibEntry::tags(), and KLFConfig::UI.
Referenced by displayEntry().
void KLFLibEntryEditor::displayEntry | ( | const KLFLibEntry & | entry | ) | [slot] |
Definition at line 117 of file klflibentryeditor.cpp.
References displayEntries().
Definition at line 94 of file klflibentryeditor.cpp.
References QKeyEvent::key(), slotUpdateFromCbx(), and QEvent::type().
Emitted when user clicks the "Apply" button after having edited category/tags, or hits return. The props
are given as a map of KLFLibEntry-property IDs with their corresponding new values.
Referenced by slotApplyChanges().
bool KLFLibEntryEditor::metaInfoModified | ( | ) | const [inline] |
Definition at line 47 of file klflibentryeditor.h.
void KLFLibEntryEditor::on_btnApplyChanges_clicked | ( | ) | [protected, slot] |
Definition at line 266 of file klflibentryeditor.cpp.
References slotApplyChanges().
void KLFLibEntryEditor::on_btnRestoreStyle_clicked | ( | ) | [protected, slot] |
Definition at line 289 of file klflibentryeditor.cpp.
References restoreStyle().
void KLFLibEntryEditor::restoreStyle | ( | const KLFStyle & | style | ) | [signal] |
Referenced by on_btnRestoreStyle_clicked().
void KLFLibEntryEditor::retranslateUi | ( | bool | alsoBaseUi = true | ) | [slot] |
Definition at line 84 of file klflibentryeditor.cpp.
void KLFLibEntryEditor::setInputEnabled | ( | bool | enabled | ) | [slot] |
Globally enable or disable input. Individual fields may still be disabled for example if more than one entry is selected.
Definition at line 240 of file klflibentryeditor.cpp.
void KLFLibEntryEditor::slotApplyChanges | ( | bool | category, |
bool | tags | ||
) | [protected, slot] |
Definition at line 270 of file klflibentryeditor.cpp.
References KLFLibEntry::Category, QMap::isEmpty(), klfDbg, metaInfoChanged(), slotCbxSaveCurrentCompletion(), and KLFLibEntry::Tags.
void KLFLibEntryEditor::slotApplyChanges | ( | ) | [inline, protected, slot] |
Updates the changes done to category and tags, for which the corresponding argument is true
. eg. slotApplyChanges(true,false)
will update category but not tags.
Definition at line 84 of file klflibentryeditor.h.
References slotApplyChanges().
Referenced by on_btnApplyChanges_clicked(), slotApplyChanges(), and slotUpdateFromCbx().
void KLFLibEntryEditor::slotCbxCleanUpCompletions | ( | QComboBox * | cbx | ) | [protected, slot] |
Definition at line 300 of file klflibentryeditor.cpp.
References QComboBox::addItems(), QStringList::contains(), QComboBox::itemText(), QComboBox::removeItem(), QComboBox::setEditText(), and QStringList::sort().
Referenced by addCategorySuggestions(), and slotCbxSaveCurrentCompletion().
void KLFLibEntryEditor::slotCbxSaveCurrentCompletion | ( | QComboBox * | cbx | ) | [protected, slot] |
Definition at line 294 of file klflibentryeditor.cpp.
References QComboBox::addItem(), and slotCbxCleanUpCompletions().
Referenced by slotApplyChanges().
void KLFLibEntryEditor::slotModified | ( | bool | modif = true | ) | [protected, slot] |
Definition at line 245 of file klflibentryeditor.cpp.
Referenced by displayEntries(), and KLFLibEntryEditor().
void KLFLibEntryEditor::slotUpdateFromCbx | ( | QComboBox * | cbx | ) | [protected, slot] |
Definition at line 252 of file klflibentryeditor.cpp.
References slotApplyChanges().
Referenced by eventFilter().