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 #include "lldboptionspage.h"
34 #include "debuggerconstants.h"
36 #include <coreplugin/icore.h>
38 #include <QtCore/QCoreApplication>
39 #include <QtCore/QUrl>
40 #include <QtCore/QTextStream>
41 #include <QtGui/QMessageBox>
42 #include <QtGui/QDesktopServices>
47 LldbOptionsPageWidget::LldbOptionsPageWidget(QWidget *parent, QSettings *s_)
55 void LldbOptionsPageWidget::save()
57 s->beginGroup(QLatin1String("LLDB"));
58 s->setValue(QLatin1String("enabled"), m_ui.enableLldb->isChecked ());
59 s->setValue(QLatin1String("gdbEmu"), m_ui.gdbEmu->isChecked ());
63 void LldbOptionsPageWidget::load()
65 s->beginGroup(QLatin1String("LLDB"));
66 m_ui.enableLldb->setChecked(s->value(QLatin1String("enabled"), false).toBool());
67 m_ui.gdbEmu->setChecked(s->value(QLatin1String("gdbEmu"), true).toBool());
71 // ---------- LldbOptionsPage
72 LldbOptionsPage::LldbOptionsPage()
74 // m_options->fromSettings(Core::ICore::instance()->settings());
77 LldbOptionsPage::~LldbOptionsPage()
81 QString LldbOptionsPage::settingsId()
83 return QLatin1String("F.Lldb");
86 QString LldbOptionsPage::displayName() const
91 QString LldbOptionsPage::category() const
93 return QLatin1String(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY);
96 QString LldbOptionsPage::displayCategory() const
98 return QCoreApplication::translate("Debugger", Debugger::Constants::DEBUGGER_SETTINGS_TR_CATEGORY);
101 QIcon LldbOptionsPage::categoryIcon() const
103 return QIcon(QLatin1String(Debugger::Constants::DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON));
106 QWidget *LldbOptionsPage::createPage(QWidget *parent)
108 m_widget = new LldbOptionsPageWidget(parent, Core::ICore::instance()->settings());
112 void LldbOptionsPage::apply()
119 void LldbOptionsPage::finish()
123 bool LldbOptionsPage::matches(const QString &s) const
125 return QString(s.toLower()).contains("lldb");
128 void addLldbOptionPages(QList<Core::IOptionsPage *> *opts)
130 opts->push_back(new LldbOptionsPage);
134 } // namespace Internal
135 } // namespace Debugger