Miam-Player  0.8.0
A nice music player
taglineedit.h
Go to the documentation of this file.
1 #ifndef TAGLINEEDIT_H
2 #define TAGLINEEDIT_H
3 
4 #include <styling/lineedit.h>
5 #include "tagbutton.h"
7 
14 {
15  Q_OBJECT
16 
17 protected:
18  QList<TagButton*> _tags;
19 
20 public:
21  explicit TagLineEdit(QWidget *parent = nullptr);
22 
23  void addTag(const QString &tag, int column = -1);
24 
27  void backspace();
28 
29  inline QList<TagButton*> tags() const { return _tags; }
30 
31 protected:
32  virtual void closeTagButton(TagButton *t);
33 
34  virtual bool eventFilter(QObject *obj, QEvent *event);
35 
37  virtual void keyPressEvent(QKeyEvent *event);
38 
40  virtual void mousePressEvent(QMouseEvent *event);
41 
43  virtual void paintEvent(QPaintEvent *);
44 
45  QStringList toStringList() const;
46 
47 public slots:
48  void clearTextAndTags(const QString &txt);
49 
50 private slots:
52  void insertSpaces();
53 };
54 
55 #endif // TAGLINEEDIT_H
#define MIAMTAGEDITOR_LIBRARY
Definition: miamtageditor_global.hpp:8
QList< TagButton * > tags() const
Definition: taglineedit.h:29
QList< TagButton * > _tags
Definition: taglineedit.h:18
The TagButton class is a small closable button which can be inserted in a QLineEdit.
Definition: tagbutton.h:18
The TagLineEdit class.
Definition: taglineedit.h:13
The LineEdit class.
Definition: lineedit.h:17