Sayonara Player
Public Types | Public Member Functions | Protected Types | Protected Member Functions | List of all members
SearchableViewInterface Class Referenceabstract

The SearchViewInterface class. More...

#include <SearchableView.h>

Inheritance diagram for SearchableViewInterface:
SelectionViewInterface SearchableView< View, Model >

Public Types

enum  SelectionType {
  Rows =0,
  Columns,
  Items
}
 

Public Member Functions

 SearchableViewInterface (QAbstractItemView *view)
 
QAbstractItemView * view () const
 
virtual int viewportHeight () const
 
virtual int viewportWidth () const
 
int setSearchstring (const QString &str)
 
void selectNextMatch (const QString &str)
 
void selectPreviousMatch (const QString &str)
 
bool isMinisearcherActive () const
 
virtual IndexSet selectedItems () const
 

Protected Types

enum  SearchDirection : unsigned char {
  First,
  Next,
  Prev
}
 

Protected Member Functions

virtual void setSearchModel (SearchableModelInterface *model)
 
virtual QModelIndex matchIndex (const QString &str, SearchDirection direction) const
 
virtual void selectMatch (const QString &str, SearchDirection direction)
 
bool handleKeyPress (QKeyEvent *e) override
 
void selectRows (const IndexSet &rows, int minimumColumn=-1, int maximumColumn=-1)
 
void selectColumns (const IndexSet &columns, int minimumRow=-1, int maximumRow=-1)
 
void selectItems (const IndexSet &indexes)
 
void selectAll ()
 
virtual SelectionViewInterface::SelectionType selectionType () const
 
virtual int mapModelIndexToIndex (const QModelIndex &idx) const =0
 
virtual ModelIndexRange mapIndexToModelIndexes (int idx) const =0
 
IndexSet mapModelIndexesToIndexes (const QModelIndexList &indexes) const
 
ModelIndexRanges mapIndexesToModelIndexRanges (const IndexSet &indexes) const
 

Detailed Description

The SearchViewInterface class.