File indexing completed on 2025-02-02 04:26:10
0001 /* 0002 * SPDX-FileCopyrightText: 2019 David Redondo <kde@david-redondo.de> 0003 * SPDX-FileCopyrightText: 2015 Boudhayan Gupta <bgupta@kde.org> 0004 * 0005 * SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #include "GeneralOptionsPage.h" 0009 0010 #include "settings.h" 0011 #include "ui_GeneralOptions.h" 0012 0013 #include <KWindowSystem> 0014 0015 #include <QCheckBox> 0016 0017 GeneralOptionsPage::GeneralOptionsPage(QWidget *parent) 0018 : QWidget(parent) 0019 , m_ui(new Ui_GeneralOptions) 0020 { 0021 m_ui->setupUi(this); 0022 0023 m_ui->runningTitle->setLevel(2); 0024 m_ui->regionTitle->setLevel(2); 0025 0026 //On Wayland we can't programmatically raise and focus the window so we have to hide the option 0027 if (KWindowSystem::isPlatformWayland() || qstrcmp(qgetenv("XDG_SESSION_TYPE").constData(), "wayland") == 0) { 0028 m_ui->kcfg_printKeyRunningAction->removeItem(2); 0029 } 0030 } 0031 0032 GeneralOptionsPage::~GeneralOptionsPage() = default; 0033 0034 #include "moc_GeneralOptionsPage.cpp"