kwave
18.07.70
|
#include <KeywordWidget.h>
Signals | |
void | autoGenerate () |
Public Member Functions | |
KeywordWidget (QWidget *parent) | |
virtual | ~KeywordWidget () Q_DECL_OVERRIDE |
QStringList | keywords () |
void | setKeywords (const QStringList &keywords) |
Protected Member Functions | |
bool | contained (const QString &item) |
void | update () |
virtual bool | eventFilter (QObject *sender, QEvent *event) Q_DECL_OVERRIDE |
Private Slots | |
void | editChanged (const QString &) |
void | returnPressed () |
void | add () |
void | remove () |
void | listClicked (QListWidgetItem *item) |
void | autoClicked () |
Re-implemented and slightly modified version of a KEditListBox. All items in the list are unique and sorted alphabetically, leading and trailing whitespaces are removed. An additional "Auto" button is provided for populating the list with automatically generated entries.
Definition at line 40 of file KeywordWidget.h.
|
explicit |
Constructor
Definition at line 29 of file KeywordWidget.cpp.
References add(), autoClicked(), Kwave::connect(), editChanged(), listClicked(), and update().
|
virtual |
|
privateslot |
add an entry to the list
Definition at line 149 of file KeywordWidget.cpp.
References contained(), and update().
Referenced by eventFilter(), KeywordWidget(), and returnPressed().
|
privateslot |
forwards the click of the "Auto" button
Definition at line 198 of file KeywordWidget.cpp.
References autoGenerate().
Referenced by KeywordWidget().
|
signal |
emitted if the user pressed the "Auto" button
Referenced by autoClicked().
|
protected |
returns true if the given string is contained in the list
Definition at line 68 of file KeywordWidget.cpp.
Referenced by add(), setKeywords(), and update().
|
privateslot |
updates the controls if the text edit changed
Definition at line 128 of file KeywordWidget.cpp.
References update().
Referenced by KeywordWidget().
|
protectedvirtual |
event filter for blocking the effect of pressing "return"
Definition at line 204 of file KeywordWidget.cpp.
References add().
QStringList Kwave::KeywordWidget::keywords | ( | ) |
Returns the list of keywords (sorted)
Definition at line 75 of file KeywordWidget.cpp.
|
privateslot |
called when a new list entry has been selected
Definition at line 190 of file KeywordWidget.cpp.
References update().
Referenced by KeywordWidget().
|
privateslot |
remove the currently selected item from the list
Definition at line 172 of file KeywordWidget.cpp.
References update().
|
privateslot |
called if the user pressed return in the edit line
Definition at line 143 of file KeywordWidget.cpp.
References add().
void Kwave::KeywordWidget::setKeywords | ( | const QStringList & | keywords | ) |
Sets/initializes the list of keywords
Definition at line 88 of file KeywordWidget.cpp.
References contained(), and update().
|
protected |
update the enable state of the buttons
Definition at line 107 of file KeywordWidget.cpp.
References contained().
Referenced by add(), editChanged(), KeywordWidget(), listClicked(), remove(), and setKeywords().