aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/textmark.h
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@theqtcompany.com>2015-04-17 12:46:28 +0200
committerOrgad Shaneh <orgads@gmail.com>2015-05-21 08:23:16 +0000
commitab2a0d74dec2df08d23e14b5b3ad670d98af435f (patch)
tree02b161b155335a5cfd498fdd2052e86b7c490964 /src/plugins/texteditor/textmark.h
parenta6e1c3cb54dcf419aa3b86ecd24865198906e313 (diff)
TextEditor: Sort text marks in categories.
Also adding a color for each category. Change-Id: I3627d13913951a95804b5a816f087a822c01bd86 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src/plugins/texteditor/textmark.h')
-rw-r--r--src/plugins/texteditor/textmark.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/texteditor/textmark.h b/src/plugins/texteditor/textmark.h
index 85726d521c..e91ba41da3 100644
--- a/src/plugins/texteditor/textmark.h
+++ b/src/plugins/texteditor/textmark.h
@@ -33,6 +33,9 @@
#include "texteditor_global.h"
+#include <coreplugin/id.h>
+#include <utils/theme/theme.h>
+
#include <QIcon>
QT_BEGIN_NAMESPACE
@@ -51,7 +54,7 @@ namespace Internal { class TextMarkRegistry; }
class TEXTEDITOR_EXPORT TextMark
{
public:
- TextMark(const QString &fileName, int lineNumber);
+ TextMark(const QString &fileName, int lineNumber, Core::Id category);
virtual ~TextMark();
// determine order on markers on the same line.
@@ -77,6 +80,8 @@ public:
virtual bool isDraggable() const;
virtual void dragToLine(int lineNumber);
+ static Utils::Theme::Color categoryColor(Core::Id category);
+ static void setCategoryColor(Core::Id category, Utils::Theme::Color color);
void setIcon(const QIcon &icon);
// call this if the icon has changed.
void updateMarker();
@@ -84,6 +89,7 @@ public:
void setPriority(Priority prioriy);
bool isVisible() const;
void setVisible(bool isVisible);
+ Core::Id category() const;
double widthFactor() const;
void setWidthFactor(double factor);
@@ -100,6 +106,8 @@ private:
Priority m_priority;
bool m_visible;
QIcon m_icon;
+ QColor m_color;
+ Core::Id m_category;
double m_widthFactor;
};