blob: e1e0a1312cb1aea5cb42a609f527c5f8fc07af16 [file] [log] [blame]
Sébastien Blin1f915762020-08-03 13:27:42 -04001/*
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
19import QtQuick 2.15
20import QtQuick.Window 2.14
21import QtQuick.Controls 1.4 as CT
22import QtQuick.Controls 2.14
23import QtQuick.Controls.Universal 2.12
24import QtQuick.Layouts 1.3
25import QtGraphicalEffects 1.14
ababia284cae2020-08-10 12:33:34 +020026import net.jami.Models 1.0
Sébastien Blin1f915762020-08-03 13:27:42 -040027
28import "../../commoncomponents"
ababia284cae2020-08-10 12:33:34 +020029import "../../mainview/components"
Sébastien Blin1f915762020-08-03 13:27:42 -040030
ababia284cae2020-08-10 12:33:34 +020031Rectangle {
32 id: leftPanelRect
Sébastien Blin1f915762020-08-03 13:27:42 -040033
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
ababia284cae2020-08-10 12:33:34 +020050 color: JamiTheme.backgroundColor
Sébastien Blin1f915762020-08-03 13:27:42 -040051
52 ColumnLayout {
53 spacing: 0
54
55 width: contentViewportWidth
56 height: contentViewPortHeight
57
Sébastien Blin1f915762020-08-03 13:27:42 -040058 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 Blin1f915762020-08-03 13:27:42 -0400115}
116