- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/tools/designer/src/lib/shared/qdesigner_propertycommand_p.h
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 59 59 #include <QtCore/QList> 60 60 #include <QtCore/QPair> 61 61 62 62 63 QT_BEGIN_NAMESPACE … … 78 79 enum SpecialProperty getSpecialProperty(const QString& propertyName); 79 80 80 81 81 // A helper class for applying properties to objects. 82 82 // Can be used for Set commands (setValue(), restoreOldValue()) or 83 83 // Reset Commands restoreDefaultValue(), restoreOldValue()). 84 class PropertyHelper { 84 // 85 class QDESIGNER_SHARED_EXPORT PropertyHelper { 86 Q_DISABLE_COPY(PropertyHelper) 85 87 public: 86 88 // A pair of Value and changed flag … … 93 95 QDesignerPropertySheetExtension *sheet, 94 96 int index); 97 95 98 96 99 QObject *object() const { return m_object; } 97 100 SpecialProperty specialProperty() const { return m_specialProperty; } 98 // set a new value 99 Value setValue(QDesignerFormWindowInterface *fw, const QVariant &value, bool changed, unsigned subPropertyMask); 101 // set a new value. Can be overwritten to perform a transformation (see 102 // handling of Arrow key move in FormWindow class). 103 virtual Value setValue(QDesignerFormWindowInterface *fw, const QVariant &value, bool changed, unsigned subPropertyMask); 100 104 101 105 // restore old value … … 148 152 typedef QList<QObject *> ObjectList; 149 153 150 explicit PropertyListCommand(QDesignerFormWindowInterface *formWindow );154 explicit PropertyListCommand(QDesignerFormWindowInterface *formWindow); 151 155 152 156 QObject* object(int index = 0) const; … … 160 164 161 165 protected: 162 typedef Q List<PropertyHelper> PropertyHelperList;163 166 typedef Q; 167 typedef QList<PropertyHelperPtr> PropertyHelperList; 164 168 165 169 // add an object … … 205 209 const PropertyDescription &propertyDescription() const { return m_propertyDescription; } 206 210 211 212 213 214 207 215 private: 208 216 PropertyDescription m_propertyDescription; … … 216 224 typedef QList<QObject *> ObjectList; 217 225 218 explicit SetPropertyCommand(QDesignerFormWindowInterface *formWindow );226 explicit SetPropertyCommand(QDesignerFormWindowInterface *formWindow); 219 227 220 228 bool init(QObject *object, const QString &propertyName, const QVariant &newValue); … … 233 241 234 242 virtual void redo(); 243 244 245 246 235 247 private: 236 248 unsigned subPropertyMask(const QVariant &newValue, QObject *referenceObject);
Note:
See TracChangeset
for help on using the changeset viewer.