diff --git a/views/basic/qml/basic.qml b/views/basic/qml/basic.qml index 232f36a9..c4eb1376 100644 --- a/views/basic/qml/basic.qml +++ b/views/basic/qml/basic.qml @@ -1,125 +1,125 @@ /* * Copyright 2018 Fabian Riethmayer * Copyright 2019 Emmanuel Lepage * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 3, 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 Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.6 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.2 import org.kde.kirigami 2.6 as Kirigami import net.lvindustries.ringqtquick 1.0 as RingQtQuick import org.kde.ringkde.basicview 1.0 as BasicView import org.kde.ringkde.jamicontactview 1.0 as JamiContactView import org.kde.ringkde.jamiwizard 1.0 as JamiWizard import org.kde.ringkde.jamikdeintegration 1.0 as JamiKDEIntegration Kirigami.ApplicationWindow { width: 320 height: 600 id: root RingQtQuick.SharedModelLocker { id: mainPage onChanged: { chat.boo.timelineModel = timelineModel console.log("\n\nCHANGED", timelineModel, chat.boo, chat.boo.timelineModel) // chat.model = timelineModel } } BasicView.ActionCollection { id: actionCollection } BasicView.Contacts { id : mydata Component.onCompleted: { chat.model = mydata.get(3) } } pageStack.initialPage: [list, chat] pageStack.globalToolBar.style: Kirigami.ApplicationHeaderStyle.ToolBar pageStack.globalToolBar.preferredHeight: Kirigami.Units.gridUnit * 3 pageStack.defaultColumnWidth: root.width < 320 ? root.width : 320 BasicView.ListPage { id: list model: RingSession.peersTimelineModel } BasicView.ChatPage { id: chat visible: true } contextDrawer: Kirigami.ContextDrawer { id: contextDrawer } globalDrawer: BasicView.GlobalDrawer { id: globalDrawer } - JamiKDEIntegration.WindowEvent { + /*JamiKDEIntegration.WindowEvent { id: events onRequestsConfigureAccounts: { var component = Qt.createComponent("qrc:/account/qml/accountdialog.qml") if (component.status == Component.Ready) { var window = component.createObject(applicationWindow().contentItem) window.open() } else console.log("ERROR", component.status, component.errorString()) } onRequestsHideWindow: { hide() } onRequestsWizard: { wizardVisible = true globalDrawer.drawerOpen = false wizardLoader.visible = true wizardLoader.active = true } - } + }*/ - Loader { + /*Loader { id: wizardLoader active: false anchors.fill: parent z: 999999 visible: false sourceComponent: JamiWizard.Wizard { anchors.fill: parent z: 999999 onVisibleChanged: { if (!visible) { wizardLoader.visible = false wizardLoader.active = false } wizardVisible = visible } } - } + }*/ } diff --git a/views/basic/qml/chatpage.qml b/views/basic/qml/chatpage.qml index a4f50a96..ae995f08 100644 --- a/views/basic/qml/chatpage.qml +++ b/views/basic/qml/chatpage.qml @@ -1,114 +1,114 @@ /* * Copyright 2018 Fabian Riethmayer * Copyright 2019 Emmanuel Lepage * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 3, 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 Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.2 import QtQuick.Layouts 1.4 import QtQuick.Controls 2.2 as Controls import org.kde.kirigami 2.6 as Kirigami import org.kde.ringkde.basicview 1.0 as BasicView import org.kde.ringkde.jamichatview 1.0 as JamiChatView Kirigami.Page { property var model; // property alias content: loader.sourceComponent // property alias model2: chatView.model property var currentIndividual: null property var boo: chatView property alias showContactDetails: detail.active property alias editContact: form.active Kirigami.Theme.colorSet: Kirigami.Theme.View id: chatPage spacing: 0 leftPadding: 0 rightPadding: 0 topPadding: 0 bottomPadding: 0 padding: 0 title: "Susan Hoffman" - titleDelegate: BasicView.DesktopHeader { + /*titleDelegate: BasicView.DesktopHeader { id: dheader visible: fits onVisibleChanged: header.visible = !visible - } + }*/ - header: BasicView.Header { + /*header: BasicView.Header { id: header visible: !pageStack.wideMode Layout.fillWidth: true height: visible ? Kirigami.Units.gridUnit * 5 : 0 Layout.preferredHeight: visible ? Kirigami.Units.gridUnit * 5 : 0 Layout.margins: 0 //source: model.image - } + }*/ // Loader { // id: loader // anchors.fill: parent // active: true // sourceComponent: // } - JamiChatView.ChatPage { + /*JamiChatView.ChatPage { id: chatView anchors.fill: parent currentIndividual: mainPage.currentIndividual timelineModel: mainPage.timelineModel - } + }*/ Loader { active: false id: detail sourceComponent: BasicView.DetailPage { model: chatPage.model onSheetOpenChanged: detail.active = sheetOpen Component.onCompleted: sheetOpen = true } } Loader { active: false id: form sourceComponent: BasicView.DetailPage { model: chatPage.model onSheetOpenChanged: form.active = sheetOpen Component.onCompleted: {sheetOpen = true} } } actions { left : actionCollection.mailAction main : actionCollection.callAction right: actionCollection.chatAction } contextualActions: [ actionCollection.bookmarkAction, actionCollection.shareAction, actionCollection.editAction, actionCollection.photoAction, actionCollection.banAction, actionCollection.deleteAction, actionCollection.learAction, ] } diff --git a/views/basic/qml/listpage.qml b/views/basic/qml/listpage.qml index e5c93df8..687c299e 100644 --- a/views/basic/qml/listpage.qml +++ b/views/basic/qml/listpage.qml @@ -1,87 +1,87 @@ /* * Copyright 2018 Fabian Riethmayer * Copyright 2019 Emmanuel Lepage * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 3, 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 Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.6 import QtQuick.Controls 2.2 as Controls import org.kde.kirigami 2.4 as Kirigami import QtQuick.Layouts 1.2 as Layouts import org.kde.ringkde.basicview 1.0 as BasicView import org.kde.ringkde.jamitroubleshooting 1.0 as JamiTroubleShooting Kirigami.Page { id: peerListPage - property alias currentIndex: list.currentIndex; - property alias model: list.model + property var currentIndex: null//list.currentIndex; + property var model: null//list.model spacing: 0 leftPadding: 0 rightPadding: 0 topPadding: 0 bottomPadding: 0 padding: 0 header: Layouts.ColumnLayout { height: globalTroubleshoot.active ? implicitHeight : 0 width: peerListPage.width spacing: Kirigami.Units.largeSpacing - JamiTroubleShooting.GlobalTroubleshoot { + /*JamiTroubleShooting.GlobalTroubleshoot { id: globalTroubleshoot Layouts.Layout.fillWidth: true Layouts.Layout.margins: Kirigami.Units.largeSpacing - } + }*/ Item { height: 10 } } Kirigami.Theme.colorSet: Kirigami.Theme.View title: i18n("Address book") background: Rectangle { color: Kirigami.Theme.backgroundColor } titleDelegate: Item { clip: true id: header implicitHeight: parent.parent.height - 2*Kirigami.Units.largeSpacing implicitWidth: 10 Controls.TextField { id: searchField placeholderText: i18n("Search") anchors.centerIn: parent anchors.margins: Kirigami.Units.largeSpacing width: parent.width - 2 * Kirigami.Units.largeSpacing } } - BasicView.List { + /*BasicView.List { id: list width: parent.width height: parent.height - } + }*/ actions { main: actionCollection.newContact } }