diff --git a/dialer/contents/ui/Dialer.qml b/dialer/contents/ui/Dialer/Dialer.qml similarity index 83% rename from dialer/contents/ui/Dialer.qml rename to dialer/contents/ui/Dialer/Dialer.qml index 02ec4e05..d76c4022 100644 --- a/dialer/contents/ui/Dialer.qml +++ b/dialer/contents/ui/Dialer/Dialer.qml @@ -23,6 +23,7 @@ import QtQuick.Layouts 1.1 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 2.0 as PlasmaComponents import org.nemomobile.voicecall 1.0 +import "../Dialpad" Item { id: dialer @@ -73,30 +74,8 @@ Item { fontSizeMode: Text.Fit } - GridLayout { - id: pad - columns: 3 - - property int buttonHeight: parent.height / 6 - - Layout.fillWidth: true - Layout.fillHeight: true - - DialerButton { id: one; text: "1" } - DialerButton { text: "2" } - DialerButton { text: "3" } - - DialerButton { text: "4" } - DialerButton { text: "5" } - DialerButton { text: "6" } - - DialerButton { text: "7" } - DialerButton { text: "8" } - DialerButton { text: "9" } - - DialerButton { text: "*"; } - DialerButton { text: "0"; sub: "+"; } - DialerButton { text: "#" } + Dialpad { + } RowLayout { diff --git a/dialer/contents/ui/DialerButton.qml b/dialer/contents/ui/Dialpad/DialerButton.qml similarity index 63% rename from dialer/contents/ui/DialerButton.qml rename to dialer/contents/ui/Dialpad/DialerButton.qml index 86954b0d..f388449e 100644 --- a/dialer/contents/ui/DialerButton.qml +++ b/dialer/contents/ui/Dialpad/DialerButton.qml @@ -1,3 +1,22 @@ +/* + * Copyright 2014 Aaron Seigo + * Copyright 2014 Marco Martin + * + * 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 2, 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.0 import QtQuick.Layouts 1.1 diff --git a/dialer/contents/ui/DialerIconButton.qml b/dialer/contents/ui/Dialpad/DialerIconButton.qml similarity index 59% rename from dialer/contents/ui/DialerIconButton.qml rename to dialer/contents/ui/Dialpad/DialerIconButton.qml index eb1ed1a8..19afb872 100644 --- a/dialer/contents/ui/DialerIconButton.qml +++ b/dialer/contents/ui/Dialpad/DialerIconButton.qml @@ -1,3 +1,23 @@ +/* + * Copyright 2014 Aaron Seigo + * Copyright 2014 Marco Martin + * + * 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 2, 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.0 import QtQuick.Layouts 1.1 import org.kde.plasma.core 2.0 as PlasmaCore diff --git a/dialer/contents/ui/Dialpad/Dialpad.qml b/dialer/contents/ui/Dialpad/Dialpad.qml new file mode 100644 index 00000000..b5baaecd --- /dev/null +++ b/dialer/contents/ui/Dialpad/Dialpad.qml @@ -0,0 +1,51 @@ +/* + * Copyright 2014 Aaron Seigo + * Copyright 2014 Marco Martin + * + * 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 2, 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.0 +import QtQuick.Layouts 1.1 +import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.plasma.components 2.0 as PlasmaComponents + +GridLayout { + id: pad + columns: 3 + + property int buttonHeight: parent.height / 6 + + Layout.fillWidth: true + Layout.fillHeight: true + + DialerButton { id: one; text: "1" } + DialerButton { text: "2" } + DialerButton { text: "3" } + + DialerButton { text: "4" } + DialerButton { text: "5" } + DialerButton { text: "6" } + + DialerButton { text: "7" } + DialerButton { text: "8" } + DialerButton { text: "9" } + + DialerButton { text: "*"; } + DialerButton { text: "0"; sub: "+"; } + DialerButton { text: "#" } +} + diff --git a/dialer/contents/ui/main.qml b/dialer/contents/ui/main.qml index 17bc24cb..40a33bd4 100644 --- a/dialer/contents/ui/main.qml +++ b/dialer/contents/ui/main.qml @@ -115,7 +115,7 @@ ApplicationWindow { PlasmaExtras.ConditionalLoader { anchors.fill: parent when: root.visible && root.status == 0 - source: Qt.resolvedUrl("Dialer.qml") + source: Qt.resolvedUrl("Dialer/Dialer.qml") opacity: root.status == 0 ? 1 : 0 Behavior on opacity { OpacityAnimator {