![]() |
2010-04-27
, 18:28
|
Posts: 402 |
Thanked: 229 times |
Joined on Nov 2009
@ Missouri, USA
|
#22
|
Are you using Qt for the GUI ? It looks excellent!
I'm working on a SmartDialer (mDial ?) that lets you 't9 dial your contacts'.
I have done the GUI in Qt, but I can't get the rotation code working correctly. I have the gPodder rotate.py script, but it segfaults my application on the device.
Sorry if this should be in a separate thread...
![]() |
2010-04-27
, 18:35
|
|
Posts: 91 |
Thanked: 32 times |
Joined on Jan 2008
@ Near: Gilroy, CA
|
#23
|
![]() |
2010-04-27
, 18:59
|
|
Posts: 3,159 |
Thanked: 2,023 times |
Joined on Feb 2008
@ Finland
|
#24
|
![]() |
2010-04-27
, 19:03
|
|
Posts: 3,159 |
Thanked: 2,023 times |
Joined on Feb 2008
@ Finland
|
#25
|
I don't see a screenshot...I see it now.
Anyways, as for the "aaaaaa" what about keeping a global variable (or class attribute) that keeps track of the number of sequential presses?
Something like:
Of course, using something like this would be more pythonic than the if/elif clauses. I don't know what toolkit you're using, so it's hard to give concrete examples. Also, it might be worth using ord() or char() instead of manually having to figure out which character needs to be displayed.Code:sequential_presses = 0 last_key_pressed = None on_key_press(key): if key == last_key_pressed: seuqential_presses +=1 else: sequential_presses = 1 last_key_pressed = key if sequential_presses == 1: .. elif sequential_presses == 2: ..
BTW, space is usually the 0 key, isn't it? Might help if each key had the letters it can input under them in a smaller font. Looking good so far though.
edit:
Just another idea:
The names are verbose just to convey my ideas. Also, the _ is used so that you don't have to do something like "sequential_presses - 1" when doing index referencing.Code:letters = {} letters[2] = [_, 'a', 'b', 'c'] letters[3] = [_, 'd', 'e', 'f'] print letters[key][sequential_presses]
![]() |
2010-04-29
, 15:54
|
|
Posts: 3,159 |
Thanked: 2,023 times |
Joined on Feb 2008
@ Finland
|
#26
|
![]() |
2010-04-30
, 06:02
|
Posts: 402 |
Thanked: 229 times |
Joined on Nov 2009
@ Missouri, USA
|
#27
|
status report: just got text input kinda working.
tried also to get contact dialog to give a sms number but no luck for now. Lets see if maemo-dev mailing list has some tips for me....
so contact dialog plus timer for text input (so one is able to type aa for example succesfully, now result for that is b) and I'll start researching how to pack this for extras-devel.
![]() |
2010-04-30
, 06:25
|
|
Posts: 1,111 |
Thanked: 1,985 times |
Joined on Aug 2009
@ Åbo, Finland
|
#28
|
![]() |
2010-04-30
, 06:42
|
|
Posts: 3,159 |
Thanked: 2,023 times |
Joined on Feb 2008
@ Finland
|
#29
|
![]() |
2010-04-30
, 06:52
|
Posts: 282 |
Thanked: 337 times |
Joined on Dec 2009
@ Austin, TX, USA
|
#30
|
I'm working on a SmartDialer (mDial ?) that lets you 't9 dial your contacts'.
I have done the GUI in Qt, but I can't get the rotation code working correctly. I have the gPodder rotate.py script, but it segfaults my application on the device.
Sorry if this should be in a separate thread...
[Nokia N900] [Lenovo T61p]
15GB Movies / 5GB Music. I'm ready to go!
Loving this device, bugs and all.
http://thecubed.com