2023-08-24 22:32:11 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2014 by Eike Hein <hein@kde.org> *
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
* along with this program; if not, write to the *
|
|
|
|
* Free Software Foundation, Inc., *
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
|
|
|
|
***************************************************************************/
|
|
|
|
|
2024-08-09 01:20:25 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
import QtQuick.Layouts
|
2023-08-24 22:32:11 +00:00
|
|
|
|
2024-08-09 01:20:25 +00:00
|
|
|
import org.kde.kcmutils as KCM
|
2023-08-24 22:32:11 +00:00
|
|
|
|
2024-08-09 01:20:25 +00:00
|
|
|
import org.kde.plasma.plasmoid 2.0
|
|
|
|
import org.kde.kirigami 2.3 as Kirigami
|
2023-08-24 22:32:11 +00:00
|
|
|
|
2024-08-09 01:20:25 +00:00
|
|
|
KCM.SimpleKCM {
|
2023-08-24 22:32:11 +00:00
|
|
|
id: configSidepanel
|
|
|
|
|
|
|
|
width: childrenRect.width
|
|
|
|
height: childrenRect.height
|
|
|
|
|
|
|
|
property alias cfg_showHomeSidepanel: showHomeSidepanel.checked
|
|
|
|
property alias cfg_showDocumentsSidepanel: showDocumentsSidepanel.checked
|
|
|
|
property alias cfg_showPicturesSidepanel: showPicturesSidepanel.checked
|
|
|
|
property alias cfg_showMusicSidepanel: showMusicSidepanel.checked
|
|
|
|
property alias cfg_showVideosSidepanel: showVideosSidepanel.checked
|
|
|
|
property alias cfg_showDownloadsSidepanel: showDownloadsSidepanel.checked
|
2024-01-20 02:08:06 +00:00
|
|
|
property alias cfg_showGamesSidepanel: showGamesSidepanel.checked
|
|
|
|
property alias cfg_showRecentItemsSidepanel: showRecentItemsSidepanel.checked
|
2023-08-24 22:32:11 +00:00
|
|
|
property alias cfg_showRootSidepanel: showRootSidepanel.checked
|
|
|
|
property alias cfg_showNetworkSidepanel: showNetworkSidepanel.checked
|
|
|
|
property alias cfg_showSettingsSidepanel: showSettingsSidepanel.checked
|
2024-01-20 02:08:06 +00:00
|
|
|
property alias cfg_showDevicesSidepanel: showDevicesSidepanel.checked
|
2023-08-24 22:32:11 +00:00
|
|
|
property alias cfg_showDefaultsSidepanel: showDefaultsSidepanel.checked
|
2024-01-20 02:08:06 +00:00
|
|
|
property alias cfg_showHelpSidepanel: showHelpSidepanel.checked
|
2023-08-24 22:32:11 +00:00
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
anchors.left: parent.left
|
2024-08-09 01:20:25 +00:00
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.leftMargin: Kirigami.Units.gridUnit*4
|
|
|
|
anchors.rightMargin: Kirigami.Units.gridUnit*4
|
2023-08-24 22:32:11 +00:00
|
|
|
GroupBox {
|
2024-08-09 01:20:25 +00:00
|
|
|
id: gbox
|
2023-08-24 22:32:11 +00:00
|
|
|
Layout.fillWidth: true
|
|
|
|
|
2024-08-09 01:20:25 +00:00
|
|
|
background: Rectangle {
|
|
|
|
color: "white"
|
|
|
|
border.color: "#bababe"
|
|
|
|
y: gbox.topPadding - gbox.bottomPadding
|
|
|
|
height: parent.height - gbox.topPadding + gbox.bottomPadding
|
|
|
|
|
|
|
|
}
|
|
|
|
label: Label {
|
|
|
|
x: gbox.leftPadding
|
|
|
|
width: gbox.availableWidth
|
|
|
|
text: gbox.title
|
|
|
|
elide: Text.ElideRight
|
|
|
|
}
|
|
|
|
|
2023-08-24 22:32:11 +00:00
|
|
|
title: i18n("Show sidebar items")
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
CheckBox {
|
|
|
|
id: showHomeSidepanel
|
|
|
|
text: i18n("Home directory")
|
|
|
|
}
|
|
|
|
CheckBox {
|
|
|
|
id: showDocumentsSidepanel
|
|
|
|
text: i18n("Documents")
|
|
|
|
}
|
|
|
|
CheckBox {
|
|
|
|
id: showPicturesSidepanel
|
|
|
|
text: i18n("Pictures")
|
|
|
|
}
|
|
|
|
CheckBox {
|
|
|
|
id: showMusicSidepanel
|
|
|
|
text: i18n("Music")
|
|
|
|
}
|
|
|
|
CheckBox {
|
|
|
|
id: showVideosSidepanel
|
|
|
|
text: i18n("Videos")
|
|
|
|
}
|
|
|
|
CheckBox {
|
|
|
|
id: showDownloadsSidepanel
|
|
|
|
text: i18n("Downloads")
|
|
|
|
}
|
2024-01-20 02:08:06 +00:00
|
|
|
CheckBox {
|
|
|
|
id: showGamesSidepanel
|
|
|
|
text: i18n("Games")
|
|
|
|
}
|
|
|
|
CheckBox {
|
|
|
|
id: showRecentItemsSidepanel
|
|
|
|
text: i18n("Recent Items")
|
|
|
|
}
|
2023-08-24 22:32:11 +00:00
|
|
|
CheckBox {
|
|
|
|
id: showRootSidepanel
|
|
|
|
text: i18n("Computer")
|
|
|
|
}
|
|
|
|
CheckBox {
|
|
|
|
id: showNetworkSidepanel
|
|
|
|
text: i18n("Network")
|
|
|
|
}
|
|
|
|
CheckBox {
|
|
|
|
id: showSettingsSidepanel
|
2024-01-20 02:08:06 +00:00
|
|
|
text: i18n("Control Panel")
|
|
|
|
}
|
|
|
|
CheckBox {
|
|
|
|
id: showDevicesSidepanel
|
|
|
|
text: i18n("Devices and Printers")
|
2023-08-24 22:32:11 +00:00
|
|
|
}
|
|
|
|
CheckBox {
|
|
|
|
id: showDefaultsSidepanel
|
|
|
|
text: i18n("Default Programs")
|
|
|
|
}
|
2024-01-20 02:08:06 +00:00
|
|
|
CheckBox {
|
|
|
|
id: showHelpSidepanel
|
|
|
|
text: i18n("Help and Support")
|
|
|
|
}
|
2023-08-24 22:32:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-01-20 02:08:06 +00:00
|
|
|
Component.onCompleted: {
|
2024-08-09 01:20:25 +00:00
|
|
|
if(Plasmoid.configuration.stickOutOrb) Plasmoid.setTransparentWindow();
|
2024-01-20 02:08:06 +00:00
|
|
|
}
|
|
|
|
Component.onDestruction: {
|
2024-08-09 01:20:25 +00:00
|
|
|
if(Plasmoid.configuration.stickOutOrb) Plasmoid.setTransparentWindow();
|
2024-01-20 02:08:06 +00:00
|
|
|
}
|
2023-08-24 22:32:11 +00:00
|
|
|
}
|