Re: [SailfishDevel] Dynamically populate a ContextMenu

2013-11-25 Thread Martin Kampas
Hi,

simply assign id to one of the static items, e.g. firstStatic, and then use 
firstStatic.parent instead of menu._contentColumn as parent for the 
dynamic items -- this way you do not rely on implementation details:

menu: ContextMenu {
id: menu
MenuItem { id: firstStatic; text: Static 1 }
MenuItem { text: Static 2 }
}

Component.onCompleted: {
console.debug(Populating menu)
for (var i=0; i 4 ; i++){
var newMenuItem = menuItemComp.createObject(firstStatic.parent, 
{text : Dynamic + i})
}
}

Event better consider using Repeater and provide the list of dynamic 
items as item model[1] (assiging a number as a model gives exactly the 
same result as in your original example):

ApplicationWindow {
initialPage: Page {
ComboBox {
width: parent.width
label: Menu

menu: ContextMenu {
id: menu
MenuItem { text: Static 1 }
MenuItem { text: Static 2 }
Repeater {
model: 4
MenuItem { text: Dynamic  + index }
}
}
}
}
}


BR,
Martin

[1] 
https://qt-project.org/doc/qt-5.0/qtquick/qml-qtquick2-repeater.html#model-prop


On Saturday, November 23, 2013 04:06:40 PM 
christopher.l...@thurweb.ch wrote:
 Hi Andrey
 
 Zitat von Andrey Kozhevnikov coderusin...@gmail.com:
  you may need to make childs of menu._contentColumn, not just menu.
 
 I thought that the underscore stuff are private internal properties /
 functions that we mere mortals should not be using 8-) (Not that
 that would necessarily stop me).
 
 Chris
 
 
 ___
 SailfishOS.org Devel mailing list

___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Fwd: Massive issues while installing SailfishOS IDE

2013-11-25 Thread Juha Kallioinen

On 23.11.2013 18:12, Gabriel Böhme wrote:

Hi,

I have the same problem with the SailfishOS IDE in Windows 7 and guess 
special chars and/or spaces causes the issues. The main folder is 
C:/SailfishOS and also my projects are in C:/SailfishOS/projects, but 
the SailfishAlpha2 folder in AppData is just affected, cause it's in 
the user path, in my case a very bad path Gabriel Böhme. So a 
special char and a space. :)




Hi,

thanks Gabriel for clarification on this issue! I wasn't aware of the 
problems with special chars in user names and had not even considered 
user names with spaces :-)


This is definitely something we need to improve on in future SDK updates.

Best regards,
 Juha

___
SailfishOS.org Devel mailing list

[SailfishDevel] Let the screen stay awake

2013-11-25 Thread Gabriel Boehme
Hi sailors,

in my Harmattan app version I was using the ScreenSaver QML element that
was part of Qt Mobility's SystemInfo to prevent the screen from
sleeping. But as far as I know Qt Mobility is now, with Qt5, forked in
different packages and the relating Qt5 package is not allowed in
Harbour applications so far.

So my question is: Is there another way to hold the screen/display
awake?

Thank you very much!

Gabriel.



___
SailfishOS.org Devel mailing list


[SailfishDevel] No map overlay objects shown if zoomLevel 3

2013-11-25 Thread tw_bolek
Hi guys,

In my application I use a map (QtLocation 5.0, Map, OSM or Nokia plugin) and I 
need to show certain overlay objects on it.  The map itself works fine (both 
with OSM and Nokia plugin), the problem is that objects over it are shown only 
if zoomLevel is 3 or more.  No matter if I use an Image within MapQuickItem, or 
MapCircle, or whatever else, the objects become visible only if the zoomLevel 
is at least 3.  On zoomLevel 0-2 only plain map is shown, no objects at all...

I use the MapQuickItem image without rescalling (i.e. its size is the same in 
all zoomLevels), I also tried with really huge MapCircle (like 500 km radius), 
so it's not that in zoomLevel 0-2 the objects are too small to be seen, they 
just AREN'T THERE.

A bug, a feature, or am I doing something wrong?

Thanks, Bolek
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] .ico : Unsupported image format

2013-11-25 Thread Tigre-Bleu
Hi Jonni,

Actually yes, adding qt5-plugin-imageformat-ico to the yaml and reinstalling my 
package solves the problem.

Thanks!


- Mail original -
De: Jonni Rainisto jonni.raini...@jolla.com
À: Sailfish OS Developers devel@lists.sailfishos.org
Envoyé: Lundi 25 Novembre 2013 08:11:32
Objet: Re: [SailfishDevel] .ico : Unsupported image format

Have you tried adding following line in your yaml/spec?:

Requires: qt5-plugin-imageformat-ico


From: devel-boun...@lists.sailfishos.org [devel-boun...@lists.sailfishos.org] 
on behalf of Tigre-Bleu [de...@tigre-bleu.net]
Sent: Sunday, November 24, 2013 5:59 PM
To: Sailfish OS Developers
Subject: [SailfishDevel] .ico : Unsupported image format

Hi sailors,

I've just realized that .ico is not supported by QtQuick Image {} QML Component

QML Image: Error decoding: http://www.jollatides.com/favicon.ico: Unsupported 
image format

I'm surprised as I was assuming that ico files shall be displayed as it is a 
defacto icon standard.

Is there another way to display a .ico in QML?

Thanks,

Antoine
___
SailfishOS.org Devel mailing list
___
SailfishOS.org Devel mailing list
___
SailfishOS.org Devel mailing list

[SailfishDevel] Correct way of referring to Sailfish

2013-11-25 Thread Matt Austin
Hi,

Just a small pedantic question - when referring to Sailfish, should I be
using:
1) Sailfish
2) Sailfish OS
3) SailfishOS


Is there any versioning scheme I should also use when I want to say that my
app works on Sailfish?


Thanks,

-- 
Matt
m...@mattaustin.me.uk
http://mattaustin.me.uk/
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] QtWebKit module - shouldm't it be whitelisted?

2013-11-25 Thread Luciano Montanaro
On Nov 26, 2013 2:07 AM, Robin Burchell robin.burch...@jolla.com wrote:

 Hi,

 The reason for not whitelisting QtWebKit is a bit different here: that we
don’t want to promise an API that we cannot promise to continue to support.
While QtWebKit may continue to limp along for a few years yet, it has been
removed from upstream webkit, and has no real active maintainers that I am
aware of. The unfortunate reality is that we are not in a position where we
can take on the sole maintenance of a web engine (which is a rather large
and complex piece of software).


That is very unfortunate, if true, but as OI understand the matter,
qtwebkit will not go away anytime soon...

My application too depends on it to scrape data from a web page. I need the
QWebElement interface, otherwise I will need to parse the html on my own.

 We do offer SilicaWebView (in Silica) as a component that does not expose
any engine/implementation details (meaning that we can change the
implementation to use QtWebEngine, or Gecko, or whatever suits us / works
best for the purpose). It should be good enough for simple cases. If you’re
lacking something from it, please ask away :)


Well, access to the DOM model...
I don't really find the current trend being an improvement... qtwebkit2 was
a functional regression already, and qtwebengine, while still an unknown,
seems to be even more restricted.

 BR,
 Robin

 On 26 Nov 2013, at 02:02, Artem Marchenko artem.marche...@gmail.com
wrote:

 Hi all

 One of the rejection messages I've got in harbour is the following:
 -
 In ./usr/share/wikipedia/pages/MainWikipediaPage.qml the 'QtWebKit 3.0'
 is not allowed
 -

 Is WebKit really not allowed? Just double checking as I thought that
it's API/ABI is to be very stable at the times when it's going to retire -
http://blog.qt.digia.com/blog/2013/09/12/introducing-the-qt-webengine/ (thanks
to John Brooks for quickly locating the link).

 Shouldn't QtWebKit import be whitelisted?

 Best regards,
 Artem.

 --
 Artem Marchenko
 http://agilesoftwaredevelopment.com
 http://twitter.com/AgileArtem
 ___
 SailfishOS.org Devel mailing list



 ___
 SailfishOS.org Devel mailing list
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] QtWebKit module - shouldm't it be whitelisted?

2013-11-25 Thread Thomas Perl
Hi,

2013/11/26 Luciano Montanaro mikel...@gmail.com:
 On Nov 26, 2013 2:07 AM, Robin Burchell robin.burch...@jolla.com wrote:
 [...]
 My application too depends on it to scrape data from a web page. I need the
 QWebElement interface, otherwise I will need to parse the html on my own.
 [...]
 Well, access to the DOM model...

Depending on how JavaScript-laden the page you are trying to scrape
is, something like BeautifulSoup or Mechanize (both written in Python;
the latter one might sound familiar to Perl programmers, it’s designed
after WWW:Mechanize) might do the job, and in a more lightweight way
(no need to download images or execute JS / layout the page for simple
scraping):

 http://www.crummy.com/software/BeautifulSoup/
 http://wwwsearch.sourceforge.net/mechanize/

Of course, this drags in a new dependency that also isn’t supported at
the moment (Python), but as mentioned in the announcement[1], we are
actively working on getting Python support into shape”, and once that
will be supported (PyOtherSide QML Plugin), it might be easier to
integrate and more efficient than moving the whole webpage through a
WebView and going through that with the DOM.

And if your page is JavaScript-laden, and you can’t parse the static
HTML using BeautifulSoup or Mechanize, chances are the data parsed by
JavaScript is also available as JSON somewhere (just look into the
webpage code / watch the traffic) - and that’ll definitely be easier
to parse, too :)

HTH :)
Thomas

[1] https://lists.sailfishos.org/pipermail/devel/2013-November/001319.html
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] No map overlay objects shown if zoomLevel 3

2013-11-25 Thread Aaron McCarthy
Hi,

On Tue, 26 Nov 2013 08:21:52 tw_bolek wrote:
  You are not doing anything wrong. As you discovered items are only visible
  when the map zoom level is greater than 3. Between zoom levels 2 and 3 the
  opacity is ramped down linearly and is 0 below a zoom level of 2. See
  https://bugreports.qt-project.org/browse/QTBUG-25393 for details on why
  this was implemented.
 
 Thank you very much. But does it mean that I cannot show any objects in
 zoomLevel 1?  Are there no workarounds for this?   Let's say that I need to
 show a full cruise of a ship between two distant continents - I want to
 show it over the whole world map visible at once, i.e. zoom level 1, so
 that the user does not have to scroll the map all around to see the whole
 route...  Zoom level 3 where the items become visible is of no use - it
 only fits a very small part of the what I need to show at once...   
 Everything worked so well in Qt4.8/QtMobility.location 1.2

Unfortunately from the looks of the implementation there is no work around for 
this.

Cheers,

-- 
Aaron McCarthy
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Correct way of referring to Sailfish

2013-11-25 Thread Jukka Eklund
Refer to official sites (jolla.com  sailfishos.org), so Sailfish OS.

-Jukka


On Tue, Nov 26, 2013 at 2:34 AM, Lorn Potter lorn.pot...@jolla.com wrote:


 On 26/11/2013, at 10:26 AM, Matt Austin m...@mattaustin.me.uk wrote:

  Hi,
 
  Just a small pedantic question - when referring to Sailfish, should I be
 using:
  1) Sailfish
  2) Sailfish OS
  3) SailfishOS
 
 
  Is there any versioning scheme I should also use when I want to say that
 my app works on Sailfish?
 
 

 On the about product page, it is referred to as Sailfish OS

 versioning is like:
 x.x.x.x

 :)
 ___
 SailfishOS.org Devel mailing list

___
SailfishOS.org Devel mailing list