-
Notifications
You must be signed in to change notification settings - Fork 0
/
optionspage.cpp
43 lines (37 loc) · 1008 Bytes
/
optionspage.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "optionspage.h"
#include "jenkinspluginconstants.h"
using namespace JenkinsCI::Internal;
OptionsPage::OptionsPage(const JenkinsSettings settings, QObject *parent) : Core::IOptionsPage(parent)
{
_settings = settings;
setId("JenkinsPluginSettings");
setDisplayName(tr("Jenkins"));
setCategory("Jenkins");
setDisplayCategory(tr("Jenkins"));
setCategoryIcon(Utils::Icon(QLatin1String(JenkinsCI::Constants::JENKINS_LOGO)));
}
QWidget *OptionsPage::widget()
{
if(_optionsWidget == NULL)
{
_optionsWidget = new JenkinsSettingsWidget();
_optionsWidget->setSettings(_settings);
}
return _optionsWidget;
}
void OptionsPage::apply()
{
JenkinsSettings newSettings = _optionsWidget->settings();
if(!newSettings.equals(_settings))
{
_settings = newSettings;
emit settingsChanged(_settings);
}
}
void OptionsPage::finish()
{
}
void OptionsPage::setSettings(const JenkinsSettings &settings)
{
_settings = settings;
}