TransformFinder.h
Go to the documentation of this file.
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2 
3 /*
4  Sonic Visualiser
5  An audio file viewer and annotation editor.
6  Centre for Digital Music, Queen Mary, University of London.
7  This file copyright 2008 QMUL.
8 
9  This program is free software; you can redistribute it and/or
10  modify it under the terms of the GNU General Public License as
11  published by the Free Software Foundation; either version 2 of the
12  License, or (at your option) any later version. See the file
13  COPYING included with this distribution for more information.
14 */
15 
16 #ifndef SV_TRANSFORM_FINDER_H
17 #define SV_TRANSFORM_FINDER_H
18 
19 #include <QDialog>
20 
21 #include <vector>
22 
23 #include "transform/Transform.h"
24 #include "transform/TransformFactory.h"
25 
26 class QVBoxLayout;
27 class QScrollArea;
28 class QLabel;
29 class SelectableLabel;
30 class QWidget;
31 class QTimer;
32 
33 class TransformFinder : public QDialog
34 {
35  Q_OBJECT
36 
37 public:
38  TransformFinder(QWidget *parent = 0);
40 
41  TransformId getTransform() const;
42 
43 protected slots:
44  void searchTextChanged(const QString &);
45  void selectedLabelChanged();
46  void labelDoubleClicked();
47  void timeout();
48  void up();
49  void down();
50 
51 protected:
52  QLabel *m_infoLabel;
55 
56  QScrollArea *m_resultsScroll;
57  QWidget *m_resultsFrame;
58  QVBoxLayout *m_resultsLayout;
59  std::vector<SelectableLabel *> m_labels;
60  TransformId m_selectedTransform;
61  QTimer *m_timer;
62 
64 
65  QString m_newSearchText;
66  typedef std::vector<TextMatcher::Match> SortedResults;
67  SortedResults m_sortedResults;
69 };
70 
71 #endif
72 
QWidget * m_resultsFrame
TransformId getTransform() const
QLabel * m_infoLabel
std::vector< TextMatcher::Match > SortedResults
void searchTextChanged(const QString &)
QLabel * m_noResultsLabel
QVBoxLayout * m_resultsLayout
TransformId m_selectedTransform
QLabel * m_beforeSearchLabel
TransformFinder(QWidget *parent=0)
QScrollArea * m_resultsScroll
QString m_newSearchText
std::vector< SelectableLabel * > m_labels
SortedResults m_sortedResults