Workspace 6.21.5
|
#include <Tools/Widgets/columntextformatter.h>
Public Member Functions | |
ColumnTextFormatter (QColor colourA, QColor colourB, QColor colourMissing, QBrush gradientBrush, int maxLength, int nameColumn, int columnA, int columnB, const QStringList &eltsWithAttributeNamedChildren, const QStringList &eltsWithTagNamedChildren, const QStringList &eltsWithAttributesAsChildren, int stringHighlightRole, QWidget *parentWidget) | |
void | formatText (QString valueInA, QString valueInB, QMap< QTreeWidgetItem *, QPair< HighlightingTextEdit *, HighlightingTextEdit * > > &widgetItemMap, QTreeWidgetItem *newItem) |
bool | formatXmlArray (QString valueInA, QString valueInB, QString elementInA, QString elementInB, QTreeWidgetItem *newItem, int recursionLevel=0) |
QWidget * | parentWidget () |
void | setMaxLength (int length) |
Static Public Member Functions | |
static bool | getAsXml (const QString &str, QString &taggedText) |
Tests a fragment of text to see if it is xml or partial xml format, if so returns it in xml format (with an outer tag set added) | |
static bool | isJsonFormat (const QString &text) |
static bool | isXmlFragment (const QString &text) |
Public Attributes | |
QColor | colourA_ |
QColor | colourB_ |
QColor | colourMissing_ |
int | columnA_ |
int | columnB_ |
QBrush | gradientBrush_ |
int | maxLength_ |
int | maxNumLines_ |
int | nameColumn_ |
int | stringHighlightRole_ |
Protected Member Functions | |
bool | setStringHighlightData (QTreeWidgetItem &item, const QString &valueInA, const QString &valueInB) |
Protected Attributes | |
QSet< QString > | eltsWithAttributeNamedChildren_ |
QSet< QString > | eltsWithAttributesAsChildren_ |
QSet< QString > | eltsWithTagNamedChildren_ |
bool | indentChildName_ {false} |
QWidget * | parentWidget_ |
Colours an item containing a pair of text elements, creates child elements if the text is long
|
inline |
void formatText | ( | QString | valueInA, |
QString | valueInB, | ||
QMap< QTreeWidgetItem *, QPair< HighlightingTextEdit *, HighlightingTextEdit * > > & | widgetItemMap, | ||
QTreeWidgetItem * | newItem | ||
) |
Formats an array of elements where they are in xml format, creating a child widget item for each name Note: this does not automatically create further child elements if individual elements are big
valueInA | the value in workflowA as a string |
valueInB | the value in workflowB as a string |
widgetItemMap | map of created widgets corresponding to witdget items, these need to be added to the parent widget |
newItem | The parent item to be expanded |
bool formatXmlArray | ( | QString | valueInA, |
QString | valueInB, | ||
QString | elementInA, | ||
QString | elementInB, | ||
QTreeWidgetItem * | newItem, | ||
int | recursionLevel = 0 |
||
) |
Formats an array of elements where they are in xml format, creating a child widget item for each name Note: this does not automatically create further child elements if individual elements are big
valueInA | the value in workflowA as a string |
valueInB | the value in workflowB as a string |
elementInA | the value in workflowA as an element in xml format |
elementInB | the value in workflowB as an element in xml format |
newItem | The parent item to be expanded |
recursionLevel | The recursion level in the XML |
|
static |
str | Text fragment being tested |
taggedText | If it can be construed as xml, returns the original text, enclosed in a dummy xml tag set if necessary |
|
static |
|
static |
|
inline |
void setMaxLength | ( | int | length | ) |
|
protected |
QColor colourA_ |
QColor colourB_ |
QColor colourMissing_ |
int columnA_ |
int columnB_ |
|
protected |
|
protected |
|
protected |
QBrush gradientBrush_ |
|
protected |
int maxLength_ |
int maxNumLines_ |
int nameColumn_ |
|
protected |
int stringHighlightRole_ |