[SailfishDevel] PageStack: from push pushAttached directly to initialPage

2016-09-08 Thread Michael Fuchs

Hi guys,

I got a question about the PageStack.

I got a main page and a filter page, which can be push() 'ed or 
pushAttached() several times. Either via PullDownMenu or swipe to left.
I would like to have another item in the pulldownmenu, which lets me 
directly go back to the first page ("Back To FirstPage"), no matter how 
the pages where added to the stack.


Thanks a lot,

Michael.


FirstPage.qml
==
Page {
 ...
  PullDownMenu {
MenuItem {
  text: qsTr("Filters")
  onClicked: pageStack.navigateForward();
}
  }
  ...
  onStatusChanged: {
if (status === PageStatus.Active && pageStack.depth === 1) {
  pageStack.pushAttached(Qt.resolvedUrl("Filters.qml"), {});
}
  }
}
==

Filters.qml
==
Page {
...
  PullDownMenu {
MenuItem {
  text: qsTr("Specific Filters")
  onClicked: pageStack.push(Qt.resolvedUrl("Filters.qml"));
}
MenuItem {
  text: qsTr("More Filters")
  onClicked: pageStack.navigateForward();
}
MenuItem {
  text: qsTr("Back To FirstPage")
  onClicked: /*what to put here*/;
}
  }
...
  onStatusChanged: {
if (status === PageStatus.Active && pageStack.depth === 1) {
  pageStack.pushAttached(Qt.resolvedUrl("Filters.qml"), {});
}
  }
}
==


___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


Re: [SailfishDevel] PageStack: from push pushAttached directly to initialPage

2016-09-08 Thread Michael Fuchs

Thanks for your attention. ;)

I guess I got it:

onClicked: pageStack.replaceAbove(null, app.initialPage);

...works for me.




Am 08.09.2016 um 13:18 schrieb Michael Fuchs:

Hi guys,

I got a question about the PageStack.

I got a main page and a filter page, which can be push() 'ed or
pushAttached() several times. Either via PullDownMenu or swipe to left.
I would like to have another item in the pulldownmenu, which lets me
directly go back to the first page ("Back To FirstPage"), no matter how
the pages where added to the stack.

Thanks a lot,

Michael.


FirstPage.qml
==
Page {
 ...
  PullDownMenu {
MenuItem {
  text: qsTr("Filters")
  onClicked: pageStack.navigateForward();
}
  }
  ...
  onStatusChanged: {
if (status === PageStatus.Active && pageStack.depth === 1) {
  pageStack.pushAttached(Qt.resolvedUrl("Filters.qml"), {});
}
  }
}
==

Filters.qml
==
Page {
...
  PullDownMenu {
MenuItem {
  text: qsTr("Specific Filters")
  onClicked: pageStack.push(Qt.resolvedUrl("Filters.qml"));
}
MenuItem {
  text: qsTr("More Filters")
  onClicked: pageStack.navigateForward();
}
MenuItem {
  text: qsTr("Back To FirstPage")
  onClicked: /*what to put here*/;
}
  }
...
  onStatusChanged: {
if (status === PageStatus.Active && pageStack.depth === 1) {
  pageStack.pushAttached(Qt.resolvedUrl("Filters.qml"), {});
}
  }
}
==


___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to
devel-unsubscr...@lists.sailfishos.org

___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


[SailfishDevel] Connect to 2 databases

2016-09-08 Thread Chris Walker
Can anybody point me in the direction of some C++ code to connect to
two SQL databases please?

I want to have one set as read-only and the other as read-write.

Whatever I'm doing is wrong as I always end up with a default
connection.
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


Re: [SailfishDevel] PageStack: from push pushAttached directly to initialPage

2016-09-08 Thread Andrey Kozhevnikov
pageStack.pop(id of mainPage or page found using pageStack.find 
function)


-- Исходное сообщение --
От: "Michael Fuchs" 
Кому: devel@lists.sailfishos.org
Отправлено: 08.09.2016 19:39:39
Тема: Re: [SailfishDevel] PageStack: from push pushAttached directly to 
initialPage



Thanks for your attention. ;)

I guess I got it:

onClicked: pageStack.replaceAbove(null, app.initialPage);

...works for me.




