Sébastien Blin | 1f91576 | 2020-08-03 13:27:42 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2019-2020 by Savoir-faire Linux |
| 3 | * Author: Yang Wang <yang.wang@savoirfairelinux.com> |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ |
| 18 | |
| 19 | import QtQuick 2.15 |
| 20 | import QtQuick.Window 2.14 |
| 21 | import QtQuick.Controls 1.4 as CT |
| 22 | import QtQuick.Controls 2.14 |
| 23 | import QtQuick.Controls.Universal 2.12 |
| 24 | import QtQuick.Layouts 1.3 |
| 25 | import QtGraphicalEffects 1.14 |
ababi | a284cae | 2020-08-10 12:33:34 +0200 | [diff] [blame] | 26 | import net.jami.Models 1.0 |
Sébastien Blin | 1f91576 | 2020-08-03 13:27:42 -0400 | [diff] [blame] | 27 | |
| 28 | import "../../commoncomponents" |
ababi | a284cae | 2020-08-10 12:33:34 +0200 | [diff] [blame] | 29 | import "../../mainview/components" |
Sébastien Blin | 1f91576 | 2020-08-03 13:27:42 -0400 | [diff] [blame] | 30 | |
ababi | a284cae | 2020-08-10 12:33:34 +0200 | [diff] [blame] | 31 | Rectangle { |
| 32 | id: leftPanelRect |
Sébastien Blin | 1f91576 | 2020-08-03 13:27:42 -0400 | [diff] [blame] | 33 | |
| 34 | property int contentViewportWidth: 200 |
| 35 | property int contentViewPortHeight: 768 |
| 36 | |
| 37 | property alias btnAccountSettings: accountSettingsButton |
| 38 | property alias btnGeneralSettings: generalSettingsButton |
| 39 | property alias btnMediaSettings: mediaSettingsButton |
| 40 | property alias btnPluginSettings: pluginSettingsButton |
| 41 | |
| 42 | signal btnExitClicked |
| 43 | |
| 44 | Component.onCompleted: { |
| 45 | accountSettingsButton.setCheckedState(true, true) |
| 46 | } |
| 47 | |
| 48 | anchors.fill: parent |
| 49 | clip: true |
ababi | a284cae | 2020-08-10 12:33:34 +0200 | [diff] [blame] | 50 | color: JamiTheme.backgroundColor |
Sébastien Blin | 1f91576 | 2020-08-03 13:27:42 -0400 | [diff] [blame] | 51 | |
| 52 | ColumnLayout { |
| 53 | spacing: 0 |
| 54 | |
| 55 | width: contentViewportWidth |
| 56 | height: contentViewPortHeight |
| 57 | |
Sébastien Blin | 1f91576 | 2020-08-03 13:27:42 -0400 | [diff] [blame] | 58 | IconButton { |
| 59 | id: accountSettingsButton |
| 60 | |
| 61 | buttonText: qsTr("Account") |
| 62 | imageSource: "qrc:/images/icons/baseline-people-24px.svg" |
| 63 | |
| 64 | onCheckedToggledForLeftPanel: { |
| 65 | generalSettingsButton.setCheckedState(!checked, false) |
| 66 | mediaSettingsButton.setCheckedState(!checked, false) |
| 67 | pluginSettingsButton.setCheckedState(!checked, false) |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | IconButton { |
| 72 | id: generalSettingsButton |
| 73 | |
| 74 | buttonText: qsTr("General") |
| 75 | imageSource: "qrc:/images/icons/round-settings-24px.svg" |
| 76 | |
| 77 | onCheckedToggledForLeftPanel: { |
| 78 | accountSettingsButton.setCheckedState(!checked, false) |
| 79 | mediaSettingsButton.setCheckedState(!checked, false) |
| 80 | pluginSettingsButton.setCheckedState(!checked, false) |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | IconButton { |
| 85 | id: mediaSettingsButton |
| 86 | |
| 87 | buttonText: qsTr("Audio/Video") |
| 88 | imageSource: "qrc:/images/icons/baseline-desktop_windows-24px.svg" |
| 89 | |
| 90 | onCheckedToggledForLeftPanel: { |
| 91 | generalSettingsButton.setCheckedState(!checked, false) |
| 92 | accountSettingsButton.setCheckedState(!checked, false) |
| 93 | pluginSettingsButton.setCheckedState(!checked, false) |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | IconButton { |
| 98 | id: pluginSettingsButton |
| 99 | |
| 100 | buttonText: qsTr("Plugins") |
| 101 | imageSource: "qrc:/images/icons/extension_24dp.svg" |
| 102 | |
| 103 | onCheckedToggledForLeftPanel: { |
| 104 | generalSettingsButton.setCheckedState(!checked, false) |
| 105 | accountSettingsButton.setCheckedState(!checked, false) |
| 106 | mediaSettingsButton.setCheckedState(!checked, false) |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | Item { |
| 111 | Layout.fillWidth: true |
| 112 | Layout.fillHeight: true |
| 113 | } |
| 114 | } |
Sébastien Blin | 1f91576 | 2020-08-03 13:27:42 -0400 | [diff] [blame] | 115 | } |
| 116 | |