2020-09-03 21:19:10 -04:00
|
|
|
/*
|
2023-02-06 01:47:15 -05:00
|
|
|
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
|
2020-08-18 17:41:05 -04:00
|
|
|
* Author: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com>
|
2020-08-03 13:27:42 -04:00
|
|
|
*
|
|
|
|
|
* 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 3 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, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
2021-09-08 10:31:38 -04:00
|
|
|
import QtQuick
|
|
|
|
|
import QtQuick.Controls
|
|
|
|
|
import QtQuick.Layouts
|
2021-03-17 14:23:21 -04:00
|
|
|
|
2021-08-23 13:24:08 -04:00
|
|
|
import net.jami.Adapters 1.1
|
|
|
|
|
import net.jami.Models 1.1
|
|
|
|
|
import net.jami.Constants 1.1
|
2020-10-06 13:58:44 +02:00
|
|
|
|
2020-08-03 13:27:42 -04:00
|
|
|
import "../../commoncomponents"
|
|
|
|
|
|
2023-04-04 11:44:36 -04:00
|
|
|
SettingsPageBase {
|
2020-08-18 17:41:05 -04:00
|
|
|
id: root
|
2020-08-03 13:27:42 -04:00
|
|
|
|
2023-04-04 11:44:36 -04:00
|
|
|
title: JamiStrings.pluginSettingsTitle
|
2020-09-16 17:08:21 -04:00
|
|
|
|
2020-11-28 16:14:25 -05:00
|
|
|
|
2023-04-04 11:44:36 -04:00
|
|
|
flickableContent: ColumnLayout {
|
2020-09-16 17:08:21 -04:00
|
|
|
id: pluginSettingsColumnLayout
|
|
|
|
|
|
2023-04-04 11:44:36 -04:00
|
|
|
width: contentFlickableWidth
|
|
|
|
|
spacing: JamiTheme.settingsBlockSpacing
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.leftMargin: JamiTheme.preferredSettingsMarginSize
|
2020-09-14 16:48:07 -04:00
|
|
|
|
2020-08-03 13:27:42 -04:00
|
|
|
|
2023-04-04 11:44:36 -04:00
|
|
|
ColumnLayout {
|
|
|
|
|
id: generalSettings
|
2020-08-03 13:27:42 -04:00
|
|
|
|
2023-04-04 11:44:36 -04:00
|
|
|
width: parent.width
|
|
|
|
|
spacing: JamiTheme.settingsCategorySpacing
|
2020-12-11 15:41:20 -05:00
|
|
|
|
2023-04-04 11:44:36 -04:00
|
|
|
ToggleSwitch {
|
|
|
|
|
id: enabledplugin
|
2020-08-03 13:27:42 -04:00
|
|
|
|
2023-04-04 11:44:36 -04:00
|
|
|
checked: PluginAdapter.isEnabled
|
|
|
|
|
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
labelText: JamiStrings.enable
|
2020-08-03 13:27:42 -04:00
|
|
|
|
2023-04-04 11:44:36 -04:00
|
|
|
onSwitchToggled: {
|
|
|
|
|
PluginModel.setPluginsEnabled(checked)
|
|
|
|
|
PluginAdapter.isEnabled = checked
|
|
|
|
|
}
|
2021-09-23 13:52:38 -04:00
|
|
|
}
|
2020-08-10 12:33:34 +02:00
|
|
|
|
2023-04-04 11:44:36 -04:00
|
|
|
PluginListView {
|
|
|
|
|
id: pluginListView
|
2021-08-13 17:33:48 -04:00
|
|
|
|
2023-04-04 11:44:36 -04:00
|
|
|
visible: PluginAdapter.isEnabled
|
2020-08-03 13:27:42 -04:00
|
|
|
|
2023-04-04 11:44:36 -04:00
|
|
|
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
|
|
|
|
|
Layout.preferredWidth: parent.width
|
|
|
|
|
Layout.minimumHeight: 0
|
|
|
|
|
Layout.preferredHeight: childrenRect.height
|
|
|
|
|
}
|
2020-09-16 17:08:21 -04:00
|
|
|
}
|
2020-08-03 13:27:42 -04:00
|
|
|
}
|
|
|
|
|
}
|