Am 08.09.2016 um 13:18 schrieb Michael Fuchs:

Hi guys,

I got a question about the PageStack.

I got a main page and a filter page, which can be push() 'ed or
pushAttached() several times. Either via PullDownMenu or swipe to 
left.

I would like to have another item in the pulldownmenu, which lets me
directly go back to the first page ("Back To FirstPage"), no matter 
how

the pages where added to the stack.

Thanks a lot,

Michael.


FirstPage.qml
==
Page {
 ...
  PullDownMenu {
MenuItem {
  text: qsTr("Filters")
  onClicked: pageStack.navigateForward();
}
  }
  ...
  onStatusChanged: {
if (status === PageStatus.Active && pageStack.depth === 1) {
  pageStack.pushAttached(Qt.resolvedUrl("Filters.qml"), {});
}
  }
}
==

Filters.qml
==
Page {
...
  PullDownMenu {
MenuItem {
  text: qsTr("Specific Filters")
  onClicked: pageStack.push(Qt.resolvedUrl("Filters.qml"));
}
MenuItem {
  text: qsTr("More Filters")
  onClicked: pageStack.navigateForward();
}
MenuItem {
  text: qsTr("Back To FirstPage")
  onClicked: /*what to put here*/;
}
  }
...
  onStatusChanged: {
if (status === PageStatus.Active && pageStack.depth === 1) {
  pageStack.pushAttached(Qt.resolvedUrl("Filters.qml"), {});
}
  }
}
==


___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to
devel-unsubscr...@lists.sailfishos.org

___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to 
devel-unsubscr...@lists.sailfishos.org


___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] PageStack: from push pushAttached directly to initialPage

2016-09-08 Thread Michael Fuchs

The find function looks promising.

But where do I set the id of the mainPage, which is accessible via 
pageStack?


ApplicationWindow
{
id: app
initialPage: Component { id: here?; TaskList { id:here?; } }

}


Am 08.09.2016 um 17:16 schrieb Andrey Kozhevnikov:

pageStack.pop(id of mainPage or page found using pageStack.find function)

-- Исходное сообщение --
От: "Michael Fuchs" 
Кому: devel@lists.sailfishos.org
Отправлено: 08.09.2016 19:39:39
Тема: Re: [SailfishDevel] PageStack: from push pushAttached directly to
initialPage


Thanks for your attention. ;)

I guess I got it:

onClicked: pageStack.replaceAbove(null, app.initialPage);

...works for me.




Am 08.09.2016 um 13:18 schrieb Michael Fuchs:

Hi guys,

I got a question about the PageStack.

I got a main page and a filter page, which can be push() 'ed or
pushAttached() several times. Either via PullDownMenu or swipe to left.
I would like to have another item in the pulldownmenu, which lets me
directly go back to the first page ("Back To FirstPage"), no matter how
the pages where added to the stack.

Thanks a lot,

Michael.


FirstPage.qml
==
Page {
 ...
  PullDownMenu {
MenuItem {
  text: qsTr("Filters")
  onClicked: pageStack.navigateForward();
}
  }
  ...
  onStatusChanged: {
if (status === PageStatus.Active && pageStack.depth === 1) {
  pageStack.pushAttached(Qt.resolvedUrl("Filters.qml"), {});
}
  }
}
==

Filters.qml
==
Page {
...
  PullDownMenu {
MenuItem {
  text: qsTr("Specific Filters")
  onClicked: pageStack.push(Qt.resolvedUrl("Filters.qml"));
}
MenuItem {
  text: qsTr("More Filters")
  onClicked: pageStack.navigateForward();
}
MenuItem {
  text: qsTr("Back To FirstPage")
  onClicked: /*what to put here*/;
}
  }
...
  onStatusChanged: {
if (status === PageStatus.Active && pageStack.depth === 1) {
  pageStack.pushAttached(Qt.resolvedUrl("Filters.qml"), {});
}
  }
}
==


___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to
devel-unsubscr...@lists.sailfishos.org

___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to
devel-unsubscr...@lists.sailfishos.org


___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] PageStack: from push pushAttached directly to initialPage

2016-09-08 Thread Andrey Kozhevnikov

for find function you might set objectName of your page

