Advertisement
Guest User

Untitled

a guest
Sep 11th, 2019
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 2.66 KB | None | 0 0
  1. /*
  2.     Copyright 2014-2015 Harald Sitter <sitter@kde.org>
  3.  
  4.     This program is free software; you can redistribute it and/or
  5.     modify it under the terms of the GNU General Public License as
  6.     published by the Free Software Foundation; either version 2 of
  7.     the License or (at your option) version 3 or any later version
  8.     accepted by the membership of KDE e.V. (or its successor approved
  9.     by the membership of KDE e.V.), which shall act as a proxy
  10.     defined in Section 14 of version 3 of the license.
  11.  
  12.     This program is distributed in the hope that it will be useful,
  13.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.     GNU General Public License for more details.
  16.  
  17.     You should have received a copy of the GNU General Public License
  18.     along with this program.  If not, see <http://www.gnu.org/licenses/>.
  19. */
  20.  
  21. import QtQuick 2.7
  22. import QtQuick.Layouts 1.3
  23. import QtQuick.Controls 2.0
  24.  
  25. import org.kde.kcm 1.0
  26. import org.kde.plasma.core 2.0 as PlasmaCore /* for units.gridUnit */
  27. import org.kde.kirigami 2.5 as Kirigami
  28. import org.kde.plasma.private.volume 0.1
  29.  
  30. Kirigami.Page {
  31.     title: kcm.name
  32.     property QtObject sinkModel: SinkModel { }
  33.     property QtObject sourceModel: SourceModel { }
  34.     ConfigModule.quickHelp: i18nd("kcm_pulseaudio", "This module allows configuring the Pulseaudio sound subsystem.")
  35.  
  36.     // TODO: replace this TabBar-plus-Frame-in-a-ColumnLayout with whatever shakes
  37.     // out of https://bugs.kde.org/show_bug.cgi?id=394296
  38.     ColumnLayout {
  39.         anchors.fill: parent
  40.         spacing: 0
  41.  
  42.         TabBar {
  43.             id: tabView
  44.  
  45.             TabButton {
  46.                 text: i18ndc("kcm_pulseaudio", "@title:tab", "Devices")
  47.             }
  48.             TabButton {
  49.                 text: i18ndc("kcm_pulseaudio", "@title:tab", "Applications")
  50.             }
  51.             TabButton {
  52.                 text: i18ndc("kcm_pulseaudio", "@title:tab", "Advanced")
  53.             }
  54.         }
  55.         Frame {
  56.             Layout.fillWidth: true
  57.             Layout.fillHeight: true
  58.  
  59.             StackLayout {
  60.                 anchors.fill: parent
  61.  
  62.                 currentIndex: tabView.currentIndex
  63.  
  64.                 Devices {
  65.                     Layout.fillWidth: true
  66.                     Layout.fillHeight: true
  67.                 }
  68.                 Applications {
  69.                     Layout.fillWidth: true
  70.                     Layout.fillHeight: true
  71.                 }
  72.                 Advanced {
  73.                     Layout.fillWidth: true
  74.                     Layout.fillHeight: true
  75.                 }
  76.             }
  77.         }
  78.     }
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement