Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/kwintabbox/kwintabboxconfigform.cpp
Show First 20 Lines • Show All 275 Lines • ▼ Show 20 Line(s) | 275 | } else if (TabboxType::Alternative == m_type) { | |||
---|---|---|---|---|---|
276 | resetShortcut(ui->scAll); | 276 | resetShortcut(ui->scAll); | ||
277 | resetShortcut(ui->scAllReverse); | 277 | resetShortcut(ui->scAllReverse); | ||
278 | resetShortcut(ui->scCurrent); | 278 | resetShortcut(ui->scCurrent); | ||
279 | resetShortcut(ui->scCurrentReverse); | 279 | resetShortcut(ui->scCurrentReverse); | ||
280 | } | 280 | } | ||
281 | m_actionCollection->writeSettings(); | 281 | m_actionCollection->writeSettings(); | ||
282 | } | 282 | } | ||
283 | 283 | | |||
284 | void KWinTabBoxConfigForm::setHighlightWindowsEnabled(bool enabled) | ||||
285 | { | ||||
286 | m_isHighlightWindowsEnabled = enabled; | ||||
287 | ui->kcfg_HighlightWindows->setEnabled(m_isHighlightWindowsEnabled); | ||||
288 | } | ||||
289 | | ||||
290 | void KWinTabBoxConfigForm::setFilterScreenEnabled(bool enabled) | ||||
291 | { | ||||
292 | ui->filterScreens->setEnabled(enabled); | ||||
293 | ui->currentScreen->setEnabled(enabled); | ||||
294 | ui->otherScreens->setEnabled(enabled); | ||||
295 | } | ||||
296 | | ||||
297 | void KWinTabBoxConfigForm::setFilterDesktopEnabled(bool enabled) | ||||
298 | { | ||||
299 | ui->filterDesktops->setEnabled(enabled); | ||||
300 | ui->currentDesktop->setEnabled(enabled); | ||||
301 | ui->otherDesktops->setEnabled(enabled); | ||||
302 | } | ||||
303 | | ||||
304 | void KWinTabBoxConfigForm::setFilterActivitiesEnabled(bool enabled) | ||||
305 | { | ||||
306 | ui->filterActivities->setEnabled(enabled); | ||||
307 | ui->currentActivity->setEnabled(enabled); | ||||
308 | ui->otherActivities->setEnabled(enabled); | ||||
309 | } | ||||
310 | | ||||
311 | void KWinTabBoxConfigForm::setFilterMinimizationEnabled(bool enabled) | ||||
312 | { | ||||
313 | ui->filterMinimization->setEnabled(enabled); | ||||
314 | ui->visibleWindows->setEnabled(enabled); | ||||
315 | ui->hiddenWindows->setEnabled(enabled); | ||||
316 | } | ||||
317 | | ||||
318 | void KWinTabBoxConfigForm::setApplicationModeEnabled(bool enabled) | ||||
319 | { | ||||
320 | ui->oneAppWindow->setEnabled(enabled); | ||||
321 | } | ||||
322 | | ||||
323 | void KWinTabBoxConfigForm::setShowDesktopModeEnabled(bool enabled) | ||||
324 | { | ||||
325 | ui->showDesktop->setEnabled(enabled); | ||||
326 | } | ||||
327 | | ||||
328 | void KWinTabBoxConfigForm::setSwitchingModeEnabled(bool enabled) | ||||
329 | { | ||||
330 | ui->switchingModeCombo->setEnabled(enabled); | ||||
331 | } | ||||
332 | | ||||
333 | void KWinTabBoxConfigForm::setLayoutNameEnabled(bool enabled) | ||||
334 | { | ||||
335 | ui->effectCombo->setEnabled(enabled); | ||||
336 | } | ||||
337 | | ||||
284 | void KWinTabBoxConfigForm::tabBoxToggled(bool on) | 338 | void KWinTabBoxConfigForm::tabBoxToggled(bool on) | ||
285 | { | 339 | { | ||
286 | // Highlight Windows options is availabled if no TabBox effect is selected | 340 | // Highlight Windows options is availabled if no TabBox effect is selected | ||
287 | // or if Tabbox is not builtin effet. | 341 | // or if Tabbox is not builtin effet. | ||
288 | on = !on || ui->effectCombo->currentData(AddonEffect).toBool(); | 342 | on = !on || ui->effectCombo->currentData(AddonEffect).toBool(); | ||
289 | ui->kcfg_HighlightWindows->setEnabled(on); | 343 | ui->kcfg_HighlightWindows->setEnabled(on && m_isHighlightWindowsEnabled); | ||
290 | } | 344 | } | ||
291 | 345 | | |||
292 | void KWinTabBoxConfigForm::onFilterScreen() | 346 | void KWinTabBoxConfigForm::onFilterScreen() | ||
293 | { | 347 | { | ||
294 | emit filterScreenChanged(filterScreen()); | 348 | emit filterScreenChanged(filterScreen()); | ||
295 | } | 349 | } | ||
296 | 350 | | |||
297 | void KWinTabBoxConfigForm::onFilterDesktop() | 351 | void KWinTabBoxConfigForm::onFilterDesktop() | ||
Show All 28 Lines | |||||
326 | 380 | | |||
327 | void KWinTabBoxConfigForm::onEffectCombo() | 381 | void KWinTabBoxConfigForm::onEffectCombo() | ||
328 | { | 382 | { | ||
329 | const bool isAddonEffect = ui->effectCombo->currentData(AddonEffect).toBool(); | 383 | const bool isAddonEffect = ui->effectCombo->currentData(AddonEffect).toBool(); | ||
330 | ui->effectConfigButton->setIcon(QIcon::fromTheme(isAddonEffect ? "view-preview" : "configure")); | 384 | ui->effectConfigButton->setIcon(QIcon::fromTheme(isAddonEffect ? "view-preview" : "configure")); | ||
331 | if (!ui->kcfg_ShowTabBox->isChecked()) { | 385 | if (!ui->kcfg_ShowTabBox->isChecked()) { | ||
332 | return; | 386 | return; | ||
333 | } | 387 | } | ||
334 | ui->kcfg_HighlightWindows->setEnabled(isAddonEffect); | 388 | ui->kcfg_HighlightWindows->setEnabled(isAddonEffect && m_isHighlightWindowsEnabled); | ||
335 | 389 | | |||
336 | emit layoutNameChanged(layoutName()); | 390 | emit layoutNameChanged(layoutName()); | ||
337 | } | 391 | } | ||
338 | 392 | | |||
339 | void KWinTabBoxConfigForm::shortcutChanged(const QKeySequence &seq) | 393 | void KWinTabBoxConfigForm::shortcutChanged(const QKeySequence &seq) | ||
340 | { | 394 | { | ||
341 | QString action; | 395 | QString action; | ||
342 | if (sender()) { | 396 | if (sender()) { | ||
Show All 11 Lines |