Miam-Player  0.8.0
A nice music player
TabBar Class Reference

The TabBar class is used to be able to rename a tab, e.g. a Playlist. More...

#include <tabbar.h>

Inheritance diagram for TabBar:

Signals

void tabRenamed (int index, const QString &text)
 

Public Member Functions

 TabBar (TabPlaylist *parent)
 
void editTab (int indexTab)
 
virtual bool eventFilter (QObject *, QEvent *)
 

Protected Member Functions

virtual void dragEnterEvent (QDragEnterEvent *event)
 
virtual void dragMoveEvent (QDragMoveEvent *event)
 
virtual void dropEvent (QDropEvent *event)
 
virtual void mouseDoubleClickEvent (QMouseEvent *)
 
virtual void mousePressEvent (QMouseEvent *)
 
virtual void paintEvent (QPaintEvent *)
 
virtual QSize tabSizeHint (int index) const
 

Detailed Description

The TabBar class is used to be able to rename a tab, e.g. a Playlist.

By double clicking or using the contextual menu, one can interact with the name of every playlists in this Widget. It also forwards drag & drop events to automatically switch from one tab to another.

Author
Matthieu Bachelier

Constructor & Destructor Documentation

TabBar::TabBar ( TabPlaylist parent)
explicit

Member Function Documentation

void TabBar::dragEnterEvent ( QDragEnterEvent *  event)
protectedvirtual

Redefined to accept D&D from another playlist or the library.

void TabBar::dragMoveEvent ( QDragMoveEvent *  event)
protectedvirtual

Redefined to accept D&D from another playlist or the library.

void TabBar::dropEvent ( QDropEvent *  event)
protectedvirtual

Redefined to accept D&D from another playlist or the library.

void TabBar::editTab ( int  indexTab)

Trigger a double click to rename a tab.

bool TabBar::eventFilter ( QObject *  obj,
QEvent *  event 
)
virtual

Redefined to validate new tab name if the focus is lost.

void TabBar::mouseDoubleClickEvent ( QMouseEvent *  event)
protectedvirtual

Redefined to display an editable area.

void TabBar::mousePressEvent ( QMouseEvent *  event)
protectedvirtual

Redefined to validate new tab name without pressing return.

void TabBar::paintEvent ( QPaintEvent *  e)
protectedvirtual
void TabBar::tabRenamed ( int  index,
const QString &  text 
)
signal
QSize TabBar::tabSizeHint ( int  index) const
protectedvirtual

Redefined to return a square for the last tab which is the [+] button.


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