Songbook-Client  0.7
This application is a manager of customguitar songbooks
 All Classes Files Functions Variables Enumerations Enumerator Pages
Public Slots | Public Member Functions
CFilterLineEdit Class Reference

CFilterLineEdit is a QLineEdit widget that allows one to filter results in the songs library. More...

#include <filter-lineedit.hh>

List of all members.

Public Slots

void filterLanguageEnglish ()
 Only display songs written in English.
void filterLanguageFrench ()
 Only display songs written in French.
void filterLanguageSpanish ()
 Only display songs written in Spanish.
void filterLanguagePortuguese ()
 Only display songs written in Portuguese.

Public Member Functions

 CFilterLineEdit (QWidget *parent=0)
 Constructor.
 ~CFilterLineEdit ()
 Destructor.
void addAction (QAction *action)
void setFilterModel (CSongSortFilterProxyModel *filterModel)

Detailed Description

CFilterLineEdit is a QLineEdit widget that allows one to filter results in the songs library.

The filter updates the songs library view so that it only displays songs that match the user input.

The filter only applies on artist/title/album columns as provided by the CLibrary::completionModel().

A CFilterLineEdit widget contains a CMagButton on the left that allows one to access quick filters functions (such as search by songs' language) and a CClearButton on the right that resets its content (only dispayed when there is some user input).

filter.png

Member Function Documentation

void CFilterLineEdit::addAction ( QAction *  action)

Add an action to the menu that is displayed when clicking on the CMagButton on the left.

void CFilterLineEdit::setFilterModel ( CSongSortFilterProxyModel filterModel)

Defines the model that should be filtered.

Parameters:
filterModelthe proxy model of the songs library

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