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) cmake_minimum_required(VERSION 3.1)
project(union LANGUAGES CXX) project(dialer LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOMOC ON)
...@@ -25,7 +23,7 @@ include(ECMAddAppIcon) ...@@ -25,7 +23,7 @@ include(ECMAddAppIcon)
set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTORCC ON) set(CMAKE_AUTORCC ON)
set(union_SRCS set(dialer_SRCS
src/main.cpp src/main.cpp
src/interfaces/synchroniser.cpp src/interfaces/synchroniser.cpp
src/db/db.cpp src/db/db.cpp
...@@ -38,7 +36,7 @@ set(union_SRCS ...@@ -38,7 +36,7 @@ set(union_SRCS
src/interfaces/contactimage.cpp src/interfaces/contactimage.cpp
) )
set(union_HDRS set(dialer_HDRS
src/union.h src/union.h
src/db/db.h src/db/db.h
src/db/dbactions.h src/db/dbactions.h
...@@ -51,15 +49,15 @@ set(union_HDRS ...@@ -51,15 +49,15 @@ set(union_HDRS
src/interfaces/contactimage.h src/interfaces/contactimage.h
) )
set(union_ASSETS set(dialer_ASSETS
src/qml.qrc src/qml.qrc
assets/union_assets.qrc assets/union_assets.qrc
) )
add_executable(${PROJECT_NAME} add_executable(${PROJECT_NAME}
${union_SRCS} ${dialer_SRCS}
${union_HDRS} ${dialer_HDRS}
${union_ASSETS} ${dialer_ASSETS}
) )
if (ANDROID) if (ANDROID)
...@@ -76,8 +74,8 @@ else() ...@@ -76,8 +74,8 @@ else()
target_link_libraries(${PROJECT_NAME} KF5::ConfigCore KF5::Notifications KF5::KIOCore KF5::I18n KF5::Attica KF5::Contacts KF5::People ) target_link_libraries(${PROJECT_NAME} KF5::ConfigCore KF5::Notifications KF5::KIOCore KF5::I18n KF5::Attica KF5::Contacts KF5::People )
endif() endif()
if (TARGET create-apk-union) if (TARGET create-apk-dialer)
set_target_properties(create-apk-union PROPERTIES ANDROID_APK_DIR "${MAUIKIT_ANDROID_DIR}") set_target_properties(create-apk-dialer PROPERTIES ANDROID_APK_DIR "${MAUIKIT_ANDROID_DIR}")
endif() endif()
target_link_libraries(${PROJECT_NAME} MauiKit Qt5::Sql Qt5::Qml Qt5::Widgets Qt5::Svg Qt5::Concurrent) 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}) ...@@ -87,6 +85,7 @@ install(FILES org.kde.communicator.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
#TODO: port to ecm_install_icons() #TODO: port to ecm_install_icons()
install(FILES assets/communicator.svg DESTINATION ${KDE_INSTALL_ICONDIR}/hicolor/scalable/apps) 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}) #install(FILES org.kde.pix.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) 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[]) ...@@ -46,6 +46,26 @@ int main(int argc, char *argv[])
app.setApplicationDisplayName(APPNAME); app.setApplicationDisplayName(APPNAME);
app.setWindowIcon(QIcon(":/smartphone.svg")); 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()); QScopedPointer<ContactImage> contactImageProvider(new ContactImage());
QQmlApplicationEngine engine; QQmlApplicationEngine engine;
// QQuickStyle::setStyle("Material"); // QQuickStyle::setStyle("Material");
......
...@@ -2,6 +2,10 @@ import QtQuick 2.9 ...@@ -2,6 +2,10 @@ import QtQuick 2.9
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import org.kde.mauikit 1.0 as Maui import org.kde.mauikit 1.0 as Maui
import org.kde.kirigami 2.6 as Kirigami import org.kde.kirigami 2.6 as Kirigami
<<<<<<< HEAD
=======
import org.mauikit.accounts 1.0 as Accounts
>>>>>>> 599a48b3f2e573c70cbd4b50f84ff218cf515c40
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import "views/contacts" import "views/contacts"
...@@ -48,6 +52,23 @@ Maui.ApplicationWindow ...@@ -48,6 +52,23 @@ Maui.ApplicationWindow
property bool darkTheme : Maui.FM.loadSettings("dark", "theme", false) == "true" 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: [ mainMenu: [
MenuItem MenuItem
{ {
...@@ -62,6 +83,13 @@ Maui.ApplicationWindow ...@@ -62,6 +83,13 @@ Maui.ApplicationWindow
if(isAndroid) if(isAndroid)
Maui.Android.statusbarColor(backgroundColor, !darkTheme) Maui.Android.statusbarColor(backgroundColor, !darkTheme)
} }
},
Maui.MenuItem
{
checkable: true
text: qsTr("Accounts");
onTriggered: _accountsForm.open()
} }
] ]
...@@ -88,10 +116,12 @@ Maui.ApplicationWindow ...@@ -88,10 +116,12 @@ Maui.ApplicationWindow
{ {
id: _favsButton id: _favsButton
icon.name: "draw-star" icon.name: "draw-star"
text: qsTr("Favorites")
icon.color: currentView === views.favs ? highlightColor : textColor icon.color: currentView === views.favs ? highlightColor : textColor
text: qsTr("Favorites")
checked: currentView === views.favs checked: currentView === views.favs
onTriggered: currentView = views.favs onTriggered: currentView = views.favs
checkable: false
}, },
Kirigami.Action Kirigami.Action
...@@ -102,19 +132,21 @@ Maui.ApplicationWindow ...@@ -102,19 +132,21 @@ Maui.ApplicationWindow
text: qsTr("Favorites") text: qsTr("Favorites")
checked: currentView === views.log checked: currentView === views.log
onTriggered: currentView = views.log onTriggered: currentView = views.log
checkable: false
}, },
Kirigami.Action Kirigami.Action
{ {
id: _contactsButton
Layout.fillHeight: true
icon.name: "view-contacts" icon.name: "view-contacts"
icon.color: currentView === views.contacts ? highlightColor : textColor icon.color: currentView === views.contacts ? highlightColor : textColor
text: qsTr("Contacts") text: qsTr("Contacts")
// height: parent.height
checked: currentView === views.contacts checked: currentView === views.contacts
onTriggered: 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