debugger: implement per-type format changes in the watch view

This commit is contained in:
hjk
2009-07-03 11:20:47 +02:00
parent a125e54b51
commit 916fc9aa96
3 changed files with 169 additions and 85 deletions

View File

@@ -139,8 +139,11 @@ enum WatchRoles
{
INameRole = Qt::UserRole,
ExpressionRole,
ExpandedRole,
ExpandedRole, // used to communicate prefered expanded state to the view
ActiveDataRole, // used for tooltip
TypeFormatListRole,
TypeFormatRole, // used to communicate alternative formats to the view
IndividualFormatRole
};
class WatchModel : public QAbstractItemModel
@@ -180,6 +183,9 @@ private:
void removeItem(WatchItem *item);
void setActiveData(const QString &data) { m_activeData = data; }
void emitDataChanged(int column,
const QModelIndex &parentIndex = QModelIndex());
private:
WatchHandler *m_handler;
WatchType m_type;
@@ -234,6 +240,10 @@ private:
void loadWatchers();
void saveWatchers();
void loadTypeFormats();
void saveTypeFormats();
void setFormat(const QString &type, int format);
bool m_expandPointers;
bool m_inChange;
@@ -242,6 +252,8 @@ private:
QHash<QString, int> m_watcherNames;
QString watcherName(const QString &exp);
QHash<QString, int> m_typeFormats;
QHash<QString, int> m_individualFormats;
void setDisplayedIName(const QString &iname, bool on);
QSet<QString> m_expandedINames; // those expanded in the treeview