From 963f872433ffda7421e7b5863280413465f58ae9 Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Fri, 6 May 2016 13:06:40 +0200 Subject: add account switcher dummy --- components/mail/contents/ui/main.qml | 10 ++++---- components/package/contents/ui/AccountSwitcher.qml | 27 ++++++++++++++++++++++ components/qmldir | 1 + 3 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 components/package/contents/ui/AccountSwitcher.qml diff --git a/components/mail/contents/ui/main.qml b/components/mail/contents/ui/main.qml index 589faf30..4251c73f 100644 --- a/components/mail/contents/ui/main.qml +++ b/components/mail/contents/ui/main.qml @@ -92,13 +92,9 @@ ApplicationWindow { width: folderListView.width clip: true - ToolButton { + KubeComponents.AccountSwitcher { Layout.fillHeight: true - text: "Account/Project/Activity Switch" - onClicked: { - //TODO - } } ToolButton { @@ -111,6 +107,10 @@ ApplicationWindow { syncAction.execute() } } + + Item { + Layout.fillWidth: true + } } RowLayout { diff --git a/components/package/contents/ui/AccountSwitcher.qml b/components/package/contents/ui/AccountSwitcher.qml new file mode 100644 index 00000000..0e620854 --- /dev/null +++ b/components/package/contents/ui/AccountSwitcher.qml @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2016 Michael Bohlender + * + * 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 . + */ + +import QtQuick 2.4 +import QtQuick.Controls 1.3 +import QtQuick.Layouts 1.1 + +import org.kube.framework.domain 1.0 as KubeFramework + +ComboBox { + model: KubeFramework.AccountsModel { } + textRole: "name" +} \ No newline at end of file diff --git a/components/qmldir b/components/qmldir index e9a70bc5..c043302a 100644 --- a/components/qmldir +++ b/components/qmldir @@ -5,3 +5,4 @@ SingleMailView 1.0 SingleMailView.qml FolderListView 1.0 FolderListView.qml MailListView 1.0 MailListView.qml Settings 1.0 Settings.qml +AccountSwitcher 1.0 AccountSwitcher.qml \ No newline at end of file -- cgit v1.2.3