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:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • 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 ([email protected])
     4** All rights reserved.
     5** Contact: Nokia Corporation ([email protected])
    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
     37** @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.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 e &ks, QAction *action, QDesignerFormWindowInterface *fw)
    495497{
    496498    const QString shortcutProperty = QLatin1String(shortcutPropertyC);
    497     if (ks.isEmpty()) {
     499    if (ks.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 = );
    548550    oldActionData.checkable =  action->isCheckable();
    549551    dlg.setActionData(oldActionData);
Note: See TracChangeset for help on using the changeset viewer.