Chris@416: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@416: Chris@416: /* Chris@416: Sonic Visualiser Chris@416: An audio file viewer and annotation editor. Chris@416: Centre for Digital Music, Queen Mary, University of London. Chris@416: This file copyright 2008 QMUL. Chris@416: Chris@416: This program is free software; you can redistribute it and/or Chris@416: modify it under the terms of the GNU General Public License as Chris@416: published by the Free Software Foundation; either version 2 of the Chris@416: License, or (at your option) any later version. See the file Chris@416: COPYING included with this distribution for more information. Chris@416: */ Chris@416: Chris@416: #ifndef _TRANSFORM_FINDER_H_ Chris@416: #define _TRANSFORM_FINDER_H_ Chris@416: Chris@416: #include Chris@416: Chris@417: #include Chris@417: Chris@416: #include "transform/Transform.h" Chris@416: Chris@419: class QGridLayout; Chris@416: class QScrollArea; Chris@417: class QLabel; Chris@419: class SelectableLabel; Chris@417: class QWidget; Chris@416: Chris@419: Chris@419: #include Chris@419: class SelectableLabel : public QLabel Chris@419: { Chris@419: Q_OBJECT Chris@419: Chris@419: public: Chris@419: SelectableLabel(QWidget *parent = 0) : QLabel(parent) { Chris@419: setTextFormat(Qt::RichText); Chris@419: } Chris@419: virtual ~SelectableLabel() { } Chris@419: Chris@419: void setSelectedText(QString); Chris@419: void setUnselectedText(QString); Chris@419: Chris@419: protected: Chris@419: virtual void mousePressEvent(QMouseEvent *e); Chris@419: }; Chris@419: Chris@416: class TransformFinder : public QDialog Chris@416: { Chris@416: Q_OBJECT Chris@416: Chris@416: public: Chris@416: TransformFinder(QWidget *parent = 0); Chris@416: ~TransformFinder(); Chris@416: Chris@416: TransformId getTransform() const; Chris@416: Chris@416: protected slots: Chris@416: void searchTextChanged(const QString &); Chris@416: Chris@416: protected: Chris@416: QScrollArea *m_resultsScroll; Chris@417: QWidget *m_resultsFrame; Chris@419: QGridLayout *m_resultsLayout; Chris@419: std::vector m_labels; Chris@416: }; Chris@416: Chris@416: #endif Chris@416: