Re: [Interest] QNAM timeout is way too long

2014-04-22 Thread Giuseppe D'Angelo
On 22 April 2014 03:12, Scott Aron Bloom scott.bl...@onshorecs.com wrote:
 Agreed.. but it would be even easier... if abort was a slot :)

It is a slot in Qt 5. Besides, you can always connect to a custom slot
which invokes abort()...

-- 
Giuseppe D'Angelo
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QAbstractItemDelegate like interface for QHeaderView.

2014-04-22 Thread André Somers
D. Brentjes schreef op 20-4-2014 09:40:
 Hello everybody,

 I'm using the ItemDelegate system to last minute convert all my custom
 object to a QString representative of the content. This works great, but
 yesterday I discovered that QHeaderView actually does not use the
 ItemDelegate facility.
True. It has also been documented that way, even though the API suggests 
otherwise.
 Has this been done deliberately,
That seems likely, yes.
 and would it still be possible to
 convert the data in a similar way for the QHeaderView.
Sure. Just subclass QHeaderView and do your work there, or adapt your 
model (or use a proxy model) to provide the conversion instead of 
relying on the view to do the work.

André

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Failed to fetch Nokia Map using QtLocation

2014-04-22 Thread Ramakanthreddy Kesireddy
Hi,

am trying to run places_map QtLocation example. However, am getting error

Failed to read nokia map version.


I set Map-plugin parameters with heremaps registered credentials like below:

 PluginParameter { name: app_id; value:  }
 PluginParameter { name: token; value:  }
 PluginParameter { name: proxy; value: system }

Thanks and Regards,
Ramakanth




DISCLAIMER:
This email (including any attachments) is intended for the sole use of the 
intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE 
COMPANY INFORMATION. Any review or reliance by others or copying or 
distribution or forwarding of any or all of the contents in this message is 
STRICTLY PROHIBITED. If you are not the intended recipient, please contact the 
sender by email and delete all copies; your cooperation in this regard is 
appreciated.



Disclaimer:  This message and the information contained herein is proprietary 
and confidential and subject to the Tech Mahindra policy statement, you may 
review the policy at http://www.techmahindra.com/Disclaimer.html externally 
http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Failed to fetch Nokia Map using QtLocation

2014-04-22 Thread Blasche Alexander
Hi,

This message should only appear the first time you start Nokia based mapping 
services. The second time around it is gone. I get the same message when I 
remove the entire QtLocation cache (in my case ~/.config/QtLocation) directory.

My guess is that your problem is related to the missing app_id and token. Nokia 
maps require them. You should also get another warning like:

Error message:Qt Location requires app_id and token parameters.
Please register at https://developer.here.com/ to get your personal 
application credentials.

Or did you mean to say that you do set the values (but just left them out from 
your mail) but still don't get any tiles? If so does dragging the map make a 
difference?


--

Alex


From: interest-bounces+alexander.blasche=digia@qt-project.org 
[interest-bounces+alexander.blasche=digia@qt-project.org] on behalf of 
Ramakanthreddy Kesireddy [ramakanthreddy.kesire...@techmahindra.com]
Sent: Tuesday, April 22, 2014 16:10
To: interest@qt-project.org
Subject: [Interest] Failed to fetch Nokia Map using QtLocation

Hi,

am trying to run places_map QtLocation example. However, am getting error

Failed to read nokia map version.


I set Map-plugin parameters with heremaps registered credentials like below:

 PluginParameter { name: app_id; value:  }
 PluginParameter { name: token; value:  }
 PluginParameter { name: proxy; value: system }

Thanks and Regards,
Ramakanth




DISCLAIMER:
This email (including any attachments) is intended for the sole use of the 
intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE 
COMPANY INFORMATION. Any review or reliance by others or copying or 
distribution or forwarding of any or all of the contents in this message is 
STRICTLY PROHIBITED. If you are not the intended recipient, please contact the 
sender by email and delete all copies; your cooperation in this regard is 
appreciated.



