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 **************************************************************************/
32 #ifndef QTOPTIONSPAGE_H
33 #define QTOPTIONSPAGE_H
35 #include "debugginghelperbuildtask.h"
37 #include <coreplugin/dialogs/ioptionspage.h>
39 #include <QtCore/QSharedPointer>
40 #include <QtCore/QFutureInterface>
42 #include <QtGui/QWidget>
45 class QTreeWidgetItem;
48 namespace Qt4ProjectManager {
54 class QtVersionManager;
56 class DebuggingHelper;
59 class QtOptionsPageWidget : public QWidget
62 Q_DISABLE_COPY(QtOptionsPageWidget)
64 QtOptionsPageWidget(QWidget *parent, QList<QtVersion *> versions);
65 ~QtOptionsPageWidget();
66 QList<QtVersion *> versions() const;
68 QString searchKeywords() const;
70 virtual bool eventFilter(QObject *o, QEvent *e);
73 void showEnvironmentPage(QTreeWidgetItem * item);
74 void fixQtVersionName(int index);
75 int indexForTreeItem(const QTreeWidgetItem *item) const;
76 QTreeWidgetItem *treeItemForIndex(int index) const;
77 QtVersion *currentVersion() const;
78 int currentIndex() const;
80 const QString m_specifyNameString;
81 const QString m_specifyPathString;
83 Internal::Ui::QtVersionManager *m_ui;
84 Internal::Ui::QtVersionInfo *m_versionUi;
85 Internal::Ui::DebuggingHelper *m_debuggingHelperUi;
86 QList<QtVersion *> m_versions;
90 void versionChanged(QTreeWidgetItem *item, QTreeWidgetItem *old);
94 void makeS60Visible(bool visible);
96 void updateCurrentQtName();
97 void updateCurrentQMakeLocation();
98 void updateCurrentS60SDKDirectory();
99 void updateCurrentSbsV2Directory();
100 void updateDebuggingHelperUi();
101 void buildDebuggingHelper(DebuggingHelperBuildTask::Tools tools
102 = DebuggingHelperBuildTask::AllTools);
103 void buildGdbHelper();
105 void buildQmlDebuggingLibrary();
106 void buildQmlObserver();
107 void slotShowDebuggingBuildLog();
108 void debuggingHelperBuildFinished(int qtVersionId, const QString &output, DebuggingHelperBuildTask::Tools tools);
111 void updateDescriptionLabel();
112 void showDebuggingBuildLog(const QTreeWidgetItem *currentItem);
115 class QtOptionsPage : public Core::IOptionsPage
121 QString displayName() const;
122 QString category() const;
123 QString displayCategory() const;
124 QIcon categoryIcon() const;
125 QWidget *createPage(QWidget *parent);
128 virtual bool matches(const QString &) const;
131 QtOptionsPageWidget *m_widget;
132 QString m_searchKeywords;
135 } //namespace Internal
136 } //namespace Qt4ProjectManager
139 #endif // QTOPTIONSPAGE_H