Workspace 6.21.5
|
Holds 2 SerializedTrees corresponding to 2 global name files being compared.
#include <Tools/GlobalsComparison/Application/Model/globalsdiffmodel.h>
Inherits QAbstractItemModel.
Public Types | |
enum | Column { GlobalName , Sort , Name , ValueInA , EditorInA , ValueInB , EditorInB , ColumnCount } |
enum | Role { Tag = Qt::UserRole + 1 , Present , UnscopedGlobalName , ScopedGlobalName , ProxyScopedGlobalName , Namespace , Identifier , Identifiers , DataPlugin , DataType , PreferredWidget , EditorSizeHint , Editing , ScalarInput , ScalarInputEditor , Difference , Duplicated , Inconsistent , StandardIcon , SortId , ValueAttribute , CachedBackground , StringHighlights } |
Signals | |
void | modelChanged () |
Public Member Functions | |
GlobalsDiffModel (const GlobalsDiffModel &)=delete | |
GlobalsDiffModel (QObject *parent=nullptr) | |
~GlobalsDiffModel () override | |
void | addItem (bool isA, const QString &scopedGlobalName, DataExecution::SerializedItem &serializedItem) |
void | clear () |
void | clear (bool isA) |
void | clearHighlightsFromFoundItems (QList< GlobalsDiffModelItem * > items) |
const QColor & | colourA () const |
const QColor & | colourB () const |
int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
QWidget * | createEditorSelectorWidget (const QModelIndex &index, QWidget *parent=nullptr) const |
CustomWidgetWrapper * | createEditorWidget (const QModelIndex &index, QWidget *parent=nullptr) const |
QVariant | data (const QModelIndex &index, int role) const override |
Column | editorColumn (bool isA) const |
QSize | editorSizeHint (const QString &editorName) const |
QList< GlobalsDiffModelItem * > | findAllItems () const |
QList< GlobalsDiffModelItem * > | findItems (const QRegExp &searchTerm) const |
Qt::ItemFlags | flags (const QModelIndex &index) const override |
const QColor & | foundItemColour () const |
const QFileInfo & | getFileInfo (bool isA) |
QModelIndex | getIndex (const GlobalsDiffModelItem &item) const |
GlobalsDiffModelItem * | getItem (const QModelIndex &index) const |
bool | getLoaded (bool isA) const |
bool | getModified (bool isA) const |
DataExecution::SerializedTree & | getSerializedTree (bool isA) |
const DataExecution::SerializedTree & | getSerializedTree (bool isA) const |
const QBrush & | gradientBrush () const |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
void | highlightFoundItems (QList< GlobalsDiffModelItem * > items) |
void | highlightProblemGlobalNames (bool isA, QStringList duplicatedNames) |
QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const override |
bool | modifyValue (bool isA, const QString &scopedGlobalName, const QString &value) |
GlobalsDiffModel & | operator= (const GlobalsDiffModel &)=delete |
QModelIndex | parent (const QModelIndex &index) const override |
void | refreshDifferenceRoles () |
void | refreshDifferenceRoles (const QString &globalName) |
void | refreshErrorRoles () |
void | refreshErrorRoles (const QString &globalName) |
void | removeModelItem (GlobalsDiffModelItem &item) |
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
void | setColours (QColor colourA, QColor colourB, QBrush gradientBrush, QColor findColour) |
bool | setData (const QModelIndex &index, const QVariant &value, int role) override |
void | setEditorSizeHint (const QString &editorName, const QSize &sizeHint) |
void | setFileName (bool isA, const QString &fileName) |
void | setLoaded (bool isA, bool value) |
void | setModified (bool isA, bool val) |
void | setSerializedTree (bool isA, const DataExecution::SerializedTree &serializedTree) |
const QBrush & | valueBrushA () const |
const QBrush & | valueBrushB () const |
Column | valueColumn (bool isA) const |
Static Public Member Functions | |
template<typename T > | |
static bool | canConvert (const QVariant &v, const T &data) |
static QValidator * | getValidator (const QString &dataType) |
enum Column |
enum Role |
|
delete |
GlobalsDiffModel | ( | QObject * | parent = nullptr | ) |
|
overridedefault |
void addItem | ( | bool | isA, |
const QString & | scopedGlobalName, | ||
DataExecution::SerializedItem & | serializedItem | ||
) |
|
static |
void clear | ( | ) |
void clear | ( | bool | isA | ) |
void clearHighlightsFromFoundItems | ( | QList< GlobalsDiffModelItem * > | items | ) |
const QColor & colourA | ( | ) | const |
const QColor & colourB | ( | ) | const |
|
override |
QWidget * createEditorSelectorWidget | ( | const QModelIndex & | index, |
QWidget * | parent = nullptr |
||
) | const |
CustomWidgetWrapper * createEditorWidget | ( | const QModelIndex & | index, |
QWidget * | parent = nullptr |
||
) | const |
|
override |
Column editorColumn | ( | bool | isA | ) | const |
QSize editorSizeHint | ( | const QString & | editorName | ) | const |
QList< GlobalsDiffModelItem * > findAllItems | ( | ) | const |
QList< GlobalsDiffModelItem * > findItems | ( | const QRegExp & | searchTerm | ) | const |
|
override |
const QColor & foundItemColour | ( | ) | const |
const QFileInfo & getFileInfo | ( | bool | isA | ) |
QModelIndex getIndex | ( | const GlobalsDiffModelItem & | item | ) | const |
GlobalsDiffModelItem * getItem | ( | const QModelIndex & | index | ) | const |
index | The index of interest. |
bool getLoaded | ( | bool | isA | ) | const |
bool getModified | ( | bool | isA | ) | const |
DataExecution::SerializedTree & getSerializedTree | ( | bool | isA | ) |
const DataExecution::SerializedTree & getSerializedTree | ( | bool | isA | ) | const |
|
static |
const QBrush & gradientBrush | ( | ) | const |
|
override |
void highlightFoundItems | ( | QList< GlobalsDiffModelItem * > | items | ) |
void highlightProblemGlobalNames | ( | bool | isA, |
QStringList | duplicatedNames | ||
) |
|
override |
|
signal |
bool modifyValue | ( | bool | isA, |
const QString & | scopedGlobalName, | ||
const QString & | value | ||
) |
|
delete |
|
override |
void refreshDifferenceRoles | ( | ) |
void refreshDifferenceRoles | ( | const QString & | globalName | ) |
void refreshErrorRoles | ( | ) |
void refreshErrorRoles | ( | const QString & | globalName | ) |
void removeModelItem | ( | GlobalsDiffModelItem & | item | ) |
|
override |
void setColours | ( | QColor | colourA, |
QColor | colourB, | ||
QBrush | gradientBrush, | ||
QColor | findColour | ||
) |
|
override |
void setEditorSizeHint | ( | const QString & | editorName, |
const QSize & | sizeHint | ||
) |
void setFileName | ( | bool | isA, |
const QString & | fileName | ||
) |
void setLoaded | ( | bool | isA, |
bool | value | ||
) |
void setModified | ( | bool | isA, |
bool | val | ||
) |
void setSerializedTree | ( | bool | isA, |
const DataExecution::SerializedTree & | serializedTree | ||
) |
const QBrush & valueBrushA | ( | ) | const |
const QBrush & valueBrushB | ( | ) | const |
Column valueColumn | ( | bool | isA | ) | const |