aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/textmark.h
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2019-01-28 09:32:11 +0100
committerNikolai Kosjar <nikolai.kosjar@qt.io>2019-02-01 08:15:36 +0000
commit0df7468e517192b5fbc6c8a5059d3ef6c412545c (patch)
tree8f203735d93e1fd467e58c9e8f6cfec0b32dcb45 /src/plugins/texteditor/textmark.h
parent966f4ea6a9d1e46833fc30df878ba6fa8f919988 (diff)
Clang: Add tooltip action to copy to clipboard
...as selecting text in the tooltip was difficult and eventually got disabled due to other problems - see d58c0a9ac8123fd81c335b322defbbb567de840d. This adds support for actions in TextMarks. They are displayed as QToolButtons in a dedicated column in the tooltip. Change-Id: I84ee3c3e4af573a80953786881d1333b00e4200c Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/texteditor/textmark.h')
-rw-r--r--src/plugins/texteditor/textmark.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/texteditor/textmark.h b/src/plugins/texteditor/textmark.h
index 9275c254ae..eeeb761eaf 100644
--- a/src/plugins/texteditor/textmark.h
+++ b/src/plugins/texteditor/textmark.h
@@ -32,8 +32,10 @@
#include <utils/fileutils.h>
#include <QIcon>
+#include <QVector>
QT_BEGIN_NAMESPACE
+class QAction;
class QGridLayout;
class QLayout;
class QPainter;
@@ -122,6 +124,9 @@ public:
QString toolTip() const { return m_toolTip; }
void setToolTip(const QString &toolTip) { m_toolTip = toolTip; }
+ QVector<QAction *> actions() const;
+ void setActions(const QVector<QAction *> &actions); // Takes ownership
+
private:
Q_DISABLE_COPY(TextMark)
@@ -138,6 +143,7 @@ private:
QString m_lineAnnotation;
QString m_toolTip;
QString m_defaultToolTip;
+ QVector<QAction *> m_actions;
};
} // namespace TextEditor