Commit 9b1538db authored by camilo higuita's avatar camilo higuita

push changes

parent 0c58d006
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.9.1, 2019-07-02T11:01:18. -->
<!-- Written by QtCreator 4.9.1, 2019-07-16T08:01:06. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{bf97479d-fb2b-4786-844d-bbae9915c44f}</value>
<value type="QByteArray">{415a6c17-06fa-4d4e-973e-41bbf4031d43}</value>
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
......@@ -64,13 +64,13 @@
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{ac5dbf14-ba67-4764-b79a-a2d24f134146}</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{891e8f4a-3093-4399-8ec9-9373da7aca35}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<valuelist type="QVariantList" key="CMake.Configuration"/>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/camilo/Coding/qml/build-union-Desktop-Default</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/camilo/Coding/qml/build-maui-dialer-Desktop-Default</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
......@@ -91,7 +91,7 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
<value type="QString">clean</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
......@@ -114,7 +114,7 @@
<valuelist type="QVariantList" key="CMake.Configuration">
<value type="QString">CMAKE_BUILD_TYPE:STRING=Debug</value>
</valuelist>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/camilo/Coding/qml/build-union-Desktop-Debug</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/camilo/Coding/qml/build-maui-dialer-Desktop-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
......@@ -135,7 +135,7 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
<value type="QString">clean</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
......@@ -158,7 +158,7 @@
<valuelist type="QVariantList" key="CMake.Configuration">
<value type="QString">CMAKE_BUILD_TYPE:STRING=Release</value>
</valuelist>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/camilo/Coding/qml/build-union-Desktop-Release</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/camilo/Coding/qml/build-maui-dialer-Desktop-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
......@@ -179,7 +179,7 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
<value type="QString">clean</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
......@@ -202,7 +202,7 @@
<valuelist type="QVariantList" key="CMake.Configuration">
<value type="QString">CMAKE_BUILD_TYPE:STRING=RelWithDebInfo</value>
</valuelist>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/camilo/Coding/qml/build-union-Desktop-Release with Debug Information</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/camilo/Coding/qml/build-maui-dialer-Desktop-Release-with-Debug-Information</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
......@@ -223,7 +223,7 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
<value type="QString">clean</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
......@@ -246,7 +246,7 @@
<valuelist type="QVariantList" key="CMake.Configuration">
<value type="QString">CMAKE_BUILD_TYPE:STRING=MinSizeRel</value>
</valuelist>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/camilo/Coding/qml/build-union-Desktop-Minimum Size Release</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/camilo/Coding/qml/build-maui-dialer-Desktop-Minimum-Size-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
......@@ -267,7 +267,7 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
<value type="QString">clean</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
......@@ -353,10 +353,76 @@
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">union</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">union</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.union
/home/camilo/Coding/qml/union/</value>
/home/camilo/Coding/qml/maui-dialer/</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1">
<value type="QString" key="Analyzer.Perf.CallgraphMode">dwarf</value>
<valuelist type="QVariantList" key="Analyzer.Perf.Events">
<value type="QString">cpu-cycles</value>
</valuelist>
<valuelist type="QVariantList" key="Analyzer.Perf.ExtraArguments"/>
<value type="int" key="Analyzer.Perf.Frequency">250</value>
<value type="QString" key="Analyzer.Perf.SampleMode">-F</value>
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
<value type="int" key="Analyzer.Perf.StackSize">4096</value>
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="QString" key="Analyzer.Valgrind.KCachegrindExecutable">kcachegrind</value>
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">dialer</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.dialer
/home/camilo/Coding/qml/maui-dialer/</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
......@@ -365,9 +431,9 @@
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/camilo/Coding/qml/build-union-Desktop-Default</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/camilo/Coding/qml/build-maui-dialer-Desktop-Default</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">2</value>
</valuemap>
</data>
<data>
......
import QtQuick 2.9
import QtQuick.Controls 2.3
import org.kde.mauikit 1.0 as Maui
/*
* Copyright 2018 Camilo Higuita <milo.h@aol.com>
*
* 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 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.Controls 2.2
import QtQuick.Layouts 1.3
import UnionModels 1.0
import QtQuick.Controls.impl 2.3
import org.kde.mauikit 1.0 as Maui
import org.kde.kirigami 2.2 as Kirigami
import QtGraphicalEffects 1.0
GridLayout
ScrollView
{
id: _grid
height: parent.height
width: parent.width
anchors.centerIn: parent
columns: 3
rows: 3
rowSpacing: space.big
columnSpacing: space.big
// spacing: space.medium
readonly property int buttonFontSize: fontSizes.huge * 1.5
property var model : ["1", "2", "3", "4", "5", "6", "7", "8", "9", "*", "0", "#"]
Repeater
id: control
property int cellWidth: unit * 200
property int cellHeight: unit * 200
spacing: space.medium
property int itemSize: 0
property alias model : gridView.model
property alias delegate : gridView.delegate
property alias contentY: gridView.contentY
property alias currentIndex : gridView.currentIndex
property alias count : gridView.count
property alias cacheBuffer : gridView.cacheBuffer
property alias topMargin: gridView.topMargin
property alias bottomMargin: gridView.bottomMargin
property alias rightMargin: gridView.rightMargin
property alias leftMarging: gridView.leftMargin
property alias header : gridView.header
property bool centerContent: false
property bool adaptContent: false
signal areaClicked(var mouse)
signal areaRightClicked()
PinchArea
{
model: _grid.model
anchors.fill: parent
onPinchStarted:
{
console.log("pinch started")
}
onPinchUpdated:
{
}
onPinchFinished:
{
console.log("pinch finished")
resizeContent(pinch.scale)
}
GridView
{
id: gridView
anchors
{
leftMargin: control.ScrollBar.visible ? 0 : control.ScrollBar.width
}
Item
flow: GridView.FlowLeftToRight
clip: true
focus: true
anchors.horizontalCenter: centerContent ? parent.horizontalCenter :
undefined
width: centerContent ? Math.min(model.count,
Math.floor(parent.width/cellWidth))*cellWidth :
parent.width
height: parent.height
cellWidth: control.cellWidth
cellHeight: control.cellHeight
// maximumFlickVelocity: albumSize*8
boundsBehavior: !isMobile? Flickable.StopAtBounds : Flickable.OvershootBounds
flickableDirection: Flickable.AutoFlickDirection
snapMode: GridView.SnapToRow
highlightMoveDuration: 0
interactive: true
onWidthChanged: adaptContent? control.adaptGrid() : undefined
}
MouseArea
{
Layout.fillHeight: true
Layout.fillWidth: true
anchors.fill: parent
z: -1
acceptedButtons: Qt.RightButton | Qt.LeftButton
onClicked: control.areaClicked(mouse)
onPressAndHold: control.areaRightClicked()
Button
onWheel:
{
height: buttonSize
width: height
anchors.centerIn: parent
// bg.radius: Math.max(width, height)
text: modelData
font.bold: true
font.weight: Font.Bold
font.pointSize: buttonFontSize
onClicked:
if (wheel.modifiers & Qt.ControlModifier)
{
dialString += text;
if (wheel.angleDelta.y != 0)
{
var factor = 1 + wheel.angleDelta.y / 600;
if(factor > 1)
{
control.itemSize = control.itemSize + 10
control.cellHeight = control.cellHeight + 10
control.cellWidth = control.cellWidth + 10
}
else if((control.itemSize - 10) > iconSizes.small)
{
control.itemSize = control.itemSize - 10
control.cellHeight = control.cellHeight - 10
control.cellWidth = control.cellWidth - 10
}
if(adaptContent)
control.adaptGrid()
}
}
}
}
}
function resizeContent(factor)
{
if(factor > 1)
{
control.itemSize = control.itemSize + 10
control.cellHeight = control.cellHeight + 10
control.cellWidth = control.cellWidth + 10
}
else if((control.itemSize - 10) > iconSizes.small)
{
control.itemSize = control.itemSize - 10
control.cellHeight = control.cellHeight - 10
control.cellWidth = control.cellWidth - 10
}
if(adaptContent)
control.adaptGrid()
}
function adaptGrid()
{
var amount = parseInt(gridView.width / (itemSize + spacing), 10)
var leftSpace = parseInt(gridView.width - ( amount * (itemSize + spacing) ), 10)
var size = parseInt((itemSize + spacing) + (parseInt(leftSpace/amount, 10)), 10)
size = size > itemSize + spacing ? size : itemSize + spacing
cellWidth = size
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment