1
#include "gdboptionspage.h"
2
#include "debuggeractions.h"
3
#include "debuggerconstants.h"
5
#include <coreplugin/icore.h>
6
#include <QtCore/QCoreApplication>
8
const char * const GDB_SETTINGS_ID = QT_TRANSLATE_NOOP("Debugger::Internal::GdbOptionsPage", "Gdb");
13
GdbOptionsPage::GdbOptionsPage()
17
QString GdbOptionsPage::settingsId()
19
return QLatin1String(GDB_SETTINGS_ID);
22
QString GdbOptionsPage::trName() const
24
return tr(GDB_SETTINGS_ID);
27
QString GdbOptionsPage::category() const
29
return QLatin1String(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY);
32
QString GdbOptionsPage::trCategory() const
34
return QCoreApplication::translate("Debugger", Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY);
37
QWidget *GdbOptionsPage::createPage(QWidget *parent)
39
QWidget *w = new QWidget(parent);
41
m_ui.gdbLocationChooser->setExpectedKind(Core::Utils::PathChooser::Command);
42
m_ui.gdbLocationChooser->setPromptDialogTitle(tr("Choose Gdb Location"));
43
m_ui.scriptFileChooser->setExpectedKind(Core::Utils::PathChooser::File);
44
m_ui.scriptFileChooser->setPromptDialogTitle(tr("Choose Location of Startup Script File"));
47
m_group.insert(theDebuggerAction(GdbLocation),
48
m_ui.gdbLocationChooser);
49
m_group.insert(theDebuggerAction(GdbScriptFile),
50
m_ui.scriptFileChooser);
51
m_group.insert(theDebuggerAction(GdbEnvironment),
52
m_ui.environmentEdit);
54
m_group.insert(theDebuggerAction(AllPluginBreakpoints),
55
m_ui.radioButtonAllPluginBreakpoints);
56
m_group.insert(theDebuggerAction(SelectedPluginBreakpoints),
57
m_ui.radioButtonSelectedPluginBreakpoints);
58
m_group.insert(theDebuggerAction(NoPluginBreakpoints),
59
m_ui.radioButtonNoPluginBreakpoints);
60
m_group.insert(theDebuggerAction(SelectedPluginBreakpointsPattern),
61
m_ui.lineEditSelectedPluginBreakpointsPattern);
63
m_ui.lineEditSelectedPluginBreakpointsPattern->
64
setEnabled(theDebuggerAction(SelectedPluginBreakpoints)->value().toBool());
65
connect(m_ui.radioButtonSelectedPluginBreakpoints, SIGNAL(toggled(bool)),
66
m_ui.lineEditSelectedPluginBreakpointsPattern, SLOT(setEnabled(bool)));
69
m_ui.environmentEdit->hide();
70
m_ui.labelEnvironment->hide();
74
void GdbOptionsPage::apply()
76
m_group.apply(Core::ICore::instance()->settings());
79
void GdbOptionsPage::finish()
84
} // namespace Internal
85
} // namespace Debugger