Changeset View
Changeset View
Standalone View
Standalone View
language/duchain/navigation/useswidget.h
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | 40 | namespace KDevelop { | |||
---|---|---|---|---|---|
43 | class IndexedDeclaration; | 43 | class IndexedDeclaration; | ||
44 | ///A widget representing one use of a Declaration in a speicific context | 44 | ///A widget representing one use of a Declaration in a speicific context | ||
45 | class KDEVPLATFORMLANGUAGE_EXPORT OneUseWidget : public QWidget { | 45 | class KDEVPLATFORMLANGUAGE_EXPORT OneUseWidget : public QWidget { | ||
46 | Q_OBJECT | 46 | Q_OBJECT | ||
47 | public: | 47 | public: | ||
48 | OneUseWidget(IndexedDeclaration declaration, IndexedString document, KTextEditor::Range range, const CodeRepresentation& code); | 48 | OneUseWidget(IndexedDeclaration declaration, IndexedString document, KTextEditor::Range range, const CodeRepresentation& code); | ||
49 | ~OneUseWidget() override; | 49 | ~OneUseWidget() override; | ||
50 | 50 | | |||
51 | void setHighlighted(bool highlight); | ||||
52 | bool isHighlighted() const; | ||||
mwolff: const | |||||
Added const only to the one function that returned a value, is that what you meant? dporobic: Added const only to the one function that returned a value, is that what you meant? | |||||
mwolff: yes, perfect | |||||
53 | void activateLink(); | ||||
54 | | ||||
51 | private: | 55 | private: | ||
52 | void mousePressEvent(QMouseEvent * event) override; | 56 | void mousePressEvent(QMouseEvent * event) override; | ||
53 | void resizeEvent ( QResizeEvent * event ) override; | 57 | void resizeEvent ( QResizeEvent * event ) override; | ||
54 | 58 | | |||
55 | PersistentMovingRange::Ptr m_range; | 59 | PersistentMovingRange::Ptr m_range; | ||
56 | IndexedDeclaration m_declaration; | 60 | IndexedDeclaration m_declaration; | ||
57 | IndexedString m_document; | 61 | IndexedString m_document; | ||
58 | QString m_sourceLine; | 62 | QString m_sourceLine; | ||
59 | 63 | | |||
60 | QLabel* m_label; | 64 | QLabel* m_label; | ||
61 | QLabel* m_icon; | 65 | QLabel* m_icon; | ||
62 | QHBoxLayout* m_layout; | 66 | QHBoxLayout* m_layout; | ||
67 | bool m_isHighlighted = false; | ||||
63 | }; | 68 | }; | ||
64 | 69 | | |||
65 | 70 | | |||
66 | class KDEVPLATFORMLANGUAGE_EXPORT NavigatableWidgetList : public QScrollArea { | 71 | class KDEVPLATFORMLANGUAGE_EXPORT NavigatableWidgetList : public QScrollArea { | ||
67 | Q_OBJECT | 72 | Q_OBJECT | ||
68 | public: | 73 | public: | ||
69 | explicit NavigatableWidgetList(bool allowScrolling = false, uint maxHeight = 0, bool vertical = true); | 74 | explicit NavigatableWidgetList(bool allowScrolling = false, uint maxHeight = 0, bool vertical = true); | ||
70 | ~NavigatableWidgetList() override; | 75 | ~NavigatableWidgetList() override; | ||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |
const