Disclaimer: This message and the information contained herein is proprietary 
and confidential and subject to the Tech Mahindra policy statement, you may 
review the policy at http://www.techmahindra.com/Disclaimer.html externally 
http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Can a view somehow notify a model of which rows it is going to show on screen?

2014-04-22 Thread Andre Somers
Mark Gaiser schreef op 20-4-2014 4:04:
 Hi,

 the title says it all...

 I can't find any signals that expose this information in the model.
 I would like to know this from the QML ListView component. What i can
 do is tell the model where the current y position is in the models
 content and the height of each row. That gives me enough information
 to calculate which rows are visible, but i'm hoping there is some
 way out there that i just haven't discovered yet.

 I'm asking because i have a big dataset and only want to sort the data
 that is visible for the user (partial_sort along with nth_element will
 do that).
AFAIK, there are no facilities for that. The way to know what data is 
needed, is simply to respond to the data() calls in QAbstractItemModel. 
Only rows that are needed are (should be) fetched. But that information 
is not shared in advance.

Are you sure that this is your performance bottleneck though? To me, it 
sounds like premature optimization to worry about this and to try to 
optimize this.

André


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Can a view somehow notify a model of which rows it is going to show on screen?

2014-04-22 Thread Mark Gaiser
On Tue, Apr 22, 2014 at 9:38 PM, Andre Somers an...@familiesomers.nl wrote:
 Mark Gaiser schreef op 20-4-2014 4:04:
 Hi,

 the title says it all...

 I can't find any signals that expose this information in the model.
 I would like to know this from the QML ListView component. What i can
 do is tell the model where the current y position is in the models
 content and the height of each row. That gives me enough information
 to calculate which rows are visible, but i'm hoping there is some
 way out there that i just haven't discovered yet.

 I'm asking because i have a big dataset and only want to sort the data
 that is visible for the user (partial_sort along with nth_element will
 do that).
 AFAIK, there are no facilities for that. The way to know what data is
 needed, is simply to respond to the data() calls in QAbstractItemModel.
 Only rows that are needed are (should be) fetched. But that information
 is not shared in advance.

I figured out a way to do it fairly accurate.
Each ListView has the the itemAt function [1]. That allows you to get
your index from any position in the _content_ area.

That alone isn't enough since you still need to figure out which part
of your content area is shown. That information is luckily available
(and is also used for creating a scrollbar). It's the contentY[2]
property.

Now, if you use itemAt with the contentY property we know the
beginning pixel of our view and itemAt neatly shows us which index
belongs on that position.
Next, we still need to know the last item in the view. To figure that
you we simply do:
yBottomPos = contentY + height (height is the height of your listview itself)

There we have it. All visible item indexes accurately known. :)
I think i just answered myself, hehehe


 Are you sure that this is your performance bottleneck though? To me, it
 sounds like premature optimization to worry about this and to try to
 optimize this.

You can see it both ways.

Usecase:
If you only look at small folders then this definitely is premature
optimizations since the regular sorting will do just fine there.
Bit if you look at insanely massive folders with 500.000 items. All
stuffed in one ListView (where you only see ~50 or so). Sorting that
by string in a natural way (using QCollator) is very slow. In my case
~6 seconds. I know that giving a ListView a task with that many items
is insane and in most cases you're probably better of splitting the
data in chunks. This however is a difficult thing to do with massive
folders so i'm optimizing for that case.
The assumption is that it's implementation will be fine for small
folders, but absolutely necessary for massive folders. I already have
it partly working, but it is very difficult to get it working right by
sorting (partial_sort actually) as little items as possible. That
requires a bit of complicated bookkeeping.

In reality this will unlikely be an issue - ever. The only place where
you can begin to see it's benefit is when browsing through large
folders like /usr/bin and /usr/lib on linux.

[1] http://qt-project.org/doc/qt-5/qml-qtquick-listview.html#indexAt-method
[2] http://qt-project.org/doc/qt-5/qml-qtquick-flickable.html#contentY-prop
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest