Changeset 561 for trunk/tools/designer/src/lib/shared/actioneditor.cpp
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/tools/designer/src/lib/shared/actioneditor.cpp
r2 r561 2 2 ** 3 3 ** 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]) 5 6 ** 6 7 ** This file is part of the Qt Designer of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** 40 40 ****************************************************************************/ 41 42 /*43 TRANSLATOR qdesigner_internal::ActionEditor44 */45 41 46 42 #include "actioneditor_p.h" … … 152 148 l->addWidget(toolbar); 153 149 // 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); 155 152 m_actionNew->setEnabled(false); 156 153 connect(m_actionNew, SIGNAL(triggered()), this, SLOT(slotNewAction())); … … 161 158 m_actionCut->setEnabled(false); 162 159 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); 164 162 165 163 m_actionCopy->setEnabled(false); 166 164 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); 168 167 toolbar->addAction(m_actionCopy); 169 168 170 169 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); 172 172 toolbar->addAction(m_actionPaste); 173 173 … … 177 177 connect(m_actionNavigateToSlot, SIGNAL(triggered()), this, SLOT(navigateToSlotCurrentAction())); 178 178 179 m_actionDelete->setIcon(createIconSet(QLatin1String("editdelete.png"))); 179 QIcon editDeleteIcon = QIcon::fromTheme("edit-delete", createIconSet(QLatin1String("editdelete.png"))); 180 m_actionDelete->setIcon(editDeleteIcon); 180 181 m_actionDelete->setEnabled(false); 181 182 connect(m_actionDelete, SIGNAL(triggered()), this, SLOT(slotDelete())); … … 234 235 this, SLOT(slotSelectionChanged(QItemSelection,QItemSelection))); 235 236 236 connect(m_actionView, SIGNAL(contextMenuRequested(QContextMenuEvent*, 237 this, SLOT(slotContextMenuRequested(QContextMenuEvent*, 237 connect(m_actionView, SIGNAL(contextMenuRequested(QContextMenuEvent*,QAction*)), 238 this, SLOT(slotContextMenuRequested(QContextMenuEvent*,QAction*))); 238 239 239 240 connect(this, SIGNAL(itemActivated(QAction*)), this, SLOT(editAction(QAction*))); … … 248 249 QToolButton *configureButton = new QToolButton; 249 250 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); 251 253 QMenu *configureMenu = new QMenu; 252 254 configureAction->setMenu(configureMenu); … … 457 459 setInitialProperty(sheet, QLatin1String(checkablePropertyC), QVariant(true)); 458 460 459 if (!actionData.keysequence. isEmpty())461 if (!actionData.keysequence.isEmpty()) 460 462 setInitialProperty(sheet, QLatin1String(shortcutPropertyC), qVariantFromValue(actionData.keysequence)); 461 463 … … 492 494 // in case it is empty. 493 495 494 static QDesignerFormWindowCommand *setKeySequencePropertyCommand(const QKeySequence &ks, QAction *action, QDesignerFormWindowInterface *fw)496 static QDesignerFormWindowCommand *setKeySequencePropertyCommand(const e &ks, QAction *action, QDesignerFormWindowInterface *fw) 495 497 { 496 498 const QString shortcutProperty = QLatin1String(shortcutPropertyC); 497 if (ks. isEmpty()) {499 if (ks.isEmpty()) { 498 500 ResetPropertyCommand *cmd = new ResetPropertyCommand(fw); 499 501 cmd->init(action, shortcutProperty); … … 545 547 oldActionData.toolTip = textPropertyValue(sheet, QLatin1String(toolTipPropertyC)); 546 548 oldActionData.icon = qVariantValue<PropertySheetIconValue>(sheet->property(sheet->indexOf(QLatin1String(iconPropertyC)))); 547 oldActionData.keysequence = qVariantValue<QKeySequence>(sheet->property(sheet->indexOf(QLatin1String(shortcutPropertyC))));549 oldActionData.keysequence = ); 548 550 oldActionData.checkable = action->isCheckable(); 549 551 dlg.setActionData(oldActionData);
Note:
See TracChangeset
for help on using the changeset viewer.