Changeset View
Changeset View
Standalone View
Standalone View
kcm/kcm.cpp
Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Line(s) | 66 | { | |||
---|---|---|---|---|---|
82 | loadWallpapers(); | 82 | loadWallpapers(); | ||
83 | auto wallpaperChangedSignal = static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged); | 83 | auto wallpaperChangedSignal = static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged); | ||
84 | connect(m_ui->wallpaperCombo, wallpaperChangedSignal, this, static_cast<void (KCModule::*)()>(&ScreenLockerKcm::changed)); | 84 | connect(m_ui->wallpaperCombo, wallpaperChangedSignal, this, static_cast<void (KCModule::*)()>(&ScreenLockerKcm::changed)); | ||
85 | connect(m_ui->wallpaperCombo, wallpaperChangedSignal, this, &ScreenLockerKcm::loadWallpaperConfig); | 85 | connect(m_ui->wallpaperCombo, wallpaperChangedSignal, this, &ScreenLockerKcm::loadWallpaperConfig); | ||
86 | 86 | | |||
87 | m_ui->wallpaperCombo->installEventFilter(this); | 87 | m_ui->wallpaperCombo->installEventFilter(this); | ||
88 | 88 | | |||
89 | m_ui->wallpaperConfigWidget->setClearColor(m_ui->palette().color(QPalette::Active, QPalette::Window)); | 89 | m_ui->wallpaperConfigWidget->setClearColor(m_ui->palette().color(QPalette::Active, QPalette::Window)); | ||
90 | m_ui->wallpaperConfigWidget->rootContext()->setContextProperty("configDialog", this); | 90 | auto proxy = new ScreenLockerProxy(this); | ||
91 | m_ui->wallpaperConfigWidget->rootContext()->setContextProperty("configDialog", proxy); | ||||
92 | | ||||
93 | connect(this, &ScreenLockerKcm::wallpaperConfigurationChanged, proxy, &ScreenLockerProxy::wallpaperConfigurationChanged); | ||||
94 | connect(this, &ScreenLockerKcm::currentWallpaperChanged, proxy, &ScreenLockerProxy::currentWallpaperChanged); | ||||
95 | | ||||
91 | m_ui->wallpaperConfigWidget->setSource(QUrl(QStringLiteral("qrc:/kscreenlocker-kcm-resources/config.qml"))); | 96 | m_ui->wallpaperConfigWidget->setSource(QUrl(QStringLiteral("qrc:/kscreenlocker-kcm-resources/config.qml"))); | ||
92 | connect(m_ui->wallpaperConfigWidget->rootObject(), SIGNAL(configurationChanged()), this, SLOT(changed())); | 97 | connect(m_ui->wallpaperConfigWidget->rootObject(), SIGNAL(configurationChanged()), this, SLOT(changed())); | ||
93 | 98 | | |||
94 | m_ui->installEventFilter(this); | 99 | m_ui->installEventFilter(this); | ||
95 | } | 100 | } | ||
96 | 101 | | |||
97 | void ScreenLockerKcm::shortcutChanged(const QKeySequence &key) | 102 | void ScreenLockerKcm::shortcutChanged(const QKeySequence &key) | ||
98 | { | 103 | { | ||
▲ Show 20 Lines • Show All 174 Lines • Show Last 20 Lines |