1 /**************************************************************************
3 ** This file is part of Qt Creator
5 ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
7 ** Contact: Nokia Corporation (info@qt.nokia.com)
10 ** GNU Lesser General Public License Usage
12 ** This file may be used under the terms of the GNU Lesser General Public
13 ** License version 2.1 as published by the Free Software Foundation and
14 ** appearing in the file LICENSE.LGPL included in the packaging of this file.
15 ** Please review the following information to ensure the GNU Lesser General
16 ** Public License version 2.1 requirements will be met:
17 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
19 ** In addition, as a special exception, Nokia gives you certain additional
20 ** rights. These rights are described in the Nokia Qt LGPL Exception
21 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
25 ** Alternatively, this file may be used in accordance with the terms and
26 ** conditions contained in a signed written agreement between you and Nokia.
28 ** If you have questions regarding the use of this file, please contact
29 ** Nokia at qt-info@nokia.com.
31 **************************************************************************/
33 #ifndef DEBUGGERSOURCEPATHMAPPINGWIDGET_H
34 #define DEBUGGERSOURCEPATHMAPPINGWIDGET_H
36 #include <QtGui/QGroupBox>
37 #include <QtCore/QMap>
38 #include <QtCore/QPair>
41 class QStandardItemModel;
55 class SourcePathMappingModel;
57 class DebuggerSourcePathMappingWidget : public QGroupBox
61 typedef QMap<QString, QString> SourcePathMap;
63 explicit DebuggerSourcePathMappingWidget(QWidget *parent = 0);
65 SourcePathMap sourcePathMap() const;
66 void setSourcePathMap(const SourcePathMap &);
68 /* Merge settings for an installed Qt (unless another setting
69 * is already in the map. */
70 static SourcePathMap mergePlatformQtPath(const QString &qtInstallPath,
71 const SourcePathMap &in);
79 void slotCurrentRowChanged(const QModelIndex &,const QModelIndex &);
80 void slotEditSourceFieldChanged();
81 void slotEditTargetFieldChanged();
86 QString editSourceField() const;
87 QString editTargetField() const;
88 void setEditFieldMapping(const QPair<QString, QString> &m);
89 int currentRow() const;
90 void setCurrentRow(int r);
92 SourcePathMappingModel *m_model;
93 QTreeView *m_treeView;
94 QPushButton *m_addButton;
95 QPushButton *m_addQtButton;
96 QPushButton *m_removeButton;
97 QLineEdit *m_sourceLineEdit;
98 Utils::PathChooser *m_targetChooser;
101 } // namespace Internal
102 } // namespace Debugger
104 #endif // DEBUGGERSOURCEPATHMAPPINGWIDGET_H