MuseScore  3.4
Music composition and notation
filterableview.h
Go to the documentation of this file.
1 //=============================================================================
2 // FilterableView
3 //
4 // Copyright (C) 2018 Peter Jonas
5 //
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License version 2
8 // as published by the Free Software Foundation and appearing in
9 // the file LICENCE.GPL
10 //=============================================================================
11 
12 #ifndef __FILTERABLEVIEW_H__
13 #define __FILTERABLEVIEW_H__
14 
15 namespace Ms {
16 
17 //---------------------------------------------------------
18 // FilterableView
19 // Interface / abstract class to declare some methods that we would like
20 // to be able to use with item views. Later we will extend Qt's item view
21 // classes (QTreeView, etc.) to implement these virtual methods.
22 //---------------------------------------------------------
23 
25  {
26 
27  public:
28  virtual void selectFirst() = 0;
29  virtual void selectNext() = 0;
30  virtual void selectPrevious() = 0;
31  virtual void toInitialState() = 0;
32  virtual void toInitialState(const QModelIndex& node) = 0;
33  virtual bool filter(const QString& searchString) = 0;
34  virtual bool matches(const QModelIndex& node, const QString& searchString);
35  };
36 
37 }
38 
39 #endif // __FILTERABLEVIEW_H__
virtual bool filter(const QString &searchString)=0
virtual void toInitialState()=0
virtual bool matches(const QModelIndex &node, const QString &searchString)
Definition: filterableview.cpp:26
virtual void selectFirst()=0
Definition: aeolus.cpp:26
virtual void selectNext()=0
virtual void selectPrevious()=0
Definition: filterableview.h:24