Discussion:
[SailfishDevel] How can I setup calendar access via QML ?
Matthias Barmeier
2014-01-25 11:57:00 UTC
Permalink
Hi,

does anybody know how how to setup calendar access from QML ?
I have successfully gained access to contacts. I tried the same
approach, but it does not work :(.

What I have tried:

.pro:
CONFIG += QtOrganizer
INCLUDEPATH += /usr/include/qt5/QtOrganizer


.qml:
import QtQuick 2.0
import Sailfish.Silica 1.0
import QtOrganizer 5.0


I get this during compile:

[W] unknown:37 - file:///usr/share/CalDav/qml/CalDav.qml:37:30: Type
FirstPage unavailable

initialPage: Component { FirstPage { } }

^

[W] unknown:33 - file:///usr/share/CalDav/qml/pages/FirstPage.qml:33:1:
module "QtOrganizer" is not installed

import QtOrganizer 5.0



What can I do to make it work ?

Ciao
Matze


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20140125/f4cf78a2/attachment.html>
Andrey Kozhevnikov
2014-01-25 12:01:47 UTC
Permalink
there are no organizer in Sailfish

Sailfish using org.nemomobile.calendar module
Post by Matthias Barmeier
Hi,
does anybody know how how to setup calendar access from QML ?
I have successfully gained access to contacts. I tried the same
approach, but it does not work :(.
CONFIG += QtOrganizer
INCLUDEPATH += /usr/include/qt5/QtOrganizer
import QtQuick 2.0
import Sailfish.Silica 1.0
import QtOrganizer 5.0
[W] unknown:37 - file:///usr/share/CalDav/qml/CalDav.qml:37:30: Type
FirstPage unavailable
initialPage: Component { FirstPage { } }
^
[W] unknown:33 -
file:///usr/share/CalDav/qml/pages/FirstPage.qml:33:1: module
"QtOrganizer" is not installed
import QtOrganizer 5.0
What can I do to make it work ?
Ciao
Matze
_______________________________________________
SailfishOS.org Devel mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20140125/5bbb279b/attachment.html>
Matthias Barmeier
2014-01-25 12:55:52 UTC
Permalink
Hi,

do you mean that all these packages:


qt5-qtdeclarative-pim-organizer

qt5-qtdeclarative-pim-organizer-debuginfo

qt5-qtpim-organizer

qt5-qtpim-organizer-debuginfo

qt5-qtpim-organizer-devel

qt5-qtpim-versitorganizer

qt5-qtpim-versitorganizer-debuginfo

qt5-qtpim-versitorganizer-devel


are obsolete or am I unable to use them from QML ?

Do you have a hint where I can found an example on how to access the
calendar with nemo.mobile.org ?

Thanks.

Ciao
Matze
Post by Andrey Kozhevnikov
there are no organizer in Sailfish
Sailfish using org.nemomobile.calendar module
Post by Matthias Barmeier
Hi,
does anybody know how how to setup calendar access from QML ?
I have successfully gained access to contacts. I tried the same
approach, but it does not work :(.
CONFIG += QtOrganizer
INCLUDEPATH += /usr/include/qt5/QtOrganizer
import QtQuick 2.0
import Sailfish.Silica 1.0
import QtOrganizer 5.0
[W] unknown:37 - file:///usr/share/CalDav/qml/CalDav.qml:37:30: Type
FirstPage unavailable
initialPage: Component { FirstPage { } }
^
[W] unknown:33 -
file:///usr/share/CalDav/qml/pages/FirstPage.qml:33:1: module
"QtOrganizer" is not installed
import QtOrganizer 5.0
What can I do to make it work ?
Ciao
Matze
_______________________________________________
SailfishOS.org Devel mailing list
_______________________________________________
SailfishOS.org Devel mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20140125/4cdf874e/attachment.html>
Andrey Kozhevnikov
2014-01-25 13:02:31 UTC
Permalink
well, you should try. i dont know if it functioning. but just try.

you need to add "qt5-qtdeclarative-pim-organizer" to package depends to
be able to install it. its not on device by default.
Post by Matthias Barmeier
Hi,
qt5-qtdeclarative-pim-organizer
qt5-qtdeclarative-pim-organizer-debuginfo
qt5-qtpim-organizer
qt5-qtpim-organizer-debuginfo
qt5-qtpim-organizer-devel
qt5-qtpim-versitorganizer
qt5-qtpim-versitorganizer-debuginfo
qt5-qtpim-versitorganizer-devel
are obsolete or am I unable to use them from QML ?
Do you have a hint where I can found an example on how to access the
calendar with nemo.mobile.org ?
Thanks.
Ciao
Matze
Post by Andrey Kozhevnikov
there are no organizer in Sailfish
Sailfish using org.nemomobile.calendar module
Post by Matthias Barmeier
Hi,
does anybody know how how to setup calendar access from QML ?
I have successfully gained access to contacts. I tried the same
approach, but it does not work :(.
CONFIG += QtOrganizer
INCLUDEPATH += /usr/include/qt5/QtOrganizer
import QtQuick 2.0
import Sailfish.Silica 1.0
import QtOrganizer 5.0
[W] unknown:37 - file:///usr/share/CalDav/qml/CalDav.qml:37:30: Type
FirstPage unavailable
initialPage: Component { FirstPage { } }
^
[W] unknown:33 -
file:///usr/share/CalDav/qml/pages/FirstPage.qml:33:1: module
"QtOrganizer" is not installed
import QtOrganizer 5.0
What can I do to make it work ?
Ciao
Matze
_______________________________________________
SailfishOS.org Devel mailing list
_______________________________________________
SailfishOS.org Devel mailing list
_______________________________________________
SailfishOS.org Devel mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20140125/033438c7/attachment.html>
Matthias Barmeier
2014-01-25 13:29:00 UTC
Permalink
perfect, I just ad forgotten to install it on the emulator via pkcon.
Thanks.

Ciao
Matze
Post by Andrey Kozhevnikov
well, you should try. i dont know if it functioning. but just try.
you need to add "qt5-qtdeclarative-pim-organizer" to package depends
to be able to install it. its not on device by default.
Post by Matthias Barmeier
Hi,
qt5-qtdeclarative-pim-organizer
qt5-qtdeclarative-pim-organizer-debuginfo
qt5-qtpim-organizer
qt5-qtpim-organizer-debuginfo
qt5-qtpim-organizer-devel
qt5-qtpim-versitorganizer
qt5-qtpim-versitorganizer-debuginfo
qt5-qtpim-versitorganizer-devel
are obsolete or am I unable to use them from QML ?
Do you have a hint where I can found an example on how to access the
calendar with nemo.mobile.org ?
Thanks.
Ciao
Matze
Post by Andrey Kozhevnikov
there are no organizer in Sailfish
Sailfish using org.nemomobile.calendar module
Post by Matthias Barmeier
Hi,
does anybody know how how to setup calendar access from QML ?
I have successfully gained access to contacts. I tried the same
approach, but it does not work :(.
CONFIG += QtOrganizer
INCLUDEPATH += /usr/include/qt5/QtOrganizer
import QtQuick 2.0
import Sailfish.Silica 1.0
import QtOrganizer 5.0
Type FirstPage unavailable
initialPage: Component { FirstPage { } }
^
[W] unknown:33 -
file:///usr/share/CalDav/qml/pages/FirstPage.qml:33:1: module
"QtOrganizer" is not installed
import QtOrganizer 5.0
What can I do to make it work ?
Ciao
Matze
_______________________________________________
SailfishOS.org Devel mailing list
_______________________________________________
SailfishOS.org Devel mailing list
_______________________________________________
SailfishOS.org Devel mailing list
_______________________________________________
SailfishOS.org Devel mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20140125/b60772dc/attachment.html>
Ove Kåven
2014-01-25 16:48:27 UTC
Permalink
Post by Matthias Barmeier
Hi,
qt5-qtdeclarative-pim-organizer
qt5-qtdeclarative-pim-organizer-debuginfo
qt5-qtpim-organizer
qt5-qtpim-organizer-debuginfo
qt5-qtpim-organizer-devel
qt5-qtpim-versitorganizer
qt5-qtpim-versitorganizer-debuginfo
qt5-qtpim-versitorganizer-devel
are obsolete or am I unable to use them from QML ?
Like Andrey, I'm convinced they are not used on Jolla. If you check,
you'll see that none of these QtOrganizer packages are installed by
default on the actual Jolla device, nor depended on by jolla-calendar.
Since I can find no QtOrganizer backend to interface with the actual
calendar, I'm pretty sure that trying to use QtOrganizer will not work
in any useful way, even if you can access it from QML.
Post by Matthias Barmeier
Do you have a hint where I can found an example on how to access the
calendar with nemo.mobile.org ?
For an example, you could always install jolla-calendar into your Jolla,
ssh into it, and look under /usr/share/jolla-calendar to study their QML.

Or you could, if you like, study the source code of
org.nemomobile.calendar at
https://github.com/nemomobile/nemo-qml-plugin-calendar/tree/master/src

If you don't know C++, here are a few tips for finding what you need:

In plugin.cpp, search for "qmlRegister", to find out which components
are available to QML. "qmlRegisterType" registers a type you can create
from QML, and "qmlRegisterSingletonType" registers a global object you
can access, much like the "Theme" object.

Then you can look in the .h files for the declarations of these types.
Look for Q_PROPERTY to find the properties, Q_INVOKABLE to find the
methods you can call, and the "signal:" section for signals you can add
handlers for (e.g. if there's a "eventChanged" signal in C++, then
there's a "onEventChanged" signal in QML).
Matthias Barmeier
2014-01-25 16:59:38 UTC
Permalink
Hi Ove,

you are right. After I tried QtContacts and it worked 99% I were
optimistic about QtOrganizer, but it doesn't work.

Thanks for your hints!

I will check them out and hopefully find something useful.

Ciao
Matze
Post by Ove KÃ¥ven
Post by Matthias Barmeier
Hi,
qt5-qtdeclarative-pim-organizer
qt5-qtdeclarative-pim-organizer-debuginfo
qt5-qtpim-organizer
qt5-qtpim-organizer-debuginfo
qt5-qtpim-organizer-devel
qt5-qtpim-versitorganizer
qt5-qtpim-versitorganizer-debuginfo
qt5-qtpim-versitorganizer-devel
are obsolete or am I unable to use them from QML ?
Like Andrey, I'm convinced they are not used on Jolla. If you check,
you'll see that none of these QtOrganizer packages are installed by
default on the actual Jolla device, nor depended on by jolla-calendar.
Since I can find no QtOrganizer backend to interface with the actual
calendar, I'm pretty sure that trying to use QtOrganizer will not work
in any useful way, even if you can access it from QML.
Post by Matthias Barmeier
Do you have a hint where I can found an example on how to access the
calendar with nemo.mobile.org ?
For an example, you could always install jolla-calendar into your
Jolla, ssh into it, and look under /usr/share/jolla-calendar to study
their QML.
Or you could, if you like, study the source code of
org.nemomobile.calendar at
https://github.com/nemomobile/nemo-qml-plugin-calendar/tree/master/src
In plugin.cpp, search for "qmlRegister", to find out which components
are available to QML. "qmlRegisterType" registers a type you can
create from QML, and "qmlRegisterSingletonType" registers a global
object you can access, much like the "Theme" object.
Then you can look in the .h files for the declarations of these types.
Look for Q_PROPERTY to find the properties, Q_INVOKABLE to find the
methods you can call, and the "signal:" section for signals you can
add handlers for (e.g. if there's a "eventChanged" signal in C++, then
there's a "onEventChanged" signal in QML).
_______________________________________________
SailfishOS.org Devel mailing list
Pekka Vuorela
2014-01-27 12:18:04 UTC
Permalink
Post by Ove KÃ¥ven
Post by Matthias Barmeier
Hi,
qt5-qtdeclarative-pim-organizer
[...]
Post by Ove KÃ¥ven
Post by Matthias Barmeier
are obsolete or am I unable to use them from QML ?
Like Andrey, I'm convinced they are not used on Jolla. If you check,
you'll see that none of these QtOrganizer packages are installed by
default on the actual Jolla device, nor depended on by jolla-calendar.
Since I can find no QtOrganizer backend to interface with the actual
calendar, I'm pretty sure that trying to use QtOrganizer will not work
in any useful way, even if you can access it from QML.
Correct. Calendar is using Mkcal and currently there is no QtOrganizer
backend for it.
Post by Ove KÃ¥ven
Post by Matthias Barmeier
Do you have a hint where I can found an example on how to access the
calendar with nemo.mobile.org ?
For an example, you could always install jolla-calendar into your Jolla,
ssh into it, and look under /usr/share/jolla-calendar to study their QML.
Or you could, if you like, study the source code of
org.nemomobile.calendar at
https://github.com/nemomobile/nemo-qml-plugin-calendar/tree/master/src
Worth noting that the qml plugin is not stable API, and also on the
device the calendar database is protected from third party apps.
Ove Kåven
2014-01-27 12:26:13 UTC
Permalink
Post by Pekka Vuorela
Worth noting that the qml plugin is not stable API, and also on the
device the calendar database is protected from third party apps.
Not really. It has already been established on this list that if you
start your app with "invoker" (which I think third party apps are
encouraged to do, to make them launch faster or something), then it
automatically gains the necessary permissions for accessing the PIM
databases (because the boosters used by invoker are sgid privileged).
Matthias Barmeier
2014-01-28 08:27:16 UTC
Permalink
Hi,

I have successfully gained read access to the calender. After reverse
engineering the jolla calendar.
Hopefully write access will work too .

Ciao
Matze
Post by Pekka Vuorela
Post by Ove KÃ¥ven
Post by Matthias Barmeier
Hi,
qt5-qtdeclarative-pim-organizer
[...]
Post by Ove KÃ¥ven
Post by Matthias Barmeier
are obsolete or am I unable to use them from QML ?
Like Andrey, I'm convinced they are not used on Jolla. If you check,
you'll see that none of these QtOrganizer packages are installed by
default on the actual Jolla device, nor depended on by jolla-calendar.
Since I can find no QtOrganizer backend to interface with the actual
calendar, I'm pretty sure that trying to use QtOrganizer will not work
in any useful way, even if you can access it from QML.
Correct. Calendar is using Mkcal and currently there is no QtOrganizer
backend for it.
Post by Ove KÃ¥ven
Post by Matthias Barmeier
Do you have a hint where I can found an example on how to access the
calendar with nemo.mobile.org ?
For an example, you could always install jolla-calendar into your Jolla,
ssh into it, and look under /usr/share/jolla-calendar to study their QML.
Or you could, if you like, study the source code of
org.nemomobile.calendar at
https://github.com/nemomobile/nemo-qml-plugin-calendar/tree/master/src
Worth noting that the qml plugin is not stable API, and also on the
device the calendar database is protected from third party apps.
_______________________________________________
SailfishOS.org Devel mailing list
Karsten Todtermuschke
2014-08-30 19:23:04 UTC
Permalink
Matthias,

could you give some hints how you managed to access the calendar within QML?

I tried to understand what the jolla-calendar does, but its not that clear
which of the qml libraries are needed.

By the way I found that the jolla-calendar already includes a page for one of
the most important features I am looking for: an "Agenda View" (events of
upcoming 7 days). It just can not be reached as the menu entry is commented in
the MonthPage.qml.

What I like to do is to use the tweak for the lock-screen
(http://saildev.wordpress.com/2014/08/16/diy-notifications-on-your-lock-screen/#more-197)
and include something like the agenda view. I really miss the event feed
screen since I retired my N9. ;)

Regards,

Karsten
Post by Matthias Barmeier
Hi,
I have successfully gained read access to the calender. After reverse
engineering the jolla calendar.
Hopefully write access will work too .
Ciao
Matze
Post by Pekka Vuorela
Post by Ove KÃ¥ven
Post by Matthias Barmeier
Hi,
qt5-qtdeclarative-pim-organizer
[...]
Post by Ove KÃ¥ven
Post by Matthias Barmeier
are obsolete or am I unable to use them from QML ?
Like Andrey, I'm convinced they are not used on Jolla. If you check,
you'll see that none of these QtOrganizer packages are installed by
default on the actual Jolla device, nor depended on by jolla-calendar.
Since I can find no QtOrganizer backend to interface with the actual
calendar, I'm pretty sure that trying to use QtOrganizer will not work
in any useful way, even if you can access it from QML.
Correct. Calendar is using Mkcal and currently there is no QtOrganizer
backend for it.
Post by Ove KÃ¥ven
Post by Matthias Barmeier
Do you have a hint where I can found an example on how to access the
calendar with nemo.mobile.org ?
For an example, you could always install jolla-calendar into your Jolla,
ssh into it, and look under /usr/share/jolla-calendar to study their QML.
Or you could, if you like, study the source code of
org.nemomobile.calendar at
https://github.com/nemomobile/nemo-qml-plugin-calendar/tree/master/src
Worth noting that the qml plugin is not stable API, and also on the
device the calendar database is protected from third party apps.
_______________________________________________
SailfishOS.org Devel mailing list
_______________________________________________
SailfishOS.org Devel mailing list
Karsten Todtermuschke
2014-08-30 17:01:21 UTC
Permalink
Matthias,

could you give some hints how you managed to access the calendar within QML?

I tried to understand what the jolla-calendar does, but its not that clear
which of the qml libraries are needed.

By the way I found that the jolla-calendar already includes a page for one of
the most important features I am looking for: an "Agenda View" (events of
upcoming 7 days). It just can not be reached as the menu entry is commented in
the MonthPage.qml.

What I like to do is to use the tweak for the lock-screen
(http://saildev.wordpress.com/2014/08/16/diy-notifications-on-your-lock-screen/#more-197)
and include something like the agenda view. I really miss the event screen
since I retired my N9. :)

Regards,

Karsten
Post by Matthias Barmeier
Hi,
I have successfully gained read access to the calender. After reverse
engineering the jolla calendar.
Hopefully write access will work too .
Ciao
Matze
Post by Pekka Vuorela
Post by Ove KÃ¥ven
Post by Matthias Barmeier
Hi,
qt5-qtdeclarative-pim-organizer
[...]
Post by Ove KÃ¥ven
Post by Matthias Barmeier
are obsolete or am I unable to use them from QML ?
Like Andrey, I'm convinced they are not used on Jolla. If you check,
you'll see that none of these QtOrganizer packages are installed by
default on the actual Jolla device, nor depended on by jolla-calendar.
Since I can find no QtOrganizer backend to interface with the actual
calendar, I'm pretty sure that trying to use QtOrganizer will not work
in any useful way, even if you can access it from QML.
Correct. Calendar is using Mkcal and currently there is no QtOrganizer
backend for it.
Post by Ove KÃ¥ven
Post by Matthias Barmeier
Do you have a hint where I can found an example on how to access the
calendar with nemo.mobile.org ?
For an example, you could always install jolla-calendar into your Jolla,
ssh into it, and look under /usr/share/jolla-calendar to study their QML.
Or you could, if you like, study the source code of
org.nemomobile.calendar at
https://github.com/nemomobile/nemo-qml-plugin-calendar/tree/master/src
Worth noting that the qml plugin is not stable API, and also on the
device the calendar database is protected from third party apps.
_______________________________________________
SailfishOS.org Devel mailing list
_______________________________________________
SailfishOS.org Devel mailing list
Loading...