Mercurial > hg > svgui
comparison widgets/TransformFinder.h @ 419:b0c8e0def62e
* some work on transform finder
author | Chris Cannam |
---|---|
date | Thu, 25 Sep 2008 12:44:23 +0000 |
parents | fbf9f53cf979 |
children | f8e04ad8e7b1 |
comparison
equal
deleted
inserted
replaced
418:bd1e4ff5091d | 419:b0c8e0def62e |
---|---|
20 | 20 |
21 #include <vector> | 21 #include <vector> |
22 | 22 |
23 #include "transform/Transform.h" | 23 #include "transform/Transform.h" |
24 | 24 |
25 class QVBoxLayout; | 25 class QGridLayout; |
26 class QScrollArea; | 26 class QScrollArea; |
27 class QLabel; | 27 class QLabel; |
28 class SelectableLabel; | |
28 class QWidget; | 29 class QWidget; |
30 | |
31 | |
32 #include <QLabel> | |
33 class SelectableLabel : public QLabel | |
34 { | |
35 Q_OBJECT | |
36 | |
37 public: | |
38 SelectableLabel(QWidget *parent = 0) : QLabel(parent) { | |
39 setTextFormat(Qt::RichText); | |
40 } | |
41 virtual ~SelectableLabel() { } | |
42 | |
43 void setSelectedText(QString); | |
44 void setUnselectedText(QString); | |
45 | |
46 protected: | |
47 virtual void mousePressEvent(QMouseEvent *e); | |
48 }; | |
29 | 49 |
30 class TransformFinder : public QDialog | 50 class TransformFinder : public QDialog |
31 { | 51 { |
32 Q_OBJECT | 52 Q_OBJECT |
33 | 53 |
41 void searchTextChanged(const QString &); | 61 void searchTextChanged(const QString &); |
42 | 62 |
43 protected: | 63 protected: |
44 QScrollArea *m_resultsScroll; | 64 QScrollArea *m_resultsScroll; |
45 QWidget *m_resultsFrame; | 65 QWidget *m_resultsFrame; |
46 QVBoxLayout *m_resultsLayout; | 66 QGridLayout *m_resultsLayout; |
47 std::vector<QLabel *> m_labels; | 67 std::vector<SelectableLabel *> m_labels; |
48 }; | 68 }; |
49 | 69 |
50 #endif | 70 #endif |
51 | 71 |