Re: [Interest] grabGesture on QDeclarativeItem subclass (for QML)

2013-06-27 Thread Mariano Boragno
Oops, sorry, just forgot to say that I'm using Qt 4.7.4 and compiling for Harmattan (Nokia N9). Also, when I emulate it in the Qt Emulator (included in the Harmattan SDK) the gestures are caught, but not on the real device. Thanks a lot, regards... ...Mariano Boragno... On Fri, Jun 28, 2013 at

[Interest] grabGesture on QDeclarativeItem subclass (for QML)

2013-06-27 Thread Mariano Boragno
Hi, I'm trying to grab gestures (pan, pinch) in a QML item I made by subclassing QDeclarativeItem and then qmlregistertype-ing it to import it in the QML code. I managed to get the item drawing implementing the "paint" slot and everything is just fine, except that I cannot grab any gesture on it.

Re: [Interest] Simple doubt on file i/o

2013-06-27 Thread Constantin Makshin
Another random suggestion is Berkeley DB -- transactions, scalability, concurrency and other nice things. :-) On Jun 27, 2013 10:56 AM, "Mandeep Sandhu" wrote: > Hi, > > I wanted to know if I'm doing file i/o the right way in one of my apps. > > I'm writing a small helper class for one of my app

Re: [Interest] Simple doubt on file i/o

2013-06-27 Thread Mandeep Sandhu
On Thu, Jun 27, 2013 at 1:56 PM, André Hartmann wrote: > Hello, > > > QSettings uses specific locations for storing its contents. I don't > > think one can specify which file to use to QSettings. > > Sure you can. Just use QSettings::IniFormat and see here: > > http://doc.qt.digia.com/4.6/qsetting

Re: [Interest] Simple doubt on file i/o

2013-06-27 Thread R. Reucher
On Thursday 27 June 2013 10:16:35 Mandeep Sandhu wrote: > On Thu, Jun 27, 2013 at 1:34 PM, André Somers wrote: > > I read nothing that would stop you from using QSettings. Even if it does > > provide "fancy" functions like groups, nothing makes you use those > > functions. And QSettings can work wi

Re: [Interest] Simple doubt on file i/o

2013-06-27 Thread Mandeep Sandhu
On Thu, Jun 27, 2013 at 1:34 PM, André Somers wrote: > Op 27-6-2013 8:56, Mandeep Sandhu schreef: > > Hi, > > > > I wanted to know if I'm doing file i/o the right way in one of my apps. > > > > I'm writing a small helper class for one of my applications which is > > supposed to store data, in the

Re: [Interest] Simple doubt on file i/o

2013-06-27 Thread Mandeep Sandhu
On Thu, Jun 27, 2013 at 1:09 PM, Nishant Parashar wrote: > Since the data is very less. Read the file once during start-up of app and > prepare the in-memory QMap. This QMap is used for any set/get calls by the > app, don't read/write to file. Finally when we exit the app, write the QMap > to file

Re: [Interest] Simple doubt on file i/o

2013-06-27 Thread Mandeep Sandhu
On Thu, Jun 27, 2013 at 1:01 PM, alexander golks wrote: > > Thoughts? > > i would use a "cache" QMap, and keep it in sync just when needed. > fill the cache from file on load/construction/first access, write the > cache to > file on destruction, thus you won't have any file access during > setter

Re: [Interest] Simple doubt on file i/o

2013-06-27 Thread Mandeep Sandhu
On Thu, Jun 27, 2013 at 12:58 PM, Arne Dirks wrote: > On 06/27/2013 08:56 AM, Mandeep Sandhu wrote: > > get(key): > > * Open the file in Read-Only mode. > > * Parse the data and prepare a QMap of the key-value pairs. > > * Close the file > > * Return the value for the key > > > > set(key, value):

Re: [Interest] Simple doubt on file i/o

2013-06-27 Thread Nishant Parashar
Since the data is very less. Read the file once during start-up of app and prepare the in-memory QMap. This QMap is used for any set/get calls by the app, don't read/write to file. Finally when we exit the app, write the QMap to file wiping out old contents. On 27 June 2013 12:26, Mandeep Sandhu

Re: [Interest] Simple doubt on file i/o

2013-06-27 Thread alexander golks
> Thoughts? i would use a "cache" QMap, and keep it in sync just when needed. fill the cache from file on load/construction/first access, write the cache to file on destruction, thus you won't have any file access during setter/getter functions. you can do file handling in a thread to not block c