Mercurial > hg > svgui
diff widgets/TransformFinder.h @ 420:f8e04ad8e7b1
* More transform finder fiddling
author | Chris Cannam |
---|---|
date | Thu, 25 Sep 2008 13:47:40 +0000 |
parents | b0c8e0def62e |
children | 7466402a32c5 |
line wrap: on
line diff
--- a/widgets/TransformFinder.h Thu Sep 25 12:44:23 2008 +0000 +++ b/widgets/TransformFinder.h Thu Sep 25 13:47:40 2008 +0000 @@ -35,16 +35,26 @@ Q_OBJECT public: - SelectableLabel(QWidget *parent = 0) : QLabel(parent) { - setTextFormat(Qt::RichText); - } + SelectableLabel(QWidget *parent = 0); virtual ~SelectableLabel() { } void setSelectedText(QString); void setUnselectedText(QString); + bool isSelected() const { return m_selected; } + +signals: + void selectionChanged(); + +public slots: + void setSelected(bool); + void toggle(); + protected: virtual void mousePressEvent(QMouseEvent *e); + QString m_selectedText; + QString m_unselectedText; + bool m_selected; }; class TransformFinder : public QDialog @@ -59,12 +69,14 @@ protected slots: void searchTextChanged(const QString &); - + void selectedLabelChanged(); + protected: QScrollArea *m_resultsScroll; QWidget *m_resultsFrame; QGridLayout *m_resultsLayout; std::vector<SelectableLabel *> m_labels; + TransformId m_selectedTransform; }; #endif