Commit f67c1b88 authored by Camilo higuita's avatar Camilo higuita

update to work wiht chnages on new mauikit #1

parents f1350271 599a48b3
project(union)
cmake_minimum_required(VERSION 3.1)
project(union LANGUAGES CXX)
project(dialer LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
......@@ -25,7 +23,7 @@ include(ECMAddAppIcon)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTORCC ON)
set(union_SRCS
set(dialer_SRCS
src/main.cpp
src/interfaces/synchroniser.cpp
src/db/db.cpp
......@@ -38,7 +36,7 @@ set(union_SRCS
src/interfaces/contactimage.cpp
)
set(union_HDRS
set(dialer_HDRS
src/union.h
src/db/db.h
src/db/dbactions.h
......@@ -51,15 +49,15 @@ set(union_HDRS
src/interfaces/contactimage.h
)
set(union_ASSETS
set(dialer_ASSETS
src/qml.qrc
assets/union_assets.qrc
)
add_executable(${PROJECT_NAME}
${union_SRCS}
${union_HDRS}
${union_ASSETS}
${dialer_SRCS}
${dialer_HDRS}
${dialer_ASSETS}
)
if (ANDROID)
......@@ -76,8 +74,8 @@ else()
target_link_libraries(${PROJECT_NAME} KF5::ConfigCore KF5::Notifications KF5::KIOCore KF5::I18n KF5::Attica KF5::Contacts KF5::People )
endif()
if (TARGET create-apk-union)
set_target_properties(create-apk-union PROPERTIES ANDROID_APK_DIR "${MAUIKIT_ANDROID_DIR}")
if (TARGET create-apk-dialer)
set_target_properties(create-apk-dialer PROPERTIES ANDROID_APK_DIR "${MAUIKIT_ANDROID_DIR}")
endif()
target_link_libraries(${PROJECT_NAME} MauiKit Qt5::Sql Qt5::Qml Qt5::Widgets Qt5::Svg Qt5::Concurrent)
......@@ -87,6 +85,7 @@ install(FILES org.kde.communicator.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
#TODO: port to ecm_install_icons()
install(FILES assets/communicator.svg DESTINATION ${KDE_INSTALL_ICONDIR}/hicolor/scalable/apps)
install(FILES org.maui.dialer.json DESTINATION /usr/share/maui-accounts/manifests)
#install(FILES org.kde.pix.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
{
"app": {
"name": "Dialer",
"icon": "phone"
},
"syncCommand": "dialer --sync"
}
......@@ -46,6 +46,26 @@ int main(int argc, char *argv[])
app.setApplicationDisplayName(APPNAME);
app.setWindowIcon(QIcon(":/smartphone.svg"));
QCommandLineParser parser;
parser.addOptions({
// A boolean option with a single name (-p)
{"sync",
QCoreApplication::translate("main", "Show progress during copy")},
// A boolean option with multiple names (-f, --force)
{{"f", "force"},
QCoreApplication::translate("main", "Overwrite existing files.")},
// An option with a value
{{"t", "target-directory"},
QCoreApplication::translate("main", "Copy all source files into <directory>."),
QCoreApplication::translate("main", "directory")},
});
parser.process(app);
if(parser.isSet("sync"))
{
qDebug()<< "TESTING P";
return 0;
}
QScopedPointer<ContactImage> contactImageProvider(new ContactImage());
QQmlApplicationEngine engine;
// QQuickStyle::setStyle("Material");
......
......@@ -2,6 +2,10 @@ import QtQuick 2.9
import QtQuick.Controls 2.3
import org.kde.mauikit 1.0 as Maui
import org.kde.kirigami 2.6 as Kirigami
<<<<<<< HEAD
=======
import org.mauikit.accounts 1.0 as Accounts
>>>>>>> 599a48b3f2e573c70cbd4b50f84ff218cf515c40
import QtQuick.Layouts 1.3
import "views/contacts"
......@@ -48,6 +52,23 @@ Maui.ApplicationWindow
property bool darkTheme : Maui.FM.loadSettings("dark", "theme", false) == "true"
Maui.Dialog
{
id: _accountsForm
defaultButtons: false
maxHeight: 300* unit
maxWidth: maxHeight
Accounts.AddAccountForm {
anchors.fill: parent
appId: "org.maui.dialer"
onAccountAdded: {
console.log("Account Secret :", secret);
}
}
}
mainMenu: [
MenuItem
{
......@@ -62,6 +83,13 @@ Maui.ApplicationWindow
if(isAndroid)
Maui.Android.statusbarColor(backgroundColor, !darkTheme)
}
},
Maui.MenuItem
{
checkable: true
text: qsTr("Accounts");
onTriggered: _accountsForm.open()
}
]
......@@ -88,10 +116,12 @@ Maui.ApplicationWindow
{
id: _favsButton
icon.name: "draw-star"
text: qsTr("Favorites")
icon.color: currentView === views.favs ? highlightColor : textColor
text: qsTr("Favorites")
checked: currentView === views.favs
onTriggered: currentView = views.favs
checkable: false
},
Kirigami.Action
......@@ -102,18 +132,20 @@ Maui.ApplicationWindow
text: qsTr("Favorites")
checked: currentView === views.log
onTriggered: currentView = views.log
checkable: false
},
Kirigami.Action
{
id: _contactsButton
Layout.fillHeight: true
icon.name: "view-contacts"
icon.color: currentView === views.contacts ? highlightColor : textColor
text: qsTr("Contacts")
// height: parent.height
checked: currentView === views.contacts
onTriggered: currentView = views.contacts
checkable: false
}
]
}
......
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