forked from qt-creator/qt-creator
QmlDesigner.Model: Adding SignalHandlerProperty
SignalHandlerProperty allows editing convenient editing of signal handlers like onMousePress in the model. The interface is analogous to BindingProperty. Since mos views do not care about SignalHandlerProperties and they should not be mixed up with BindingProperties they are different types. I also added the signalHandlerPropertiesChanged() notifier to AbstractView. Change-Id: I68bc7d2c5d3b991944e8f8d698212a1dfef218bf Reviewed-by: Marco Bubke <marco.bubke@digia.com>
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include <designersettings.h>
|
||||
|
||||
#include <bindingproperty.h>
|
||||
#include <signalhandlerproperty.h>
|
||||
#include <nodeabstractproperty.h>
|
||||
#include <variantproperty.h>
|
||||
|
||||
@@ -185,6 +186,19 @@ void DebugView::bindingPropertiesChanged(const QList<BindingProperty> &propertyL
|
||||
}
|
||||
}
|
||||
|
||||
void DebugView::signalHandlerPropertiesChanged(const QVector<SignalHandlerProperty> &propertyList, AbstractView::PropertyChangeFlags propertyChange)
|
||||
{
|
||||
if (isDebugViewEnabled()) {
|
||||
QTextStream message;
|
||||
QString string;
|
||||
message.setString(&string);
|
||||
foreach (const SignalHandlerProperty &property, propertyList) {
|
||||
message << property;
|
||||
}
|
||||
log(tr("SignalHandlerProperties changed:"), string);
|
||||
}
|
||||
}
|
||||
|
||||
void DebugView::rootNodeTypeChanged(const QString &type, int majorVersion, int minorVersion)
|
||||
{
|
||||
if (isDebugViewEnabled()) {
|
||||
|
||||
Reference in New Issue
Block a user