kwave  18.07.70
KeywordWidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  KeywordWidget.h - widget for editing a list of keywords
3  -------------------
4  begin : Fri 02 2002
5  copyright : (C) 2002 by Thomas Eschenbacher
6  email : Thomas Eschenbacher <thomas.eschenbacher@gmx.de>
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef KEYWORD_WIDGET_H
19 #define KEYWORD_WIDGET_H
20 
21 #include "config.h"
22 
23 #include <QObject>
24 #include <QStringList>
25 
26 #include "ui_KeywordWidgetBase.h"
27 
28 class QEvent;
29 class QString;
30 class QWidget;
31 
32 namespace Kwave
33 {
40  class KeywordWidget: public QWidget,
41  Ui::KeywordWidgetBase
42  {
43  Q_OBJECT
44  public:
45 
47  explicit KeywordWidget(QWidget *parent);
48 
50  virtual ~KeywordWidget() Q_DECL_OVERRIDE;
51 
53  QStringList keywords();
54 
56  void setKeywords(const QStringList &keywords);
57 
58  signals:
59 
61  void autoGenerate();
62 
63  private slots:
64 
66  void editChanged(const QString &);
67 
69  void returnPressed();
70 
72  void add();
73 
75  void remove();
76 
78  void listClicked(QListWidgetItem *item);
79 
81  void autoClicked();
82 
83  protected:
84 
86  bool contained(const QString &item);
87 
89  void update();
90 
92  virtual bool eventFilter(QObject *sender, QEvent *event)
93  Q_DECL_OVERRIDE;
94 
95  };
96 }
97 
98 #endif /* KEYWORD_WIDGET_H */
99 
100 //***************************************************************************
101 //***************************************************************************
Definition: App.h:33
virtual ~KeywordWidget() Q_DECL_OVERRIDE
void setKeywords(const QStringList &keywords)
KeywordWidget(QWidget *parent)
void listClicked(QListWidgetItem *item)
bool contained(const QString &item)
virtual bool eventFilter(QObject *sender, QEvent *event) Q_DECL_OVERRIDE
void editChanged(const QString &)
QStringList keywords()