Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
254 edited
9 copied

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/tools/designer/src/lib/components/qdesigner_components.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/components/qdesigner_components_global.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/extension/default_extensionfactory.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/extension/default_extensionfactory.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/extension/extension.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/extension/extension.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/extension/extension_global.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/extension/qextensionmanager.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/extension/qextensionmanager.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/lib.pro

    r552 r561  
    3030CONFIG += qt_install_headers
    3131HEADERS_PRI = $$QT_BUILD_TREE/include/QtDesigner/headers.pri
    32 include($$HEADERS_PRI)|clear(HEADERS_PRI)
     32include($$HEADERS_PRI, "", true)|clear(HEADERS_PRI)
    3333
    3434#mac frameworks
  • trunk/tools/designer/src/lib/lib_pch.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractactioneditor.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractactioneditor.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractbrushmanager.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractdialoggui.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractdialoggui_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractdnditem.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractformeditor.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    6767#include <QtDesigner/QDesignerPromotionInterface>
    6868
     69// Must be done outside of the Qt namespace
    6970static void initResources()
    7071{
    7172    Q_INIT_RESOURCE(shared);
     73    Q_INIT_RESOURCE(ClamshellPhone);
     74    Q_INIT_RESOURCE(PDAPhone);
     75    Q_INIT_RESOURCE(PortableMedia);
     76    Q_INIT_RESOURCE(S60_nHD_Touchscreen);
     77    Q_INIT_RESOURCE(S60_QVGA_Candybar);
     78    Q_INIT_RESOURCE(SmartPhone2);
     79    Q_INIT_RESOURCE(SmartPhone);
     80    Q_INIT_RESOURCE(SmartPhoneWithButtons);
     81    Q_INIT_RESOURCE(TouchscreenPhone);
     82    Q_INIT_RESOURCE(Trolltech_Keypad);
     83    Q_INIT_RESOURCE(Trolltech_Touchscreen);
    7284}
    7385
  • trunk/tools/designer/src/lib/sdk/abstractformeditor.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractformeditorplugin.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractformeditorplugin.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractformwindow.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    248248    \fn virtual QString QDesignerFormWindowInterface::fileName() const
    249249
    250     Returns the file name of the .ui file that describes the form
     250    Returns the file name of the UI file that describes the form
    251251    currently being shown.
    252252
     
    400400
    401401    Returns a list of the header files that will be included in the
    402     form window's associated \c .ui file.
     402    form window's associated UI file.
    403403
    404404    Header files may be local, i.e. relative to the project's
    405     directory,\c "mywidget.h", or global, i.e. part of Qt or the
    406     compilers standard libraries:\c <QtGui/QWidget>.
     405    directory, \c "mywidget.h", or global, i.e. part of Qt or the
     406    compilers standard libraries: \c <QtGui/QWidget>.
    407407
    408408    \sa setIncludeHints()
     
    413413
    414414    Sets the header files that will be included in the form window's
    415     associated \c .ui file to the specified \a includeHints.
     415    associated UI file to the specified \a includeHints.
    416416
    417417    Header files may be local, i.e. relative to the project's
    418     directory,\c "mywidget.h", or global, i.e. part of Qt or the
    419     compilers standard libraries:\c <QtGui/QWidget>.
     418    directory, \c "mywidget.h", or global, i.e. part of Qt or the
     419    compilers standard libraries: \c <QtGui/QWidget>.
    420420
    421421    \sa includeHints()
  • trunk/tools/designer/src/lib/sdk/abstractformwindow.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractformwindowcursor.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractformwindowcursor.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractformwindowmanager.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractformwindowmanager.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractformwindowtool.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractformwindowtool.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstracticoncache.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractintegration.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractintegration.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractintrospection.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractintrospection_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractlanguage.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractmetadatabase.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractmetadatabase.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractnewformwidget.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractnewformwidget_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractobjectinspector.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractobjectinspector.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractoptionspage_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractpromotioninterface.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractpromotioninterface.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractpropertyeditor.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractpropertyeditor.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractresourcebrowser.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractresourcebrowser.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractsettings_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractwidgetbox.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractwidgetbox.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractwidgetdatabase.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractwidgetdatabase.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractwidgetfactory.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/abstractwidgetfactory.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/dynamicpropertysheet.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/extrainfo.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/extrainfo.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/layoutdecoration.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/membersheet.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/propertysheet.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/script.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5555
    5656    On saving the form, the extension is queried for a script snippet
    57     to be associated with the widget while saving the \c .ui file.
     57    to be associated with the widget while saving the UI file.
    5858    This script is then run after creating the widget by \l uic or
    5959    QUiLoader.
     
    6767
    6868    While saving the form, the state is serialized as a QVariantMap of
    69     \QD-supported properties, which is stored in the \c .ui file. This is
     69    \QD-supported properties, which is stored in the UI file. This is
    7070    handled by data() and setData().
    7171
     
    9898
    9999    Returns a map of variants describing the internal state to be
    100     stored in the  \c .ui file.
     100    stored in the UI file.
    101101*/
    102102
  • trunk/tools/designer/src/lib/sdk/script_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/sdk_global.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/sdk/taskmenu.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/actioneditor.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
    4040****************************************************************************/
    41 
    42 /*
    43 TRANSLATOR qdesigner_internal::ActionEditor
    44 */
    4541
    4642#include "actioneditor_p.h"
     
    152148    l->addWidget(toolbar);
    153149    // edit actions
    154     m_actionNew->setIcon(createIconSet(QLatin1String("filenew.png")));
     150    QIcon documentNewIcon = QIcon::fromTheme("document-new", createIconSet(QLatin1String("filenew.png")));
     151    m_actionNew->setIcon(documentNewIcon);
    155152    m_actionNew->setEnabled(false);
    156153    connect(m_actionNew, SIGNAL(triggered()), this, SLOT(slotNewAction()));
     
    161158    m_actionCut->setEnabled(false);
    162159    connect(m_actionCut, SIGNAL(triggered()), this, SLOT(slotCut()));
    163     m_actionCut->setIcon(createIconSet(QLatin1String("editcut.png")));
     160    QIcon editCutIcon = QIcon::fromTheme("edit-cut", createIconSet(QLatin1String("editcut.png")));
     161    m_actionCut->setIcon(editCutIcon);
    164162
    165163    m_actionCopy->setEnabled(false);
    166164    connect(m_actionCopy, SIGNAL(triggered()), this, SLOT(slotCopy()));
    167     m_actionCopy->setIcon(createIconSet(QLatin1String("editcopy.png")));
     165    QIcon editCopyIcon = QIcon::fromTheme("edit-copy", createIconSet(QLatin1String("editcopy.png")));
     166    m_actionCopy->setIcon(editCopyIcon);
    168167    toolbar->addAction(m_actionCopy);
    169168
    170169    connect(m_actionPaste, SIGNAL(triggered()), this, SLOT(slotPaste()));
    171     m_actionPaste->setIcon(createIconSet(QLatin1String("editpaste.png")));
     170    QIcon editPasteIcon = QIcon::fromTheme("edit-paste", createIconSet(QLatin1String("editpaste.png")));
     171    m_actionPaste->setIcon(editPasteIcon);
    172172    toolbar->addAction(m_actionPaste);
    173173
     
    177177    connect(m_actionNavigateToSlot, SIGNAL(triggered()), this, SLOT(navigateToSlotCurrentAction()));
    178178
    179     m_actionDelete->setIcon(createIconSet(QLatin1String("editdelete.png")));
     179    QIcon editDeleteIcon = QIcon::fromTheme("edit-delete", createIconSet(QLatin1String("editdelete.png")));
     180    m_actionDelete->setIcon(editDeleteIcon);
    180181    m_actionDelete->setEnabled(false);
    181182    connect(m_actionDelete, SIGNAL(triggered()), this, SLOT(slotDelete()));
     
    234235            this, SLOT(slotSelectionChanged(QItemSelection,QItemSelection)));
    235236
    236     connect(m_actionView, SIGNAL(contextMenuRequested(QContextMenuEvent*, QAction*)),
    237             this, SLOT(slotContextMenuRequested(QContextMenuEvent*, QAction*)));
     237    connect(m_actionView, SIGNAL(contextMenuRequested(QContextMenuEvent*,QAction*)),
     238            this, SLOT(slotContextMenuRequested(QContextMenuEvent*,QAction*)));
    238239
    239240    connect(this, SIGNAL(itemActivated(QAction*)), this, SLOT(editAction(QAction*)));
     
    248249    QToolButton *configureButton = new QToolButton;
    249250    QAction *configureAction = new QAction(t, configureButton);
    250     configureAction->setIcon(createIconSet(QLatin1String("configure.png")));
     251    QIcon configureIcon = QIcon::fromTheme("document-properties", createIconSet(QLatin1String("configure.png")));
     252    configureAction->setIcon(configureIcon);
    251253    QMenu *configureMenu = new QMenu;
    252254    configureAction->setMenu(configureMenu);
     
    457459            setInitialProperty(sheet, QLatin1String(checkablePropertyC), QVariant(true));
    458460
    459         if (!actionData.keysequence.isEmpty())
     461        if (!actionData.keysequence.value().isEmpty())
    460462            setInitialProperty(sheet, QLatin1String(shortcutPropertyC), qVariantFromValue(actionData.keysequence));
    461463
     
    492494// in case it is empty.
    493495
    494 static QDesignerFormWindowCommand *setKeySequencePropertyCommand(const QKeySequence &ks, QAction *action, QDesignerFormWindowInterface *fw)
     496static QDesignerFormWindowCommand *setKeySequencePropertyCommand(const PropertySheetKeySequenceValue &ks, QAction *action, QDesignerFormWindowInterface *fw)
    495497{
    496498    const QString shortcutProperty = QLatin1String(shortcutPropertyC);
    497     if (ks.isEmpty()) {
     499    if (ks.value().isEmpty()) {
    498500        ResetPropertyCommand *cmd = new ResetPropertyCommand(fw);
    499501        cmd->init(action, shortcutProperty);
     
    545547    oldActionData.toolTip = textPropertyValue(sheet, QLatin1String(toolTipPropertyC));
    546548    oldActionData.icon = qVariantValue<PropertySheetIconValue>(sheet->property(sheet->indexOf(QLatin1String(iconPropertyC))));
    547     oldActionData.keysequence = qVariantValue<QKeySequence>(sheet->property(sheet->indexOf(QLatin1String(shortcutPropertyC))));
     549    oldActionData.keysequence = ActionModel::actionShortCut(sheet);
    548550    oldActionData.checkable =  action->isCheckable();
    549551    dlg.setActionData(oldActionData);
  • trunk/tools/designer/src/lib/shared/actioneditor_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/actionprovider_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    8787    // stretches to the end of the toolbar/menu bar. So, check from the beginning
    8888    // in the case of a horizontal right-to-left orientation.
    89     const bool checkTopRight = orientation == Qt::Horizontal && QApplication::layoutDirection() == Qt::RightToLeft;
     89    const bool checkTopRight = orientation == Qt::Horizontal && w->layoutDirection() == Qt::RightToLeft;
    9090    const QPoint topRight = QPoint(w->rect().width(), 0);
    9191    for (int index = 0; index < actionCount; ++index) {
  • trunk/tools/designer/src/lib/shared/actionrepository.cpp

    r372 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    4343#include "qtresourceview_p.h"
    4444#include "iconloader_p.h"
     45#include "qdesigner_utils_p.h"
    4546
    4647#include <QtDesigner/QDesignerFormEditorInterface>
     
    169170
    170171// shortcut is a fake property, need to retrieve it via property sheet.
    171 static QString actionShortCut(QDesignerFormEditorInterface *core, QAction *action)
     172PropertySheetKeySequenceValue ActionModel::actionShortCut(QDesignerFormEditorInterface *core, QAction *action)
    172173{
    173174    QDesignerPropertySheetExtension *sheet = qt_extension<QDesignerPropertySheetExtension*>(core->extensionManager(), action);
    174175    if (!sheet)
    175         return QString();
     176        return PropertySheetKeySequenceValue();
     177    return actionShortCut(sheet);
     178}
     179
     180PropertySheetKeySequenceValue ActionModel::actionShortCut(const QDesignerPropertySheetExtension *sheet)
     181{
    176182    const int index = sheet->indexOf(QLatin1String("shortcut"));
    177183    if (index == -1)
    178         return QString();
    179     const QKeySequence keysequence = qvariant_cast<QKeySequence>(sheet->property(index));
    180     return keysequence.toString();
     184        return PropertySheetKeySequenceValue();
     185    return qvariant_cast<PropertySheetKeySequenceValue>(sheet->property(index));
    181186}
    182187
     
    222227    item->setToolTip(action->text());
    223228    // shortcut
    224     const QString shortcut = actionShortCut(core, action);
     229    const QString shortcut = actionShortCut(core, action).value().toString(QKeySequence::NativeText);
    225230    item = sl[ShortCutColumn];
    226231    item->setText(shortcut);
     
    526531    addWidget(m_actionTreeView);
    527532    // Wire signals
    528     connect(m_actionTreeView, SIGNAL(contextMenuRequested(QContextMenuEvent*, QAction*)),
    529             this, SIGNAL(contextMenuRequested(QContextMenuEvent*, QAction*)));
    530     connect(m_actionListView, SIGNAL(contextMenuRequested(QContextMenuEvent*, QAction*)),
    531             this, SIGNAL(contextMenuRequested(QContextMenuEvent*, QAction*)));
     533    connect(m_actionTreeView, SIGNAL(contextMenuRequested(QContextMenuEvent*,QAction*)),
     534            this, SIGNAL(contextMenuRequested(QContextMenuEvent*,QAction*)));
     535    connect(m_actionListView, SIGNAL(contextMenuRequested(QContextMenuEvent*,QAction*)),
     536            this, SIGNAL(contextMenuRequested(QContextMenuEvent*,QAction*)));
    532537
    533538    // make it possible for vs integration to reimplement edit action dialog
  • trunk/tools/designer/src/lib/shared/actionrepository_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    6666
    6767class QDesignerFormEditorInterface;
     68class QDesignerPropertySheetExtension;
    6869
    6970namespace qdesigner_internal {
     71
     72class PropertySheetKeySequenceValue;
    7073
    7174// Shared model of actions, to be used for several views (detailed/icon view).
     
    99102    // Find the associated menus and toolbars, ignore toolbuttons
    100103    static QWidgetList associatedWidgets(const QAction *action);
     104
     105    // Retrieve shortcut via property sheet as it is a fake property
     106    static PropertySheetKeySequenceValue actionShortCut(QDesignerFormEditorInterface *core, QAction *action);
     107    static PropertySheetKeySequenceValue actionShortCut(const QDesignerPropertySheetExtension *ps);
    101108
    102109signals:
  • trunk/tools/designer/src/lib/shared/codedialog.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
    4040****************************************************************************/
    41 
    42 /*
    43 TRANSLATOR qdesigner_internal::CodeDialog
    44 */
    4541
    4642#include "codedialog_p.h"
  • trunk/tools/designer/src/lib/shared/codedialog_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/connectionedit.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/connectionedit_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/csshighlighter.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
    4040****************************************************************************/
    41 
    42 /*
    43 TRANSLATOR qdesigner_internal::StyleSheetEditorDialog
    44 */
    4541
    4642#include "csshighlighter_p.h"
  • trunk/tools/designer/src/lib/shared/csshighlighter_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/deviceprofile.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/deviceprofile_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/dialoggui.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/dialoggui_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/extensionfactory_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/filterwidget.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/filterwidget_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/formlayoutmenu.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/formlayoutmenu_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/formwindowbase.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
    4040****************************************************************************/
    41 
    42 /*
    43 TRANSLATOR qdesigner_internal::FormWindowBase
    44 */
    4541
    4642#include "formwindowbase_p.h"
     
    5652#include "qdesigner_utils_p.h"
    5753
    58 #include <abstractformbuilder.h>
     54#include "qsimpleresource_p.h"
    5955
    6056#include <QtDesigner/QDesignerFormEditorInterface>
     
    483479}
    484480
     481QString FormWindowBase::fileContents() const
     482{
     483    const bool oldValue = QSimpleResource::setWarningsEnabled(false);
     484    const QString rc = contents();
     485    QSimpleResource::setWarningsEnabled(oldValue);
     486    return rc;
     487}
     488
    485489} // namespace qdesigner_internal
    486490
  • trunk/tools/designer/src/lib/shared/formwindowbase_p.h

    r372 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    9090    QVariantMap formData();
    9191    void setFormData(const QVariantMap &vm);
     92
     93    // Return contents without warnings. Should be 'contents(bool quiet)'
     94    QString fileContents() const;
    9295
    9396    // Return the widget containing the form. This is used to
  • trunk/tools/designer/src/lib/shared/grid.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/grid_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/gridpanel.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/gridpanel_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/htmlhighlighter.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/htmlhighlighter_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/iconloader.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/iconloader_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/iconselector.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    158158LanguageResourceDialog::~LanguageResourceDialog()
    159159{
    160     delete d_ptr;
    161160}
    162161
     
    428427// ------------- IconSelector
    429428IconSelector::IconSelector(QWidget *parent) :
    430     QWidget(parent)
    431 {
    432     d_ptr = new IconSelectorPrivate();
     429    QWidget(parent), d_ptr(new IconSelectorPrivate())
     430{
    433431    d_ptr->q_ptr = this;
    434432
     
    501499IconSelector::~IconSelector()
    502500{
    503     delete d_ptr;
    504501}
    505502
  • trunk/tools/designer/src/lib/shared/iconselector_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    8888
    8989private:
    90     class LanguageResourceDialogPrivate *d_ptr;
     90    QScopedPointer<class LanguageResourceDialogPrivate> d_ptr;
    9191    Q_DECLARE_PRIVATE(LanguageResourceDialog)
    9292    Q_DISABLE_COPY(LanguageResourceDialog)
     
    121121    void iconChanged(const PropertySheetIconValue &icon);
    122122private:
    123     class IconSelectorPrivate *d_ptr;
     123    QScopedPointer<class IconSelectorPrivate> d_ptr;
    124124    Q_DECLARE_PRIVATE(IconSelector)
    125125    Q_DISABLE_COPY(IconSelector)
  • trunk/tools/designer/src/lib/shared/invisible_widget.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/invisible_widget_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/layout.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/layout_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/layoutinfo.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/layoutinfo_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/metadatabase.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/metadatabase_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/morphmenu.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/morphmenu_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/newactiondialog.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    135135    rc.icon = m_ui->iconSelector->icon();
    136136    rc.checkable = m_ui->checkableCheckBox->checkState() == Qt::Checked;
    137     rc.keysequence = m_ui->keySequenceEdit->keySequence();
     137    rc.keysequence = PropertySheetKeySequenceValue(m_ui->keySequenceEdit->keySequence());
    138138    return rc;
    139139}
     
    145145    m_ui->iconSelector->setIcon(d.icon);
    146146    m_ui->tooltipEditor->setText(d.toolTip);
    147     m_ui->keySequenceEdit->setKeySequence(d.keysequence);
     147    m_ui->keySequenceEdit->setKeySequence(d.keysequence.value());
    148148    m_ui->checkableCheckBox->setCheckState(d.checkable ? Qt::Checked : Qt::Unchecked);
    149149
  • trunk/tools/designer/src/lib/shared/newactiondialog.ui

    r2 r561  
    44**
    55** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    6 ** Contact: Qt Software Information (qt-info@nokia.com)
     6** All rights reserved.
     7** Contact: Nokia Corporation (qt-info@nokia.com)
    78**
    89** This file is part of the Qt Designer of the Qt Toolkit.
     
    2324** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2425**
    25 ** In addition, as a special exception, Nokia gives you certain
    26 ** additional rights. These rights are described in the Nokia Qt LGPL
    27 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    28 ** package.
     26** In addition, as a special exception, Nokia gives you certain additional
     27** rights.  These rights are described in the Nokia Qt LGPL Exception
     28** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2929**
    3030** GNU General Public License Usage
     
    3636** met: http://www.gnu.org/copyleft/gpl.html.
    3737**
    38 ** If you are unsure which license is appropriate for your use, please
    39 ** contact the sales department at qt-sales@nokia.com.
     38** If you have questions regarding the use of this file, please contact
     39** Nokia at qt-info@nokia.com.
    4040** $QT_END_LICENSE$
    4141**
  • trunk/tools/designer/src/lib/shared/newactiondialog_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    8585    PropertySheetIconValue icon;
    8686    bool checkable;
    87     QKeySequence keysequence;
     87    PropertySheetKeySequenceValue keysequence;
    8888};
    8989
  • trunk/tools/designer/src/lib/shared/newformwidget.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    311311                         const qdesigner_internal::DeviceProfile &dp)
    312312{
    313     qdesigner_internal::QDesignerFormBuilder formBuilder(core,
    314                                                          qdesigner_internal::QDesignerFormBuilder::DisableScripts,
    315                                                          dp);
     313    qdesigner_internal::NewFormWidgetFormBuilder
     314        formBuilder(core, qdesigner_internal::QDesignerFormBuilder::DisableScripts, dp);
    316315    if (!workingDir.isEmpty())
    317316        formBuilder.setWorkingDirectory(workingDir);
  • trunk/tools/designer/src/lib/shared/newformwidget.ui

    r2 r561  
    44**
    55** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    6 ** Contact: Qt Software Information (qt-info@nokia.com)
     6** All rights reserved.
     7** Contact: Nokia Corporation (qt-info@nokia.com)
    78**
    89** This file is part of the Qt Designer of the Qt Toolkit.
     
    2324** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2425**
    25 ** In addition, as a special exception, Nokia gives you certain
    26 ** additional rights. These rights are described in the Nokia Qt LGPL
    27 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    28 ** package.
     26** In addition, as a special exception, Nokia gives you certain additional
     27** rights.  These rights are described in the Nokia Qt LGPL Exception
     28** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2929**
    3030** GNU General Public License Usage
     
    3636** met: http://www.gnu.org/copyleft/gpl.html.
    3737**
    38 ** If you are unsure which license is appropriate for your use, please
    39 ** contact the sales department at qt-sales@nokia.com.
     38** If you have questions regarding the use of this file, please contact
     39** Nokia at qt-info@nokia.com.
    4040** $QT_END_LICENSE$
    4141**
  • trunk/tools/designer/src/lib/shared/newformwidget_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/orderdialog.cpp

    r372 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
    4040****************************************************************************/
    41 
    42 /*
    43 TRANSLATOR qdesigner_internal::OrderDialog
    44 */
    4541
    4642#include "orderdialog_p.h"
  • trunk/tools/designer/src/lib/shared/orderdialog.ui

    r2 r561  
    33**
    44** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    5 ** Contact: Qt Software Information (qt-info@nokia.com)
     5** All rights reserved.
     6** Contact: Nokia Corporation (qt-info@nokia.com)
    67**
    78** This file is part of the Qt Designer of the Qt Toolkit.
     
    2223** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2324**
    24 ** In addition, as a special exception, Nokia gives you certain
    25 ** additional rights. These rights are described in the Nokia Qt LGPL
    26 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    27 ** package.
     25** In addition, as a special exception, Nokia gives you certain additional
     26** rights.  These rights are described in the Nokia Qt LGPL Exception
     27** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2828**
    2929** GNU General Public License Usage
     
    3535** met: http://www.gnu.org/copyleft/gpl.html.
    3636**
    37 ** If you are unsure which license is appropriate for your use, please
    38 ** contact the sales department at qt-sales@nokia.com.
     37** If you have questions regarding the use of this file, please contact
     38** Nokia at qt-info@nokia.com.
    3939** $QT_END_LICENSE$
    4040**
  • trunk/tools/designer/src/lib/shared/orderdialog_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/plaintexteditor.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
    4040****************************************************************************/
    41 
    42 /*
    43 TRANSLATOR qdesigner_internal::PlainTextEditorDialog
    44 */
    4541
    4642#include "plaintexteditor_p.h"
  • trunk/tools/designer/src/lib/shared/plaintexteditor_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/plugindialog.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/plugindialog.ui

    r2 r561  
    44**
    55** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    6 ** Contact: Qt Software Information (qt-info@nokia.com)
     6** All rights reserved.
     7** Contact: Nokia Corporation (qt-info@nokia.com)
    78**
    89** This file is part of the Qt Designer of the Qt Toolkit.
     
    2324** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2425**
    25 ** In addition, as a special exception, Nokia gives you certain
    26 ** additional rights. These rights are described in the Nokia Qt LGPL
    27 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    28 ** package.
     26** In addition, as a special exception, Nokia gives you certain additional
     27** rights.  These rights are described in the Nokia Qt LGPL Exception
     28** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2929**
    3030** GNU General Public License Usage
     
    3636** met: http://www.gnu.org/copyleft/gpl.html.
    3737**
    38 ** If you are unsure which license is appropriate for your use, please
    39 ** contact the sales department at qt-sales@nokia.com.
     38** If you have questions regarding the use of this file, please contact
     39** Nokia at qt-info@nokia.com.
    4040** $QT_END_LICENSE$
    4141**
  • trunk/tools/designer/src/lib/shared/plugindialog_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/pluginmanager.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    7373static const char *extendsElementC = "extends";
    7474static const char *addPageMethodC = "addpagemethod";
     75static const char *propertySpecsC = "propertyspecifications";
     76static const char *stringPropertySpecC = "stringpropertyspecification";
     77static const char *stringPropertyNameAttrC = "name";
     78static const char *stringPropertyTypeAttrC = "type";
     79static const char *stringPropertyNoTrAttrC = "notr";
    7580static const char *jambiLanguageC = "jambi";
    7681
     
    142147class QDesignerCustomWidgetSharedData : public QSharedData {
    143148public:
     149    // Type of a string property
     150    typedef QPair<qdesigner_internal::TextPropertyValidationMode, bool> StringPropertyType;
     151    typedef QHash<QString, StringPropertyType> StringPropertyTypeMap;
     152
    144153    explicit QDesignerCustomWidgetSharedData(const QString &thePluginPath) : pluginPath(thePluginPath) {}
    145154    void clearXML();
     
    153162    QString xmlExtends;
    154163
     164    StringPropertyTypeMap xmlStringPropertyTypeMap;
    155165};
    156166
     
    162172    xmlAddPageMethod.clear();
    163173    xmlExtends.clear();
     174    xmlStringPropertyTypeMap.clear();
    164175}
    165176
     
    219230{
    220231    return m_d->pluginPath;
     232}
     233
     234bool QDesignerCustomWidgetData::xmlStringPropertyType(const QString &name, StringPropertyType *type) const
     235{
     236    QDesignerCustomWidgetSharedData::StringPropertyTypeMap::const_iterator it = m_d->xmlStringPropertyTypeMap.constFind(name);
     237    if (it == m_d->xmlStringPropertyTypeMap.constEnd()) {
     238        *type = StringPropertyType(qdesigner_internal::ValidationRichText, true);
     239        return false;
     240    }
     241    *type = it.value();
     242    return true;
    221243}
    222244
     
    248270{
    249271    return QDesignerPluginManager::tr("An XML error was encountered when parsing the XML of the custom widget %1: %2").arg(name, errorMessage);
     272}
     273
     274static inline QString msgAttributeMissing(const QString &name)
     275{
     276    return QDesignerPluginManager::tr("A required attribute ('%1') is missing.").arg(name);
     277}
     278
     279static qdesigner_internal::TextPropertyValidationMode typeStringToType(const QString &v, bool *ok)
     280{
     281    *ok = true;
     282    if (v  == QLatin1String("multiline"))
     283        return qdesigner_internal::ValidationMultiLine;
     284    if (v  == QLatin1String("richtext"))
     285        return qdesigner_internal::ValidationRichText;
     286    if (v  == QLatin1String("stylesheet"))
     287        return qdesigner_internal::ValidationStyleSheet;
     288    if (v  == QLatin1String("singleline"))
     289        return qdesigner_internal::ValidationSingleLine;
     290    if (v  == QLatin1String("objectname"))
     291        return qdesigner_internal::ValidationObjectName;
     292    if (v  == QLatin1String("objectnamescope"))
     293        return qdesigner_internal::ValidationObjectNameScope;
     294    if (v  == QLatin1String("url"))
     295        return qdesigner_internal::ValidationURL;
     296    *ok = false;
     297    return qdesigner_internal::ValidationRichText;
     298}
     299
     300static  bool parsePropertySpecs(QXmlStreamReader &sr,
     301                                   QDesignerCustomWidgetSharedData::StringPropertyTypeMap *rc,
     302                                   QString *errorMessage)
     303{
     304    const QString propertySpecs = QLatin1String(propertySpecsC);
     305    const QString stringPropertySpec = QLatin1String(stringPropertySpecC);
     306    const QString stringPropertyTypeAttr = QLatin1String(stringPropertyTypeAttrC);
     307    const QString stringPropertyNoTrAttr = QLatin1String(stringPropertyNoTrAttrC);
     308    const QString stringPropertyNameAttr = QLatin1String(stringPropertyNameAttrC);
     309
     310    while (!sr.atEnd()) {
     311        switch(sr.readNext()) {
     312        case QXmlStreamReader::StartElement: {
     313            if (sr.name() != stringPropertySpec) {
     314                *errorMessage = QDesignerPluginManager::tr("An invalid property specification ('%1') was encountered. Supported types: %2").arg(sr.name().toString(), stringPropertySpec);
     315                return false;
     316            }
     317            const QXmlStreamAttributes atts = sr.attributes();
     318            const QString name = atts.value(stringPropertyNameAttr).toString();
     319            const QString type = atts.value(stringPropertyTypeAttr).toString();
     320            const QString notrS = atts.value(stringPropertyNoTrAttr).toString(); //Optional
     321
     322            if (type.isEmpty()) {
     323                *errorMessage = msgAttributeMissing(stringPropertyTypeAttr);
     324                return false;
     325            }
     326            if (name.isEmpty()) {
     327                *errorMessage = msgAttributeMissing(stringPropertyNameAttr);
     328                return false;
     329            }
     330            bool typeOk;
     331            const bool noTr = notrS == QLatin1String("true") || notrS == QLatin1String("1");
     332            QDesignerCustomWidgetSharedData::StringPropertyType v(typeStringToType(type, &typeOk), !noTr);
     333            if (!typeOk) {
     334                *errorMessage = QDesignerPluginManager::tr("'%1' is not a valid string property specification.").arg(type);
     335                return false;
     336            }
     337            rc->insert(name, v);
     338        }
     339            break;
     340        case QXmlStreamReader::EndElement: // Outer </stringproperties>
     341            if (sr.name() == propertySpecs)
     342                return true;
     343        default:
     344            break;
     345        }
     346    }
     347    return true;
    250348}
    251349
     
    312410        break;
    313411    }
    314     // Find <extends>, <addPageMethod>
     412    // Find <extends>, <addPageMethod>, <stringproperties>
    315413    elements.clear();
    316414    elements.push_back(QLatin1String(extendsElementC));
    317415    elements.push_back(QLatin1String(addPageMethodC));
     416    elements.push_back(QLatin1String(propertySpecsC));
    318417    while (true) {
    319418        switch (findElement(elements, sr)) {
     
    337436            }
    338437            break;
     438        case 2: // <stringproperties>
     439            if (!parsePropertySpecs(sr, &m_d->xmlStringPropertyTypeMap, errorMessage)) {
     440                *errorMessage = msgXmlError(name, *errorMessage);
     441                return ParseError;
     442            }
     443            break;
    339444        }
    340445    }
     
    346451class QDesignerPluginManagerPrivate {
    347452    public:
     453    typedef QPair<QString, QString> ClassNamePropertyNameKey;
     454
    348455    QDesignerPluginManagerPrivate(QDesignerFormEditorInterface *core);
    349456
     
    563670    const int before = m_d->m_registeredPlugins.size();
    564671    foreach (const QString &path, m_d->m_pluginPaths)
    565         registerPath(path);       
     672        registerPath(path);
    566673    const bool newPluginsFound = m_d->m_registeredPlugins.size() > before;
    567674    // We force a re-initialize as Jambi collection might return
     
    655762}
    656763
     764QDesignerCustomWidgetData QDesignerPluginManager::customWidgetData(const QString &name) const
     765{
     766    const int count = m_d->m_customWidgets.size();
     767    for (int i = 0; i < count; i++)
     768        if (m_d->m_customWidgets.at(i)->name() == name)
     769            return m_d->m_customWidgetData.at(i);
     770    return QDesignerCustomWidgetData();
     771}
     772
    657773QObjectList QDesignerPluginManager::instances() const
    658774{
  • trunk/tools/designer/src/lib/shared/pluginmanager_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5555
    5656#include "shared_global_p.h"
     57#include "shared_enums_p.h"
    5758
    5859#include <QtCore/QSharedDataPointer>
    5960#include <QtCore/QMap>
     61#include <QtCore/QPair>
    6062#include <QtCore/QStringList>
    6163
     
    7173class QDESIGNER_SHARED_EXPORT QDesignerCustomWidgetData {
    7274public:
     75    // StringPropertyType: validation mode and translatable flag.
     76    typedef QPair<qdesigner_internal::TextPropertyValidationMode, bool> StringPropertyType;
     77
    7378    explicit QDesignerCustomWidgetData(const QString &pluginPath = QString());
    7479
     
    9499    // Optional. The name to be used in the widget box.
    95100    QString xmlDisplayName() const;
     101    // Type of a string property
     102    bool xmlStringPropertyType(const QString &name, StringPropertyType *type) const;
    96103
    97104private:
     
    129136    CustomWidgetList registeredCustomWidgets() const;
    130137    QDesignerCustomWidgetData customWidgetData(QDesignerCustomWidgetInterface *w) const;
     138    QDesignerCustomWidgetData customWidgetData(const QString &className) const;
    131139
    132140    bool registerNewPlugins();
  • trunk/tools/designer/src/lib/shared/previewconfigurationwidget.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    6666#include <QtCore/QSharedData>
    6767
    68 // #define DEFAULT_SKINS_FROM_RESOURCE
    69 #ifdef DEFAULT_SKINS_FROM_RESOURCE
     68
     69static const char *skinResourcePathC = ":/skins/";
     70
    7071QT_BEGIN_NAMESPACE
    71 static const char *skinResourcePathC = ":/skins/";
    72 QT_END_NAMESPACE
    73 #else
    74 #  include <QtCore/QLibraryInfo>
    75 #endif
    76 
    77 QT_BEGIN_NAMESPACE
    7872
    7973static const char *skinExtensionC = "skin";
    8074
    81 namespace {
    82     // Pair of skin name, path
    83     typedef QPair<QString, QString> SkinNamePath;
    84     typedef QList<SkinNamePath> Skins;
    85     enum { SkinComboNoneIndex = 0 };
    86 }
     75// Pair of skin name, path
     76typedef QPair<QString, QString> SkinNamePath;
     77typedef QList<SkinNamePath> Skins;
     78enum { SkinComboNoneIndex = 0 };
    8779
    8880// find default skins (resources)
     
    9082    static Skins rc;
    9183    if (rc.empty()) {
    92 #ifdef DEFAULT_SKINS_FROM_RESOURCE
    9384        const QString skinPath = QLatin1String(skinResourcePathC);
    94 #else
    95         QString skinPath = QLibraryInfo::location(QLibraryInfo::PrefixPath);
    96         skinPath += QDir::separator();
    97         skinPath += QLatin1String("tools");
    98         skinPath += QDir::separator();
    99         skinPath += QLatin1String("qvfb");
    100 #endif
    10185        QString pattern = QLatin1String("*.");
    10286        pattern += QLatin1String(skinExtensionC);
    10387        const QDir dir(skinPath, pattern);
    104         const QFileInfoList list = dir.entryInfoList();
     88        const QFileInfoList list = dir.entryInfoList(QDir::Dirs|QDir::NoDotAndDotDot, QDir::Name);
    10589        if (list.empty())
    10690            return rc;
  • trunk/tools/designer/src/lib/shared/previewconfigurationwidget_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/previewmanager.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    6868#include <QtGui/QActionGroup>
    6969#include <QtGui/QCursor>
     70#include <QtGui/QMatrix>
    7071
    7172#include <QtCore/QMap>
     
    150151}
    151152
    152 // --------- Widget Preview skin: Forward the key events to the window
     153// PreviewDeviceSkin: Forwards the key events to the window and
     154// provides context menu with rotation options. Derived class
     155// can apply additional transformations to the skin.
     156
    153157class PreviewDeviceSkin : public  DeviceSkin
    154158{
    155159    Q_OBJECT
    156160public:
     161    enum Direction { DirectionUp, DirectionLeft,  DirectionRight };
     162
    157163    explicit PreviewDeviceSkin(const DeviceSkinParameters &parameters, QWidget *parent);
    158164    virtual void setPreview(QWidget *w);
     
    165171
    166172protected:
    167     virtual void populateContextMenu(QMenu *m);
     173    virtual void populateContextMenu(QMenu *) {}
     174
     175private slots:
     176    void slotDirection(QAction *);
     177
     178protected:
     179    // Fit the widget in case the orientation changes (transposing screensize)
     180    virtual void fitWidget(const QSize &size);   
     181    //  Calculate the complete transformation for the skin
     182    // (base class implementation provides rotation).
     183    virtual QMatrix skinTransform() const;
    168184
    169185private:
    170186    const QSize m_screenSize;
     187    Direction m_direction;
     188
     189    QAction *m_directionUpAction;
     190    QAction *m_directionLeftAction;
     191    QAction *m_directionRightAction;
     192    QAction *m_closeAction;
    171193};
    172194
    173195PreviewDeviceSkin::PreviewDeviceSkin(const DeviceSkinParameters &parameters, QWidget *parent) :
    174     DeviceSkin(parameters, parent),
    175     m_screenSize(parameters.screenSize())
     196    DeviceSkin(parameters, parent),   
     197    m_screenSize(parameters.screenSize()),
     198    m_direction(DirectionUp),
     199    m_directionUpAction(0),
     200    m_directionLeftAction(0),
     201    m_directionRightAction(0),
     202    m_closeAction(0)
    176203{
    177204    connect(this, SIGNAL(skinKeyPressEvent(int,QString,bool)),
     
    196223        QApplication::sendEvent(focusWidget, &e);
    197224    }
    198 
    199225}
    200226
     
    207233}
    208234
     235// Create a checkable action with integer data and
     236// set it checked if it matches the currentState.
     237static inline QAction
     238        *createCheckableActionIntData(const QString &label,
     239                                      int actionValue, int currentState,
     240                                      QActionGroup *ag, QObject *parent)
     241{
     242    QAction *a = new QAction(label, parent);
     243    a->setData(actionValue);
     244    a->setCheckable(true);
     245    if (actionValue == currentState)
     246        a->setChecked(true);
     247    ag->addAction(a);
     248    return a;
     249}
     250
    209251void PreviewDeviceSkin::slotPopupMenu()
    210252{
    211253    QMenu menu(this);
     254    // Create actions
     255    if (!m_directionUpAction) {
     256        QActionGroup *directionGroup = new QActionGroup(this);
     257        connect(directionGroup, SIGNAL(triggered(QAction*)), this, SLOT(slotDirection(QAction*)));
     258        directionGroup->setExclusive(true);
     259        m_directionUpAction = createCheckableActionIntData(tr("&Portrait"), DirectionUp, m_direction, directionGroup, this);
     260        //: Rotate form preview counter-clockwise
     261        m_directionLeftAction = createCheckableActionIntData(tr("Landscape (&CCW)"), DirectionLeft, m_direction, directionGroup, this);
     262        //: Rotate form preview clockwise
     263        m_directionRightAction = createCheckableActionIntData(tr("&Landscape (CW)"), DirectionRight, m_direction, directionGroup, this);
     264        m_closeAction = new QAction(tr("&Close"), this);
     265        connect(m_closeAction, SIGNAL(triggered()), parentWidget(), SLOT(close()));
     266    }
     267    menu.addAction(m_directionUpAction);
     268    menu.addAction(m_directionLeftAction);
     269    menu.addAction(m_directionRightAction);
     270    menu.addSeparator();
    212271    populateContextMenu(&menu);
     272    menu.addAction(m_closeAction);
    213273    menu.exec(QCursor::pos());
    214274}
    215275
    216 void PreviewDeviceSkin::populateContextMenu(QMenu *menu)
    217 {
    218      connect(menu->addAction(tr("&Close")), SIGNAL(triggered()), parentWidget(), SLOT(close()));
     276void PreviewDeviceSkin::slotDirection(QAction *a)
     277{
     278    const Direction newDirection = static_cast<Direction>(a->data().toInt());
     279    if (m_direction == newDirection)
     280        return;
     281    const Qt::Orientation newOrientation = newDirection == DirectionUp ? Qt::Vertical : Qt::Horizontal;
     282    const Qt::Orientation oldOrientation = m_direction  == DirectionUp ? Qt::Vertical : Qt::Horizontal;
     283    m_direction = newDirection;
     284    QApplication::setOverrideCursor(Qt::WaitCursor);
     285    if (oldOrientation != newOrientation) {
     286        QSize size = screenSize();
     287        if (newOrientation == Qt::Horizontal)
     288            size.transpose();
     289        fitWidget(size);
     290    }
     291    setTransform(skinTransform());
     292    QApplication::restoreOverrideCursor();
     293}
     294
     295void PreviewDeviceSkin::fitWidget(const QSize &size)
     296{
     297    view()->setFixedSize(size);
     298}
     299
     300QMatrix PreviewDeviceSkin::skinTransform() const
     301{
     302    QMatrix newTransform;   
     303    switch (m_direction)  {
     304        case DirectionUp:
     305            break;
     306        case DirectionLeft:
     307            newTransform.rotate(270.0);
     308            break;
     309        case DirectionRight:
     310            newTransform.rotate(90.0);
     311            break;
     312    }
     313    return newTransform;
    219314}
    220315
     
    258353
    259354protected:
    260     virtual void populateContextMenu(QMenu *m);
     355    virtual void populateContextMenu(QMenu *m);   
     356    virtual QMatrix skinTransform() const;
     357    virtual void fitWidget(const QSize &size);
    261358
    262359private:
    263360    ZoomMenu *m_zoomMenu;
     361    QAction *m_zoomSubMenuAction;
    264362    ZoomWidget *m_zoomWidget;
    265363};
     
    268366    PreviewDeviceSkin(parameters, parent),
    269367    m_zoomMenu(new ZoomMenu(this)),
     368    m_zoomSubMenuAction(0),
    270369    m_zoomWidget(new DesignerZoomWidget)
    271370{
     
    280379}
    281380
     381static inline qreal zoomFactor(int percent)
     382{
     383    return qreal(percent) / 100.0;
     384}
     385
     386static inline QSize scaleSize(int zoomPercent, const QSize &size)
     387{
     388    return zoomPercent == 100 ? size : (QSizeF(size) * zoomFactor(zoomPercent)).toSize();
     389}
     390
    282391void ZoomablePreviewDeviceSkin::setPreview(QWidget *formWidget)
    283 {
    284     formWidget->setFixedSize(screenSize());
     392{   
    285393    m_zoomWidget->setWidget(formWidget);
     394    m_zoomWidget->resize(scaleSize(zoomPercent(), screenSize()));
    286395}
    287396
     
    291400}
    292401
    293 void ZoomablePreviewDeviceSkin::setZoomPercent(int z)
    294 {
    295     if (z == zoomPercent())
     402void ZoomablePreviewDeviceSkin::setZoomPercent(int zp)
     403{
     404    if (zp == zoomPercent())
    296405        return;
    297406
    298407    // If not triggered by the menu itself: Update it
    299     if (m_zoomMenu->zoom() != z)
    300         m_zoomMenu->setZoom(z);
    301 
    302     const QCursor oldCursor = cursor();
    303     QApplication::setOverrideCursor(Qt::WaitCursor);
    304     // DeviceSkin has double, not qreal.
    305     const double hundred = 100.0;
    306     setZoom(static_cast<double>(z) / hundred);
    307     m_zoomWidget->setZoom(z);
     408    if (m_zoomMenu->zoom() != zp)
     409        m_zoomMenu->setZoom(zp);
     410
     411    QApplication::setOverrideCursor(Qt::WaitCursor);   
     412    m_zoomWidget->setZoom(zp);
     413    setTransform(skinTransform());
    308414    QApplication::restoreOverrideCursor();
    309415}
     
    311417void ZoomablePreviewDeviceSkin::populateContextMenu(QMenu *menu)
    312418{
    313     m_zoomMenu->addActions(menu);
     419    if (!m_zoomSubMenuAction) {
     420        m_zoomSubMenuAction = new QAction(tr("&Zoom"), this);
     421        QMenu *zoomSubMenu = new QMenu;
     422        m_zoomSubMenuAction->setMenu(zoomSubMenu);
     423        m_zoomMenu->addActions(zoomSubMenu);
     424    }
     425    menu->addAction(m_zoomSubMenuAction);
    314426    menu->addSeparator();
    315     PreviewDeviceSkin::populateContextMenu(menu);
    316     menu->addSeparator();
     427}
     428
     429QMatrix ZoomablePreviewDeviceSkin::skinTransform() const
     430{
     431    // Complete transformation consisting of base class rotation and zoom.
     432    QMatrix rc = PreviewDeviceSkin::skinTransform();
     433    const int zp = zoomPercent();
     434    if (zp != 100) {
     435        const qreal factor = zoomFactor(zp);
     436        rc.scale(factor, factor);
     437    }
     438    return rc;
     439}
     440
     441void ZoomablePreviewDeviceSkin::fitWidget(const QSize &size)
     442{
     443    m_zoomWidget->resize(scaleSize(zoomPercent(), size));
    317444}
    318445
     
    563690    const QString title = tr("%1 - [Preview]").arg(formWidget->windowTitle());
    564691    formWidget = fakeContainer(formWidget);
     692    formWidget->setWindowTitle(title);
    565693
    566694    // Clear any modality settings, child widget modalities must not be higher than parent's
  • trunk/tools/designer/src/lib/shared/previewmanager_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/promotionmodel.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
    4040****************************************************************************/
    41 
    42 /*
    43 TRANSLATOR qdesigner_internal::PromotionModel
    44 */
    4541
    4642#include "promotionmodel_p.h"
     
    126122        m_core(core)
    127123    {
    128         connect(this, SIGNAL(itemChanged(QStandardItem *)), this, SLOT(slotItemChanged(QStandardItem *)));
     124        connect(this, SIGNAL(itemChanged(QStandardItem*)), this, SLOT(slotItemChanged(QStandardItem*)));
    129125    }
    130126
  • trunk/tools/designer/src/lib/shared/promotionmodel_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/promotiontaskmenu.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/promotiontaskmenu_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/propertylineedit.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/propertylineedit_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_command.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    11141114    m_itemText = QApplication::translate("Command", "Page");
    11151115    m_itemIcon = QIcon();
    1116     m_widget->setObjectName(QApplication::translate("Command", "page"));
     1116    m_widget->setObjectName(QLatin1String("page"));
    11171117    formWindow()->ensureUniqueObjectName(m_widget);
    11181118
     
    12371237    m_itemText = QApplication::translate("Command", "Page");
    12381238    m_itemIcon = QIcon();
    1239     m_widget->setObjectName(QApplication::translate("Command", "tab"));
     1239    m_widget->setObjectName(QLatin1String("tab"));
    12401240    formWindow()->ensureUniqueObjectName(m_widget);
    12411241
     
    14231423        m_index++;
    14241424    m_widget = new QDesignerWidget(formWindow(), m_stackedWidget);
    1425     m_widget->setObjectName(QApplication::translate("Command", "page"));
     1425    m_widget->setObjectName(QLatin1String("page"));
    14261426    formWindow()->ensureUniqueObjectName(m_widget);
    14271427
  • trunk/tools/designer/src/lib/shared/qdesigner_command2.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_command2_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_command_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_dnditem.cpp

    r372 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_dnditem_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_dockwidget.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_dockwidget_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_formbuilder.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    8484QT_BEGIN_NAMESPACE
    8585
     86#ifndef QT_FORMBUILDER_NO_SCRIPT
    8687static QString summarizeScriptErrors(const QFormScriptRunner::Errors &errors)
    8788{
     
    9394    return rc;
    9495}
     96#endif
    9597
    9698namespace qdesigner_internal {
     
    109111{
    110112    Q_ASSERT(m_core);
     113#ifndef QT_FORMBUILDER_NO_SCRIPT
    111114    // Disable scripting in the editors.
    112115    QFormScriptRunner::Options options = formScriptRunner()->options();
     
    121124    }
    122125    formScriptRunner()-> setOptions(options);
     126#endif
    123127}
    124128
     
    401405        }
    402406    }
     407#ifndef QT_FORMBUILDER_NO_SCRIPT
    403408    // Check for script errors
    404409    *scriptErrors = builder.formScriptRunner()->errors();
     
    408413        return  0;
    409414    }
     415#endif
    410416    // Fake application style sheet by prepending. (If this doesn't work, fake by nesting
    411417    // into parent widget).
     
    474480}
    475481
     482// ---------- NewFormWidgetFormBuilder
     483
     484NewFormWidgetFormBuilder::NewFormWidgetFormBuilder(QDesignerFormEditorInterface *core,
     485                             Mode mode,
     486                             const DeviceProfile &deviceProfile) :
     487    QDesignerFormBuilder(core, mode, deviceProfile)
     488{
     489}
     490
     491void NewFormWidgetFormBuilder::createCustomWidgets(DomCustomWidgets *dc)
     492{
     493    QSimpleResource::handleDomCustomWidgets(core(), dc);
     494}
     495
    476496} // namespace qdesigner_internal
    477497
  • trunk/tools/designer/src/lib/shared/qdesigner_formbuilder_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    7676class DesignerIconCache;
    7777
    78 /* Form builder used for previewing forms, widget box and new form dialog.
     78/* Form builder used for previewing forms and widget box.
    7979 * It applies the system settings to its toplevel window. */
    8080
     
    160160};
    161161
     162// Form builder for a new form widget (preview). To allow for promoted
     163// widgets in the template, it implements the handling of custom widgets
     164// (adding of them to the widget database).
     165
     166class QDESIGNER_SHARED_EXPORT NewFormWidgetFormBuilder: public QDesignerFormBuilder {
     167public:
     168    NewFormWidgetFormBuilder(QDesignerFormEditorInterface *core,
     169                             Mode mode,
     170                             const DeviceProfile &deviceProfile = DeviceProfile());
     171
     172protected:
     173    virtual void createCustomWidgets(DomCustomWidgets *);
     174};
     175
     176
    162177} // namespace qdesigner_internal
    163178
  • trunk/tools/designer/src/lib/shared/qdesigner_formeditorcommand.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_formeditorcommand_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_formwindowcommand.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_formwindowcommand_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_formwindowmanager.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_formwindowmanager_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_integration.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    118118    // Extensions
    119119    if (QDesignerPropertyEditor *designerPropertyEditor= qobject_cast<QDesignerPropertyEditor *>(core()->propertyEditor())) {
    120         connect(designerPropertyEditor, SIGNAL(propertyValueChanged(QString, QVariant, bool)), this, SLOT(updateProperty(QString, QVariant, bool)));
     120        connect(designerPropertyEditor, SIGNAL(propertyValueChanged(QString,QVariant,bool)), this, SLOT(updateProperty(QString,QVariant,bool)));
    121121        connect(designerPropertyEditor, SIGNAL(resetProperty(QString)), this, SLOT(resetProperty(QString)));
    122122        connect(designerPropertyEditor, SIGNAL(addDynamicProperty(QString,QVariant)),
  • trunk/tools/designer/src/lib/shared/qdesigner_integration_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_introspection.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_introspection_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_membersheet.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_membersheet_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_menu.cpp

    r372 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    7373
    7474using namespace qdesigner_internal;
     75
     76// give the user a little more space to click on the sub menu rectangle
     77static inline void extendClickableArea(QRect *subMenuRect, Qt::LayoutDirection dir)
     78{
     79    switch (dir) {
     80    case Qt::LeftToRight:
     81        subMenuRect->setLeft(subMenuRect->left() - 20);
     82        break;
     83    case Qt::RightToLeft:
     84        subMenuRect->setRight(subMenuRect->right() + 20);
     85        break;
     86    }
     87}
    7588
    7689QDesignerMenu::QDesignerMenu(QWidget *parent) :
     
    332345    if (action->menu() || hasSubMenuPixmap(action)) {
    333346        pm_rect = subMenuPixmapRect(action);
    334         pm_rect.setLeft(pm_rect.left() - 20); // give the user a little more
    335                                               // space to click
     347        extendClickableArea(&pm_rect, layoutDirection());
    336348    }
    337349
     
    388400    QAction *action = safeActionAt(index);
    389401    QRect pm_rect = subMenuPixmapRect(action);
    390     pm_rect.setLeft(pm_rect.left() - 20); // give the user a little more space to click
     402    extendClickableArea(&pm_rect, layoutDirection());
    391403
    392404    const int old_index = m_currentIndex;
     
    547559    static const QPixmap pm(QLatin1String(":/trolltech/formeditor/images/submenu.png"));
    548560    const QRect g = actionGeometry(action);
    549     const int x = g.right() - pm.width() - 2;
     561    const int x = layoutDirection() == Qt::LeftToRight ? (g.right() - pm.width() - 2) : 2;
    550562    const int y = g.top() + (g.height() - pm.height())/2 + 1;
    551563    return QRect(x, y, pm.width(), pm.height());
     
    876888}
    877889
    878 void QDesignerMenu::moveLeft()
     890// Close submenu using the left/right keys according to layoutDirection().
     891// Return false to indicate the event must be propagated to the menu bar.
     892bool QDesignerMenu::hideSubMenuOnCursorKey()
    879893{
    880894    if (parentMenu()) {
    881895        hide();
    882     } else {
     896        return true;
     897    }
     898    closeMenuChain();
     899    update();
     900    if (parentMenuBar())
     901        return false;
     902    return true;
     903}
     904
     905// Open a submenu using the left/right keys according to layoutDirection().
     906// Return false to indicate the event must be propagated to the menu bar.
     907bool QDesignerMenu::showSubMenuOnCursorKey()
     908{
     909    const QAction *action = currentAction();
     910
     911    if (qobject_cast<const SpecialMenuAction*>(action) || action->isSeparator()) {
    883912        closeMenuChain();
    884         if (QDesignerMenuBar *mb = parentMenuBar()) {
    885             if (QApplication::layoutDirection() == Qt::LeftToRight)
    886                 mb->moveLeft();
    887             else
    888                 mb->moveRight();
    889         }
    890     }
    891     update();
     913        if (parentMenuBar())
     914            return false;
     915        return true;
     916    }
     917    m_lastSubMenuIndex = -1; // force a refresh
     918    slotShowSubMenuNow();
     919    return true;
     920}
     921
     922void QDesignerMenu::moveLeft()
     923{
     924    const bool handled = layoutDirection() == Qt::LeftToRight ?
     925                         hideSubMenuOnCursorKey() : showSubMenuOnCursorKey();
     926    if (!handled)
     927        parentMenuBar()->moveLeft();
    892928}
    893929
    894930void QDesignerMenu::moveRight()
    895931{
    896     QAction *action = currentAction();
    897 
    898     if (qobject_cast<SpecialMenuAction*>(action) || action->isSeparator()) {
    899         closeMenuChain();
    900         if (QDesignerMenuBar *mb = parentMenuBar()) {
    901             if (QApplication::layoutDirection() == Qt::LeftToRight)
    902                 mb->moveRight();
    903             else
    904                 mb->moveLeft();
    905         }
    906     } else {
    907         m_lastSubMenuIndex = -1; // force a refresh
    908         slotShowSubMenuNow();
    909     }
     932    const bool handled = layoutDirection() == Qt::LeftToRight ?
     933                         showSubMenuOnCursorKey() : hideSubMenuOnCursorKey();
     934    if (!handled)
     935        parentMenuBar()->moveRight();
    910936}
    911937
     
    10661092                menu->setWindowFlags(Qt::Popup);
    10671093            const QRect g = actionGeometry(action);
    1068             menu->move(mapToGlobal(g.topRight()));
     1094            if (layoutDirection() == Qt::LeftToRight) {
     1095                menu->move(mapToGlobal(g.topRight()));
     1096            } else {
     1097                // The position is not initially correct due to the unknown width,
     1098                // causing it to overlap a bit the first time it is invoked.
     1099                const QSize menuSize = menu->size();
     1100                QPoint point = g.topLeft() - QPoint(menu->width() + 10, 0);
     1101                menu->move(mapToGlobal(point));
     1102            }
    10691103            menu->show();
    10701104            menu->setFocus();
  • trunk/tools/designer/src/lib/shared/qdesigner_menu_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    182182
    183183private:
     184    bool hideSubMenuOnCursorKey();
     185    bool showSubMenuOnCursorKey();
     186
    184187    QPoint m_startPosition;
    185188    int m_currentIndex;
  • trunk/tools/designer/src/lib/shared/qdesigner_menubar.cpp

    r372 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    105105
    106106    setAcceptDrops(true); // ### fake
     107    // Fake property: Keep the menu bar editable in the form even if a native menu bar is used.
     108    setNativeMenuBar(false);
    107109
    108110    m_addMenu->setText(tr("Type Here"));
     
    220222        case Qt::Key_Left:
    221223            e->accept();
    222             if (QApplication::layoutDirection() == Qt::LeftToRight)
    223                 moveLeft(e->modifiers() & Qt::ControlModifier);
    224             else
    225                 moveRight(e->modifiers() & Qt::ControlModifier);
     224            moveLeft(e->modifiers() & Qt::ControlModifier);
    226225            return true;
    227226
    228227        case Qt::Key_Right:
    229228            e->accept();
    230             if (QApplication::layoutDirection() == Qt::LeftToRight)
    231                 moveRight(e->modifiers() & Qt::ControlModifier);
    232             else
    233                 moveLeft(e->modifiers() & Qt::ControlModifier);
     229            moveRight(e->modifiers() & Qt::ControlModifier);
    234230            return true; // no update
    235231
     
    754750}
    755751
     752bool QDesignerMenuBar::dragging() const
     753{
     754    return m_dragging;
     755}
     756
    756757void QDesignerMenuBar::moveLeft(bool ctrl)
    757758{
    758     if (ctrl)
    759         (void) swap(m_currentIndex, m_currentIndex - 1);
    760 
    761     m_currentIndex = qMax(0, --m_currentIndex);
     759    if (layoutDirection() == Qt::LeftToRight) {
     760        movePrevious(ctrl);
     761    } else {
     762        moveNext(ctrl);
     763    }
     764}
     765
     766void QDesignerMenuBar::moveRight(bool ctrl)
     767{
     768    if (layoutDirection() == Qt::LeftToRight) {
     769        moveNext(ctrl);
     770    } else {
     771        movePrevious(ctrl);
     772    }
     773}
     774
     775void QDesignerMenuBar::movePrevious(bool ctrl)
     776{
     777    const bool swapped = ctrl && swapActions(m_currentIndex, m_currentIndex - 1);
     778    const int newIndex = qMax(0, m_currentIndex - 1);
    762779    // Always re-select, swapping destroys order
    763     updateCurrentAction(true);
    764 }
    765 
    766 bool QDesignerMenuBar::dragging() const
    767 {
    768     return m_dragging;
    769 }
    770 
    771 void QDesignerMenuBar::moveRight(bool ctrl)
    772 {
    773     if (ctrl)
    774         (void) swap(m_currentIndex + 1, m_currentIndex);
    775 
    776     m_currentIndex = qMin(actions().count() - 1, ++m_currentIndex);
    777     updateCurrentAction(!ctrl);
     780    if (swapped || newIndex != m_currentIndex) {
     781        m_currentIndex = newIndex;
     782        updateCurrentAction(true);
     783    }
     784}
     785
     786void QDesignerMenuBar::moveNext(bool ctrl)
     787{
     788    const bool swapped = ctrl && swapActions(m_currentIndex + 1, m_currentIndex);
     789    const int newIndex = qMin(actions().count() - 1, m_currentIndex + 1);
     790    if (swapped || newIndex != m_currentIndex) {
     791        m_currentIndex = newIndex;
     792        updateCurrentAction(!ctrl);
     793    }
    778794}
    779795
     
    864880                menu->setWindowFlags(Qt::Popup);
    865881            menu->adjustSize();
    866             menu->move(mapToGlobal(g.bottomLeft()));
     882            if (layoutDirection() == Qt::LeftToRight) {
     883                menu->move(mapToGlobal(g.bottomLeft()));
     884            } else {
     885                // The position is not initially correct due to the unknown width,
     886                // causing it to overlap a bit the first time it is invoked.
     887                const QSize menuSize = menu->size();
     888                QPoint point = g.bottomRight() - QPoint(menu->width(), 0);
     889                menu->move(mapToGlobal(point));
     890            }
    867891            menu->setFocus(Qt::MouseFocusReason);
    868892            menu->raise();
     
    882906}
    883907
    884 bool QDesignerMenuBar::swap(int a, int b)
     908bool QDesignerMenuBar::swapActions(int a, int b)
    885909{
    886910    const int left = qMin(a, b);
  • trunk/tools/designer/src/lib/shared/qdesigner_menubar_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    156156    QAction *safeActionAt(int index) const;
    157157
    158     bool swap(int a, int b);
     158    bool swapActions(int a, int b);
    159159
    160160private:
    161161    void updateCurrentAction(bool selectAction);
     162    void movePrevious(bool ctrl);
     163    void moveNext(bool ctrl);
    162164
    163165    QAction *m_addMenu;
  • trunk/tools/designer/src/lib/shared/qdesigner_objectinspector.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_objectinspector_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_promotion.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_promotion_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_promotiondialog.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
    4040****************************************************************************/
    41 
    42 /*
    43 TRANSLATOR qdesigner_internal::QDesignerPromotionDialog
    44 */
    4541
    4642#include "qdesigner_promotiondialog_p.h"
     
    224220        m_treeView->setContextMenuPolicy(Qt::CustomContextMenu);
    225221
    226         connect(m_treeView->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
    227                 this, SLOT(slotSelectionChanged(QItemSelection, QItemSelection)));
     222        connect(m_treeView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
     223                this, SLOT(slotSelectionChanged(QItemSelection,QItemSelection)));
    228224
    229225        connect(m_treeView, SIGNAL(customContextMenuRequested(QPoint)),
     
    253249
    254250        NewPromotedClassPanel *newPromotedClassPanel = new NewPromotedClassPanel(baseClassNameList, preselectedBaseClass);
    255         connect(newPromotedClassPanel, SIGNAL(newPromotedClass(PromotionParameters, bool *)), this, SLOT(slotNewPromotedClass(PromotionParameters, bool *)));
     251        connect(newPromotedClassPanel, SIGNAL(newPromotedClass(PromotionParameters,bool*)), this, SLOT(slotNewPromotedClass(PromotionParameters,bool*)));
    256252        connect(this, SIGNAL(selectedBaseClassChanged(QString)),
    257253                newPromotedClassPanel, SLOT(chooseBaseClass(QString)));
     
    260256        vboxLayout->addWidget(m_buttonBox);
    261257        // connect model
    262         connect(m_model, SIGNAL(includeFileChanged(QDesignerWidgetDataBaseItemInterface*, QString)),
    263                 this, SLOT(slotIncludeFileChanged(QDesignerWidgetDataBaseItemInterface*, QString)));
    264 
    265         connect(m_model, SIGNAL(classNameChanged(QDesignerWidgetDataBaseItemInterface*, QString)),
    266                 this, SLOT(slotClassNameChanged(QDesignerWidgetDataBaseItemInterface*, QString)));
     258        connect(m_model, SIGNAL(includeFileChanged(QDesignerWidgetDataBaseItemInterface*,QString)),
     259                this, SLOT(slotIncludeFileChanged(QDesignerWidgetDataBaseItemInterface*,QString)));
     260
     261        connect(m_model, SIGNAL(classNameChanged(QDesignerWidgetDataBaseItemInterface*,QString)),
     262                this, SLOT(slotClassNameChanged(QDesignerWidgetDataBaseItemInterface*,QString)));
    267263
    268264        // focus
  • trunk/tools/designer/src/lib/shared/qdesigner_promotiondialog_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_propertycommand.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    317317unsigned compareSubProperties(const QVariant & q1, const QVariant & q2, qdesigner_internal::SpecialProperty specialProperty)
    318318{
     319    // Do not clobber new value in the comparison function in
     320    // case someone sets a QString on a PropertySheetStringValue.
     321    if (q1.type() != q2.type())
     322        return SubPropertyAll;
    319323    switch (q1.type()) {
    320324    case QVariant::Rect:
  • trunk/tools/designer/src/lib/shared/qdesigner_propertycommand_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_propertyeditor.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    4141
    4242#include "qdesigner_propertyeditor_p.h"
    43 #ifdef Q_OS_WIN
    44 #  include <widgetfactory_p.h>
    45 #endif
    46 #include <QAction>
    47 #include <QLineEdit>
    48 #include <QAbstractButton>
     43#include "pluginmanager_p.h"
     44
     45#include <QtDesigner/QDesignerFormEditorInterface>
     46#include <widgetfactory_p.h>
     47#include <QtGui/QAction>
     48#include <QtGui/QLineEdit>
     49#include <QtGui/QAbstractButton>
    4950
    5051QT_BEGIN_NAMESPACE
    5152
    5253namespace qdesigner_internal {
     54typedef QDesignerPropertyEditor::StringPropertyParameters StringPropertyParameters;
     55// A map of property name to type
     56typedef QHash<QString, StringPropertyParameters> PropertyNameTypeMap;
     57
     58// Compile a map of hard-coded string property types
     59static const PropertyNameTypeMap &stringPropertyTypes()
     60{
     61    static PropertyNameTypeMap propertyNameTypeMap;
     62    if (propertyNameTypeMap.empty()) {
     63        const StringPropertyParameters richtext(ValidationRichText, true);
     64        // Accessibility. Both are texts the narrator reads
     65        propertyNameTypeMap.insert(QLatin1String("accessibleDescription"), richtext);
     66        propertyNameTypeMap.insert(QLatin1String("accessibleName"), richtext);
     67        // object names
     68        const StringPropertyParameters objectName(ValidationObjectName, false);
     69        propertyNameTypeMap.insert(QLatin1String("buddy"), objectName);
     70        propertyNameTypeMap.insert(QLatin1String("currentItemName"), objectName);
     71        propertyNameTypeMap.insert(QLatin1String("currentPageName"), objectName);
     72        propertyNameTypeMap.insert(QLatin1String("currentTabName"), objectName);
     73        propertyNameTypeMap.insert(QLatin1String("layoutName"), objectName);
     74        propertyNameTypeMap.insert(QLatin1String("spacerName"), objectName);
     75        // Style sheet
     76        propertyNameTypeMap.insert(QLatin1String("styleSheet"), StringPropertyParameters(ValidationStyleSheet, false));
     77        // Buttons/  QCommandLinkButton
     78        const StringPropertyParameters multiline(ValidationMultiLine, true);
     79        propertyNameTypeMap.insert(QLatin1String("description"), multiline);
     80        propertyNameTypeMap.insert(QLatin1String("iconText"), multiline);
     81        // Tooltips, etc.
     82        propertyNameTypeMap.insert(QLatin1String("toolTip"), richtext);
     83        propertyNameTypeMap.insert(QLatin1String("whatsThis"), richtext);
     84        propertyNameTypeMap.insert(QLatin1String("windowIconText"), richtext);
     85        propertyNameTypeMap.insert(QLatin1String("html"), richtext);
     86        //  A QWizard page id
     87        propertyNameTypeMap.insert(QLatin1String("pageId"), StringPropertyParameters(ValidationSingleLine, false));
     88        // QPlainTextEdit
     89        propertyNameTypeMap.insert(QLatin1String("plainText"), StringPropertyParameters(ValidationMultiLine, true));
     90    }
     91    return propertyNameTypeMap;
     92}
    5393
    5494QDesignerPropertyEditor::QDesignerPropertyEditor(QWidget *parent, Qt::WindowFlags flags) :
     
    69109    }
    70110
    71     // Accessibility. Both are texts the narrator reads
    72     if (propertyName == QLatin1String("accessibleDescription") || propertyName == QLatin1String("accessibleName"))
    73         return StringPropertyParameters(ValidationRichText, true);
     111    // Check custom widgets by class.
     112    const QString className = WidgetFactory::classNameOf(core, object);
     113    const QDesignerCustomWidgetData customData = core->pluginManager()->customWidgetData(className);
     114    if (!customData.isNull()) {
     115        StringPropertyParameters customType;
     116        if (customData.xmlStringPropertyType(propertyName, &customType))
     117            return customType;
     118    }
    74119
    75     // Names
    76     if (propertyName == QLatin1String("buddy")
    77           || propertyName == QLatin1String("currentItemName")
    78           || propertyName == QLatin1String("currentPageName")
    79           || propertyName == QLatin1String("currentTabName")
    80           || propertyName == QLatin1String("layoutName")
    81           || propertyName == QLatin1String("spacerName"))
    82         return StringPropertyParameters(ValidationObjectName, false);
    83 
    84     if (propertyName.endsWith(QLatin1String("Name")))
    85         return StringPropertyParameters(ValidationSingleLine, true);
    86 
    87     // Multi line?
    88     if (propertyName == QLatin1String("styleSheet"))
    89         return StringPropertyParameters(ValidationStyleSheet, false);
    90 
    91     if (propertyName == QLatin1String("description") || propertyName == QLatin1String("iconText")) // QCommandLinkButton
    92         return StringPropertyParameters(ValidationMultiLine, true);
    93 
    94     if (propertyName == QLatin1String("toolTip")         || propertyName.endsWith(QLatin1String("ToolTip")) ||
    95             propertyName == QLatin1String("whatsThis")       ||
    96             propertyName == QLatin1String("windowIconText")  || propertyName == QLatin1String("html"))
    97         return StringPropertyParameters(ValidationRichText, true);
     120    // Check hardcoded property ames
     121   const PropertyNameTypeMap::const_iterator hit = stringPropertyTypes().constFind(propertyName);
     122   if (hit != stringPropertyTypes().constEnd())
     123       return hit.value();
    98124
    99125    // text: Check according to widget type.
     
    105131        return StringPropertyParameters(ValidationRichText, true);
    106132    }
    107     if (propertyName == QLatin1String("pageId")) // A QWizard page id
    108         return StringPropertyParameters(ValidationSingleLine, false);
    109133
    110     if (propertyName == QLatin1String("plainText")) // QPlainTextEdit
    111         return StringPropertyParameters(ValidationMultiLine, true);
     134   // Fuzzy matching
     135    if (propertyName.endsWith(QLatin1String("Name")))
     136        return StringPropertyParameters(ValidationSingleLine, true);
     137
     138    if (propertyName.endsWith(QLatin1String("ToolTip")))
     139        return StringPropertyParameters(ValidationRichText, true);
    112140
    113141#ifdef Q_OS_WIN // No translation for the active X "control" property
    114     if (propertyName == QLatin1String("control") && WidgetFactory::classNameOf(core, object) == QLatin1String("QAxWidget"))
     142    if (propertyName == QLatin1String("control") && className == QLatin1String("QAxWidget"))
    115143        return StringPropertyParameters(ValidationSingleLine, false);
    116 #else
    117     Q_UNUSED(core);
    118144#endif
    119145
  • trunk/tools/designer/src/lib/shared/qdesigner_propertyeditor_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    6464#include <QtGui/QToolBar>
    6565#include <QtGui/QMainWindow>
     66#include <QtGui/QMenuBar>
    6667
    6768QT_BEGIN_NAMESPACE
     
    612613        // windowModality is visible only for the main container, in which case the form windows enables it on loading
    613614        setVisible(createFakeProperty(QLatin1String("windowModality")), false);
    614         if (qobject_cast<const QToolBar *>(d->m_object)) // prevent toolbars from being dragged off
     615        if (qobject_cast<const QToolBar *>(d->m_object)) { // prevent toolbars from being dragged off
    615616            createFakeProperty(QLatin1String("floatable"), QVariant(true));
    616 
     617        } else {
     618            if (qobject_cast<const QMenuBar *>(d->m_object)) {
     619                // Keep the menu bar editable in the form even if a native menu bar is used.
     620                const bool nativeMenuBarDefault = !qApp->testAttribute(Qt::AA_DontUseNativeMenuBar);
     621                createFakeProperty(QLatin1String("nativeMenuBar"), QVariant(nativeMenuBarDefault));
     622            }
     623        }
    617624        if (d->m_canHaveLayoutAttributes) {
    618625            static const QString layoutGroup = QLatin1String("Layout");
     
    13821389}
    13831390
     1391// Determine the "designable" state of a property. Properties, which have
     1392// a per-object boolean test function that returns false are shown in
     1393// disabled state ("checked" depending on "checkable", etc.)
     1394// Properties, which are generally not designable independent
     1395// of the object are not shown at all.
     1396enum DesignableState { PropertyIsDesignable,
     1397                       // Object has a Designable test function that returns false.
     1398                       PropertyOfObjectNotDesignable,
     1399                       PropertyNotDesignable };
     1400
     1401static inline DesignableState designableState(const QDesignerMetaPropertyInterface *p, const QObject *object)
     1402{   
     1403    if (p->attributes(object) & QDesignerMetaPropertyInterface::DesignableAttribute)
     1404        return PropertyIsDesignable;
     1405    return (p->attributes() & QDesignerMetaPropertyInterface::DesignableAttribute) ?
     1406            PropertyOfObjectNotDesignable : PropertyNotDesignable;
     1407}
     1408
    13841409bool QDesignerPropertySheet::isVisible(int index) const
    13851410{
     
    14511476         return false;
    14521477
    1453     // Enabled handling
    1454     return (p->attributes(d->m_object) & QDesignerMetaPropertyInterface::DesignableAttribute) ||
    1455            (p->attributes() & QDesignerMetaPropertyInterface::DesignableAttribute);
     1478    // Enabled handling: Hide only statically not designable properties
     1479    return designableState(p, d->m_object) != PropertyNotDesignable;
    14561480}
    14571481
     
    14831507        return true;
    14841508
     1509    // Enable setting of properties for statically non-designable properties
     1510    // as this might be done via TaskMenu/Cursor::setProperty. Note that those
     1511    // properties are not visible.
    14851512    const QDesignerMetaPropertyInterface *p = d->m_meta->property(index);
    14861513    return (p->accessFlags() & QDesignerMetaPropertyInterface::WriteAccess) &&
    1487            (p->attributes(d->m_object) & QDesignerMetaPropertyInterface::DesignableAttribute);
     1514           designableState(p, d->m_object) != PropertyOfObjectNotDesignable;
    14881515}
    14891516
  • trunk/tools/designer/src/lib/shared/qdesigner_propertysheet_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_qsettings.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_qsettings_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_stackedbox.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    316316    const int count = stackedWidget()->count();
    317317    const bool hasSeveralPages = count > 1;
    318     m_actionDeletePage->setEnabled(hasSeveralPages);
     318    m_actionDeletePage->setEnabled(count);
    319319    if (count) {
    320320        const QString pageSubMenuLabel = tr("Page %1 of %2").arg(stackedWidget()->currentIndex() + 1).arg(count);
     
    328328                                                pageMenu);
    329329        }
    330     }
    331     QMenu *insertPageMenu = popup->addMenu(tr("Insert Page"));
    332     insertPageMenu->addAction(m_actionInsertPageAfter);
    333     insertPageMenu->addAction(m_actionInsertPage);
     330        QMenu *insertPageMenu = popup->addMenu(tr("Insert Page"));
     331        insertPageMenu->addAction(m_actionInsertPageAfter);
     332        insertPageMenu->addAction(m_actionInsertPage);
     333    } else {
     334        QAction *insertPageAction = popup->addAction(tr("Insert Page"));
     335        connect(insertPageAction, SIGNAL(triggered()), this, SLOT(addPage()));
     336    }
    334337    popup->addAction(m_actionNextPage);
    335338    m_actionNextPage->setEnabled(hasSeveralPages);
  • trunk/tools/designer/src/lib/shared/qdesigner_stackedbox_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp

    r372 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    388388    QMenu *pageMenu = 0;
    389389    const int count = m_tabWidget->count();
    390     m_actionDeletePage->setEnabled(count > 1);
     390    m_actionDeletePage->setEnabled(count);
    391391    if (count) {
    392392        const int currentIndex = m_tabWidget->currentIndex();
     
    401401                                                pageMenu);
    402402        }
    403     }
    404 
    405     QMenu *insertPageMenu = popup->addMenu(tr("Insert Page"));
    406     insertPageMenu->addAction(m_actionInsertPageAfter);
    407     insertPageMenu->addAction(m_actionInsertPage);
     403        QMenu *insertPageMenu = popup->addMenu(tr("Insert Page"));
     404        insertPageMenu->addAction(m_actionInsertPageAfter);
     405        insertPageMenu->addAction(m_actionInsertPage);
     406    } else {
     407        QAction *insertPageAction = popup->addAction(tr("Insert Page"));
     408        connect(insertPageAction, SIGNAL(triggered()), this, SLOT(addPage()));
     409    }
    408410    popup->addSeparator();
    409411    return pageMenu;
     
    417419static const char *currentTabToolTipKey = "currentTabToolTip";
    418420static const char *currentTabWhatsThisKey = "currentTabWhatsThis";
     421static const char *tabMovableKey = "movable";
    419422
    420423QTabWidgetPropertySheet::QTabWidgetPropertySheet(QTabWidget *object, QObject *parent) :
     
    429432    createFakeProperty(QLatin1String(currentTabToolTipKey), qVariantFromValue(qdesigner_internal::PropertySheetStringValue()));
    430433    createFakeProperty(QLatin1String(currentTabWhatsThisKey), qVariantFromValue(qdesigner_internal::PropertySheetStringValue()));
     434    // Prevent the tab widget's drag and drop handling from interfering with Designer's
     435    createFakeProperty(QLatin1String(tabMovableKey), QVariant(false));
    431436}
    432437
  • trunk/tools/designer/src/lib/shared/qdesigner_tabwidget_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_taskmenu.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
    4040****************************************************************************/
    41 
    42 /*
    43 TRANSLATOR qdesigner_internal::QDesignerTaskMenu
    44 */
    4541
    4642#include "qdesigner_taskmenu_p.h"
     
    661657        dialogUi.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
    662658    } else {
    663         connect(dialogUi.signalList, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)),
     659        connect(dialogUi.signalList, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)),
    664660                &selectSignalDialog, SLOT(accept()));
    665661    }
  • trunk/tools/designer/src/lib/shared/qdesigner_taskmenu_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_toolbar.cpp

    r372 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
    4040****************************************************************************/
    41 
    42 /*
    43 TRANSLATOR qdesigner_internal::Sentinel
    44 */
    4541
    4642#include "qdesigner_toolbar_p.h"
     
    6662#include <QtGui/qevent.h>
    6763#include <QtGui/QApplication>
    68 #include <QtGui/private/qtoolbarlayout_p.h>
    6964#include <QtCore/QDebug>
    7065
     
    454449}
    455450
     451//that's a trick to get acces to the initStyleOption which is a protected member
     452class FriendlyToolBar : public QToolBar {
     453public:
     454    friend class ToolBarEventFilter;
     455};
     456
    456457QRect ToolBarEventFilter::handleArea(const QToolBar *tb)
    457458{
    458     const QToolBarLayout *tbl = qobject_cast<QToolBarLayout *>(tb->layout());
    459     Q_ASSERT(tbl);
    460     return tbl->handleRect();
     459    QStyleOptionToolBar opt;
     460    static_cast<const FriendlyToolBar*>(tb)->initStyleOption(&opt);
     461    return tb->style()->subElementRect(QStyle::SE_ToolBarHandle, &opt, tb);
    461462}
    462463
     
    474475    switch (tb->orientation()) {
    475476    case Qt::Horizontal:
    476         switch (QApplication::layoutDirection()) {
     477        switch (tb->layoutDirection()) {
    477478        case Qt::LeftToRight:
    478479            rc.setX(exclusionRectangle.right() + 1);
  • trunk/tools/designer/src/lib/shared/qdesigner_toolbar_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_toolbox.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_toolbox_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_utils.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    398398        while (itPath.hasNext()) {
    399399            QPair<QIcon::Mode, QIcon::State> pair = itPath.next().key();
    400             icon.addPixmap(m_pixmapCache->pixmap(itPath.value()), pair.first, pair.second);
     400            icon.addFile(itPath.value().path(), QSize(), pair.first, pair.second);
    401401        }
    402402        m_cache.insert(value, icon);
  • trunk/tools/designer/src/lib/shared/qdesigner_utils_p.h

    r2 r561  
    1 
    21/****************************************************************************
    32**
    43** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    5 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    66**
    77** This file is part of the Qt Designer of the Qt Toolkit.
     
    2222** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2323**
    24 ** In addition, as a special exception, Nokia gives you certain
    25 ** additional rights. These rights are described in the Nokia Qt LGPL
    26 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    27 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2827**
    2928** GNU General Public License Usage
     
    3534** met: http://www.gnu.org/copyleft/gpl.html.
    3635**
    37 ** If you are unsure which license is appropriate for your use, please
    38 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3938** $QT_END_LICENSE$
    4039**
  • trunk/tools/designer/src/lib/shared/qdesigner_widget.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_widget_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_widgetbox.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
    4040****************************************************************************/
    41 
    42 /*
    43 TRANSLATOR qdesigner_internal::QDesignerWidgetBox
    44 */
    4541
    4642#include "qdesigner_widgetbox_p.h"
  • trunk/tools/designer/src/lib/shared/qdesigner_widgetbox_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_widgetitem.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qdesigner_widgetitem_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qlayout_widget.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    39 **
    40 ** This file is provided AS IS with NO WARRANTY OF ANY KND, INCLUDING THE
    41 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
    4239**
    4340****************************************************************************/
  • trunk/tools/designer/src/lib/shared/qlayout_widget_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qscripthighlighter.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qscripthighlighter_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/qsimpleresource.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    4242#include "qsimpleresource_p.h"
    4343#include "widgetfactory_p.h"
     44#include "widgetdatabase_p.h"
    4445
    4546#include <formscriptrunner_p.h>
     
    5859#include <QtGui/QAction>
    5960#include <QtCore/QDebug>
     61#include <QtCore/QCoreApplication>
     62
    6063
    6164QT_BEGIN_NAMESPACE
     
    7982    workingDirectory +=  QLatin1String(".designer");
    8083    setWorkingDirectory(QDir(workingDirectory));
     84#ifndef QT_FORMBUILDER_NO_SCRIPT
    8185    // Disable scripting in the editors.
    8286    formScriptRunner()-> setOptions(QFormScriptRunner::DisableScripts);
     87#endif
    8388}
    8489
     
    268273}
    269274
     275// Custom widgets handling helpers
     276
     277// Add unique fake slots and signals to lists
     278bool QSimpleResource::addFakeMethods(const DomSlots *domSlots, QStringList &fakeSlots, QStringList &fakeSignals)
     279{
     280    if (!domSlots)
     281        return false;
     282
     283    bool rc = false;
     284    foreach (const QString &fakeSlot, domSlots->elementSlot())
     285        if (fakeSlots.indexOf(fakeSlot) == -1) {
     286            fakeSlots += fakeSlot;
     287            rc = true;
     288        }
     289
     290    foreach (const QString &fakeSignal, domSlots->elementSignal())
     291        if (fakeSignals.indexOf(fakeSignal) == -1) {
     292            fakeSignals += fakeSignal;
     293            rc = true;
     294        }
     295    return rc;
     296}
     297
     298void QSimpleResource::addFakeMethodsToWidgetDataBase(const DomCustomWidget *domCustomWidget, WidgetDataBaseItem *item)
     299{
     300    const DomSlots *domSlots = domCustomWidget->elementSlots();
     301    if (!domSlots)
     302        return;
     303
     304    // Merge in new slots, signals
     305    QStringList fakeSlots = item->fakeSlots();
     306    QStringList fakeSignals = item->fakeSignals();
     307    if (addFakeMethods(domSlots, fakeSlots, fakeSignals)) {
     308        item->setFakeSlots(fakeSlots);
     309        item->setFakeSignals(fakeSignals);
     310    }
     311}
     312
     313// Perform one iteration of adding the custom widgets to the database,
     314// looking up the base class and inheriting its data.
     315// Remove the succeeded custom widgets from the list.
     316// Classes whose base class could not be found are left in the list.
     317
     318void QSimpleResource::addCustomWidgetsToWidgetDatabase(const QDesignerFormEditorInterface *core,
     319                                                       QList<DomCustomWidget*>& custom_widget_list)
     320{
     321    QDesignerWidgetDataBaseInterface *db = core->widgetDataBase();
     322    for (int i=0; i < custom_widget_list.size(); ) {
     323        bool classInserted = false;
     324        DomCustomWidget *custom_widget = custom_widget_list[i];
     325        const QString customClassName = custom_widget->elementClass();
     326        const QString base_class = custom_widget->elementExtends();
     327        QString includeFile;
     328        IncludeType includeType = IncludeLocal;
     329        if (const DomHeader *header = custom_widget->elementHeader()) {
     330            includeFile = header->text();
     331            if (header->hasAttributeLocation() && header->attributeLocation() == QLatin1String("global"))
     332                includeType = IncludeGlobal;
     333        }
     334        const bool domIsContainer = custom_widget->elementContainer();
     335        // Append a new item
     336        if (base_class.isEmpty()) {
     337            WidgetDataBaseItem *item = new WidgetDataBaseItem(customClassName);
     338            item->setPromoted(false);
     339            item->setGroup(QCoreApplication::translate("Designer", "Custom Widgets"));
     340            item->setIncludeFile(buildIncludeFile(includeFile, includeType));
     341            item->setContainer(domIsContainer);
     342            item->setCustom(true);
     343            addFakeMethodsToWidgetDataBase(custom_widget, item);
     344            db->append(item);
     345            custom_widget_list.removeAt(i);
     346            classInserted = true;
     347        } else {
     348            // Create a new entry cloned from base class. Note that this will ignore existing
     349            // classes, eg, plugin custom widgets.
     350            QDesignerWidgetDataBaseItemInterface *item =
     351                appendDerived(db, customClassName, QCoreApplication::translate("Designer", "Promoted Widgets"),
     352                              base_class,
     353                              buildIncludeFile(includeFile, includeType),
     354                              true,true);
     355            // Ok, base class found.
     356            if (item) {
     357                // Hack to accommodate for old UI-files in which "container" is not set properly:
     358                // Apply "container" from DOM only if true (else, eg classes from QFrame might not accept
     359                // dropping child widgets on them as container=false). This also allows for
     360                // QWidget-derived stacked pages.
     361                if (domIsContainer)
     362                    item->setContainer(domIsContainer);
     363
     364                addFakeMethodsToWidgetDataBase(custom_widget, static_cast<WidgetDataBaseItem*>(item));
     365                custom_widget_list.removeAt(i);
     366                classInserted = true;
     367            }
     368        }
     369        // Skip failed item.
     370        if (!classInserted)
     371            i++;
     372    }
     373
     374}
     375
     376void QSimpleResource::handleDomCustomWidgets(const QDesignerFormEditorInterface *core,
     377                                             const DomCustomWidgets *dom_custom_widgets)
     378{
     379    if (dom_custom_widgets == 0)
     380        return;
     381    QList<DomCustomWidget*> custom_widget_list = dom_custom_widgets->elementCustomWidget();
     382    // Attempt to insert each item derived from its base class.
     383    // This should at most require two iterations in the event that the classes are out of order
     384    // (derived first, max depth: promoted custom plugin = 2)
     385    for (int iteration = 0;  iteration < 2;  iteration++) {
     386        addCustomWidgetsToWidgetDatabase(core, custom_widget_list);
     387        if (custom_widget_list.empty())
     388            return;
     389    }
     390    // Oops, there are classes left whose base class could not be found.
     391    // Default them to QWidget with warnings.
     392    const QString fallBackBaseClass = QLatin1String("QWidget");
     393    for (int i=0; i < custom_widget_list.size(); i++ ) {
     394        DomCustomWidget *custom_widget = custom_widget_list[i];
     395        const QString customClassName = custom_widget->elementClass();
     396        const QString base_class = custom_widget->elementExtends();
     397        qDebug() << "** WARNING The base class " << base_class << " of the custom widget class " << customClassName
     398            << " could not be found. Defaulting to " << fallBackBaseClass << '.';
     399        custom_widget->setElementExtends(fallBackBaseClass);
     400    }
     401    // One more pass.
     402    addCustomWidgetsToWidgetDatabase(core, custom_widget_list);
     403}
     404
    270405// ------------ FormBuilderClipboard
    271406
  • trunk/tools/designer/src/lib/shared/qsimpleresource_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5656#include "shared_global_p.h"
    5757#include "abstractformbuilder.h"
     58#include <QtCore/QStringList>
    5859
    5960QT_BEGIN_NAMESPACE
    6061
    6162class DomScript;
     63class DomCustomWidgets;
     64class DomCustomWidget;
     65class DomSlots;
    6266
    6367class QDesignerFormEditorInterface;
    6468
    6569namespace qdesigner_internal {
     70
     71class WidgetDataBaseItem;
    6672
    6773class QDESIGNER_SHARED_EXPORT QSimpleResource : public QAbstractFormBuilder
     
    9399    static bool hasCustomWidgetScript(QDesignerFormEditorInterface *core, QObject *object);
    94100
     101    // Implementation for FormBuilder::createDomCustomWidgets() that adds
     102    // the custom widgets to the widget database
     103    static void handleDomCustomWidgets(const QDesignerFormEditorInterface *core,
     104                                       const DomCustomWidgets *dom_custom_widgets);
     105
    95106protected:
    96107    virtual QIcon nameToIcon(const QString &filePath, const QString &qrcPath);
     
    106117    static void addScript(const QString &script, ScriptSource source, DomScripts &domScripts);
    107118
     119    static bool addFakeMethods(const DomSlots *domSlots, QStringList &fakeSlots, QStringList &fakeSignals);
     120
    108121private:
     122    static void addCustomWidgetsToWidgetDatabase(const QDesignerFormEditorInterface *core,
     123                                                 QList<DomCustomWidget*>& custom_widget_list);
     124    static void addFakeMethodsToWidgetDataBase(const DomCustomWidget *domCustomWidget, WidgetDataBaseItem *item);
     125
    109126    static bool m_warningsEnabled;
    110127    QDesignerFormEditorInterface *m_core;
  • trunk/tools/designer/src/lib/shared/qtresourceeditordialog.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    19501950
    19511951QtResourceEditorDialog::QtResourceEditorDialog(QDesignerFormEditorInterface *core, QDesignerDialogGuiInterface *dlgGui, QWidget *parent)
    1952     : QDialog(parent)
    1953 {
    1954     d_ptr = new QtResourceEditorDialogPrivate();
     1952    : QDialog(parent), d_ptr(new QtResourceEditorDialogPrivate())
     1953{
    19551954    d_ptr->q_ptr = this;
    19561955    d_ptr->m_ui.setupUi(this);
     
    19621961    setWindowTitle(tr("Edit Resources"));
    19631962
    1964     connect(d_ptr->m_qrcManager, SIGNAL(qrcFileInserted(QtQrcFile *)),
    1965                 this, SLOT(slotQrcFileInserted(QtQrcFile *)));
    1966     connect(d_ptr->m_qrcManager, SIGNAL(qrcFileMoved(QtQrcFile *, QtQrcFile *)),
    1967                 this, SLOT(slotQrcFileMoved(QtQrcFile *)));
    1968     connect(d_ptr->m_qrcManager, SIGNAL(qrcFileRemoved(QtQrcFile *)),
    1969                 this, SLOT(slotQrcFileRemoved(QtQrcFile *)));
    1970     connect(d_ptr->m_qrcManager, SIGNAL(resourcePrefixInserted(QtResourcePrefix *)),
    1971                 this, SLOT(slotResourcePrefixInserted(QtResourcePrefix *)));
    1972     connect(d_ptr->m_qrcManager, SIGNAL(resourcePrefixMoved(QtResourcePrefix *, QtResourcePrefix *)),
    1973                 this, SLOT(slotResourcePrefixMoved(QtResourcePrefix *)));
    1974     connect(d_ptr->m_qrcManager, SIGNAL(resourcePrefixChanged(QtResourcePrefix *, const QString &)),
    1975                 this, SLOT(slotResourcePrefixChanged(QtResourcePrefix *)));
    1976     connect(d_ptr->m_qrcManager, SIGNAL(resourceLanguageChanged(QtResourcePrefix *, const QString &)),
    1977                 this, SLOT(slotResourceLanguageChanged(QtResourcePrefix *)));
    1978     connect(d_ptr->m_qrcManager, SIGNAL(resourcePrefixRemoved(QtResourcePrefix *)),
    1979                 this, SLOT(slotResourcePrefixRemoved(QtResourcePrefix *)));
    1980     connect(d_ptr->m_qrcManager, SIGNAL(resourceFileInserted(QtResourceFile *)),
    1981                 this, SLOT(slotResourceFileInserted(QtResourceFile *)));
    1982     connect(d_ptr->m_qrcManager, SIGNAL(resourceFileMoved(QtResourceFile *, QtResourceFile *)),
    1983                 this, SLOT(slotResourceFileMoved(QtResourceFile *)));
    1984     connect(d_ptr->m_qrcManager, SIGNAL(resourceAliasChanged(QtResourceFile *, const QString &)),
    1985                 this, SLOT(slotResourceAliasChanged(QtResourceFile *)));
    1986     connect(d_ptr->m_qrcManager, SIGNAL(resourceFileRemoved(QtResourceFile *)),
    1987                 this, SLOT(slotResourceFileRemoved(QtResourceFile *)));
     1963    connect(d_ptr->m_qrcManager, SIGNAL(qrcFileInserted(QtQrcFile*)),
     1964                this, SLOT(slotQrcFileInserted(QtQrcFile*)));
     1965    connect(d_ptr->m_qrcManager, SIGNAL(qrcFileMoved(QtQrcFile*,QtQrcFile*)),
     1966                this, SLOT(slotQrcFileMoved(QtQrcFile*)));
     1967    connect(d_ptr->m_qrcManager, SIGNAL(qrcFileRemoved(QtQrcFile*)),
     1968                this, SLOT(slotQrcFileRemoved(QtQrcFile*)));
     1969    connect(d_ptr->m_qrcManager, SIGNAL(resourcePrefixInserted(QtResourcePrefix*)),
     1970                this, SLOT(slotResourcePrefixInserted(QtResourcePrefix*)));
     1971    connect(d_ptr->m_qrcManager, SIGNAL(resourcePrefixMoved(QtResourcePrefix*,QtResourcePrefix*)),
     1972                this, SLOT(slotResourcePrefixMoved(QtResourcePrefix*)));
     1973    connect(d_ptr->m_qrcManager, SIGNAL(resourcePrefixChanged(QtResourcePrefix*,QString)),
     1974                this, SLOT(slotResourcePrefixChanged(QtResourcePrefix*)));
     1975    connect(d_ptr->m_qrcManager, SIGNAL(resourceLanguageChanged(QtResourcePrefix*,QString)),
     1976                this, SLOT(slotResourceLanguageChanged(QtResourcePrefix*)));
     1977    connect(d_ptr->m_qrcManager, SIGNAL(resourcePrefixRemoved(QtResourcePrefix*)),
     1978                this, SLOT(slotResourcePrefixRemoved(QtResourcePrefix*)));
     1979    connect(d_ptr->m_qrcManager, SIGNAL(resourceFileInserted(QtResourceFile*)),
     1980                this, SLOT(slotResourceFileInserted(QtResourceFile*)));
     1981    connect(d_ptr->m_qrcManager, SIGNAL(resourceFileMoved(QtResourceFile*,QtResourceFile*)),
     1982                this, SLOT(slotResourceFileMoved(QtResourceFile*)));
     1983    connect(d_ptr->m_qrcManager, SIGNAL(resourceAliasChanged(QtResourceFile*,QString)),
     1984                this, SLOT(slotResourceAliasChanged(QtResourceFile*)));
     1985    connect(d_ptr->m_qrcManager, SIGNAL(resourceFileRemoved(QtResourceFile*)),
     1986                this, SLOT(slotResourceFileRemoved(QtResourceFile*)));
    19881987
    19891988    QIcon upIcon = qdesigner_internal::createIconSet(QString::fromUtf8("up.png"));
     
    20392038
    20402039    d_ptr->m_ui.qrcFileList->setContextMenuPolicy(Qt::CustomContextMenu);
    2041     connect(d_ptr->m_ui.qrcFileList, SIGNAL(customContextMenuRequested(const QPoint &)),
    2042                 this, SLOT(slotListWidgetContextMenuRequested(const QPoint &)));
    2043     connect(d_ptr->m_ui.qrcFileList, SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)),
    2044                     this, SLOT(slotCurrentQrcFileChanged(QListWidgetItem *)));
     2040    connect(d_ptr->m_ui.qrcFileList, SIGNAL(customContextMenuRequested(QPoint)),
     2041                this, SLOT(slotListWidgetContextMenuRequested(QPoint)));
     2042    connect(d_ptr->m_ui.qrcFileList, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)),
     2043                    this, SLOT(slotCurrentQrcFileChanged(QListWidgetItem*)));
    20452044
    20462045    d_ptr->m_treeModel = new QStandardItemModel(this);
     
    20542053    d_ptr->m_ui.resourceTreeView->setTextElideMode(Qt::ElideLeft);
    20552054
    2056     connect(d_ptr->m_ui.resourceTreeView, SIGNAL(customContextMenuRequested(const QPoint &)),
    2057                 this, SLOT(slotTreeViewContextMenuRequested(const QPoint &)));
    2058     connect(d_ptr->m_treeModel, SIGNAL(itemChanged(QStandardItem *)),
    2059                 this, SLOT(slotTreeViewItemChanged(QStandardItem *)));
    2060     connect(d_ptr->m_treeSelection, SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)),
    2061                     this, SLOT(slotCurrentTreeViewItemChanged(const QModelIndex &)));
     2055    connect(d_ptr->m_ui.resourceTreeView, SIGNAL(customContextMenuRequested(QPoint)),
     2056                this, SLOT(slotTreeViewContextMenuRequested(QPoint)));
     2057    connect(d_ptr->m_treeModel, SIGNAL(itemChanged(QStandardItem*)),
     2058                this, SLOT(slotTreeViewItemChanged(QStandardItem*)));
     2059    connect(d_ptr->m_treeSelection, SIGNAL(currentChanged(QModelIndex,QModelIndex)),
     2060                    this, SLOT(slotCurrentTreeViewItemChanged(QModelIndex)));
    20622061
    20632062    d_ptr->m_ui.resourceTreeView->setColumnWidth(0, 200);
     
    20862085    settings->setValue(QLatin1String(Geometry), geometry());
    20872086    settings->endGroup();
    2088 
    2089     delete d_ptr;
    20902087}
    20912088
  • trunk/tools/designer/src/lib/shared/qtresourceeditordialog_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5454#define QTRESOURCEEDITOR_H
    5555
     56#include <QtCore/QScopedPointer>
    5657#include <QtGui/QDialog>
    5758
     
    8485    ~QtResourceEditorDialog();
    8586
    86     class QtResourceEditorDialogPrivate *d_ptr;
     87    QScopedPointer<class QtResourceEditorDialogPrivate> d_ptr;
    8788    Q_DECLARE_PRIVATE(QtResourceEditorDialog)
    8889    Q_DISABLE_COPY(QtResourceEditorDialog)
  • trunk/tools/designer/src/lib/shared/qtresourcemodel.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    142142QtResourceSet::~QtResourceSet()
    143143{
    144     delete d_ptr;
    145144}
    146145
     
    478477
    479478    d_ptr->m_fileWatcher = new QFileSystemWatcher(this);
    480     connect(d_ptr->m_fileWatcher, SIGNAL(fileChanged(const QString &)),
    481             this, SLOT(slotFileChanged(const QString &)));
     479    connect(d_ptr->m_fileWatcher, SIGNAL(fileChanged(QString)),
     480            this, SLOT(slotFileChanged(QString)));
    482481}
    483482
     
    490489        removeResourceSet(it.next());
    491490    blockSignals(false);
    492     delete d_ptr;
    493491}
    494492
  • trunk/tools/designer/src/lib/shared/qtresourcemodel_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5757#include <QtCore/QMap>
    5858#include <QtCore/QObject>
     59#include <QtCore/QScopedPointer>
    5960
    6061QT_BEGIN_NAMESPACE
     
    8889    friend class QtResourceModel;
    8990
    90     class QtResourceSetPrivate *d_ptr;
     91    QScopedPointer<class QtResourceSetPrivate> d_ptr;
    9192    Q_DECLARE_PRIVATE(QtResourceSet)
    9293    Q_DISABLE_COPY(QtResourceSet)
     
    133134    friend class QtResourceSet;
    134135
    135     class QtResourceModelPrivate *d_ptr;
     136    QScopedPointer<class QtResourceModelPrivate> d_ptr;
    136137    Q_DECLARE_PRIVATE(QtResourceModel)
    137138    Q_DISABLE_COPY(QtResourceModel)
  • trunk/tools/designer/src/lib/shared/qtresourceview.cpp

    r372 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    4545#include "qtresourceeditordialog_p.h"
    4646#include "iconloader_p.h"
     47#include "filterwidget_p.h" // For FilterWidget
    4748
    4849#include <QtDesigner/QDesignerFormEditorInterface>
     
    149150    void slotCopyResourcePath();
    150151    void slotListWidgetContextMenuRequested(const QPoint &pos);
     152    void slotFilterChanged(const QString &pattern);
    151153    void createPaths();
    152154    QTreeWidgetItem *createPath(const QString &path, QTreeWidgetItem *parent);
     
    157159    void saveSettings();
    158160    void updateActions();
     161    void filterOutResources();
    159162
    160163    QPixmap makeThumbnail(const QPixmap &pix) const;
     
    163166    QtResourceModel *m_resourceModel;
    164167    QToolBar *m_toolBar;
     168    qdesigner_internal::FilterWidget *m_filterWidget;
    165169    QTreeWidget *m_treeWidget;
    166170    QListWidget *m_listWidget;
    167171    QSplitter *m_splitter;
    168     QMap<QString, QStringList>       m_pathToContents; // full path to contents file names
     172    QMap<QString, QStringList>       m_pathToContents; // full path to contents file names (full path to its resource filenames)
     173    QMap<QString, QString>           m_pathToParentPath; // full path to full parent path
     174    QMap<QString, QStringList>       m_pathToSubPaths; // full path to full sub paths
    169175    QMap<QString, QTreeWidgetItem *> m_pathToItem;
    170176    QMap<QTreeWidgetItem *, QString> m_itemToPath;
     
    180186    QString m_settingsKey;
    181187    bool m_resourceEditingEnabled;
     188    QString m_filterPattern;
    182189};
    183190
     
    256263}
    257264
     265void QtResourceViewPrivate::slotFilterChanged(const QString &pattern)
     266{
     267    m_filterPattern = pattern;
     268    filterOutResources();
     269}
     270
    258271void QtResourceViewPrivate::storeExpansionState()
    259272{
     
    299312    m_editResourcesAction->setEnabled(resourceActive);
    300313    m_reloadResourcesAction->setEnabled(resourceActive);
     314    m_filterWidget->setEnabled(resourceActive);
    301315}
    302316
     
    312326    m_treeWidget->clear();
    313327    m_pathToContents.clear();
     328    m_pathToParentPath.clear();
     329    m_pathToSubPaths.clear();
    314330    m_pathToItem.clear();
    315331    m_itemToPath.clear();
     
    325341    else if (!currentPath.isEmpty())
    326342        q_ptr->selectResource(currentPath);
     343    filterOutResources();
    327344}
    328345
     
    366383
    367384    const QString root(QLatin1Char(':'));
    368 
    369     QMap<QString, QString> pathToParentPath; // full path to full parent path
    370     QMap<QString, QStringList> pathToSubPaths; // full path to full sub paths
    371385
    372386    QMap<QString, QString> contents = m_resourceModel->contents();
     
    377391        QString dirPath = fi.absolutePath();
    378392        m_pathToContents[dirPath].append(fi.fileName());
    379         while (!pathToParentPath.contains(dirPath) && dirPath != root) {
     393        while (!m_pathToParentPath.contains(dirPath) && dirPath != root) { // create all parent paths
    380394            const QFileInfo fd(dirPath);
    381395            const QString parentDirPath = fd.absolutePath();
    382             pathToParentPath[dirPath] = parentDirPath;
    383             pathToSubPaths[parentDirPath].append(dirPath);
     396            m_pathToParentPath[dirPath] = parentDirPath;
     397            m_pathToSubPaths[parentDirPath].append(dirPath);
    384398            dirPath = parentDirPath;
    385399        }
     
    392406        const QString path = pathToParentItem.first;
    393407        QTreeWidgetItem *item = createPath(path, pathToParentItem.second);
    394         QStringList subPaths = pathToSubPaths.value(path);
     408        QStringList subPaths = m_pathToSubPaths.value(path);
    395409        QStringListIterator itSubPaths(subPaths);
    396410        while (itSubPaths.hasNext())
    397411            pathToParentItemQueue.enqueue(qMakePair(itSubPaths.next(), item));
     412    }
     413}
     414
     415void QtResourceViewPrivate::filterOutResources()
     416{
     417    QMap<QString, bool> pathToMatchingContents; // true means the path has any matching contents
     418    QMap<QString, bool> pathToVisible; // true means the path has to be shown
     419
     420    // 1) we go from root path recursively.
     421    // 2) we check every path if it contains at least one matching resource - if empty we add it
     422    //                 to pathToMatchingContents and pathToVisible with false, if non empty
     423    //                 we add it with true and change every parent path in pathToVisible to true.
     424    // 3) we hide these items which has pathToVisible value false.
     425
     426    const bool matchAll = m_filterPattern.isEmpty();
     427    const QString root(QLatin1Char(':'));
     428
     429    QQueue<QString> pathQueue;
     430    pathQueue.enqueue(root);
     431    while (!pathQueue.isEmpty()) {
     432        const QString path = pathQueue.dequeue();
     433
     434        QStringList fileNames = m_pathToContents.value(path);
     435        QStringListIterator it(fileNames);
     436        bool hasContents = matchAll;
     437        if (!matchAll) { // the case filter is not empty - we check if the path contains anything
     438            while (it.hasNext()) {
     439                QString fileName = it.next();
     440                hasContents = fileName.contains(m_filterPattern, Qt::CaseInsensitive);
     441                if (hasContents) // the path contains at least one resource which matches the filter
     442                    break;
     443            }
     444        }
     445
     446        pathToMatchingContents[path] = hasContents;
     447        pathToVisible[path] = hasContents;
     448
     449        if (hasContents) { // if the path is going to be shown we need to show all its parent paths
     450            QString parentPath = m_pathToParentPath.value(path);
     451            while (!parentPath.isEmpty()) {
     452                QString p = parentPath;
     453                if (pathToVisible.value(p)) // parent path is already shown, we break the loop
     454                    break;
     455                pathToVisible[p] = true;
     456                parentPath = m_pathToParentPath.value(p);
     457            }
     458        }
     459
     460        QStringList subPaths = m_pathToSubPaths.value(path); // we do the same for children paths
     461        QStringListIterator itSubPaths(subPaths);
     462        while (itSubPaths.hasNext())
     463            pathQueue.enqueue(itSubPaths.next());
     464    }
     465
     466    // we setup here new path and resource to be activated
     467    const QString currentPath = m_itemToPath.value(m_treeWidget->currentItem());
     468    QString newCurrentPath = currentPath;
     469    QString currentResource = m_itemToResource.value(m_listWidget->currentItem());
     470    if (!matchAll) {
     471        bool searchForNewPathWithContents = true;
     472
     473        if (!currentPath.isEmpty()) { // if the currentPath is empty we will search for a new path too
     474            QMap<QString, bool>::ConstIterator it = pathToMatchingContents.constFind(currentPath);
     475            if (it != pathToMatchingContents.constEnd() && it.value()) // the current item has contents, we don't need to search for another path
     476                searchForNewPathWithContents = false;
     477        }
     478
     479        if (searchForNewPathWithContents) {
     480            // we find the first path with the matching contents
     481            QMap<QString, bool>::ConstIterator itContents = pathToMatchingContents.constBegin();
     482            while (itContents != pathToMatchingContents.constEnd()) {
     483                if (itContents.value()) {
     484                    newCurrentPath = itContents.key(); // the new path will be activated
     485                    break;
     486                }
     487
     488                itContents++;
     489            }
     490        }
     491
     492        QFileInfo fi(currentResource);
     493        if (!fi.fileName().contains(m_filterPattern, Qt::CaseInsensitive)) { // the case when the current resource is filtered out
     494            const QStringList fileNames = m_pathToContents.value(newCurrentPath);
     495            QStringListIterator it(fileNames);
     496            while (it.hasNext()) { // we try to select the first matching resource from the newCurrentPath
     497                QString fileName = it.next();
     498                if (fileName.contains(m_filterPattern, Qt::CaseInsensitive)) {
     499                    QDir dirPath(newCurrentPath);
     500                    currentResource = dirPath.absoluteFilePath(fileName); // the new resource inside newCurrentPath will be activated
     501                    break;
     502                }
     503            }
     504        }
     505    }
     506
     507    QTreeWidgetItem *newCurrentItem = m_pathToItem.value(newCurrentPath);
     508    if (currentPath != newCurrentPath)
     509        m_treeWidget->setCurrentItem(newCurrentItem);
     510    else
     511        slotCurrentPathChanged(newCurrentItem); // trigger filtering on the current path
     512
     513    QListWidgetItem *currentResourceItem = m_resourceToItem.value(currentResource);
     514    if (currentResourceItem) {
     515        m_listWidget->setCurrentItem(currentResourceItem);
     516        m_listWidget->scrollToItem(currentResourceItem);
     517    }
     518
     519    QMapIterator<QString, bool> it(pathToVisible); // hide all paths filtered out
     520    while (it.hasNext()) {
     521        const QString path = it.next().key();
     522        QTreeWidgetItem *item = m_pathToItem.value(path);
     523        if (item)
     524            item->setHidden(!it.value());
    398525    }
    399526}
     
    422549void QtResourceViewPrivate::createResources(const QString &path)
    423550{
     551    const bool matchAll = m_filterPattern.isEmpty();
     552
    424553    QDir dir(path);
    425     QStringList files = m_pathToContents.value(path);
    426     QStringListIterator it(files);
     554    QStringList fileNames = m_pathToContents.value(path);
     555    QStringListIterator it(fileNames);
    427556    while (it.hasNext()) {
    428         QString file = it.next();
    429         QString filePath = dir.absoluteFilePath(file);
    430         QFileInfo fi(filePath);
    431         if (fi.isFile()) {
    432             QListWidgetItem *item = new QListWidgetItem(fi.fileName(), m_listWidget);
    433             const QPixmap pix = QPixmap(filePath);
    434             if (pix.isNull()) {
    435                 item->setToolTip(filePath);
    436             } else {
    437                 item->setIcon(QIcon(makeThumbnail(pix)));
    438                 const QSize size = pix.size();
    439                 item->setToolTip(QtResourceView::tr("Size: %1 x %2\n%3").arg(size.width()).arg(size.height()).arg(filePath));
     557        QString fileName = it.next();
     558        const bool showProperty = matchAll || fileName.contains(m_filterPattern, Qt::CaseInsensitive);
     559        if (showProperty) {
     560            QString filePath = dir.absoluteFilePath(fileName);
     561            QFileInfo fi(filePath);
     562            if (fi.isFile()) {
     563                QListWidgetItem *item = new QListWidgetItem(fi.fileName(), m_listWidget);
     564                const QPixmap pix = QPixmap(filePath);
     565                if (pix.isNull()) {
     566                    item->setToolTip(filePath);
     567                } else {
     568                    item->setIcon(QIcon(makeThumbnail(pix)));
     569                    const QSize size = pix.size();
     570                    item->setToolTip(QtResourceView::tr("Size: %1 x %2\n%3").arg(size.width()).arg(size.height()).arg(filePath));
     571                }
     572                item->setFlags(item->flags() | Qt::ItemIsDragEnabled);
     573                item->setData(Qt::UserRole, filePath);
     574                m_itemToResource[item] = filePath;
     575                m_resourceToItem[filePath] = item;
    440576            }
    441             item->setFlags(item->flags() | Qt::ItemIsDragEnabled);
    442             item->setData(Qt::UserRole, filePath);
    443             m_itemToResource[item] = filePath;
    444             m_resourceToItem[filePath] = item;
    445577        }
    446578    }
     
    455587    d_ptr->q_ptr = this;
    456588
    457     d_ptr->m_editResourcesAction = new QAction(qdesigner_internal::createIconSet(QLatin1String("edit.png")), tr("Edit Resources..."), this);
     589    QIcon editIcon = QIcon::fromTheme("document-properties", qdesigner_internal::createIconSet(QLatin1String("edit.png")));
     590    d_ptr->m_editResourcesAction = new QAction(editIcon, tr("Edit Resources..."), this);
    458591    d_ptr->m_toolBar->addAction(d_ptr->m_editResourcesAction);
    459592    connect(d_ptr->m_editResourcesAction, SIGNAL(triggered()), this, SLOT(slotEditResources()));
    460593    d_ptr->m_editResourcesAction->setEnabled(false);
    461594
    462     d_ptr->m_reloadResourcesAction = new QAction(qdesigner_internal::createIconSet(QLatin1String("reload.png")), tr("Reload"), this);
     595    QIcon refreshIcon = QIcon::fromTheme("view-refresh", qdesigner_internal::createIconSet(QLatin1String("reload.png")));
     596    d_ptr->m_reloadResourcesAction = new QAction(refreshIcon, tr("Reload"), this);
     597
    463598    d_ptr->m_toolBar->addAction(d_ptr->m_reloadResourcesAction);
    464599    connect(d_ptr->m_reloadResourcesAction, SIGNAL(triggered()), this, SLOT(slotReloadResources()));
    465600    d_ptr->m_reloadResourcesAction->setEnabled(false);
    466601
    467     d_ptr->m_copyResourcePathAction = new QAction(qdesigner_internal::createIconSet(QLatin1String("editcopy.png")), tr("Copy Path"), this);
     602    QIcon copyIcon = QIcon::fromTheme("edit-copy", qdesigner_internal::createIconSet(QLatin1String("editcopy.png")));
     603    d_ptr->m_copyResourcePathAction = new QAction(copyIcon, tr("Copy Path"), this);
    468604    connect(d_ptr->m_copyResourcePathAction, SIGNAL(triggered()), this, SLOT(slotCopyResourcePath()));
    469605    d_ptr->m_copyResourcePathAction->setEnabled(false);
     606
     607    //d_ptr->m_filterWidget = new qdesigner_internal::FilterWidget(0, qdesigner_internal::FilterWidget::LayoutAlignNone);
     608    d_ptr->m_filterWidget = new qdesigner_internal::FilterWidget(d_ptr->m_toolBar);
     609    d_ptr->m_toolBar->addWidget(d_ptr->m_filterWidget);
     610    connect(d_ptr->m_filterWidget, SIGNAL(filterChanged(QString)), this, SLOT(slotFilterChanged(QString)));
    470611
    471612    d_ptr->m_splitter = new QSplitter;
     
    489630    d_ptr->m_listWidget->setGridSize(QSize(64, 64));
    490631
    491     connect(d_ptr->m_treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)),
    492                     this, SLOT(slotCurrentPathChanged(QTreeWidgetItem *)));
    493     connect(d_ptr->m_listWidget, SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)),
    494                     this, SLOT(slotCurrentResourceChanged(QListWidgetItem *)));
    495     connect(d_ptr->m_listWidget, SIGNAL(itemActivated(QListWidgetItem *)),
    496                     this, SLOT(slotResourceActivated(QListWidgetItem *)));
     632    connect(d_ptr->m_treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),
     633                    this, SLOT(slotCurrentPathChanged(QTreeWidgetItem*)));
     634    connect(d_ptr->m_listWidget, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)),
     635                    this, SLOT(slotCurrentResourceChanged(QListWidgetItem*)));
     636    connect(d_ptr->m_listWidget, SIGNAL(itemActivated(QListWidgetItem*)),
     637                    this, SLOT(slotResourceActivated(QListWidgetItem*)));
    497638    d_ptr->m_listWidget->setContextMenuPolicy(Qt::CustomContextMenu);
    498639    connect(d_ptr->m_listWidget, SIGNAL(customContextMenuRequested(QPoint)),
     
    504645    if (!d_ptr->m_settingsKey.isEmpty())
    505646        d_ptr->saveSettings();
    506 
    507     delete d_ptr;
    508647}
    509648
     
    576715{
    577716    if (d_ptr->m_resourceModel) {
    578         disconnect(d_ptr->m_resourceModel, SIGNAL(resourceSetActivated(QtResourceSet *, bool)),
    579                     this, SLOT(slotResourceSetActivated(QtResourceSet *)));
     717        disconnect(d_ptr->m_resourceModel, SIGNAL(resourceSetActivated(QtResourceSet*,bool)),
     718                    this, SLOT(slotResourceSetActivated(QtResourceSet*)));
    580719    }
    581720
     
    589728        return;
    590729
    591     connect(d_ptr->m_resourceModel, SIGNAL(resourceSetActivated(QtResourceSet *, bool)),
    592             this, SLOT(slotResourceSetActivated(QtResourceSet *)));
     730    connect(d_ptr->m_resourceModel, SIGNAL(resourceSetActivated(QtResourceSet*,bool)),
     731            this, SLOT(slotResourceSetActivated(QtResourceSet*)));
    593732
    594733    // fill new here
     
    746885
    747886    settings->endGroup();
    748 
    749     delete d_ptr;
    750887}
    751888
  • trunk/tools/designer/src/lib/shared/qtresourceview_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    103103private:
    104104
    105     class QtResourceViewPrivate *d_ptr;
     105    QScopedPointer<class QtResourceViewPrivate> d_ptr;
    106106    Q_DECLARE_PRIVATE(QtResourceView)
    107107    Q_DISABLE_COPY(QtResourceView)
     
    114114    Q_PRIVATE_SLOT(d_func(), void slotCopyResourcePath())
    115115    Q_PRIVATE_SLOT(d_func(), void slotListWidgetContextMenuRequested(const QPoint &pos))
     116    Q_PRIVATE_SLOT(d_func(), void slotFilterChanged(const QString &pattern))
    116117};
    117118
     
    130131
    131132private:
    132     class QtResourceViewDialogPrivate *d_ptr;
     133    QScopedPointer<class QtResourceViewDialogPrivate> d_ptr;
    133134    Q_DECLARE_PRIVATE(QtResourceViewDialog)
    134135    Q_DISABLE_COPY(QtResourceViewDialog)
  • trunk/tools/designer/src/lib/shared/richtexteditor.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
    4040****************************************************************************/
    41 
    42 /*
    43 TRANSLATOR qdesigner_internal::RichTextEditorDialog
    44 */
    4541
    4642#include "richtexteditor_p.h"
  • trunk/tools/designer/src/lib/shared/richtexteditor_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/scriptcommand.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/scriptcommand_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/scriptdialog.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
    4040****************************************************************************/
    41 
    42 /*
    43 TRANSLATOR qdesigner_internal::ScriptDialog
    44 */
    4541
    4642#include "scriptdialog_p.h"
     
    5450#include <QtGui/QDialogButtonBox>
    5551#include <QtGui/QMessageBox>
     52#ifdef QT_SCRIPT_LIB
    5653#include <QtScript/QScriptEngine>
     54#endif
    5755
    5856QT_BEGIN_NAMESPACE
     
    117115        if (script.isEmpty())
    118116            return true;
     117#ifdef QT_SCRIPT_LIB
    119118        QScriptEngine scriptEngine;
    120119        if (scriptEngine.canEvaluate(script))
     
    123122                             windowTitle(), tr("Syntax error"), QMessageBox::Ok);
    124123        return  false;
     124#else
     125        return true;
     126#endif
    125127    }
    126128} // namespace qdesigner_internal
  • trunk/tools/designer/src/lib/shared/scriptdialog_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/scripterrordialog.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
    4040****************************************************************************/
    41 
    42 /*
    43 TRANSLATOR qdesigner_internal::ScriptErrorDialog
    44 */
    4541
    4642#include "scripterrordialog_p.h"
  • trunk/tools/designer/src/lib/shared/scripterrordialog_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/shared.pri

    r372 r561  
    11
    22INCLUDEPATH += $$PWD
    3 QT += script
     3contains(QT_CONFIG, script): QT += script
    44
    55include($$QT_SOURCE_TREE/tools/shared/qtpropertybrowser/qtpropertybrowser.pri)
  • trunk/tools/designer/src/lib/shared/shared_enums_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/shared_global_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/shared_settings.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/shared_settings_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/sheet_delegate.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/sheet_delegate_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/signalslotdialog.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    269269    connect(m_model, SIGNAL(checkSignature(QString,bool*)), this, SIGNAL(checkSignature(QString,bool*)));
    270270
    271     connect(m_listView->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
    272             this, SLOT(slotSelectionChanged(QItemSelection, QItemSelection)));
     271    connect(m_listView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
     272            this, SLOT(slotSelectionChanged(QItemSelection,QItemSelection)));
    273273}
    274274
  • trunk/tools/designer/src/lib/shared/signalslotdialog_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/spacer_widget.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/spacer_widget_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/stylesheeteditor.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
    4040****************************************************************************/
    41 
    42 /*
    43 TRANSLATOR qdesigner_internal::StyleSheetEditorDialog
    44 */
    4541
    4642#include "stylesheeteditor_p.h"
     
    119115
    120116    m_editor->setContextMenuPolicy(Qt::CustomContextMenu);
    121     connect(m_editor, SIGNAL(customContextMenuRequested(const QPoint &)),
    122                 this, SLOT(slotContextMenuRequested(const QPoint &)));
     117    connect(m_editor, SIGNAL(customContextMenuRequested(QPoint)),
     118                this, SLOT(slotContextMenuRequested(QPoint)));
    123119
    124120    QSignalMapper *resourceActionMapper = new QSignalMapper(this);
     
    245241void StyleSheetEditorDialog::slotAddColor(const QString &property)
    246242{
    247     bool ok;
    248     QRgb rgba = QColorDialog::getRgba(0xffffffff, &ok, this);
    249     if (!ok)
     243    const QColor color = QColorDialog::getColor(0xffffffff, this, QString(), QColorDialog::ShowAlphaChannel);
     244    if (!color.isValid())
    250245        return;
    251246
    252     QColor color;
    253     color.setRgba(rgba);
    254247    QString colorStr;
    255248
  • trunk/tools/designer/src/lib/shared/stylesheeteditor_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/textpropertyeditor.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    279279                urlCompletions.push_back(QLatin1String("http://"));
    280280                urlCompletions.push_back(QLatin1String("http://www."));
    281                 urlCompletions.push_back(QLatin1String("http://qtsoftware.com/"));
     281                urlCompletions.push_back(QLatin1String("http://qt.nokia.com/"));
    282282                urlCompletions.push_back(QLatin1String("file://"));
    283283                urlCompletions.push_back(QLatin1String("ftp://"));
  • trunk/tools/designer/src/lib/shared/textpropertyeditor_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/widgetdatabase.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/widgetdatabase_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/widgetfactory.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
    4040****************************************************************************/
    41 
    42 /*
    43 TRANSLATOR qdesigner_internal::WidgetFactory
    44 */
    4541
    4642#include "widgetfactory_p.h"
     
    839835            m_lastWasAPassiveInteractor = true;
    840836        return m_lastWasAPassiveInteractor;
    841     }  else if (qobject_cast<QSizeGrip*>(widget))
     837#ifndef QT_NO_SIZEGRIP
     838    }  else if (qobject_cast<QSizeGrip*>(widget)) {
    842839        return (m_lastWasAPassiveInteractor = true);
    843      else if (qobject_cast<QMdiSubWindow*>(widget))
     840#endif
     841    }  else if (qobject_cast<QMdiSubWindow*>(widget))
    844842        return (m_lastWasAPassiveInteractor = true);
    845843    else if (qobject_cast<QAbstractButton*>(widget) && (qobject_cast<QTabBar*>(widget->parent()) || qobject_cast<QToolBox*>(widget->parent())))
  • trunk/tools/designer/src/lib/shared/widgetfactory_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/shared/zoomwidget.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    144144    m_zoomFactor(1.0),
    145145    m_zoomContextMenuEnabled(false),
    146     m_autoScrollSuppressed(true),
    147146    m_zoomMenu(0)
    148147{
     148    setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
     149    setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    149150    setFrameShape(QFrame::NoFrame);
    150151    setScene(m_scene);
     
    188189    resetTransform();
    189190    scale(m_zoomFactor, m_zoomFactor);
    190     if (m_autoScrollSuppressed)
    191         scrollToOrigin();
    192191}
    193192
     
    209208{
    210209    m_zoomContextMenuEnabled = e;
    211 }
    212 
    213 bool ZoomView::isAutoScrollSuppressed() const
    214 {
    215     return m_autoScrollSuppressed;
    216 }
    217 
    218 void ZoomView::setAutoScrollSuppressed(bool s)
    219 {
    220     m_autoScrollSuppressed = s;
    221210}
    222211
     
    470459    if (m_proxy && !m_viewResizeBlocked) {
    471460        if (debugZoomWidget > 1)
    472             qDebug() << ">ZoomWidget (" << size() << ")::resizeEvent from " << event->oldSize() << " to " << event->size();
     461            qDebug() << '>' << Q_FUNC_INFO << size() << ")::resizeEvent from " << event->oldSize() << " to " << event->size();
    473462        const QSizeF newViewPortSize = size() - viewPortMargin();
    474463        const QSizeF widgetSizeF = newViewPortSize / zoomFactor() - widgetDecorationSizeF();
    475464        m_widgetResizeBlocked = true;
    476465        m_proxy->widget()->resize(widgetSizeF.toSize());
     466        setSceneRect(QRectF(QPointF(0, 0), widgetSizeF));
    477467        scrollToOrigin();
    478468        m_widgetResizeBlocked = false;
     469        if (debugZoomWidget > 1)
     470            qDebug() << '<' << Q_FUNC_INFO << widgetSizeF << m_proxy->widget()->size() << m_proxy->size();
    479471    }
    480472}
     
    560552{
    561553
    562     qDebug() << "ZoomWidget " << geometry() << " Viewport " << viewport()->geometry()
     554    qDebug() << "ZoomWidget::dump " << geometry() << " Viewport " << viewport()->geometry()
    563555        << "Scroll: " << scrollPosition() << "Matrix: " << matrix() << " SceneRect: " << sceneRect();
    564556    if (m_proxy) {
  • trunk/tools/designer/src/lib/shared/zoomwidget_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    105105    Q_PROPERTY(int zoom READ zoom WRITE setZoom DESIGNABLE true SCRIPTABLE true)
    106106    Q_PROPERTY(bool zoomContextMenuEnabled READ isZoomContextMenuEnabled WRITE setZoomContextMenuEnabled DESIGNABLE true SCRIPTABLE true)
    107     Q_PROPERTY(bool autoScrollSuppressed READ isAutoScrollSuppressed WRITE setAutoScrollSuppressed DESIGNABLE true SCRIPTABLE true)
    108 
    109107    Q_OBJECT
    110108    Q_DISABLE_COPY(ZoomView)
     
    121119    void setZoomContextMenuEnabled(bool e);
    122120
    123     // Suppress scrolling when changing zoom. Default: on
    124     bool isAutoScrollSuppressed() const;
    125     void setAutoScrollSuppressed(bool s);
    126 
    127121    QGraphicsScene &scene() { return *m_scene; }
    128122    const QGraphicsScene &scene() const { return *m_scene; }
     
    150144    qreal m_zoomFactor;
    151145
    152     bool m_zoomContextMenuEnabled;
    153     bool m_autoScrollSuppressed;
     146    bool m_zoomContextMenuEnabled;   
    154147    bool m_resizeBlocked;
    155148    ZoomMenu *m_zoomMenu;
  • trunk/tools/designer/src/lib/uilib/abstractformbuilder.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**sw
     
    136136    implementation for constructing forms from user interface
    137137    files. It is not intended to be instantiated directly. Use the
    138     QFormBuilder class to create user interfaces from \c{.ui} files at
     138    QFormBuilder class to create user interfaces from UI files at
    139139    run-time. For example:
    140140
     
    146146
    147147    \list
    148     \o load() handles reading of \c{.ui} format files from arbitrary
     148    \o load() handles reading of UI format files from arbitrary
    149149       QIODevices, and construction of widgets from the XML data
    150150       that they contain.
    151     \o save() handles saving of widget details in \c{.ui} format to
     151    \o save() handles saving of widget details in UI format to
    152152       arbitrary QIODevices.
    153153    \o workingDirectory() and setWorkingDirectory() control the
     
    209209    }
    210210    if (reader.hasError()) {
    211         uiLibWarning(QCoreApplication::translate("QAbstractFormBuilder", "An error has occurred while reading the ui file at line %1, column %2: %3")
     211        uiLibWarning(QCoreApplication::translate("QAbstractFormBuilder", "An error has occurred while reading the UI file at line %1, column %2: %3")
    212212                                .arg(reader.lineNumber()).arg(reader.columnNumber())
    213213                                .arg(reader.errorString()));
     
    215215    }
    216216    if (!initialized) {
    217         uiLibWarning(QCoreApplication::translate("QAbstractFormBuilder", "Invalid ui file: The root element <ui> is missing."));
     217        uiLibWarning(QCoreApplication::translate("QAbstractFormBuilder", "Invalid UI file: The root element <ui> is missing."));
    218218        return 0;
    219219    }
     
    286286            QFormBuilderExtra *formBuilderPrivate = QFormBuilderExtra::instance(this);
    287287            const DomCustomWidgetList::const_iterator cend = customWidgets.constEnd();
    288             for (DomCustomWidgetList::const_iterator it = customWidgets.constBegin(); it != cend; ++it) {
    289                 const DomCustomWidget *cw = *it;
    290 #ifndef QT_FORMBUILDER_NO_SCRIPT
    291                 if (const DomScript *domScript = cw->elementScript()) {
    292                     const QString script = domScript->text();
    293                     if (!script.isEmpty())
    294                         formBuilderPrivate->storeCustomWidgetScript(cw->elementClass(), script);
    295                 }
    296 #endif
    297                 const QString addPageMethod = cw->elementAddPageMethod();
    298                 if (!addPageMethod.isEmpty())
    299                     formBuilderPrivate->storeCustomWidgetAddPageMethod(cw->elementClass(), addPageMethod);
    300 
    301                 const QString extends = cw->elementExtends();
    302                 if (!extends.isEmpty())
    303                     formBuilderPrivate->storeCustomWidgetBaseClass(cw->elementClass(), extends);
    304             }
     288            for (DomCustomWidgetList::const_iterator it = customWidgets.constBegin(); it != cend; ++it)
     289                formBuilderPrivate->storeCustomWidgetData((*it)->elementClass(), *it);
    305290        }
    306291    }
     
    404389        return 0;
    405390
     391    m_actions.insert(ui_action->attributeName(), a);
    406392    applyProperties(a, ui_action->elementProperty());
    407393    return a;
     
    416402    if (!a)
    417403        return 0;
    418 
     404    m_actionGroups.insert(ui_action_group->attributeName(), a);
    419405    applyProperties(a, ui_action_group->elementProperty());
    420406
     
    657643
    658644#ifdef Q_OS_MAC
    659     // here we recognize ui file < 4.3 (no we don't store margin property)
     645    // here we recognize UI file < 4.3 (no we don't store margin property)
    660646    if (mar != INT_MIN) {
    661647        const int defaultMargin = parent->inherits("QLayoutWidget") ? 0 : 9;
     
    11851171    QAction *action = new QAction(parent);
    11861172    action->setObjectName(name);
    1187     m_actions.insert(name, action);
    1188 
    11891173    return action;
    11901174}
     
    11971181    QActionGroup *g = new QActionGroup(parent);
    11981182    g->setObjectName(name);
    1199     m_actionGroups.insert(name, g);
    1200 
    12011183    return g;
    12021184}
     
    12061188
    12071189    Saves an XML representation of the given \a widget to the
    1208     specified \a device in the standard \c{.ui} file format.
     1190    specified \a device in the standard UI file format.
    12091191
    12101192    \sa load()*/
     
    17021684
    17031685template<class T>
     1686static void storeItemFlags(const T *item, QList<DomProperty*> *properties)
     1687{
     1688    static const QFormBuilderStrings &strings = QFormBuilderStrings::instance();
     1689    static const Qt::ItemFlags defaultFlags = T().flags();
     1690    static const QMetaEnum itemFlags_enum = metaEnum<QAbstractFormBuilderGadget>("itemFlags");
     1691
     1692    if (item->flags() != defaultFlags) {
     1693        DomProperty *p = new DomProperty;
     1694        p->setAttributeName(strings.flagsAttribute);
     1695        p->setElementSet(QString::fromAscii(itemFlags_enum.valueToKeys(item->flags())));
     1696        properties->append(p);
     1697    }
     1698}
     1699
     1700#ifndef Q_CC_RVCT
     1701// RVCT does not accept static inline functions if one argument is templated type
     1702// For this reason all necessary function variants are explicityly written for it.
     1703template<class T>
    17041704static void storeItemProps(QAbstractFormBuilder *abstractFormBuilder, const T *item,
    17051705        QList<DomProperty*> *properties)
     
    17271727
    17281728template<class T>
    1729 static void storeItemFlags(const T *item, QList<DomProperty*> *properties)
    1730 {
    1731     static const QFormBuilderStrings &strings = QFormBuilderStrings::instance();
    1732     static const Qt::ItemFlags defaultFlags = T().flags();
    1733     static const QMetaEnum itemFlags_enum = metaEnum<QAbstractFormBuilderGadget>("itemFlags");
    1734 
    1735     if (item->flags() != defaultFlags) {
    1736         DomProperty *p = new DomProperty;
    1737         p->setAttributeName(strings.flagsAttribute);
    1738         p->setElementSet(QString::fromAscii(itemFlags_enum.valueToKeys(item->flags())));
    1739         properties->append(p);
    1740     }
    1741 }
    1742 
    1743 template<class T>
    17441729static void storeItemPropsNFlags(QAbstractFormBuilder *abstractFormBuilder, const T *item,
    17451730        QList<DomProperty*> *properties)
     
    17931778        item->setFlags(enumKeysToValue<Qt::ItemFlags>(itemFlags_enum, p->elementSet().toAscii()));
    17941779}
     1780
     1781#else
     1782
     1783static void storeItemProps(QAbstractFormBuilder *abstractFormBuilder, const QTableWidgetItem *item,
     1784        QList<DomProperty*> *properties)
     1785{
     1786    static const QFormBuilderStrings &strings = QFormBuilderStrings::instance();
     1787    FriendlyFB * const formBuilder = static_cast<FriendlyFB *>(abstractFormBuilder);
     1788
     1789    DomProperty *p;
     1790    QVariant v;
     1791
     1792    foreach (const QFormBuilderStrings::TextRoleNName &it, strings.itemTextRoles)
     1793        if ((p = formBuilder->saveText(it.second, item->data(it.first.second))))
     1794            properties->append(p);
     1795
     1796    foreach (const QFormBuilderStrings::RoleNName &it, strings.itemRoles)
     1797        if ((v = item->data(it.first)).isValid() &&
     1798            (p = variantToDomProperty(abstractFormBuilder,
     1799                static_cast<const QMetaObject *>(&QAbstractFormBuilderGadget::staticMetaObject),
     1800                it.second, v)))
     1801            properties->append(p);
     1802
     1803    if ((p = formBuilder->saveResource(item->data(Qt::DecorationPropertyRole))))
     1804        properties->append(p);
     1805}
     1806
     1807static void storeItemProps(QAbstractFormBuilder *abstractFormBuilder, const QListWidgetItem *item,
     1808        QList<DomProperty*> *properties)
     1809{
     1810    static const QFormBuilderStrings &strings = QFormBuilderStrings::instance();
     1811    FriendlyFB * const formBuilder = static_cast<FriendlyFB *>(abstractFormBuilder);
     1812
     1813    DomProperty *p;
     1814    QVariant v;
     1815
     1816    foreach (const QFormBuilderStrings::TextRoleNName &it, strings.itemTextRoles)
     1817        if ((p = formBuilder->saveText(it.second, item->data(it.first.second))))
     1818            properties->append(p);
     1819
     1820    foreach (const QFormBuilderStrings::RoleNName &it, strings.itemRoles)
     1821        if ((v = item->data(it.first)).isValid() &&
     1822            (p = variantToDomProperty(abstractFormBuilder,
     1823                static_cast<const QMetaObject *>(&QAbstractFormBuilderGadget::staticMetaObject),
     1824                it.second, v)))
     1825            properties->append(p);
     1826
     1827    if ((p = formBuilder->saveResource(item->data(Qt::DecorationPropertyRole))))
     1828        properties->append(p);
     1829}
     1830
     1831static void storeItemPropsNFlags(QAbstractFormBuilder *abstractFormBuilder, const QTableWidgetItem *item,
     1832        QList<DomProperty*> *properties)
     1833{
     1834    storeItemProps(abstractFormBuilder, item, properties);
     1835    storeItemFlags(item, properties);
     1836}
     1837
     1838static void storeItemPropsNFlags(QAbstractFormBuilder *abstractFormBuilder, const QListWidgetItem *item,
     1839        QList<DomProperty*> *properties)
     1840{
     1841    storeItemProps(abstractFormBuilder, item, properties);
     1842    storeItemFlags(item, properties);
     1843}
     1844
     1845static void loadItemProps(QAbstractFormBuilder *abstractFormBuilder, QTableWidgetItem *item,
     1846        const QHash<QString, DomProperty*> &properties)
     1847{
     1848    static const QFormBuilderStrings &strings = QFormBuilderStrings::instance();
     1849    FriendlyFB * const formBuilder = static_cast<FriendlyFB *>(abstractFormBuilder);
     1850
     1851    DomProperty *p;
     1852    QVariant v;
     1853
     1854    foreach (const QFormBuilderStrings::TextRoleNName &it, strings.itemTextRoles)
     1855        if ((p = properties.value(it.second))) {
     1856            v = formBuilder->textBuilder()->loadText(p);
     1857            QVariant nativeValue = formBuilder->textBuilder()->toNativeValue(v);
     1858            item->setData(it.first.first, qVariantValue<QString>(nativeValue));
     1859            item->setData(it.first.second, v);
     1860        }
     1861
     1862    foreach (const QFormBuilderStrings::RoleNName &it, strings.itemRoles)
     1863        if ((p = properties.value(it.second)) &&
     1864            (v = formBuilder->toVariant(&QAbstractFormBuilderGadget::staticMetaObject, p)).isValid())
     1865            item->setData(it.first, v);
     1866
     1867    if ((p = properties.value(strings.iconAttribute))) {
     1868        v = formBuilder->resourceBuilder()->loadResource(formBuilder->workingDirectory(), p);
     1869        QVariant nativeValue = formBuilder->resourceBuilder()->toNativeValue(v);
     1870        item->setIcon(qVariantValue<QIcon>(nativeValue));
     1871        item->setData(Qt::DecorationPropertyRole, v);
     1872    }
     1873}
     1874
     1875static void loadItemProps(QAbstractFormBuilder *abstractFormBuilder, QListWidgetItem *item,
     1876        const QHash<QString, DomProperty*> &properties)
     1877{
     1878    static const QFormBuilderStrings &strings = QFormBuilderStrings::instance();
     1879    FriendlyFB * const formBuilder = static_cast<FriendlyFB *>(abstractFormBuilder);
     1880
     1881    DomProperty *p;
     1882    QVariant v;
     1883
     1884    foreach (const QFormBuilderStrings::TextRoleNName &it, strings.itemTextRoles)
     1885        if ((p = properties.value(it.second))) {
     1886            v = formBuilder->textBuilder()->loadText(p);
     1887            QVariant nativeValue = formBuilder->textBuilder()->toNativeValue(v);
     1888            item->setData(it.first.first, qVariantValue<QString>(nativeValue));
     1889            item->setData(it.first.second, v);
     1890        }
     1891
     1892    foreach (const QFormBuilderStrings::RoleNName &it, strings.itemRoles)
     1893        if ((p = properties.value(it.second)) &&
     1894            (v = formBuilder->toVariant(&QAbstractFormBuilderGadget::staticMetaObject, p)).isValid())
     1895            item->setData(it.first, v);
     1896
     1897    if ((p = properties.value(strings.iconAttribute))) {
     1898        v = formBuilder->resourceBuilder()->loadResource(formBuilder->workingDirectory(), p);
     1899        QVariant nativeValue = formBuilder->resourceBuilder()->toNativeValue(v);
     1900        item->setIcon(qVariantValue<QIcon>(nativeValue));
     1901        item->setData(Qt::DecorationPropertyRole, v);
     1902    }
     1903}
     1904
     1905static void loadItemPropsNFlags(QAbstractFormBuilder *abstractFormBuilder, QTableWidgetItem *item,
     1906        const QHash<QString, DomProperty*> &properties)
     1907{
     1908    static const QFormBuilderStrings &strings = QFormBuilderStrings::instance();
     1909    static const QMetaEnum itemFlags_enum = metaEnum<QAbstractFormBuilderGadget>("itemFlags");
     1910
     1911    loadItemProps(abstractFormBuilder, item, properties);
     1912
     1913    DomProperty *p;
     1914    if ((p = properties.value(strings.flagsAttribute)) && p->kind() == DomProperty::Set)
     1915        item->setFlags(enumKeysToValue<Qt::ItemFlags>(itemFlags_enum, p->elementSet().toAscii()));
     1916}
     1917
     1918static void loadItemPropsNFlags(QAbstractFormBuilder *abstractFormBuilder, QListWidgetItem *item,
     1919        const QHash<QString, DomProperty*> &properties)
     1920{
     1921    static const QFormBuilderStrings &strings = QFormBuilderStrings::instance();
     1922    static const QMetaEnum itemFlags_enum = metaEnum<QAbstractFormBuilderGadget>("itemFlags");
     1923
     1924    loadItemProps(abstractFormBuilder, item, properties);
     1925
     1926    DomProperty *p;
     1927    if ((p = properties.value(strings.flagsAttribute)) && p->kind() == DomProperty::Set)
     1928        item->setFlags(enumKeysToValue<Qt::ItemFlags>(itemFlags_enum, p->elementSet().toAscii()));
     1929}
     1930
     1931#endif
    17951932
    17961933/*!
     
    21462283        const DomPropertyHash properties = propertyMap(ui_item->elementProperty());
    21472284        QListWidgetItem *item = new QListWidgetItem(listWidget);
     2285#ifndef Q_CC_RVCT
    21482286        loadItemPropsNFlags<QListWidgetItem>(this, item, properties);
     2287#else
     2288        loadItemPropsNFlags(this, item, properties);
     2289#endif       
    21492290    }
    21502291
     
    26702811}
    26712812
    2672 namespace {
    2673     // set forward slashes in image path.
    2674     inline void fixImagePath(QString &p)    {
    2675         p.replace(QLatin1Char('\\'), QLatin1Char('/'));
    2676     }
    2677 }
    2678 
    26792813/*!
    26802814    \internal
  • trunk/tools/designer/src/lib/uilib/abstractformbuilder.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/uilib/container.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/uilib/customwidget.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/uilib/formbuilder.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5858
    5959    \brief The QFormBuilder class is used to dynamically construct
    60     user interfaces from .ui files at run-time.
     60    user interfaces from UI files at run-time.
    6161
    6262    \inmodule QtDesigner
    6363
    6464    The QFormBuilder class provides a mechanism for dynamically
    65     creating user interfaces at run-time, based on \c{.ui} files
     65    creating user interfaces at run-time, based on UI files
    6666    created with \QD. For example:
    6767
     
    121121QWidget *QFormBuilder::create(DomWidget *ui_widget, QWidget *parentWidget)
    122122{
    123     QFormBuilderExtra::instance(this)->setProcessingLayoutWidget(false);
     123    QFormBuilderExtra *fb = QFormBuilderExtra::instance(this);
     124    if (!fb->parentWidgetIsSet())
     125        fb->setParentWidget(parentWidget);
     126    // Is this a QLayoutWidget with a margin of 0: Not a known page-based
     127    // container and no method for adding pages registered.
     128    fb->setProcessingLayoutWidget(false);
    124129    if (ui_widget->attributeClass() == QFormBuilderStrings::instance().qWidgetClass && !ui_widget->hasAttributeNative()
    125130            && parentWidget
     
    145150            && !qobject_cast<QDockWidget *>(parentWidget)
    146151#endif
    147             )
    148         QFormBuilderExtra::instance(this)->setProcessingLayoutWidget(true);
     152        ) {
     153        const QString parentClassName = QLatin1String(parentWidget->metaObject()->className());
     154        if (!fb->isCustomWidgetContainer(parentClassName))
     155            fb->setProcessingLayoutWidget(true);
     156    }
    149157    return QAbstractFormBuilder::create(ui_widget, parentWidget);
    150158}
     
    228236    if (qobject_cast<QDialog *>(w))
    229237        w->setParent(parentWidget);
    230 
    231     if (!fb->rootWidget())
    232         fb->setRootWidget(w);
    233238
    234239    return w;
     
    370375QLayout *QFormBuilder::create(DomLayout *ui_layout, QLayout *layout, QWidget *parentWidget)
    371376{
     377    QFormBuilderExtra *fb = QFormBuilderExtra::instance(this);
    372378    // Is this a temporary layout widget used to represent QLayout hierarchies in Designer?
    373379    // Set its margins to 0.
    374     bool layoutWidget = QFormBuilderExtra::instance(this)->processingLayoutWidget();
     380    bool layoutWidget = fb->processingLayoutWidget();
    375381    QLayout *l = QAbstractFormBuilder::create(ui_layout, layout, parentWidget);
    376382    if (layoutWidget) {
     
    393399
    394400        l->setContentsMargins(left, top, right, bottom);
    395         QFormBuilderExtra::instance(this)->setProcessingLayoutWidget(false);
     401        fb->setProcessingLayoutWidget(false);
    396402    }
    397403    return l;
     
    526532    \internal
    527533*/
     534
    528535void QFormBuilder::applyProperties(QObject *o, const QList<DomProperty*> &properties)
    529536{
     
    543550
    544551        const QString attributeName = (*it)->attributeName();
    545         if (o == fb->rootWidget() && attributeName == strings.geometryProperty) {
    546             // apply only the size for the rootWidget
    547             fb->rootWidget()->resize(qvariant_cast<QRect>(v).size());
     552        const bool isWidget = o->isWidgetType();
     553        if (isWidget && o->parent() == fb->parentWidget() && attributeName == strings.geometryProperty) {
     554            // apply only the size part of a geometry for the root widget
     555            static_cast<QWidget*>(o)->resize(qvariant_cast<QRect>(v).size());
    548556        } else if (fb->applyPropertyInternally(o, attributeName, v)) {
    549         } else if (!qstrcmp("QFrame", o->metaObject()->className ()) && attributeName == strings.orientationProperty) {
     557        } else if (isWidget && !qstrcmp("QFrame", o->metaObject()->className ()) && attributeName == strings.orientationProperty) {
    550558            // ### special-casing for Line (QFrame) -- try to fix me
    551559            o->setProperty("frameShape", v); // v is of QFrame::Shape enum
  • trunk/tools/designer/src/lib/uilib/formbuilder.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/uilib/formbuilderextra.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    6666}
    6767
     68
     69QFormBuilderExtra::CustomWidgetData::CustomWidgetData() :
     70    isContainer(false)
     71{
     72}
     73
     74QFormBuilderExtra::CustomWidgetData::CustomWidgetData(const DomCustomWidget *dcw) :
     75    addPageMethod(dcw->elementAddPageMethod()),
     76    baseClass(dcw->elementExtends()),
     77    isContainer(dcw->hasElementContainer() && dcw->elementContainer() != 0)
     78{
     79#ifndef QT_FORMBUILDER_NO_SCRIPT
     80    if (const DomScript *domScript = dcw->elementScript())
     81        script = domScript->text();
     82#endif
     83}
     84
    6885QFormBuilderExtra::QFormBuilderExtra() :
    6986    m_layoutWidget(false),
     
    8299{
    83100    m_buddies.clear();
    84     m_rootWidget = 0;
     101    m_parentWidget = 0;
     102    m_parentWidgetIsSet = false;
    85103#ifndef QT_FORMBUILDER_NO_SCRIPT
    86104    m_FormScriptRunner.clearErrors();
    87     m_customWidgetScriptHash.clear();
    88105#endif
     106    m_customWidgetDataHash.clear();
    89107    m_buttonGroups.clear();
    90108}
     
    137155}
    138156
    139 const QPointer<QWidget> &QFormBuilderExtra::rootWidget() const
    140 {
    141     return m_rootWidget;
    142 }
    143 
    144 void QFormBuilderExtra::setRootWidget(const QPointer<QWidget> &w)
    145 {
    146     m_rootWidget = w;
     157const QPointer<QWidget> &QFormBuilderExtra::parentWidget() const
     158{
     159    return m_parentWidget;
     160}
     161
     162bool QFormBuilderExtra::parentWidgetIsSet() const
     163{
     164    return m_parentWidgetIsSet;
     165}
     166
     167void QFormBuilderExtra::setParentWidget(const QPointer<QWidget> &w)
     168{
     169    // Parent widget requires special handling of the geometry property.
     170    m_parentWidget = w;
     171    m_parentWidgetIsSet = true;
    147172}
    148173
     
    153178}
    154179
    155 void QFormBuilderExtra::storeCustomWidgetScript(const QString &className, const QString &script)
    156 {
    157     m_customWidgetScriptHash.insert(className, script);
    158 }
    159 
    160180QString QFormBuilderExtra::customWidgetScript(const QString &className) const
    161181{
    162     const CustomWidgetScriptHash::const_iterator it = m_customWidgetScriptHash.constFind(className);
    163     if ( it == m_customWidgetScriptHash.constEnd())
    164         return QString();
    165     return it.value();
     182    const QHash<QString, CustomWidgetData>::const_iterator it = m_customWidgetDataHash.constFind(className);
     183    if (it != m_customWidgetDataHash.constEnd())
     184        return it.value().script;
     185    return QString();
    166186}
    167187
    168188#endif
    169189
    170 void QFormBuilderExtra::storeCustomWidgetBaseClass(const QString &className, const QString &baseClassName)
    171 {
    172     m_customWidgetBaseClassHash.insert(className, baseClassName);
     190void QFormBuilderExtra::storeCustomWidgetData(const QString &className, const DomCustomWidget *d)
     191{
     192    if (d)
     193        m_customWidgetDataHash.insert(className, CustomWidgetData(d));
    173194}
    174195
    175196QString QFormBuilderExtra::customWidgetBaseClass(const QString &className) const
    176197{
    177     const QHash<QString, QString>::const_iterator it = m_customWidgetBaseClassHash.constFind(className);
    178     if (it == m_customWidgetBaseClassHash.constEnd())
    179         return QString();
    180     return it.value();
    181 }
    182 
    183 void QFormBuilderExtra::storeCustomWidgetAddPageMethod(const QString &className, const QString &ct)
    184 {
    185     m_customWidgetAddPageMethodHash.insert(className, ct);
     198    const QHash<QString, CustomWidgetData>::const_iterator it = m_customWidgetDataHash.constFind(className);
     199    if (it != m_customWidgetDataHash.constEnd())
     200            return it.value().baseClass;
     201    return QString();
    186202}
    187203
    188204QString QFormBuilderExtra::customWidgetAddPageMethod(const QString &className) const
    189205{
    190     const QHash<QString, QString>::const_iterator it = m_customWidgetAddPageMethodHash.constFind(className);
    191     if (it == m_customWidgetAddPageMethodHash.constEnd())
    192         return QString();
    193     return it.value();
     206    const QHash<QString, CustomWidgetData>::const_iterator it = m_customWidgetDataHash.constFind(className);
     207    if (it != m_customWidgetDataHash.constEnd())
     208        return it.value().addPageMethod;
     209    return QString();
     210}
     211
     212bool QFormBuilderExtra::isCustomWidgetContainer(const QString &className) const
     213{
     214    const QHash<QString, CustomWidgetData>::const_iterator it = m_customWidgetDataHash.constFind(className);
     215    if (it != m_customWidgetDataHash.constEnd())
     216        return it.value().isContainer;
     217    return false;
    194218}
    195219
  • trunk/tools/designer/src/lib/uilib/formbuilderextra_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    8383class DomButtonGroups;
    8484class DomButtonGroup;
     85class DomCustomWidget;
    8586
    8687class QAbstractFormBuilder;
     
    9394    ~QFormBuilderExtra();
    9495public:
     96    struct CustomWidgetData {
     97        CustomWidgetData();
     98        explicit CustomWidgetData(const DomCustomWidget *dc);
     99
     100        QString addPageMethod;
     101        QString script;
     102        QString baseClass;
     103        bool isContainer;
     104    };
     105
    95106    void clear();
    96107
     
    102113    static bool applyBuddy(const QString &buddyName, BuddyMode applyMode, QLabel *label);
    103114
    104     const QPointer<QWidget> &rootWidget() const;
    105     void setRootWidget(const QPointer<QWidget> &w);
     115    const QPointer<QWidget> &parentWidget() const;
     116    bool parentWidgetIsSet() const;
     117    void setParentWidget(const QPointer<QWidget> &w);
    106118
    107119#ifndef QT_FORMBUILDER_NO_SCRIPT
    108120    QFormScriptRunner &formScriptRunner();
    109     void storeCustomWidgetScript(const QString &className, const QString &script);
    110121    QString customWidgetScript(const QString &className) const;
    111122#endif
     
    123134    static void removeInstance(const QAbstractFormBuilder *afb);
    124135
    125     void storeCustomWidgetAddPageMethod(const QString &className, const QString &ct);
     136    void storeCustomWidgetData(const QString &className, const DomCustomWidget *d);
    126137    QString customWidgetAddPageMethod(const QString &className) const;
    127 
    128     void storeCustomWidgetBaseClass(const QString &className, const QString &baseClassName);
    129138    QString customWidgetBaseClass(const QString &className) const;
     139    bool isCustomWidgetContainer(const QString &className) const;
    130140
    131141    // --- Hash used in creating button groups on demand. Store a map of name and pair of dom group and real group
     
    169179#ifndef QT_FORMBUILDER_NO_SCRIPT
    170180    QFormScriptRunner m_FormScriptRunner;
    171 
    172     typedef QHash<QString, QString> CustomWidgetScriptHash;
    173     CustomWidgetScriptHash m_customWidgetScriptHash;
    174 #endif
    175 
    176     QHash<QString, QString> m_customWidgetAddPageMethodHash;
    177     QHash<QString, QString> m_customWidgetBaseClassHash;
     181#endif
     182
     183    QHash<QString, CustomWidgetData> m_customWidgetDataHash;
    178184
    179185    ButtonGroupHash m_buttonGroups;
     
    183189    QTextBuilder *m_textBuilder;
    184190
    185     QPointer<QWidget> m_rootWidget;
     191    QPointer<QWidget> m_parentWidget;
     192    bool m_parentWidgetIsSet;
    186193};
    187194
  • trunk/tools/designer/src/lib/uilib/formscriptrunner.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/uilib/formscriptrunner_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/uilib/properties.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/uilib/properties_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/uilib/qdesignerexportwidget.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/uilib/resourcebuilder.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    9999                QIcon icon;
    100100                if (flags & NormalOff)
    101                     icon.addPixmap(QFileInfo(workingDirectory, dpi->elementNormalOff()->text()).absoluteFilePath(), QIcon::Normal, QIcon::Off);
     101                    icon.addFile(QFileInfo(workingDirectory, dpi->elementNormalOff()->text()).absoluteFilePath(), QSize(), QIcon::Normal, QIcon::Off);
    102102                if (flags & NormalOn)
    103                     icon.addPixmap(QFileInfo(workingDirectory, dpi->elementNormalOn()->text()).absoluteFilePath(), QIcon::Normal, QIcon::On);
     103                    icon.addFile(QFileInfo(workingDirectory, dpi->elementNormalOn()->text()).absoluteFilePath(), QSize(), QIcon::Normal, QIcon::On);
    104104                if (flags & DisabledOff)
    105                     icon.addPixmap(QFileInfo(workingDirectory, dpi->elementDisabledOff()->text()).absoluteFilePath(), QIcon::Disabled, QIcon::Off);
     105                    icon.addFile(QFileInfo(workingDirectory, dpi->elementDisabledOff()->text()).absoluteFilePath(), QSize(), QIcon::Disabled, QIcon::Off);
    106106                if (flags & DisabledOn)
    107                     icon.addPixmap(QFileInfo(workingDirectory, dpi->elementDisabledOn()->text()).absoluteFilePath(), QIcon::Disabled, QIcon::On);
     107                    icon.addFile(QFileInfo(workingDirectory, dpi->elementDisabledOn()->text()).absoluteFilePath(), QSize(), QIcon::Disabled, QIcon::On);
    108108                if (flags & ActiveOff)
    109                     icon.addPixmap(QFileInfo(workingDirectory, dpi->elementActiveOff()->text()).absoluteFilePath(), QIcon::Active, QIcon::Off);
     109                    icon.addFile(QFileInfo(workingDirectory, dpi->elementActiveOff()->text()).absoluteFilePath(), QSize(), QIcon::Active, QIcon::Off);
    110110                if (flags & ActiveOn)
    111                     icon.addPixmap(QFileInfo(workingDirectory, dpi->elementActiveOn()->text()).absoluteFilePath(), QIcon::Active, QIcon::On);
     111                    icon.addFile(QFileInfo(workingDirectory, dpi->elementActiveOn()->text()).absoluteFilePath(), QSize(), QIcon::Active, QIcon::On);
    112112                if (flags & SelectedOff)
    113                     icon.addPixmap(QFileInfo(workingDirectory, dpi->elementSelectedOff()->text()).absoluteFilePath(), QIcon::Selected, QIcon::Off);
     113                    icon.addFile(QFileInfo(workingDirectory, dpi->elementSelectedOff()->text()).absoluteFilePath(), QSize(), QIcon::Selected, QIcon::Off);
    114114                if (flags & SelectedOn)
    115                     icon.addPixmap(QFileInfo(workingDirectory, dpi->elementSelectedOn()->text()).absoluteFilePath(), QIcon::Selected, QIcon::On);
     115                    icon.addFile(QFileInfo(workingDirectory, dpi->elementSelectedOn()->text()).absoluteFilePath(), QSize(), QIcon::Selected, QIcon::On);
    116116                return qVariantFromValue(icon);
    117117            } else { // 4.3 legacy
  • trunk/tools/designer/src/lib/uilib/resourcebuilder_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/uilib/textbuilder.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/uilib/textbuilder_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/tools/designer/src/lib/uilib/ui4.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the tools applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    23692369    delete m_properties;
    23702370    delete m_slots;
     2371    delete m_propertyspecifications;
    23712372
    23722373    if (clear_all) {
     
    23822383    m_properties = 0;
    23832384    m_slots = 0;
     2385    m_propertyspecifications = 0;
    23842386}
    23852387
     
    23942396    m_properties = 0;
    23952397    m_slots = 0;
     2398    m_propertyspecifications = 0;
    23962399}
    23972400
     
    24042407    delete m_properties;
    24052408    delete m_slots;
     2409    delete m_propertyspecifications;
    24062410}
    24072411
     
    24692473                continue;
    24702474            }
     2475            if (tag == QLatin1String("propertyspecifications")) {
     2476                DomPropertySpecifications *v = new DomPropertySpecifications();
     2477                v->read(reader);
     2478                setElementPropertyspecifications(v);
     2479                continue;
     2480            }
    24712481            reader.raiseError(QLatin1String("Unexpected element ") + tag);
    24722482        }
     
    25492559                continue;
    25502560            }
     2561            if (tag == QLatin1String("propertyspecifications")) {
     2562                DomPropertySpecifications *v = new DomPropertySpecifications();
     2563                v->read(e);
     2564                setElementPropertyspecifications(v);
     2565                continue;
     2566            }
    25512567    }
    25522568    m_text.clear();
     
    26062622    }
    26072623
     2624    if (m_children & Propertyspecifications) {
     2625        m_propertyspecifications->write(writer, QLatin1String("propertyspecifications"));
     2626    }
     2627
    26082628    if (!m_text.isEmpty())
    26092629        writer.writeCharacters(m_text);
     
    27322752}
    27332753
     2754DomPropertySpecifications* DomCustomWidget::takeElementPropertyspecifications()
     2755{
     2756    DomPropertySpecifications* a = m_propertyspecifications;
     2757    m_propertyspecifications = 0;
     2758    m_children ^= Propertyspecifications;
     2759    return a;
     2760}
     2761
     2762void DomCustomWidget::setElementPropertyspecifications(DomPropertySpecifications* a)
     2763{
     2764    delete m_propertyspecifications;
     2765    m_children |= Propertyspecifications;
     2766    m_propertyspecifications = a;
     2767}
     2768
    27342769void DomCustomWidget::clearElementClass()
    27352770{
     
    27972832    m_slots = 0;
    27982833    m_children &= ~Slots;
     2834}
     2835
     2836void DomCustomWidget::clearElementPropertyspecifications()
     2837{
     2838    delete m_propertyspecifications;
     2839    m_propertyspecifications = 0;
     2840    m_children &= ~Propertyspecifications;
    27992841}
    28002842
     
    1088410926}
    1088510927
     10928void DomPropertySpecifications::clear(bool clear_all)
     10929{
     10930    qDeleteAll(m_stringpropertyspecification);
     10931    m_stringpropertyspecification.clear();
     10932
     10933    if (clear_all) {
     10934    m_text.clear();
     10935    }
     10936
     10937    m_children = 0;
     10938}
     10939
     10940DomPropertySpecifications::DomPropertySpecifications()
     10941{
     10942    m_children = 0;
     10943}
     10944
     10945DomPropertySpecifications::~DomPropertySpecifications()
     10946{
     10947    qDeleteAll(m_stringpropertyspecification);
     10948    m_stringpropertyspecification.clear();
     10949}
     10950
     10951void DomPropertySpecifications::read(QXmlStreamReader &reader)
     10952{
     10953
     10954    for (bool finished = false; !finished && !reader.hasError();) {
     10955        switch (reader.readNext()) {
     10956        case QXmlStreamReader::StartElement : {
     10957            const QString tag = reader.name().toString().toLower();
     10958            if (tag == QLatin1String("stringpropertyspecification")) {
     10959                DomStringPropertySpecification *v = new DomStringPropertySpecification();
     10960                v->read(reader);
     10961                m_stringpropertyspecification.append(v);
     10962                continue;
     10963            }
     10964            reader.raiseError(QLatin1String("Unexpected element ") + tag);
     10965        }
     10966            break;
     10967        case QXmlStreamReader::EndElement :
     10968            finished = true;
     10969            break;
     10970        case QXmlStreamReader::Characters :
     10971            if (!reader.isWhitespace())
     10972                m_text.append(reader.text().toString());
     10973            break;
     10974        default :
     10975            break;
     10976        }
     10977    }
     10978}
     10979
     10980#ifdef QUILOADER_QDOM_READ
     10981void DomPropertySpecifications::read(const QDomElement &node)
     10982{
     10983    for (QDomNode n = node.firstChild(); !n.isNull(); n = n.nextSibling()) {
     10984        if (!n.isElement())
     10985            continue;
     10986        QDomElement e = n.toElement();
     10987        QString tag = e.tagName().toLower();
     10988            if (tag == QLatin1String("stringpropertyspecification")) {
     10989                DomStringPropertySpecification *v = new DomStringPropertySpecification();
     10990                v->read(e);
     10991                m_stringpropertyspecification.append(v);
     10992                continue;
     10993            }
     10994    }
     10995    m_text.clear();
     10996    for (QDomNode child = node.firstChild(); !child.isNull(); child = child.nextSibling()) {
     10997        if (child.isText())
     10998            m_text.append(child.nodeValue());
     10999     }
     11000}
     11001#endif
     11002
     11003void DomPropertySpecifications::write(QXmlStreamWriter &writer, const QString &tagName) const
     11004{
     11005    writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("propertyspecifications") : tagName.toLower());
     11006
     11007    for (int i = 0; i < m_stringpropertyspecification.size(); ++i) {
     11008        DomStringPropertySpecification* v = m_stringpropertyspecification[i];
     11009        v->write(writer, QLatin1String("stringpropertyspecification"));
     11010    }
     11011    if (!m_text.isEmpty())
     11012        writer.writeCharacters(m_text);
     11013
     11014    writer.writeEndElement();
     11015}
     11016
     11017void DomPropertySpecifications::setElementStringpropertyspecification(const QList<DomStringPropertySpecification*>& a)
     11018{
     11019    m_children |= Stringpropertyspecification;
     11020    m_stringpropertyspecification = a;
     11021}
     11022
     11023void DomStringPropertySpecification::clear(bool clear_all)
     11024{
     11025
     11026    if (clear_all) {
     11027    m_text.clear();
     11028    m_has_attr_name = false;
     11029    m_has_attr_type = false;
     11030    m_has_attr_notr = false;
     11031    }
     11032
     11033    m_children = 0;
     11034}
     11035
     11036DomStringPropertySpecification::DomStringPropertySpecification()
     11037{
     11038    m_children = 0;
     11039    m_has_attr_name = false;
     11040    m_has_attr_type = false;
     11041    m_has_attr_notr = false;
     11042}
     11043
     11044DomStringPropertySpecification::~DomStringPropertySpecification()
     11045{
     11046}
     11047
     11048void DomStringPropertySpecification::read(QXmlStreamReader &reader)
     11049{
     11050
     11051    foreach (const QXmlStreamAttribute &attribute, reader.attributes()) {
     11052        QStringRef name = attribute.name();
     11053        if (name == QLatin1String("name")) {
     11054            setAttributeName(attribute.value().toString());
     11055            continue;
     11056        }
     11057        if (name == QLatin1String("type")) {
     11058            setAttributeType(attribute.value().toString());
     11059            continue;
     11060        }
     11061        if (name == QLatin1String("notr")) {
     11062            setAttributeNotr(attribute.value().toString());
     11063            continue;
     11064        }
     11065        reader.raiseError(QLatin1String("Unexpected attribute ") + name.toString());
     11066    }
     11067
     11068    for (bool finished = false; !finished && !reader.hasError();) {
     11069        switch (reader.readNext()) {
     11070        case QXmlStreamReader::StartElement : {
     11071            const QString tag = reader.name().toString().toLower();
     11072            reader.raiseError(QLatin1String("Unexpected element ") + tag);
     11073        }
     11074            break;
     11075        case QXmlStreamReader::EndElement :
     11076            finished = true;
     11077            break;
     11078        case QXmlStreamReader::Characters :
     11079            if (!reader.isWhitespace())
     11080                m_text.append(reader.text().toString());
     11081            break;
     11082        default :
     11083            break;
     11084        }
     11085    }
     11086}
     11087
     11088#ifdef QUILOADER_QDOM_READ
     11089void DomStringPropertySpecification::read(const QDomElement &node)
     11090{
     11091    if (node.hasAttribute(QLatin1String("name")))
     11092        setAttributeName(node.attribute(QLatin1String("name")));
     11093    if (node.hasAttribute(QLatin1String("type")))
     11094        setAttributeType(node.attribute(QLatin1String("type")));
     11095    if (node.hasAttribute(QLatin1String("notr")))
     11096        setAttributeNotr(node.attribute(QLatin1String("notr")));
     11097
     11098    for (QDomNode n = node.firstChild(); !n.isNull(); n = n.nextSibling()) {
     11099        if (!n.isElement())
     11100            continue;
     11101        QDomElement e = n.toElement();
     11102        QString tag = e.tagName().toLower();
     11103    }
     11104    m_text.clear();
     11105    for (QDomNode child = node.firstChild(); !child.isNull(); child = child.nextSibling()) {
     11106        if (child.isText())
     11107            m_text.append(child.nodeValue());
     11108     }
     11109}
     11110#endif
     11111
     11112void DomStringPropertySpecification::write(QXmlStreamWriter &writer, const QString &tagName) const
     11113{
     11114    writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8("stringpropertyspecification") : tagName.toLower());
     11115
     11116    if (hasAttributeName())
     11117        writer.writeAttribute(QLatin1String("name"), attributeName());
     11118
     11119    if (hasAttributeType())
     11120        writer.writeAttribute(QLatin1String("type"), attributeType());
     11121
     11122    if (hasAttributeNotr())
     11123        writer.writeAttribute(QLatin1String("notr"), attributeNotr());
     11124
     11125    if (!m_text.isEmpty())
     11126        writer.writeCharacters(m_text);
     11127
     11128    writer.writeEndElement();
     11129}
     11130
    1088611131QT_END_NAMESPACE
    1088711132
  • trunk/tools/designer/src/lib/uilib/ui4_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the tools applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    162162class DomDesignerData;
    163163class DomSlots;
     164class DomPropertySpecifications;
     165class DomStringPropertySpecification;
    164166
    165167/*******************************************************************************
     
    10161018    void clearElementSlots();
    10171019
     1020    inline DomPropertySpecifications* elementPropertyspecifications() const { return m_propertyspecifications; }
     1021    DomPropertySpecifications* takeElementPropertyspecifications();
     1022    void setElementPropertyspecifications(DomPropertySpecifications* a);
     1023    inline bool hasElementPropertyspecifications() const { return m_children & Propertyspecifications; }
     1024    void clearElementPropertyspecifications();
     1025
    10181026private:
    10191027    QString m_text;
     
    10341042    DomProperties* m_properties;
    10351043    DomSlots* m_slots;
     1044    DomPropertySpecifications* m_propertyspecifications;
    10361045    enum Child {
    10371046        Class = 1,
     
    10451054        Script = 256,
    10461055        Properties = 512,
    1047         Slots = 1024
     1056        Slots = 1024,
     1057        Propertyspecifications = 2048
    10481058    };
    10491059
     
    36873697};
    36883698
     3699class QDESIGNER_UILIB_EXPORT DomPropertySpecifications {
     3700public:
     3701    DomPropertySpecifications();
     3702    ~DomPropertySpecifications();
     3703
     3704    void read(QXmlStreamReader &reader);
     3705#ifdef QUILOADER_QDOM_READ
     3706    void read(const QDomElement &node);
     3707#endif
     3708    void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const;
     3709    inline QString text() const { return m_text; }
     3710    inline void setText(const QString &s) { m_text = s; }
     3711
     3712    // attribute accessors
     3713    // child element accessors
     3714    inline QList<DomStringPropertySpecification*> elementStringpropertyspecification() const { return m_stringpropertyspecification; }
     3715    void setElementStringpropertyspecification(const QList<DomStringPropertySpecification*>& a);
     3716
     3717private:
     3718    QString m_text;
     3719    void clear(bool clear_all = true);
     3720
     3721    // attribute data
     3722    // child element data
     3723    uint m_children;
     3724    QList<DomStringPropertySpecification*> m_stringpropertyspecification;
     3725    enum Child {
     3726        Stringpropertyspecification = 1
     3727    };
     3728
     3729    DomPropertySpecifications(const DomPropertySpecifications &other);
     3730    void operator = (const DomPropertySpecifications&other);
     3731};
     3732
     3733class QDESIGNER_UILIB_EXPORT DomStringPropertySpecification {
     3734public:
     3735    DomStringPropertySpecification();
     3736    ~DomStringPropertySpecification();
     3737
     3738    void read(QXmlStreamReader &reader);
     3739#ifdef QUILOADER_QDOM_READ
     3740    void read(const QDomElement &node);
     3741#endif
     3742    void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const;
     3743    inline QString text() const { return m_text; }
     3744    inline void setText(const QString &s) { m_text = s; }
     3745
     3746    // attribute accessors
     3747    inline bool hasAttributeName() const { return m_has_attr_name; }
     3748    inline QString attributeName() const { return m_attr_name; }
     3749    inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; }
     3750    inline void clearAttributeName() { m_has_attr_name = false; }
     3751
     3752    inline bool hasAttributeType() const { return m_has_attr_type; }
     3753    inline QString attributeType() const { return m_attr_type; }
     3754    inline void setAttributeType(const QString& a) { m_attr_type = a; m_has_attr_type = true; }
     3755    inline void clearAttributeType() { m_has_attr_type = false; }
     3756
     3757    inline bool hasAttributeNotr() const { return m_has_attr_notr; }
     3758    inline QString attributeNotr() const { return m_attr_notr; }
     3759    inline void setAttributeNotr(const QString& a) { m_attr_notr = a; m_has_attr_notr = true; }
     3760    inline void clearAttributeNotr() { m_has_attr_notr = false; }
     3761
     3762    // child element accessors
     3763private:
     3764    QString m_text;
     3765    void clear(bool clear_all = true);
     3766
     3767    // attribute data
     3768    QString m_attr_name;
     3769    bool m_has_attr_name;
     3770
     3771    QString m_attr_type;
     3772    bool m_has_attr_type;
     3773
     3774    QString m_attr_notr;
     3775    bool m_has_attr_notr;
     3776
     3777    // child element data
     3778    uint m_children;
     3779
     3780    DomStringPropertySpecification(const DomStringPropertySpecification &other);
     3781    void operator = (const DomStringPropertySpecification&other);
     3782};
     3783
    36893784
    36903785#ifdef QFORMINTERNAL_NAMESPACE
  • trunk/tools/designer/src/lib/uilib/uilib.pri

    r2 r561  
    33
    44DEFINES += QT_DESIGNER
     5!contains(QT_CONFIG, script): DEFINES += QT_FORMBUILDER_NO_SCRIPT
    56
    67# Input
  • trunk/tools/designer/src/lib/uilib/uilib_global.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
Note: See TracChangeset for help on using the changeset viewer.