Commit 58b70e5b authored by Camilo higuita's avatar Camilo higuita

push updates

parent 158022a5
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.8.1, 2019-02-26T22:01:28. -->
<!-- Written by QtCreator 4.8.1, 2019-02-27T11:56:10. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
......
#include "syncing.h"
#include "synchroniser.h"
Syncing::Syncing(QObject *parent) : QObject(parent)
{
}
FMH::MODEL_LIST Syncing::getContacts(const QString &query)
FMH::MODEL_LIST Synchroniser::getContacts(const QString &query)
{
Q_UNUSED(query)
return {
{{FMH::MODEL_KEY::N, "Camilo Higuita"}, {FMH::MODEL_KEY::TITLE, "MauiKit Dev"}, {FMH::MODEL_KEY::TEL, "+57 3197673511"}},
{{FMH::MODEL_KEY::N, "Anupam Basak"}, {FMH::MODEL_KEY::TITLE, "Nitrux Dev"}},
{{FMH::MODEL_KEY::N, "Camilo Higuita"}, {FMH::MODEL_KEY::TITLE, "MauiKit Dev"}, {FMH::MODEL_KEY::TEL, "+57 3197673511"}, {FMH::MODEL_KEY::EMAIL, "camilohiguita@maui.org"}},
{{FMH::MODEL_KEY::N, "Anupam Basak"}, {FMH::MODEL_KEY::TITLE, "Nitrux Dev"}, {FMH::MODEL_KEY::EMAIL, "anupam_dev@maui.org"} },
{{FMH::MODEL_KEY::N, "Uri Herrera"}, {FMH::MODEL_KEY::TITLE, "Nitrux founder"}},
{{FMH::MODEL_KEY::N, "Valentina R"}, {FMH::MODEL_KEY::TITLE, "Designer"}},
{{FMH::MODEL_KEY::N, "Valentina R"}, {FMH::MODEL_KEY::TITLE, "Designer"}, {FMH::MODEL_KEY::EMAIL, "uri_herera@maui.org"}},
{{FMH::MODEL_KEY::N, "Daniel Ray"}, {FMH::MODEL_KEY::TITLE, "Testing"}, {FMH::MODEL_KEY::TEL, "+57 3197673511"}},
{{FMH::MODEL_KEY::N, "Esteban Ergh"}, {FMH::MODEL_KEY::TITLE, "Testing"}, {FMH::MODEL_KEY::TEL, "+57 3197673511"}},
{{FMH::MODEL_KEY::N, "Sebastian Maui"}, {FMH::MODEL_KEY::TITLE, "Testing"}, {FMH::MODEL_KEY::TEL, "+57 3197673511"}},
{{FMH::MODEL_KEY::N, "Sebastian Maui"}, {FMH::MODEL_KEY::TITLE, "Testing"}, {FMH::MODEL_KEY::TEL, "+57 3197673511"}, {FMH::MODEL_KEY::EMAIL, "testing@maui.org"}},
{{FMH::MODEL_KEY::N, "Camila Test"}, {FMH::MODEL_KEY::TITLE, "Testing"}, {FMH::MODEL_KEY::TEL, "+57 3197673511"}},
{{FMH::MODEL_KEY::N, "Aleix Unkown"}, {FMH::MODEL_KEY::TITLE, "Testing"}, {FMH::MODEL_KEY::TEL, "+57 3197673511"}},
{{FMH::MODEL_KEY::N, "Aleix Unkown"}, {FMH::MODEL_KEY::TITLE, "Testing"}, {FMH::MODEL_KEY::TEL, "+57 3197673511"}, {FMH::MODEL_KEY::EMAIL, "testing@maui.org"}},
{{FMH::MODEL_KEY::N, "Daniel Ray"}, {FMH::MODEL_KEY::TITLE, "Testing"}, {FMH::MODEL_KEY::TEL, "+57 3197673511"}},
{{FMH::MODEL_KEY::N, "Pin Test"}, {FMH::MODEL_KEY::TITLE, "MauiKit Dev"}},
{{FMH::MODEL_KEY::N, "Hello World Higuita"}, {FMH::MODEL_KEY::TITLE, "MauiKit Dev"}},
{{FMH::MODEL_KEY::N, "Hello World Higuita"}, {FMH::MODEL_KEY::TITLE, "MauiKit Dev"}, {FMH::MODEL_KEY::EMAIL, "testing@maui.org"}},
{{FMH::MODEL_KEY::N, "Alejandro Higuita"}, {FMH::MODEL_KEY::TITLE, "MauiKit Dev"}},
{{FMH::MODEL_KEY::N, "Julian Higuita"}, {FMH::MODEL_KEY::TITLE, "MauiKit Dev"}},
{{FMH::MODEL_KEY::N, "Julian Higuita"}, {FMH::MODEL_KEY::TITLE, "MauiKit Dev"}, {FMH::MODEL_KEY::EMAIL, "testing@maui.org"}},
{{FMH::MODEL_KEY::N, "Andres Higuita"}, {FMH::MODEL_KEY::TITLE, "MauiKit Dev"}}
};
}
Synchroniser::Synchroniser(QObject *parent)
{
}
#ifndef SYNCING_H
#define SYNCING_H
#ifndef SYNCHRONISER_H
#define SYNCHRONISER_H
#include <QObject>
#ifdef STATIC_MAUIKIT
......@@ -8,11 +8,11 @@
#include <MauiKit/fmh.h>
#endif
class Syncing : public QObject
class Synchroniser : public QObject
{
Q_OBJECT
public:
explicit Syncing(QObject *parent = nullptr);
explicit Synchroniser(QObject *parent = nullptr);
FMH::MODEL_LIST getContacts(const QString &query);
......@@ -21,4 +21,4 @@ signals:
public slots:
};
#endif // SYNCING_H
#endif // SYNCHRONISER_H
......@@ -27,7 +27,7 @@ Maui.ApplicationWindow
// altToolBars: true
bgColor: viewBackgroundColor
highlightColor: "#8682c1"
highlightColor: "#ff6a83"
leftIcon.iconColor: footBar.visible ? highlightColor : textColor
onSearchButtonClicked: footBar.visible = !footBar.visible
......
#include "contactsmodel.h"
#include "./src/interfaces/syncing.h"
#include "./src/interfaces/synchroniser.h"
ContactsModel::ContactsModel(QObject *parent) : BaseList(parent)
{
this->syncer = new Syncing(this);
this->syncer = new Synchroniser(this);
connect(this, &ContactsModel::queryChanged, this, &ContactsModel::setList);
this->setList();
}
......
......@@ -4,7 +4,8 @@
#include <QObject>
#include "../baselist.h"
class Syncing;
class Synchroniser;
class ContactsModel : public BaseList
{
Q_OBJECT
......@@ -40,7 +41,7 @@ public:
ContactsModel::SORTBY getSortBy() const;
private:
Syncing *syncer;
Synchroniser *syncer;
FMH::MODEL_LIST list;
void sortList();
void setList();
......
......@@ -11,12 +11,12 @@ ItemDelegate
{
id: control
hoverEnabled: true
clip: true
background: Rectangle
{
color: backgroundColor
opacity: hovered ? 1 : 0.75
// border.color: borderColor
// border.color: borderColor
radius: radiusV * 2
}
......@@ -30,9 +30,11 @@ ItemDelegate
Item
{
id: _contactPic
visible: control.width > Kirigami.Units.gridUnit * 15
Layout.fillHeight: true
Layout.preferredWidth: iconSizes.huge
clip: true
Rectangle
{
height: parent.height
......@@ -128,6 +130,7 @@ ItemDelegate
Layout.fillHeight: true
Layout.fillWidth: true
clip: true
ColumnLayout
{
......@@ -141,6 +144,7 @@ ItemDelegate
font.pointSize: fontSizes.big
font.bold: true
font.weight: Font.Bold
elide: Text.ElideMiddle
}
Label
......@@ -150,15 +154,59 @@ ItemDelegate
text: model.title
font.pointSize: fontSizes.small
font.weight: Font.Light
wrapMode: Text.WrapAnywhere
elide: Text.ElideMiddle
}
}
}
Item
{
visible: control.width > Kirigami.Units.gridUnit * 20
Layout.fillHeight: true
Layout.fillWidth: true
clip: true
ColumnLayout
{
anchors.fill: parent
Label
{
Layout.fillHeight: true
Layout.fillWidth: true
Layout.alignment: Qt.AlignRight
horizontalAlignment: Qt.AlignRight
text: model.email
font.pointSize: fontSizes.small
font.weight: Font.Light
wrapMode: Text.WrapAnywhere
elide: Text.ElideMiddle
}
Label
{
Layout.fillHeight: true
Layout.fillWidth: true
Layout.alignment: Qt.AlignRight
horizontalAlignment: Qt.AlignRight
text: model.tel
font.pointSize: fontSizes.small
font.weight: Font.Light
wrapMode: Text.WrapAnywhere
elide: Text.ElideMiddle
}
}
}
Item
{
Layout.fillHeight: true
Layout.preferredWidth: iconSizes.medium
Layout.preferredWidth: iconSizes.big
Layout.alignment: Qt.AlignRight
Layout.margins: space.big
Maui.ToolButton
{
......
......@@ -249,6 +249,32 @@ Maui.Dialog
color: textColor
}
Label
{
Layout.fillHeight: true
Layout.fillWidth: true
width: parent.width
text: contact.org
font.pointSize: fontSizes.big
font.weight: Font.Bold
color: textColor
}
}
ColumnLayout
{
Layout.fillWidth: true
spacing: space.small
Label
{
Layout.fillHeight: true
Layout.fillWidth: true
text: qsTr("Title")
font.pointSize: fontSizes.default
font.weight: Font.Light
color: textColor
}
Label
{
Layout.fillHeight: true
......@@ -283,6 +309,8 @@ Maui.Dialog
font.pointSize: fontSizes.big
font.weight: Font.Bold
color: textColor
text: contact.tel
}
}
......@@ -307,6 +335,7 @@ Maui.Dialog
font.pointSize: fontSizes.big
font.weight: Font.Bold
color: textColor
text: contact.tel
}
}
......@@ -332,6 +361,7 @@ Maui.Dialog
font.pointSize: fontSizes.big
font.weight: Font.Bold
color: textColor
text: contact.email
}
}
}
......
......@@ -33,18 +33,8 @@ Maui.Page
{
iconName: "list-add-user"
onClicked: _newContactDialog.open()
// height: _searchField.height
// width: height
text: qsTr("New")
// display: ToolButton.TextUnderIcon
// background: Rectangle
// {
// color: "#615f7d"
// radius: radiusV
// border.color: Qt.darker("#615f7d", 1.3)
// }
display: ToolButton.TextUnderIcon
}
]
......@@ -54,6 +44,7 @@ Maui.Page
{
iconName: "view-sort"
text: qsTr("Sort")
display: ToolButton.TextUnderIcon
}
]
......
......@@ -37,7 +37,7 @@ SOURCES += \
src/models/baselist.cpp \
src/models/basemodel.cpp \
src/models/contacts/contactsmodel.cpp \
src/interfaces/syncing.cpp
src/interfaces/synchroniser.cpp
RESOURCES += \
$$PWD/src/qml.qrc \
......@@ -52,5 +52,5 @@ HEADERS += \
src/models/baselist.h \
src/models/basemodel.h \
src/models/contacts/contactsmodel.h \
src/interfaces/syncing.h
src/interfaces/synchroniser.h
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