-- Исходное сообщение --
От: "Michael Fuchs" 
Кому: devel@lists.sailfishos.org
Отправлено: 08.09.2016 22:52:09
Тема: Re: [SailfishDevel] PageStack: from push pushAttached directly to 
initialPage



The find function looks promising.

But where do I set the id of the mainPage, which is accessible via 
pageStack?


ApplicationWindow
{
id: app
initialPage: Component { id: here?; TaskList { id:here?; } }

}


Am 08.09.2016 um 17:16 schrieb Andrey Kozhevnikov:
pageStack.pop(id of mainPage or page found using pageStack.find 
function)


-- Исходное сообщение --
От: "Michael Fuchs" 
Кому: devel@lists.sailfishos.org
Отправлено: 08.09.2016 19:39:39
Тема: Re: [SailfishDevel] PageStack: from push pushAttached directly 
to

initialPage


Thanks for your attention. ;)

I guess I got it:

onClicked: pageStack.replaceAbove(null, app.initialPage);

...works for me.




Am 08.09.2016 um 13:18 schrieb Michael Fuchs:

Hi guys,

I got a question about the PageStack.

I got a main page and a filter page, which can be push() 'ed or
pushAttached() several times. Either via PullDownMenu or swipe to 
left.

I would like to have another item in the pulldownmenu, which lets me
directly go back to the first page ("Back To FirstPage"), no matter 
how

the pages where added to the stack.

Thanks a lot,

Michael.


FirstPage.qml
==
Page {
 ...
  PullDownMenu {
MenuItem {
  text: qsTr("Filters")
  onClicked: pageStack.navigateForward();
}
  }
  ...
  onStatusChanged: {
if (status === PageStatus.Active && pageStack.depth === 1) {
  pageStack.pushAttached(Qt.resolvedUrl("Filters.qml"), {});
}
  }
}
==

Filters.qml
==
Page {
...
  PullDownMenu {
MenuItem {
  text: qsTr("Specific Filters")
  onClicked: pageStack.push(Qt.resolvedUrl("Filters.qml"));
}
MenuItem {
  text: qsTr("More Filters")
  onClicked: pageStack.navigateForward();
}
MenuItem {
  text: qsTr("Back To FirstPage")
  onClicked: /*what to put here*/;
}
  }
...
  onStatusChanged: {
if (status === PageStatus.Active && pageStack.depth === 1) {
  pageStack.pushAttached(Qt.resolvedUrl("Filters.qml"), {});
}
  }
}
==


___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to
devel-unsubscr...@lists.sailfishos.org

___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to
devel-unsubscr...@lists.sailfishos.org


___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to 
devel-unsubscr...@lists.sailfishos.org

___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to 
devel-unsubscr...@lists.sailfishos.org


___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] PageStack: from push pushAttached directly to initialPage

2016-09-08 Thread Kimmo Lindholm
Is this what you are looking for??


function getBottomPageId()
{
return pageStack.find( function(page)
{
return (page._depth === 0)
})
}

 

pageStack.pop(getBottomPageId(), PageStackAction.Immediate)
/* Remove all except bottom page, Thansk for Acce:
* 
https://together.jolla.com/question/44103/how-to-remove-all-except-bottom-page-from-pagestack/#post-id-44117
*/

.

used e.g. here 
https://github.com/kimmoli/valuelogger/blob/master/qml/valuelogger.qml 

-kimmo

-Original Message-
From: Devel [mailto:devel-boun...@lists.sailfishos.org] On Behalf Of Andrey 
Kozhevnikov
Sent: 8. syyskuuta 2016 19:15
To: Sailfish OS Developers; devel@lists.sailfishos.org
Subject: Re: [SailfishDevel] PageStack: from push pushAttached directly to 
initialPage

for find function you might set objectName of your page

-- Исходное сообщение --
От: "Michael Fuchs" 
Кому: devel@lists.sailfishos.org
Отправлено: 08.09.2016 22:52:09
Тема: Re: [SailfishDevel] PageStack: from push pushAttached directly to 
initialPage

