aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktextnodeengine_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2015-03-17 09:32:34 +0100
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-03-17 09:52:19 +0100
commitfb0cb17cb55c9ed44b7fcbc92efcc244e96c9b36 (patch)
tree2ba609d4c6416036d3cb5f345a6c1125e0f105d6 /src/quick/items/qquicktextnodeengine_p.h
parent4dc68ba888c7dbb7bd16455991f6d5814df13cba (diff)
parent84155a8e1a6250d3e4b0949a42464eee5dfef537 (diff)
Merge remote-tracking branch 'origin/5.5' into dev
Diffstat (limited to 'src/quick/items/qquicktextnodeengine_p.h')
-rw-r--r--src/quick/items/qquicktextnodeengine_p.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/quick/items/qquicktextnodeengine_p.h b/src/quick/items/qquicktextnodeengine_p.h
index 3441a5a973..178454b19e 100644
--- a/src/quick/items/qquicktextnodeengine_p.h
+++ b/src/quick/items/qquicktextnodeengine_p.h
@@ -102,6 +102,33 @@ public:
static void inOrder(const QVarLengthArray<BinaryTreeNode, 16> &binaryTree, QVarLengthArray<int> *sortedIndexes, int currentIndex = 0);
};
+ struct BinaryTreeNodeKey
+ {
+ BinaryTreeNodeKey(QFontEngine *fe,
+ QQuickDefaultClipNode *cn,
+ QRgb col,
+ int selState)
+ : fontEngine(fe)
+ , clipNode(cn)
+ , color(col)
+ , selectionState(selState)
+ {
+ }
+
+ bool operator==(const BinaryTreeNodeKey &otherKey) const
+ {
+ return fontEngine == otherKey.fontEngine
+ && clipNode == otherKey.clipNode
+ && color == otherKey.color
+ && selectionState == otherKey.selectionState;
+ }
+
+ QFontEngine *fontEngine;
+ QQuickDefaultClipNode *clipNode;
+ QRgb color;
+ int selectionState;
+ };
+
QQuickTextNodeEngine() : m_hasSelection(false), m_hasContents(false) {}
bool hasContents() const { return m_hasContents; }
@@ -141,6 +168,8 @@ public:
int start, int end,
int selectionStart, int selectionEnd);
+ void mergeProcessedNodes(QList<BinaryTreeNode *> *regularNodes,
+ QList<BinaryTreeNode *> *imageNodes);
void addToSceneGraph(QQuickTextNode *parent,
QQuickText::TextStyle style = QQuickText::Normal,
const QColor &styleColor = QColor());