Miam-Player  0.8.0
A nice music player
TagLineEdit Class Reference

The TagLineEdit class. More...

#include <taglineedit.h>

Inheritance diagram for TagLineEdit:
LineEdit SearchBar CustomizeThemeTagLineEdit

Public Slots

void clearTextAndTags (const QString &txt)
 

Public Member Functions

 TagLineEdit (QWidget *parent=nullptr)
 
void addTag (const QString &tag, int column=-1)
 
void backspace ()
 
QList< TagButton * > tags () const
 
- Public Member Functions inherited from LineEdit
 LineEdit (QWidget *parent=nullptr)
 

Protected Member Functions

virtual void closeTagButton (TagButton *t)
 
virtual bool eventFilter (QObject *obj, QEvent *event)
 
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void mousePressEvent (QMouseEvent *event)
 
virtual void paintEvent (QPaintEvent *)
 
QStringList toStringList () const
 
- Protected Member Functions inherited from LineEdit
virtual void drawCursor (QStylePainter *painter, const QRect &rText)
 
virtual void focusInEvent (QFocusEvent *e) override
 
virtual void focusOutEvent (QFocusEvent *e) override
 

Protected Attributes

QList< TagButton * > _tags
 

Additional Inherited Members

Detailed Description

The TagLineEdit class.

Author
Matthieu Bachelier

Constructor & Destructor Documentation

TagLineEdit::TagLineEdit ( QWidget *  parent = nullptr)
explicit

Member Function Documentation

void TagLineEdit::addTag ( const QString &  tag,
int  column = -1 
)
void TagLineEdit::backspace ( )

Redefined to be able to move tag buttons. Backspace method is not virtual in QLineEdit, therefore keyPressEvent must be intercepted and eaten.

FIXME

void TagLineEdit::clearTextAndTags ( const QString &  txt)
slot
void TagLineEdit::closeTagButton ( TagButton t)
protectedvirtual
bool TagLineEdit::eventFilter ( QObject *  obj,
QEvent *  event 
)
protectedvirtual

Reimplemented in CustomizeThemeTagLineEdit.

void TagLineEdit::keyPressEvent ( QKeyEvent *  event)
protectedvirtual

Redefined to be able to move TagButton when typing.

TODO cursorWordForward / cursorWordBackard to stop on TagButton

void TagLineEdit::mousePressEvent ( QMouseEvent *  event)
protectedvirtual

Redefined to automatically move cursor outside TagButton.

void TagLineEdit::paintEvent ( QPaintEvent *  )
protectedvirtual

Redefined to display user input like closable "bubbles".

QList<TagButton*> TagLineEdit::tags ( ) const
inline
QStringList TagLineEdit::toStringList ( ) const
protected

Member Data Documentation

QList<TagButton*> TagLineEdit::_tags
protected

The documentation for this class was generated from the following files: