forked from qt-creator/qt-creator
Debugger: Expose WatchModel signals
This opens it up to be used with Qt5 connects in the TooltipManager and simpler user code. Change-Id: Ifc6fcc3a04d325437f5a2bdf1da463d28d650ee3 Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -41,6 +41,7 @@ namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
class SeparatedView;
|
||||
class WatchModel;
|
||||
|
||||
// Special formats. Keep in sync with dumper.py.
|
||||
enum DisplayFormat
|
||||
@@ -112,8 +113,6 @@ class DebuggerEngine;
|
||||
|
||||
namespace Internal {
|
||||
|
||||
class WatchModel;
|
||||
|
||||
class UpdateParameters
|
||||
{
|
||||
public:
|
||||
@@ -126,6 +125,19 @@ public:
|
||||
|
||||
typedef QHash<QString, QStringList> DumperTypeFormats; // Type name -> Dumper Formats
|
||||
|
||||
class WatchModelBase : public QAbstractItemModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
WatchModelBase() {}
|
||||
|
||||
signals:
|
||||
void currentIndexRequested(const QModelIndex &idx);
|
||||
void itemIsExpanded(const QModelIndex &idx);
|
||||
void columnAdjustmentRequested();
|
||||
};
|
||||
|
||||
class WatchHandler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -134,7 +146,7 @@ public:
|
||||
explicit WatchHandler(DebuggerEngine *engine);
|
||||
~WatchHandler();
|
||||
|
||||
QAbstractItemModel *model() const;
|
||||
WatchModelBase *model() const;
|
||||
|
||||
void cleanup();
|
||||
void watchExpression(const QString &exp, const QString &name = QString());
|
||||
|
||||
Reference in New Issue
Block a user