Changeset 561 for trunk/tools/designer/src/lib/shared
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 168 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 (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@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.value().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 PropertySheetKeySequenceValue &ks, QAction *action, QDesignerFormWindowInterface *fw) 495 497 { 496 498 const QString shortcutProperty = QLatin1String(shortcutPropertyC); 497 if (ks. isEmpty()) {499 if (ks.value().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 = ActionModel::actionShortCut(sheet); 548 550 oldActionData.checkable = action->isCheckable(); 549 551 dlg.setActionData(oldActionData); -
trunk/tools/designer/src/lib/shared/actioneditor_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/actionprovider_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 87 87 // stretches to the end of the toolbar/menu bar. So, check from the beginning 88 88 // 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; 90 90 const QPoint topRight = QPoint(w->rect().width(), 0); 91 91 for (int index = 0; index < actionCount; ++index) { -
trunk/tools/designer/src/lib/shared/actionrepository.cpp
r372 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 43 43 #include "qtresourceview_p.h" 44 44 #include "iconloader_p.h" 45 #include "qdesigner_utils_p.h" 45 46 46 47 #include <QtDesigner/QDesignerFormEditorInterface> … … 169 170 170 171 // shortcut is a fake property, need to retrieve it via property sheet. 171 static QStringactionShortCut(QDesignerFormEditorInterface *core, QAction *action)172 PropertySheetKeySequenceValue ActionModel::actionShortCut(QDesignerFormEditorInterface *core, QAction *action) 172 173 { 173 174 QDesignerPropertySheetExtension *sheet = qt_extension<QDesignerPropertySheetExtension*>(core->extensionManager(), action); 174 175 if (!sheet) 175 return QString(); 176 return PropertySheetKeySequenceValue(); 177 return actionShortCut(sheet); 178 } 179 180 PropertySheetKeySequenceValue ActionModel::actionShortCut(const QDesignerPropertySheetExtension *sheet) 181 { 176 182 const int index = sheet->indexOf(QLatin1String("shortcut")); 177 183 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)); 181 186 } 182 187 … … 222 227 item->setToolTip(action->text()); 223 228 // shortcut 224 const QString shortcut = actionShortCut(core, action) ;229 const QString shortcut = actionShortCut(core, action).value().toString(QKeySequence::NativeText); 225 230 item = sl[ShortCutColumn]; 226 231 item->setText(shortcut); … … 526 531 addWidget(m_actionTreeView); 527 532 // Wire signals 528 connect(m_actionTreeView, SIGNAL(contextMenuRequested(QContextMenuEvent*, 529 this, SIGNAL(contextMenuRequested(QContextMenuEvent*, 530 connect(m_actionListView, SIGNAL(contextMenuRequested(QContextMenuEvent*, 531 this, SIGNAL(contextMenuRequested(QContextMenuEvent*, 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*))); 532 537 533 538 // make it possible for vs integration to reimplement edit action dialog -
trunk/tools/designer/src/lib/shared/actionrepository_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 66 66 67 67 class QDesignerFormEditorInterface; 68 class QDesignerPropertySheetExtension; 68 69 69 70 namespace qdesigner_internal { 71 72 class PropertySheetKeySequenceValue; 70 73 71 74 // Shared model of actions, to be used for several views (detailed/icon view). … … 99 102 // Find the associated menus and toolbars, ignore toolbuttons 100 103 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); 101 108 102 109 signals: -
trunk/tools/designer/src/lib/shared/codedialog.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** 40 40 ****************************************************************************/ 41 42 /*43 TRANSLATOR qdesigner_internal::CodeDialog44 */45 41 46 42 #include "codedialog_p.h" -
trunk/tools/designer/src/lib/shared/codedialog_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/connectionedit.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/connectionedit_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/csshighlighter.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** 40 40 ****************************************************************************/ 41 42 /*43 TRANSLATOR qdesigner_internal::StyleSheetEditorDialog44 */45 41 46 42 #include "csshighlighter_p.h" -
trunk/tools/designer/src/lib/shared/csshighlighter_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/deviceprofile.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/deviceprofile_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/dialoggui.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/dialoggui_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/extensionfactory_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/filterwidget.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/filterwidget_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/formlayoutmenu.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/formlayoutmenu_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/formwindowbase.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** 40 40 ****************************************************************************/ 41 42 /*43 TRANSLATOR qdesigner_internal::FormWindowBase44 */45 41 46 42 #include "formwindowbase_p.h" … … 56 52 #include "qdesigner_utils_p.h" 57 53 58 #include <abstractformbuilder.h>54 #include "qsimpleresource_p.h" 59 55 60 56 #include <QtDesigner/QDesignerFormEditorInterface> … … 483 479 } 484 480 481 QString 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 485 489 } // namespace qdesigner_internal 486 490 -
trunk/tools/designer/src/lib/shared/formwindowbase_p.h
r372 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 90 90 QVariantMap formData(); 91 91 void setFormData(const QVariantMap &vm); 92 93 // Return contents without warnings. Should be 'contents(bool quiet)' 94 QString fileContents() const; 92 95 93 96 // Return the widget containing the form. This is used to -
trunk/tools/designer/src/lib/shared/grid.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/grid_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/gridpanel.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/gridpanel_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/htmlhighlighter.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/htmlhighlighter_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/iconloader.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/iconloader_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/iconselector.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 158 158 LanguageResourceDialog::~LanguageResourceDialog() 159 159 { 160 delete d_ptr;161 160 } 162 161 … … 428 427 // ------------- IconSelector 429 428 IconSelector::IconSelector(QWidget *parent) : 430 QWidget(parent) 431 { 432 d_ptr = new IconSelectorPrivate(); 429 QWidget(parent), d_ptr(new IconSelectorPrivate()) 430 { 433 431 d_ptr->q_ptr = this; 434 432 … … 501 499 IconSelector::~IconSelector() 502 500 { 503 delete d_ptr;504 501 } 505 502 -
trunk/tools/designer/src/lib/shared/iconselector_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 88 88 89 89 private: 90 class LanguageResourceDialogPrivate *d_ptr;90 QScopedPointer<class LanguageResourceDialogPrivate> d_ptr; 91 91 Q_DECLARE_PRIVATE(LanguageResourceDialog) 92 92 Q_DISABLE_COPY(LanguageResourceDialog) … … 121 121 void iconChanged(const PropertySheetIconValue &icon); 122 122 private: 123 class IconSelectorPrivate *d_ptr;123 QScopedPointer<class IconSelectorPrivate> d_ptr; 124 124 Q_DECLARE_PRIVATE(IconSelector) 125 125 Q_DISABLE_COPY(IconSelector) -
trunk/tools/designer/src/lib/shared/invisible_widget.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/invisible_widget_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/layout.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/layout_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/layoutinfo.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/layoutinfo_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/metadatabase.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/metadatabase_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/morphmenu.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/morphmenu_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/newactiondialog.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 135 135 rc.icon = m_ui->iconSelector->icon(); 136 136 rc.checkable = m_ui->checkableCheckBox->checkState() == Qt::Checked; 137 rc.keysequence = m_ui->keySequenceEdit->keySequence();137 rc.keysequence = PropertySheetKeySequenceValue(m_ui->keySequenceEdit->keySequence()); 138 138 return rc; 139 139 } … … 145 145 m_ui->iconSelector->setIcon(d.icon); 146 146 m_ui->tooltipEditor->setText(d.toolTip); 147 m_ui->keySequenceEdit->setKeySequence(d.keysequence );147 m_ui->keySequenceEdit->setKeySequence(d.keysequence.value()); 148 148 m_ui->checkableCheckBox->setCheckState(d.checkable ? Qt::Checked : Qt::Unchecked); 149 149 -
trunk/tools/designer/src/lib/shared/newactiondialog.ui
r2 r561 4 4 ** 5 5 ** 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) 7 8 ** 8 9 ** This file is part of the Qt Designer of the Qt Toolkit. … … 23 24 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 24 25 ** 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. 29 29 ** 30 30 ** GNU General Public License Usage … … 36 36 ** met: http://www.gnu.org/copyleft/gpl.html. 37 37 ** 38 ** If you are unsure which license is appropriate for your use, please39 ** 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. 40 40 ** $QT_END_LICENSE$ 41 41 ** -
trunk/tools/designer/src/lib/shared/newactiondialog_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 85 85 PropertySheetIconValue icon; 86 86 bool checkable; 87 QKeySequence keysequence;87 PropertySheetKeySequenceValue keysequence; 88 88 }; 89 89 -
trunk/tools/designer/src/lib/shared/newformwidget.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 311 311 const qdesigner_internal::DeviceProfile &dp) 312 312 { 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); 316 315 if (!workingDir.isEmpty()) 317 316 formBuilder.setWorkingDirectory(workingDir); -
trunk/tools/designer/src/lib/shared/newformwidget.ui
r2 r561 4 4 ** 5 5 ** 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) 7 8 ** 8 9 ** This file is part of the Qt Designer of the Qt Toolkit. … … 23 24 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 24 25 ** 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. 29 29 ** 30 30 ** GNU General Public License Usage … … 36 36 ** met: http://www.gnu.org/copyleft/gpl.html. 37 37 ** 38 ** If you are unsure which license is appropriate for your use, please39 ** 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. 40 40 ** $QT_END_LICENSE$ 41 41 ** -
trunk/tools/designer/src/lib/shared/newformwidget_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/orderdialog.cpp
r372 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** 40 40 ****************************************************************************/ 41 42 /*43 TRANSLATOR qdesigner_internal::OrderDialog44 */45 41 46 42 #include "orderdialog_p.h" -
trunk/tools/designer/src/lib/shared/orderdialog.ui
r2 r561 3 3 ** 4 4 ** 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) 6 7 ** 7 8 ** This file is part of the Qt Designer of the Qt Toolkit. … … 22 23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 23 24 ** 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. 28 28 ** 29 29 ** GNU General Public License Usage … … 35 35 ** met: http://www.gnu.org/copyleft/gpl.html. 36 36 ** 37 ** If you are unsure which license is appropriate for your use, please38 ** 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. 39 39 ** $QT_END_LICENSE$ 40 40 ** -
trunk/tools/designer/src/lib/shared/orderdialog_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/plaintexteditor.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** 40 40 ****************************************************************************/ 41 42 /*43 TRANSLATOR qdesigner_internal::PlainTextEditorDialog44 */45 41 46 42 #include "plaintexteditor_p.h" -
trunk/tools/designer/src/lib/shared/plaintexteditor_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/plugindialog.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/plugindialog.ui
r2 r561 4 4 ** 5 5 ** 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) 7 8 ** 8 9 ** This file is part of the Qt Designer of the Qt Toolkit. … … 23 24 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 24 25 ** 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. 29 29 ** 30 30 ** GNU General Public License Usage … … 36 36 ** met: http://www.gnu.org/copyleft/gpl.html. 37 37 ** 38 ** If you are unsure which license is appropriate for your use, please39 ** 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. 40 40 ** $QT_END_LICENSE$ 41 41 ** -
trunk/tools/designer/src/lib/shared/plugindialog_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/pluginmanager.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 73 73 static const char *extendsElementC = "extends"; 74 74 static const char *addPageMethodC = "addpagemethod"; 75 static const char *propertySpecsC = "propertyspecifications"; 76 static const char *stringPropertySpecC = "stringpropertyspecification"; 77 static const char *stringPropertyNameAttrC = "name"; 78 static const char *stringPropertyTypeAttrC = "type"; 79 static const char *stringPropertyNoTrAttrC = "notr"; 75 80 static const char *jambiLanguageC = "jambi"; 76 81 … … 142 147 class QDesignerCustomWidgetSharedData : public QSharedData { 143 148 public: 149 // Type of a string property 150 typedef QPair<qdesigner_internal::TextPropertyValidationMode, bool> StringPropertyType; 151 typedef QHash<QString, StringPropertyType> StringPropertyTypeMap; 152 144 153 explicit QDesignerCustomWidgetSharedData(const QString &thePluginPath) : pluginPath(thePluginPath) {} 145 154 void clearXML(); … … 153 162 QString xmlExtends; 154 163 164 StringPropertyTypeMap xmlStringPropertyTypeMap; 155 165 }; 156 166 … … 162 172 xmlAddPageMethod.clear(); 163 173 xmlExtends.clear(); 174 xmlStringPropertyTypeMap.clear(); 164 175 } 165 176 … … 219 230 { 220 231 return m_d->pluginPath; 232 } 233 234 bool 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; 221 243 } 222 244 … … 248 270 { 249 271 return QDesignerPluginManager::tr("An XML error was encountered when parsing the XML of the custom widget %1: %2").arg(name, errorMessage); 272 } 273 274 static inline QString msgAttributeMissing(const QString &name) 275 { 276 return QDesignerPluginManager::tr("A required attribute ('%1') is missing.").arg(name); 277 } 278 279 static 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 300 static 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; 250 348 } 251 349 … … 312 410 break; 313 411 } 314 // Find <extends>, <addPageMethod> 412 // Find <extends>, <addPageMethod>, <stringproperties> 315 413 elements.clear(); 316 414 elements.push_back(QLatin1String(extendsElementC)); 317 415 elements.push_back(QLatin1String(addPageMethodC)); 416 elements.push_back(QLatin1String(propertySpecsC)); 318 417 while (true) { 319 418 switch (findElement(elements, sr)) { … … 337 436 } 338 437 break; 438 case 2: // <stringproperties> 439 if (!parsePropertySpecs(sr, &m_d->xmlStringPropertyTypeMap, errorMessage)) { 440 *errorMessage = msgXmlError(name, *errorMessage); 441 return ParseError; 442 } 443 break; 339 444 } 340 445 } … … 346 451 class QDesignerPluginManagerPrivate { 347 452 public: 453 typedef QPair<QString, QString> ClassNamePropertyNameKey; 454 348 455 QDesignerPluginManagerPrivate(QDesignerFormEditorInterface *core); 349 456 … … 563 670 const int before = m_d->m_registeredPlugins.size(); 564 671 foreach (const QString &path, m_d->m_pluginPaths) 565 registerPath(path); 672 registerPath(path); 566 673 const bool newPluginsFound = m_d->m_registeredPlugins.size() > before; 567 674 // We force a re-initialize as Jambi collection might return … … 655 762 } 656 763 764 QDesignerCustomWidgetData 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 657 773 QObjectList QDesignerPluginManager::instances() const 658 774 { -
trunk/tools/designer/src/lib/shared/pluginmanager_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 55 55 56 56 #include "shared_global_p.h" 57 #include "shared_enums_p.h" 57 58 58 59 #include <QtCore/QSharedDataPointer> 59 60 #include <QtCore/QMap> 61 #include <QtCore/QPair> 60 62 #include <QtCore/QStringList> 61 63 … … 71 73 class QDESIGNER_SHARED_EXPORT QDesignerCustomWidgetData { 72 74 public: 75 // StringPropertyType: validation mode and translatable flag. 76 typedef QPair<qdesigner_internal::TextPropertyValidationMode, bool> StringPropertyType; 77 73 78 explicit QDesignerCustomWidgetData(const QString &pluginPath = QString()); 74 79 … … 94 99 // Optional. The name to be used in the widget box. 95 100 QString xmlDisplayName() const; 101 // Type of a string property 102 bool xmlStringPropertyType(const QString &name, StringPropertyType *type) const; 96 103 97 104 private: … … 129 136 CustomWidgetList registeredCustomWidgets() const; 130 137 QDesignerCustomWidgetData customWidgetData(QDesignerCustomWidgetInterface *w) const; 138 QDesignerCustomWidgetData customWidgetData(const QString &className) const; 131 139 132 140 bool registerNewPlugins(); -
trunk/tools/designer/src/lib/shared/previewconfigurationwidget.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 66 66 #include <QtCore/QSharedData> 67 67 68 // #define DEFAULT_SKINS_FROM_RESOURCE 69 #ifdef DEFAULT_SKINS_FROM_RESOURCE 68 69 static const char *skinResourcePathC = ":/skins/"; 70 70 71 QT_BEGIN_NAMESPACE 71 static const char *skinResourcePathC = ":/skins/";72 QT_END_NAMESPACE73 #else74 # include <QtCore/QLibraryInfo>75 #endif76 77 QT_BEGIN_NAMESPACE78 72 79 73 static const char *skinExtensionC = "skin"; 80 74 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 76 typedef QPair<QString, QString> SkinNamePath; 77 typedef QList<SkinNamePath> Skins; 78 enum { SkinComboNoneIndex = 0 }; 87 79 88 80 // find default skins (resources) … … 90 82 static Skins rc; 91 83 if (rc.empty()) { 92 #ifdef DEFAULT_SKINS_FROM_RESOURCE93 84 const QString skinPath = QLatin1String(skinResourcePathC); 94 #else95 QString skinPath = QLibraryInfo::location(QLibraryInfo::PrefixPath);96 skinPath += QDir::separator();97 skinPath += QLatin1String("tools");98 skinPath += QDir::separator();99 skinPath += QLatin1String("qvfb");100 #endif101 85 QString pattern = QLatin1String("*."); 102 86 pattern += QLatin1String(skinExtensionC); 103 87 const QDir dir(skinPath, pattern); 104 const QFileInfoList list = dir.entryInfoList( );88 const QFileInfoList list = dir.entryInfoList(QDir::Dirs|QDir::NoDotAndDotDot, QDir::Name); 105 89 if (list.empty()) 106 90 return rc; -
trunk/tools/designer/src/lib/shared/previewconfigurationwidget_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/previewmanager.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 68 68 #include <QtGui/QActionGroup> 69 69 #include <QtGui/QCursor> 70 #include <QtGui/QMatrix> 70 71 71 72 #include <QtCore/QMap> … … 150 151 } 151 152 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 153 157 class PreviewDeviceSkin : public DeviceSkin 154 158 { 155 159 Q_OBJECT 156 160 public: 161 enum Direction { DirectionUp, DirectionLeft, DirectionRight }; 162 157 163 explicit PreviewDeviceSkin(const DeviceSkinParameters ¶meters, QWidget *parent); 158 164 virtual void setPreview(QWidget *w); … … 165 171 166 172 protected: 167 virtual void populateContextMenu(QMenu *m); 173 virtual void populateContextMenu(QMenu *) {} 174 175 private slots: 176 void slotDirection(QAction *); 177 178 protected: 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; 168 184 169 185 private: 170 186 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; 171 193 }; 172 194 173 195 PreviewDeviceSkin::PreviewDeviceSkin(const DeviceSkinParameters ¶meters, 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) 176 203 { 177 204 connect(this, SIGNAL(skinKeyPressEvent(int,QString,bool)), … … 196 223 QApplication::sendEvent(focusWidget, &e); 197 224 } 198 199 225 } 200 226 … … 207 233 } 208 234 235 // Create a checkable action with integer data and 236 // set it checked if it matches the currentState. 237 static 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 209 251 void PreviewDeviceSkin::slotPopupMenu() 210 252 { 211 253 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(); 212 271 populateContextMenu(&menu); 272 menu.addAction(m_closeAction); 213 273 menu.exec(QCursor::pos()); 214 274 } 215 275 216 void PreviewDeviceSkin::populateContextMenu(QMenu *menu) 217 { 218 connect(menu->addAction(tr("&Close")), SIGNAL(triggered()), parentWidget(), SLOT(close())); 276 void 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 295 void PreviewDeviceSkin::fitWidget(const QSize &size) 296 { 297 view()->setFixedSize(size); 298 } 299 300 QMatrix 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; 219 314 } 220 315 … … 258 353 259 354 protected: 260 virtual void populateContextMenu(QMenu *m); 355 virtual void populateContextMenu(QMenu *m); 356 virtual QMatrix skinTransform() const; 357 virtual void fitWidget(const QSize &size); 261 358 262 359 private: 263 360 ZoomMenu *m_zoomMenu; 361 QAction *m_zoomSubMenuAction; 264 362 ZoomWidget *m_zoomWidget; 265 363 }; … … 268 366 PreviewDeviceSkin(parameters, parent), 269 367 m_zoomMenu(new ZoomMenu(this)), 368 m_zoomSubMenuAction(0), 270 369 m_zoomWidget(new DesignerZoomWidget) 271 370 { … … 280 379 } 281 380 381 static inline qreal zoomFactor(int percent) 382 { 383 return qreal(percent) / 100.0; 384 } 385 386 static inline QSize scaleSize(int zoomPercent, const QSize &size) 387 { 388 return zoomPercent == 100 ? size : (QSizeF(size) * zoomFactor(zoomPercent)).toSize(); 389 } 390 282 391 void ZoomablePreviewDeviceSkin::setPreview(QWidget *formWidget) 283 { 284 formWidget->setFixedSize(screenSize()); 392 { 285 393 m_zoomWidget->setWidget(formWidget); 394 m_zoomWidget->resize(scaleSize(zoomPercent(), screenSize())); 286 395 } 287 396 … … 291 400 } 292 401 293 void ZoomablePreviewDeviceSkin::setZoomPercent(int z )294 { 295 if (z == zoomPercent())402 void ZoomablePreviewDeviceSkin::setZoomPercent(int zp) 403 { 404 if (zp == zoomPercent()) 296 405 return; 297 406 298 407 // 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()); 308 414 QApplication::restoreOverrideCursor(); 309 415 } … … 311 417 void ZoomablePreviewDeviceSkin::populateContextMenu(QMenu *menu) 312 418 { 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); 314 426 menu->addSeparator(); 315 PreviewDeviceSkin::populateContextMenu(menu); 316 menu->addSeparator(); 427 } 428 429 QMatrix 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 441 void ZoomablePreviewDeviceSkin::fitWidget(const QSize &size) 442 { 443 m_zoomWidget->resize(scaleSize(zoomPercent(), size)); 317 444 } 318 445 … … 563 690 const QString title = tr("%1 - [Preview]").arg(formWidget->windowTitle()); 564 691 formWidget = fakeContainer(formWidget); 692 formWidget->setWindowTitle(title); 565 693 566 694 // 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 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/promotionmodel.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** 40 40 ****************************************************************************/ 41 42 /*43 TRANSLATOR qdesigner_internal::PromotionModel44 */45 41 46 42 #include "promotionmodel_p.h" … … 126 122 m_core(core) 127 123 { 128 connect(this, SIGNAL(itemChanged(QStandardItem *)), this, SLOT(slotItemChanged(QStandardItem*)));124 connect(this, SIGNAL(itemChanged(QStandardItem*)), this, SLOT(slotItemChanged(QStandardItem*))); 129 125 } 130 126 -
trunk/tools/designer/src/lib/shared/promotionmodel_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/promotiontaskmenu.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/promotiontaskmenu_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/propertylineedit.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/propertylineedit_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_command.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 1114 1114 m_itemText = QApplication::translate("Command", "Page"); 1115 1115 m_itemIcon = QIcon(); 1116 m_widget->setObjectName(Q Application::translate("Command","page"));1116 m_widget->setObjectName(QLatin1String("page")); 1117 1117 formWindow()->ensureUniqueObjectName(m_widget); 1118 1118 … … 1237 1237 m_itemText = QApplication::translate("Command", "Page"); 1238 1238 m_itemIcon = QIcon(); 1239 m_widget->setObjectName(Q Application::translate("Command","tab"));1239 m_widget->setObjectName(QLatin1String("tab")); 1240 1240 formWindow()->ensureUniqueObjectName(m_widget); 1241 1241 … … 1423 1423 m_index++; 1424 1424 m_widget = new QDesignerWidget(formWindow(), m_stackedWidget); 1425 m_widget->setObjectName(Q Application::translate("Command","page"));1425 m_widget->setObjectName(QLatin1String("page")); 1426 1426 formWindow()->ensureUniqueObjectName(m_widget); 1427 1427 -
trunk/tools/designer/src/lib/shared/qdesigner_command2.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_command2_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_command_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_dnditem.cpp
r372 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_dnditem_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_dockwidget.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_dockwidget_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_formbuilder.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 84 84 QT_BEGIN_NAMESPACE 85 85 86 #ifndef QT_FORMBUILDER_NO_SCRIPT 86 87 static QString summarizeScriptErrors(const QFormScriptRunner::Errors &errors) 87 88 { … … 93 94 return rc; 94 95 } 96 #endif 95 97 96 98 namespace qdesigner_internal { … … 109 111 { 110 112 Q_ASSERT(m_core); 113 #ifndef QT_FORMBUILDER_NO_SCRIPT 111 114 // Disable scripting in the editors. 112 115 QFormScriptRunner::Options options = formScriptRunner()->options(); … … 121 124 } 122 125 formScriptRunner()-> setOptions(options); 126 #endif 123 127 } 124 128 … … 401 405 } 402 406 } 407 #ifndef QT_FORMBUILDER_NO_SCRIPT 403 408 // Check for script errors 404 409 *scriptErrors = builder.formScriptRunner()->errors(); … … 408 413 return 0; 409 414 } 415 #endif 410 416 // Fake application style sheet by prepending. (If this doesn't work, fake by nesting 411 417 // into parent widget). … … 474 480 } 475 481 482 // ---------- NewFormWidgetFormBuilder 483 484 NewFormWidgetFormBuilder::NewFormWidgetFormBuilder(QDesignerFormEditorInterface *core, 485 Mode mode, 486 const DeviceProfile &deviceProfile) : 487 QDesignerFormBuilder(core, mode, deviceProfile) 488 { 489 } 490 491 void NewFormWidgetFormBuilder::createCustomWidgets(DomCustomWidgets *dc) 492 { 493 QSimpleResource::handleDomCustomWidgets(core(), dc); 494 } 495 476 496 } // namespace qdesigner_internal 477 497 -
trunk/tools/designer/src/lib/shared/qdesigner_formbuilder_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 76 76 class DesignerIconCache; 77 77 78 /* Form builder used for previewing forms , widget box and new form dialog.78 /* Form builder used for previewing forms and widget box. 79 79 * It applies the system settings to its toplevel window. */ 80 80 … … 160 160 }; 161 161 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 166 class QDESIGNER_SHARED_EXPORT NewFormWidgetFormBuilder: public QDesignerFormBuilder { 167 public: 168 NewFormWidgetFormBuilder(QDesignerFormEditorInterface *core, 169 Mode mode, 170 const DeviceProfile &deviceProfile = DeviceProfile()); 171 172 protected: 173 virtual void createCustomWidgets(DomCustomWidgets *); 174 }; 175 176 162 177 } // namespace qdesigner_internal 163 178 -
trunk/tools/designer/src/lib/shared/qdesigner_formeditorcommand.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_formeditorcommand_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_formwindowcommand.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_formwindowcommand_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_formwindowmanager.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_formwindowmanager_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_integration.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 118 118 // Extensions 119 119 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))); 121 121 connect(designerPropertyEditor, SIGNAL(resetProperty(QString)), this, SLOT(resetProperty(QString))); 122 122 connect(designerPropertyEditor, SIGNAL(addDynamicProperty(QString,QVariant)), -
trunk/tools/designer/src/lib/shared/qdesigner_integration_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_introspection.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_introspection_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_membersheet.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_membersheet_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_menu.cpp
r372 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 73 73 74 74 using namespace qdesigner_internal; 75 76 // give the user a little more space to click on the sub menu rectangle 77 static 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 } 75 88 76 89 QDesignerMenu::QDesignerMenu(QWidget *parent) : … … 332 345 if (action->menu() || hasSubMenuPixmap(action)) { 333 346 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()); 336 348 } 337 349 … … 388 400 QAction *action = safeActionAt(index); 389 401 QRect pm_rect = subMenuPixmapRect(action); 390 pm_rect.setLeft(pm_rect.left() - 20); // give the user a little more space to click402 extendClickableArea(&pm_rect, layoutDirection()); 391 403 392 404 const int old_index = m_currentIndex; … … 547 559 static const QPixmap pm(QLatin1String(":/trolltech/formeditor/images/submenu.png")); 548 560 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; 550 562 const int y = g.top() + (g.height() - pm.height())/2 + 1; 551 563 return QRect(x, y, pm.width(), pm.height()); … … 876 888 } 877 889 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. 892 bool QDesignerMenu::hideSubMenuOnCursorKey() 879 893 { 880 894 if (parentMenu()) { 881 895 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. 907 bool QDesignerMenu::showSubMenuOnCursorKey() 908 { 909 const QAction *action = currentAction(); 910 911 if (qobject_cast<const SpecialMenuAction*>(action) || action->isSeparator()) { 883 912 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 922 void QDesignerMenu::moveLeft() 923 { 924 const bool handled = layoutDirection() == Qt::LeftToRight ? 925 hideSubMenuOnCursorKey() : showSubMenuOnCursorKey(); 926 if (!handled) 927 parentMenuBar()->moveLeft(); 892 928 } 893 929 894 930 void QDesignerMenu::moveRight() 895 931 { 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(); 910 936 } 911 937 … … 1066 1092 menu->setWindowFlags(Qt::Popup); 1067 1093 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 } 1069 1103 menu->show(); 1070 1104 menu->setFocus(); -
trunk/tools/designer/src/lib/shared/qdesigner_menu_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 182 182 183 183 private: 184 bool hideSubMenuOnCursorKey(); 185 bool showSubMenuOnCursorKey(); 186 184 187 QPoint m_startPosition; 185 188 int m_currentIndex; -
trunk/tools/designer/src/lib/shared/qdesigner_menubar.cpp
r372 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 105 105 106 106 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); 107 109 108 110 m_addMenu->setText(tr("Type Here")); … … 220 222 case Qt::Key_Left: 221 223 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); 226 225 return true; 227 226 228 227 case Qt::Key_Right: 229 228 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); 234 230 return true; // no update 235 231 … … 754 750 } 755 751 752 bool QDesignerMenuBar::dragging() const 753 { 754 return m_dragging; 755 } 756 756 757 void QDesignerMenuBar::moveLeft(bool ctrl) 757 758 { 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 766 void QDesignerMenuBar::moveRight(bool ctrl) 767 { 768 if (layoutDirection() == Qt::LeftToRight) { 769 moveNext(ctrl); 770 } else { 771 movePrevious(ctrl); 772 } 773 } 774 775 void 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); 762 779 // 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 786 void 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 } 778 794 } 779 795 … … 864 880 menu->setWindowFlags(Qt::Popup); 865 881 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 } 867 891 menu->setFocus(Qt::MouseFocusReason); 868 892 menu->raise(); … … 882 906 } 883 907 884 bool QDesignerMenuBar::swap (int a, int b)908 bool QDesignerMenuBar::swapActions(int a, int b) 885 909 { 886 910 const int left = qMin(a, b); -
trunk/tools/designer/src/lib/shared/qdesigner_menubar_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 156 156 QAction *safeActionAt(int index) const; 157 157 158 bool swap (int a, int b);158 bool swapActions(int a, int b); 159 159 160 160 private: 161 161 void updateCurrentAction(bool selectAction); 162 void movePrevious(bool ctrl); 163 void moveNext(bool ctrl); 162 164 163 165 QAction *m_addMenu; -
trunk/tools/designer/src/lib/shared/qdesigner_objectinspector.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_objectinspector_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_promotion.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_promotion_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_promotiondialog.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** 40 40 ****************************************************************************/ 41 42 /*43 TRANSLATOR qdesigner_internal::QDesignerPromotionDialog44 */45 41 46 42 #include "qdesigner_promotiondialog_p.h" … … 224 220 m_treeView->setContextMenuPolicy(Qt::CustomContextMenu); 225 221 226 connect(m_treeView->selectionModel(), SIGNAL(selectionChanged(QItemSelection, 227 this, SLOT(slotSelectionChanged(QItemSelection, 222 connect(m_treeView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), 223 this, SLOT(slotSelectionChanged(QItemSelection,QItemSelection))); 228 224 229 225 connect(m_treeView, SIGNAL(customContextMenuRequested(QPoint)), … … 253 249 254 250 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*))); 256 252 connect(this, SIGNAL(selectedBaseClassChanged(QString)), 257 253 newPromotedClassPanel, SLOT(chooseBaseClass(QString))); … … 260 256 vboxLayout->addWidget(m_buttonBox); 261 257 // connect model 262 connect(m_model, SIGNAL(includeFileChanged(QDesignerWidgetDataBaseItemInterface*, 263 this, SLOT(slotIncludeFileChanged(QDesignerWidgetDataBaseItemInterface*, 264 265 connect(m_model, SIGNAL(classNameChanged(QDesignerWidgetDataBaseItemInterface*, 266 this, SLOT(slotClassNameChanged(QDesignerWidgetDataBaseItemInterface*, 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))); 267 263 268 264 // focus -
trunk/tools/designer/src/lib/shared/qdesigner_promotiondialog_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_propertycommand.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 317 317 unsigned compareSubProperties(const QVariant & q1, const QVariant & q2, qdesigner_internal::SpecialProperty specialProperty) 318 318 { 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; 319 323 switch (q1.type()) { 320 324 case QVariant::Rect: -
trunk/tools/designer/src/lib/shared/qdesigner_propertycommand_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_propertyeditor.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 41 41 42 42 #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> 49 50 50 51 QT_BEGIN_NAMESPACE 51 52 52 53 namespace qdesigner_internal { 54 typedef QDesignerPropertyEditor::StringPropertyParameters StringPropertyParameters; 55 // A map of property name to type 56 typedef QHash<QString, StringPropertyParameters> PropertyNameTypeMap; 57 58 // Compile a map of hard-coded string property types 59 static 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 } 53 93 54 94 QDesignerPropertyEditor::QDesignerPropertyEditor(QWidget *parent, Qt::WindowFlags flags) : … … 69 109 } 70 110 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 } 74 119 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(); 98 124 99 125 // text: Check according to widget type. … … 105 131 return StringPropertyParameters(ValidationRichText, true); 106 132 } 107 if (propertyName == QLatin1String("pageId")) // A QWizard page id108 return StringPropertyParameters(ValidationSingleLine, false);109 133 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); 112 140 113 141 #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")) 115 143 return StringPropertyParameters(ValidationSingleLine, false); 116 #else117 Q_UNUSED(core);118 144 #endif 119 145 -
trunk/tools/designer/src/lib/shared/qdesigner_propertyeditor_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 64 64 #include <QtGui/QToolBar> 65 65 #include <QtGui/QMainWindow> 66 #include <QtGui/QMenuBar> 66 67 67 68 QT_BEGIN_NAMESPACE … … 612 613 // windowModality is visible only for the main container, in which case the form windows enables it on loading 613 614 setVisible(createFakeProperty(QLatin1String("windowModality")), false); 614 if (qobject_cast<const QToolBar *>(d->m_object)) // prevent toolbars from being dragged off615 if (qobject_cast<const QToolBar *>(d->m_object)) { // prevent toolbars from being dragged off 615 616 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 } 617 624 if (d->m_canHaveLayoutAttributes) { 618 625 static const QString layoutGroup = QLatin1String("Layout"); … … 1382 1389 } 1383 1390 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. 1396 enum DesignableState { PropertyIsDesignable, 1397 // Object has a Designable test function that returns false. 1398 PropertyOfObjectNotDesignable, 1399 PropertyNotDesignable }; 1400 1401 static 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 1384 1409 bool QDesignerPropertySheet::isVisible(int index) const 1385 1410 { … … 1451 1476 return false; 1452 1477 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; 1456 1480 } 1457 1481 … … 1483 1507 return true; 1484 1508 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. 1485 1512 const QDesignerMetaPropertyInterface *p = d->m_meta->property(index); 1486 1513 return (p->accessFlags() & QDesignerMetaPropertyInterface::WriteAccess) && 1487 (p->attributes(d->m_object) & QDesignerMetaPropertyInterface::DesignableAttribute);1514 designableState(p, d->m_object) != PropertyOfObjectNotDesignable; 1488 1515 } 1489 1516 -
trunk/tools/designer/src/lib/shared/qdesigner_propertysheet_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_qsettings.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_qsettings_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_stackedbox.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 316 316 const int count = stackedWidget()->count(); 317 317 const bool hasSeveralPages = count > 1; 318 m_actionDeletePage->setEnabled( hasSeveralPages);318 m_actionDeletePage->setEnabled(count); 319 319 if (count) { 320 320 const QString pageSubMenuLabel = tr("Page %1 of %2").arg(stackedWidget()->currentIndex() + 1).arg(count); … … 328 328 pageMenu); 329 329 } 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 } 334 337 popup->addAction(m_actionNextPage); 335 338 m_actionNextPage->setEnabled(hasSeveralPages); -
trunk/tools/designer/src/lib/shared/qdesigner_stackedbox_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp
r372 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 388 388 QMenu *pageMenu = 0; 389 389 const int count = m_tabWidget->count(); 390 m_actionDeletePage->setEnabled(count > 1);390 m_actionDeletePage->setEnabled(count); 391 391 if (count) { 392 392 const int currentIndex = m_tabWidget->currentIndex(); … … 401 401 pageMenu); 402 402 } 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 } 408 410 popup->addSeparator(); 409 411 return pageMenu; … … 417 419 static const char *currentTabToolTipKey = "currentTabToolTip"; 418 420 static const char *currentTabWhatsThisKey = "currentTabWhatsThis"; 421 static const char *tabMovableKey = "movable"; 419 422 420 423 QTabWidgetPropertySheet::QTabWidgetPropertySheet(QTabWidget *object, QObject *parent) : … … 429 432 createFakeProperty(QLatin1String(currentTabToolTipKey), qVariantFromValue(qdesigner_internal::PropertySheetStringValue())); 430 433 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)); 431 436 } 432 437 -
trunk/tools/designer/src/lib/shared/qdesigner_tabwidget_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_taskmenu.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** 40 40 ****************************************************************************/ 41 42 /*43 TRANSLATOR qdesigner_internal::QDesignerTaskMenu44 */45 41 46 42 #include "qdesigner_taskmenu_p.h" … … 661 657 dialogUi.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); 662 658 } else { 663 connect(dialogUi.signalList, SIGNAL(itemDoubleClicked(QTreeWidgetItem *,int)),659 connect(dialogUi.signalList, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), 664 660 &selectSignalDialog, SLOT(accept())); 665 661 } -
trunk/tools/designer/src/lib/shared/qdesigner_taskmenu_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_toolbar.cpp
r372 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** 40 40 ****************************************************************************/ 41 42 /*43 TRANSLATOR qdesigner_internal::Sentinel44 */45 41 46 42 #include "qdesigner_toolbar_p.h" … … 66 62 #include <QtGui/qevent.h> 67 63 #include <QtGui/QApplication> 68 #include <QtGui/private/qtoolbarlayout_p.h>69 64 #include <QtCore/QDebug> 70 65 … … 454 449 } 455 450 451 //that's a trick to get acces to the initStyleOption which is a protected member 452 class FriendlyToolBar : public QToolBar { 453 public: 454 friend class ToolBarEventFilter; 455 }; 456 456 457 QRect ToolBarEventFilter::handleArea(const QToolBar *tb) 457 458 { 458 const QToolBarLayout *tbl = qobject_cast<QToolBarLayout *>(tb->layout());459 Q_ASSERT(tbl);460 return tb l->handleRect();459 QStyleOptionToolBar opt; 460 static_cast<const FriendlyToolBar*>(tb)->initStyleOption(&opt); 461 return tb->style()->subElementRect(QStyle::SE_ToolBarHandle, &opt, tb); 461 462 } 462 463 … … 474 475 switch (tb->orientation()) { 475 476 case Qt::Horizontal: 476 switch ( QApplication::layoutDirection()) {477 switch (tb->layoutDirection()) { 477 478 case Qt::LeftToRight: 478 479 rc.setX(exclusionRectangle.right() + 1); -
trunk/tools/designer/src/lib/shared/qdesigner_toolbar_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_toolbox.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_toolbox_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_utils.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 398 398 while (itPath.hasNext()) { 399 399 QPair<QIcon::Mode, QIcon::State> pair = itPath.next().key(); 400 icon.add Pixmap(m_pixmapCache->pixmap(itPath.value()), pair.first, pair.second);400 icon.addFile(itPath.value().path(), QSize(), pair.first, pair.second); 401 401 } 402 402 m_cache.insert(value, icon); -
trunk/tools/designer/src/lib/shared/qdesigner_utils_p.h
r2 r561 1 2 1 /**************************************************************************** 3 2 ** 4 3 ** 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) 6 6 ** 7 7 ** This file is part of the Qt Designer of the Qt Toolkit. … … 22 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 23 23 ** 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. 28 27 ** 29 28 ** GNU General Public License Usage … … 35 34 ** met: http://www.gnu.org/copyleft/gpl.html. 36 35 ** 37 ** If you are unsure which license is appropriate for your use, please38 ** 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. 39 38 ** $QT_END_LICENSE$ 40 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_widget.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_widget_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_widgetbox.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** 40 40 ****************************************************************************/ 41 42 /*43 TRANSLATOR qdesigner_internal::QDesignerWidgetBox44 */45 41 46 42 #include "qdesigner_widgetbox_p.h" -
trunk/tools/designer/src/lib/shared/qdesigner_widgetbox_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_widgetitem.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qdesigner_widgetitem_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qlayout_widget.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 **40 ** This file is provided AS IS with NO WARRANTY OF ANY KND, INCLUDING THE41 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.42 39 ** 43 40 ****************************************************************************/ -
trunk/tools/designer/src/lib/shared/qlayout_widget_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qscripthighlighter.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qscripthighlighter_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/qsimpleresource.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 42 42 #include "qsimpleresource_p.h" 43 43 #include "widgetfactory_p.h" 44 #include "widgetdatabase_p.h" 44 45 45 46 #include <formscriptrunner_p.h> … … 58 59 #include <QtGui/QAction> 59 60 #include <QtCore/QDebug> 61 #include <QtCore/QCoreApplication> 62 60 63 61 64 QT_BEGIN_NAMESPACE … … 79 82 workingDirectory += QLatin1String(".designer"); 80 83 setWorkingDirectory(QDir(workingDirectory)); 84 #ifndef QT_FORMBUILDER_NO_SCRIPT 81 85 // Disable scripting in the editors. 82 86 formScriptRunner()-> setOptions(QFormScriptRunner::DisableScripts); 87 #endif 83 88 } 84 89 … … 268 273 } 269 274 275 // Custom widgets handling helpers 276 277 // Add unique fake slots and signals to lists 278 bool 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 298 void 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 318 void 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 376 void 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 270 405 // ------------ FormBuilderClipboard 271 406 -
trunk/tools/designer/src/lib/shared/qsimpleresource_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 56 56 #include "shared_global_p.h" 57 57 #include "abstractformbuilder.h" 58 #include <QtCore/QStringList> 58 59 59 60 QT_BEGIN_NAMESPACE 60 61 61 62 class DomScript; 63 class DomCustomWidgets; 64 class DomCustomWidget; 65 class DomSlots; 62 66 63 67 class QDesignerFormEditorInterface; 64 68 65 69 namespace qdesigner_internal { 70 71 class WidgetDataBaseItem; 66 72 67 73 class QDESIGNER_SHARED_EXPORT QSimpleResource : public QAbstractFormBuilder … … 93 99 static bool hasCustomWidgetScript(QDesignerFormEditorInterface *core, QObject *object); 94 100 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 95 106 protected: 96 107 virtual QIcon nameToIcon(const QString &filePath, const QString &qrcPath); … … 106 117 static void addScript(const QString &script, ScriptSource source, DomScripts &domScripts); 107 118 119 static bool addFakeMethods(const DomSlots *domSlots, QStringList &fakeSlots, QStringList &fakeSignals); 120 108 121 private: 122 static void addCustomWidgetsToWidgetDatabase(const QDesignerFormEditorInterface *core, 123 QList<DomCustomWidget*>& custom_widget_list); 124 static void addFakeMethodsToWidgetDataBase(const DomCustomWidget *domCustomWidget, WidgetDataBaseItem *item); 125 109 126 static bool m_warningsEnabled; 110 127 QDesignerFormEditorInterface *m_core; -
trunk/tools/designer/src/lib/shared/qtresourceeditordialog.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 1950 1950 1951 1951 QtResourceEditorDialog::QtResourceEditorDialog(QDesignerFormEditorInterface *core, QDesignerDialogGuiInterface *dlgGui, QWidget *parent) 1952 : QDialog(parent) 1953 { 1954 d_ptr = new QtResourceEditorDialogPrivate(); 1952 : QDialog(parent), d_ptr(new QtResourceEditorDialogPrivate()) 1953 { 1955 1954 d_ptr->q_ptr = this; 1956 1955 d_ptr->m_ui.setupUi(this); … … 1962 1961 setWindowTitle(tr("Edit Resources")); 1963 1962 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*))); 1988 1987 1989 1988 QIcon upIcon = qdesigner_internal::createIconSet(QString::fromUtf8("up.png")); … … 2039 2038 2040 2039 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*))); 2045 2044 2046 2045 d_ptr->m_treeModel = new QStandardItemModel(this); … … 2054 2053 d_ptr->m_ui.resourceTreeView->setTextElideMode(Qt::ElideLeft); 2055 2054 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))); 2062 2061 2063 2062 d_ptr->m_ui.resourceTreeView->setColumnWidth(0, 200); … … 2086 2085 settings->setValue(QLatin1String(Geometry), geometry()); 2087 2086 settings->endGroup(); 2088 2089 delete d_ptr;2090 2087 } 2091 2088 -
trunk/tools/designer/src/lib/shared/qtresourceeditordialog_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 54 54 #define QTRESOURCEEDITOR_H 55 55 56 #include <QtCore/QScopedPointer> 56 57 #include <QtGui/QDialog> 57 58 … … 84 85 ~QtResourceEditorDialog(); 85 86 86 class QtResourceEditorDialogPrivate *d_ptr;87 QScopedPointer<class QtResourceEditorDialogPrivate> d_ptr; 87 88 Q_DECLARE_PRIVATE(QtResourceEditorDialog) 88 89 Q_DISABLE_COPY(QtResourceEditorDialog) -
trunk/tools/designer/src/lib/shared/qtresourcemodel.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 142 142 QtResourceSet::~QtResourceSet() 143 143 { 144 delete d_ptr;145 144 } 146 145 … … 478 477 479 478 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))); 482 481 } 483 482 … … 490 489 removeResourceSet(it.next()); 491 490 blockSignals(false); 492 delete d_ptr;493 491 } 494 492 -
trunk/tools/designer/src/lib/shared/qtresourcemodel_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 57 57 #include <QtCore/QMap> 58 58 #include <QtCore/QObject> 59 #include <QtCore/QScopedPointer> 59 60 60 61 QT_BEGIN_NAMESPACE … … 88 89 friend class QtResourceModel; 89 90 90 class QtResourceSetPrivate *d_ptr;91 QScopedPointer<class QtResourceSetPrivate> d_ptr; 91 92 Q_DECLARE_PRIVATE(QtResourceSet) 92 93 Q_DISABLE_COPY(QtResourceSet) … … 133 134 friend class QtResourceSet; 134 135 135 class QtResourceModelPrivate *d_ptr;136 QScopedPointer<class QtResourceModelPrivate> d_ptr; 136 137 Q_DECLARE_PRIVATE(QtResourceModel) 137 138 Q_DISABLE_COPY(QtResourceModel) -
trunk/tools/designer/src/lib/shared/qtresourceview.cpp
r372 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 45 45 #include "qtresourceeditordialog_p.h" 46 46 #include "iconloader_p.h" 47 #include "filterwidget_p.h" // For FilterWidget 47 48 48 49 #include <QtDesigner/QDesignerFormEditorInterface> … … 149 150 void slotCopyResourcePath(); 150 151 void slotListWidgetContextMenuRequested(const QPoint &pos); 152 void slotFilterChanged(const QString &pattern); 151 153 void createPaths(); 152 154 QTreeWidgetItem *createPath(const QString &path, QTreeWidgetItem *parent); … … 157 159 void saveSettings(); 158 160 void updateActions(); 161 void filterOutResources(); 159 162 160 163 QPixmap makeThumbnail(const QPixmap &pix) const; … … 163 166 QtResourceModel *m_resourceModel; 164 167 QToolBar *m_toolBar; 168 qdesigner_internal::FilterWidget *m_filterWidget; 165 169 QTreeWidget *m_treeWidget; 166 170 QListWidget *m_listWidget; 167 171 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 169 175 QMap<QString, QTreeWidgetItem *> m_pathToItem; 170 176 QMap<QTreeWidgetItem *, QString> m_itemToPath; … … 180 186 QString m_settingsKey; 181 187 bool m_resourceEditingEnabled; 188 QString m_filterPattern; 182 189 }; 183 190 … … 256 263 } 257 264 265 void QtResourceViewPrivate::slotFilterChanged(const QString &pattern) 266 { 267 m_filterPattern = pattern; 268 filterOutResources(); 269 } 270 258 271 void QtResourceViewPrivate::storeExpansionState() 259 272 { … … 299 312 m_editResourcesAction->setEnabled(resourceActive); 300 313 m_reloadResourcesAction->setEnabled(resourceActive); 314 m_filterWidget->setEnabled(resourceActive); 301 315 } 302 316 … … 312 326 m_treeWidget->clear(); 313 327 m_pathToContents.clear(); 328 m_pathToParentPath.clear(); 329 m_pathToSubPaths.clear(); 314 330 m_pathToItem.clear(); 315 331 m_itemToPath.clear(); … … 325 341 else if (!currentPath.isEmpty()) 326 342 q_ptr->selectResource(currentPath); 343 filterOutResources(); 327 344 } 328 345 … … 366 383 367 384 const QString root(QLatin1Char(':')); 368 369 QMap<QString, QString> pathToParentPath; // full path to full parent path370 QMap<QString, QStringList> pathToSubPaths; // full path to full sub paths371 385 372 386 QMap<QString, QString> contents = m_resourceModel->contents(); … … 377 391 QString dirPath = fi.absolutePath(); 378 392 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 380 394 const QFileInfo fd(dirPath); 381 395 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); 384 398 dirPath = parentDirPath; 385 399 } … … 392 406 const QString path = pathToParentItem.first; 393 407 QTreeWidgetItem *item = createPath(path, pathToParentItem.second); 394 QStringList subPaths = pathToSubPaths.value(path);408 QStringList subPaths = m_pathToSubPaths.value(path); 395 409 QStringListIterator itSubPaths(subPaths); 396 410 while (itSubPaths.hasNext()) 397 411 pathToParentItemQueue.enqueue(qMakePair(itSubPaths.next(), item)); 412 } 413 } 414 415 void 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()); 398 525 } 399 526 } … … 422 549 void QtResourceViewPrivate::createResources(const QString &path) 423 550 { 551 const bool matchAll = m_filterPattern.isEmpty(); 552 424 553 QDir dir(path); 425 QStringList file s = m_pathToContents.value(path);426 QStringListIterator it(file s);554 QStringList fileNames = m_pathToContents.value(path); 555 QStringListIterator it(fileNames); 427 556 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; 440 576 } 441 item->setFlags(item->flags() | Qt::ItemIsDragEnabled);442 item->setData(Qt::UserRole, filePath);443 m_itemToResource[item] = filePath;444 m_resourceToItem[filePath] = item;445 577 } 446 578 } … … 455 587 d_ptr->q_ptr = this; 456 588 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); 458 591 d_ptr->m_toolBar->addAction(d_ptr->m_editResourcesAction); 459 592 connect(d_ptr->m_editResourcesAction, SIGNAL(triggered()), this, SLOT(slotEditResources())); 460 593 d_ptr->m_editResourcesAction->setEnabled(false); 461 594 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 463 598 d_ptr->m_toolBar->addAction(d_ptr->m_reloadResourcesAction); 464 599 connect(d_ptr->m_reloadResourcesAction, SIGNAL(triggered()), this, SLOT(slotReloadResources())); 465 600 d_ptr->m_reloadResourcesAction->setEnabled(false); 466 601 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); 468 604 connect(d_ptr->m_copyResourcePathAction, SIGNAL(triggered()), this, SLOT(slotCopyResourcePath())); 469 605 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))); 470 611 471 612 d_ptr->m_splitter = new QSplitter; … … 489 630 d_ptr->m_listWidget->setGridSize(QSize(64, 64)); 490 631 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*))); 497 638 d_ptr->m_listWidget->setContextMenuPolicy(Qt::CustomContextMenu); 498 639 connect(d_ptr->m_listWidget, SIGNAL(customContextMenuRequested(QPoint)), … … 504 645 if (!d_ptr->m_settingsKey.isEmpty()) 505 646 d_ptr->saveSettings(); 506 507 delete d_ptr;508 647 } 509 648 … … 576 715 { 577 716 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*))); 580 719 } 581 720 … … 589 728 return; 590 729 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*))); 593 732 594 733 // fill new here … … 746 885 747 886 settings->endGroup(); 748 749 delete d_ptr;750 887 } 751 888 -
trunk/tools/designer/src/lib/shared/qtresourceview_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 103 103 private: 104 104 105 class QtResourceViewPrivate *d_ptr;105 QScopedPointer<class QtResourceViewPrivate> d_ptr; 106 106 Q_DECLARE_PRIVATE(QtResourceView) 107 107 Q_DISABLE_COPY(QtResourceView) … … 114 114 Q_PRIVATE_SLOT(d_func(), void slotCopyResourcePath()) 115 115 Q_PRIVATE_SLOT(d_func(), void slotListWidgetContextMenuRequested(const QPoint &pos)) 116 Q_PRIVATE_SLOT(d_func(), void slotFilterChanged(const QString &pattern)) 116 117 }; 117 118 … … 130 131 131 132 private: 132 class QtResourceViewDialogPrivate *d_ptr;133 QScopedPointer<class QtResourceViewDialogPrivate> d_ptr; 133 134 Q_DECLARE_PRIVATE(QtResourceViewDialog) 134 135 Q_DISABLE_COPY(QtResourceViewDialog) -
trunk/tools/designer/src/lib/shared/richtexteditor.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** 40 40 ****************************************************************************/ 41 42 /*43 TRANSLATOR qdesigner_internal::RichTextEditorDialog44 */45 41 46 42 #include "richtexteditor_p.h" -
trunk/tools/designer/src/lib/shared/richtexteditor_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/scriptcommand.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/scriptcommand_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/scriptdialog.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** 40 40 ****************************************************************************/ 41 42 /*43 TRANSLATOR qdesigner_internal::ScriptDialog44 */45 41 46 42 #include "scriptdialog_p.h" … … 54 50 #include <QtGui/QDialogButtonBox> 55 51 #include <QtGui/QMessageBox> 52 #ifdef QT_SCRIPT_LIB 56 53 #include <QtScript/QScriptEngine> 54 #endif 57 55 58 56 QT_BEGIN_NAMESPACE … … 117 115 if (script.isEmpty()) 118 116 return true; 117 #ifdef QT_SCRIPT_LIB 119 118 QScriptEngine scriptEngine; 120 119 if (scriptEngine.canEvaluate(script)) … … 123 122 windowTitle(), tr("Syntax error"), QMessageBox::Ok); 124 123 return false; 124 #else 125 return true; 126 #endif 125 127 } 126 128 } // namespace qdesigner_internal -
trunk/tools/designer/src/lib/shared/scriptdialog_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/scripterrordialog.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** 40 40 ****************************************************************************/ 41 42 /*43 TRANSLATOR qdesigner_internal::ScriptErrorDialog44 */45 41 46 42 #include "scripterrordialog_p.h" -
trunk/tools/designer/src/lib/shared/scripterrordialog_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/shared.pri
r372 r561 1 1 2 2 INCLUDEPATH += $$PWD 3 QT += script3 contains(QT_CONFIG, script): QT += script 4 4 5 5 include($$QT_SOURCE_TREE/tools/shared/qtpropertybrowser/qtpropertybrowser.pri) -
trunk/tools/designer/src/lib/shared/shared_enums_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/shared_global_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/shared_settings.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/shared_settings_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/sheet_delegate.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/sheet_delegate_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/signalslotdialog.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 269 269 connect(m_model, SIGNAL(checkSignature(QString,bool*)), this, SIGNAL(checkSignature(QString,bool*))); 270 270 271 connect(m_listView->selectionModel(), SIGNAL(selectionChanged(QItemSelection, 272 this, SLOT(slotSelectionChanged(QItemSelection, 271 connect(m_listView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), 272 this, SLOT(slotSelectionChanged(QItemSelection,QItemSelection))); 273 273 } 274 274 -
trunk/tools/designer/src/lib/shared/signalslotdialog_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/spacer_widget.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/spacer_widget_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/stylesheeteditor.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** 40 40 ****************************************************************************/ 41 42 /*43 TRANSLATOR qdesigner_internal::StyleSheetEditorDialog44 */45 41 46 42 #include "stylesheeteditor_p.h" … … 119 115 120 116 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))); 123 119 124 120 QSignalMapper *resourceActionMapper = new QSignalMapper(this); … … 245 241 void StyleSheetEditorDialog::slotAddColor(const QString &property) 246 242 { 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()) 250 245 return; 251 246 252 QColor color;253 color.setRgba(rgba);254 247 QString colorStr; 255 248 -
trunk/tools/designer/src/lib/shared/stylesheeteditor_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/textpropertyeditor.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 279 279 urlCompletions.push_back(QLatin1String("http://")); 280 280 urlCompletions.push_back(QLatin1String("http://www.")); 281 urlCompletions.push_back(QLatin1String("http://qt software.com/"));281 urlCompletions.push_back(QLatin1String("http://qt.nokia.com/")); 282 282 urlCompletions.push_back(QLatin1String("file://")); 283 283 urlCompletions.push_back(QLatin1String("ftp://")); -
trunk/tools/designer/src/lib/shared/textpropertyeditor_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/widgetdatabase.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/widgetdatabase_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/widgetfactory.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** 40 40 ****************************************************************************/ 41 42 /*43 TRANSLATOR qdesigner_internal::WidgetFactory44 */45 41 46 42 #include "widgetfactory_p.h" … … 839 835 m_lastWasAPassiveInteractor = true; 840 836 return m_lastWasAPassiveInteractor; 841 } else if (qobject_cast<QSizeGrip*>(widget)) 837 #ifndef QT_NO_SIZEGRIP 838 } else if (qobject_cast<QSizeGrip*>(widget)) { 842 839 return (m_lastWasAPassiveInteractor = true); 843 else if (qobject_cast<QMdiSubWindow*>(widget)) 840 #endif 841 } else if (qobject_cast<QMdiSubWindow*>(widget)) 844 842 return (m_lastWasAPassiveInteractor = true); 845 843 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 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/tools/designer/src/lib/shared/zoomwidget.cpp
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 144 144 m_zoomFactor(1.0), 145 145 m_zoomContextMenuEnabled(false), 146 m_autoScrollSuppressed(true),147 146 m_zoomMenu(0) 148 147 { 148 setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); 149 setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); 149 150 setFrameShape(QFrame::NoFrame); 150 151 setScene(m_scene); … … 188 189 resetTransform(); 189 190 scale(m_zoomFactor, m_zoomFactor); 190 if (m_autoScrollSuppressed)191 scrollToOrigin();192 191 } 193 192 … … 209 208 { 210 209 m_zoomContextMenuEnabled = e; 211 }212 213 bool ZoomView::isAutoScrollSuppressed() const214 {215 return m_autoScrollSuppressed;216 }217 218 void ZoomView::setAutoScrollSuppressed(bool s)219 {220 m_autoScrollSuppressed = s;221 210 } 222 211 … … 470 459 if (m_proxy && !m_viewResizeBlocked) { 471 460 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(); 473 462 const QSizeF newViewPortSize = size() - viewPortMargin(); 474 463 const QSizeF widgetSizeF = newViewPortSize / zoomFactor() - widgetDecorationSizeF(); 475 464 m_widgetResizeBlocked = true; 476 465 m_proxy->widget()->resize(widgetSizeF.toSize()); 466 setSceneRect(QRectF(QPointF(0, 0), widgetSizeF)); 477 467 scrollToOrigin(); 478 468 m_widgetResizeBlocked = false; 469 if (debugZoomWidget > 1) 470 qDebug() << '<' << Q_FUNC_INFO << widgetSizeF << m_proxy->widget()->size() << m_proxy->size(); 479 471 } 480 472 } … … 560 552 { 561 553 562 qDebug() << "ZoomWidget " << geometry() << " Viewport " << viewport()->geometry()554 qDebug() << "ZoomWidget::dump " << geometry() << " Viewport " << viewport()->geometry() 563 555 << "Scroll: " << scrollPosition() << "Matrix: " << matrix() << " SceneRect: " << sceneRect(); 564 556 if (m_proxy) { -
trunk/tools/designer/src/lib/shared/zoomwidget_p.h
r2 r561 2 2 ** 3 3 ** 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) 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 have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 105 105 Q_PROPERTY(int zoom READ zoom WRITE setZoom DESIGNABLE true SCRIPTABLE true) 106 106 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 109 107 Q_OBJECT 110 108 Q_DISABLE_COPY(ZoomView) … … 121 119 void setZoomContextMenuEnabled(bool e); 122 120 123 // Suppress scrolling when changing zoom. Default: on124 bool isAutoScrollSuppressed() const;125 void setAutoScrollSuppressed(bool s);126 127 121 QGraphicsScene &scene() { return *m_scene; } 128 122 const QGraphicsScene &scene() const { return *m_scene; } … … 150 144 qreal m_zoomFactor; 151 145 152 bool m_zoomContextMenuEnabled; 153 bool m_autoScrollSuppressed; 146 bool m_zoomContextMenuEnabled; 154 147 bool m_resizeBlocked; 155 148 ZoomMenu *m_zoomMenu;
Note:
See TracChangeset
for help on using the changeset viewer.