>The find function looks promising.
>
>But where do I set the id of the mainPage, which is accessible via 
>pageStack?
>
>ApplicationWindow
>{
> id: app
> initialPage: Component { id: here?; TaskList { id:here?; } }
>
>}
>
>
>Am 08.09.2016 um 17:16 schrieb Andrey Kozhevnikov:
>>pageStack.pop(id of mainPage or page found using pageStack.find 
>>function)
>>
>>-- Исходное сообщение --
>>От: "Michael Fuchs" 
>>Кому: devel@lists.sailfishos.org
>>Отправлено: 08.09.2016 19:39:39
>>Тема: Re: [SailfishDevel] PageStack: from push pushAttached directly 
>>to
>>initialPage
>>
>>>Thanks for your attention. ;)
>>>
>>>I guess I got it:
>>>
>>>onClicked: pageStack.replaceAbove(null, app.initialPage);
>>>
>>>...works for me.
>>>
>>>
>>>
>>>
>>>Am 08.09.2016 um 13:18 schrieb Michael Fuchs:
Hi guys,

I got a question about the PageStack.

I got a main page and a filter page, which can be push() 'ed or
pushAttached() several times. Either via PullDownMenu or swipe to 
left.
I would like to have another item in the pulldownmenu, which lets me
directly go back to the first page ("Back To FirstPage"), no matter 
how
the pages where added to the stack.

Thanks a lot,

Michael.


FirstPage.qml
==
Page {
  ...
   PullDownMenu {
 MenuItem {
   text: qsTr("Filters")
   onClicked: pageStack.navigateForward();
 }
   }
   ...
   onStatusChanged: {
 if (status === PageStatus.Active && pageStack.depth === 1) {
   pageStack.pushAttached(Qt.resolvedUrl("Filters.qml"), {});
 }
   }
}
==

Filters.qml
==
Page {
...
   PullDownMenu {
 MenuItem {
   text: qsTr("Specific Filters")
   onClicked: pageStack.push(Qt.resolvedUrl("Filters.qml"));
 }
 MenuItem {
   text: qsTr("More Filters")
   onClicked: pageStack.navigateForward();
 }
 MenuItem {
   text: qsTr("Back To FirstPage")
   onClicked: /*what to put here*/;
 }
   }
...
   onStatusChanged: {
 if (status === PageStatus.Active && pageStack.depth === 1) {
   pageStack.pushAttached(Qt.resolvedUrl("Filters.qml"), {});
 }
   }
}
==


___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to
devel-unsubscr...@lists.sailfishos.org
>>>___
>>>SailfishOS.org Devel mailing list
>>>To unsubscribe, please send a mail to
>>>devel-unsubscr...@lists.sailfishos.org
>>
>>___
>>SailfishOS.org Devel mailing list
>>To unsubscribe, please send a mail to 
>>devel-unsubscr...@lists.sailfishos.org
>___
>SailfishOS.org Devel mailing list
>To unsubscribe, please send a mail to 
>devel-unsubscr...@lists.sailfishos.org

___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

[SailfishDevel] CalDAV/CardDAV Contributor Meeting

2016-09-08 Thread Chris Adams
Hi everyone,

During the recent Sailfish OS Community Meeting, I raised the topic of 
CalDAV/CardDAV sync plugins for discussion.  These plugins provide vital 
functionality, but due to the complexity of the space (e.g., dozens of 
different server implementations, each with slightly different behaviour) 
coupled with resource limitations in Jolla, there have always been issues with 
them.  I asked the community if there would be anyone interested in 
contributing in some way, and the response was fantastic!

As a result, I have created the following wiki page: 
https://sailfishos.org/wiki/CalDAV_and_CardDAV_Community_Contributions.  Please 
note that currently that SFOS wiki is not able to be edited by community 
members (we're still trying to figure out how to create a proper review process 
for edits, and also whether or not it makes sense to provide single-sign-on 
between Mer and SFOS wiki, etc) but if you have any changes you'd like to make, 
please send them to me and I can publish them there.

Also, I would like to organise a kick-off meeting in #mer-meeting on Freenode 
IRC this coming Monday the 12th of September at 0900 UTC (which is 7 pm 
Australian Eastern Standard Time, if that helps anyone else ;-)

The agenda can be found in the wiki page.

Everyone is welcome and invited to attend, even if you cannot volunteer to help 
at this point in time.

If you cannot make it, don't worry, I will attach minutes from the meeting to 
the wiki page :-)

Best regards,
Chris Adams.


___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org