Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/tools/designer/src/lib/shared/qdesigner_propertycommand_p.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    5959#include <QtCore/QList>
    6060#include <QtCore/QPair>
     61
    6162
    6263QT_BEGIN_NAMESPACE
     
    7879enum SpecialProperty getSpecialProperty(const QString& propertyName);
    7980
    80 
    8181// A helper class for applying properties to objects.
    8282// Can be used for Set commands (setValue(), restoreOldValue()) or
    8383// Reset Commands     restoreDefaultValue(), restoreOldValue()).
    84 class PropertyHelper {
     84//
     85class QDESIGNER_SHARED_EXPORT PropertyHelper {
     86    Q_DISABLE_COPY(PropertyHelper)
    8587public:
    8688    // A pair of Value and changed flag
     
    9395                   QDesignerPropertySheetExtension *sheet,
    9496                   int index);
     97
    9598
    9699    QObject *object() const { return m_object; }
    97100    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);
    100104
    101105    // restore old value
     
    148152    typedef QList<QObject *> ObjectList;
    149153
    150     explicit PropertyListCommand(QDesignerFormWindowInterface *formWindow);
     154    explicit PropertyListCommand(QDesignerFormWindowInterface *formWindow);
    151155
    152156    QObject* object(int index = 0) const;
     
    160164
    161165protected:
    162     typedef QList<PropertyHelper> PropertyHelperList;
    163 
     166    typedef Q;
     167    typedef QList<PropertyHelperPtr> PropertyHelperList;
    164168
    165169    // add an object
     
    205209    const PropertyDescription &propertyDescription() const { return  m_propertyDescription; }
    206210
     211
     212
     213
     214
    207215private:
    208216    PropertyDescription m_propertyDescription;
     
    216224    typedef QList<QObject *> ObjectList;
    217225
    218     explicit SetPropertyCommand(QDesignerFormWindowInterface *formWindow);
     226    explicit SetPropertyCommand(QDesignerFormWindowInterface *formWindow);
    219227
    220228    bool init(QObject *object, const QString &propertyName, const QVariant &newValue);
     
    233241
    234242    virtual void redo();
     243
     244
     245
     246
    235247private:
    236248    unsigned subPropertyMask(const QVariant &newValue, QObject *referenceObject);
Note: See TracChangeset for help on using the changeset viewer.