Notices


Reply
Thread Tools
thecubed's Avatar
Posts: 91 | Thanked: 32 times | Joined on Jan 2008 @ Near: Gilroy, CA
#21
Originally Posted by ossipena View Post
i made entire app from zero. now I have working UI and problem how to get text input working. I have some ideas I am testing actively. now it only prints "aaaaaa" when I tap button number 1

there is a contact dialog (that gives the name instead of number for now but hey the dialog is working).

heres one screenshot. yes, backspace is missing
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...
__________________
[Nokia N900] [Lenovo T61p]
15GB Movies / 5GB Music. I'm ready to go!
Loving this device, bugs and all.
http://thecubed.com
 
Posts: 402 | Thanked: 229 times | Joined on Nov 2009 @ Missouri, USA
#22
Originally Posted by thecubed View Post
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...
I think it would be cool if you joined forces. ;-P

As for your rotation question, see the official (C++) documentation:
http://doc.trolltech.com/qt-maemo-4....-rotation.html

You'll need the experimental version of Qt from extras-devel (usual warnings apply) to use this though, I think.

I'm going to try and rewrite a python example to see if I get anywhere.
__________________
aspidites | blog | aspidites@inbox.com
 
thecubed's Avatar
Posts: 91 | Thanked: 32 times | Joined on Jan 2008 @ Near: Gilroy, CA
#23
I figured somehow that it'd all be tied into waiting for PR1.2, pretty much like everything else.

My search-code is pretty much done, only problem is that I'm not a GUI guy at all, so everything GUI related (custom components for highlighting the numbers as you type, etc) take forever for me to code.

I suppose if PR1.2 doesn't come out in this week, I'll just try that Qt from extras-devel... I'd like to do testing on the actual device soon, rather than in windows...
__________________
[Nokia N900] [Lenovo T61p]
15GB Movies / 5GB Music. I'm ready to go!
Loving this device, bugs and all.
http://thecubed.com
 
ossipena's Avatar
Posts: 3,159 | Thanked: 2,023 times | Joined on Feb 2008 @ Finland
#24
I am using python. only real thing I am missing is how to input text.

I am trying to get this done quick and dirty, and leave a lot space for improvements.
__________________
Want to know something?
K.I.S.S. approach:
wiki category:beginners. Browse it through and you'll be much wiser!
If the link doesn't help, just use
Google Custom Search
 
ossipena's Avatar
Posts: 3,159 | Thanked: 2,023 times | Joined on Feb 2008 @ Finland
#25
Originally Posted by aspidites View Post
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:
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:
    ..
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.

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:
Code:
letters = {}
letters[2] = [_, 'a', 'b', 'c']
letters[3] = [_, 'd', 'e', 'f']

print letters[key][sequential_presses]
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.
thanks a lot, this might do the trick. shame that I am really busy @work so I must wake early and stop for today.
__________________
Want to know something?
K.I.S.S. approach:
wiki category:beginners. Browse it through and you'll be much wiser!
If the link doesn't help, just use
Google Custom Search
 
ossipena's Avatar
Posts: 3,159 | Thanked: 2,023 times | Joined on Feb 2008 @ Finland
#26
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.
__________________
Want to know something?
K.I.S.S. approach:
wiki category:beginners. Browse it through and you'll be much wiser!
If the link doesn't help, just use
Google Custom Search
 

The Following 2 Users Say Thank You to ossipena For This Useful Post:
Posts: 402 | Thanked: 229 times | Joined on Nov 2009 @ Missouri, USA
#27
Originally Posted by ossipena View Post
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.
Code repository would be nice. Maybe instead of waiting on replies on a mailing list, interested parties could have a look at the code and maybe figure out why it only "kinda" works?
__________________
aspidites | blog | aspidites@inbox.com
 
mece's Avatar
Posts: 1,111 | Thanked: 1,985 times | Joined on Aug 2009 @ Åbo, Finland
#28
@ossipena
Great work so far!

Perhaps you could start a new thread for this in Development section. something like
"[maemo5] Portrait SMS app, collaborative development thread"
Where people could chip in with code
This thread title says just about nothing about the contents.
__________________
Class .. : Meddler, Thread watcher, Developer, Helper
Humor .. : [********--] Alignment: Pacifist
Patience : [*****-----] Weapon(s): N900, N950, Metal music
Agro ... : [----------] Relic(s) : N95, NGage, Tamyia Wild One

Try Tweed Suit for your hardcore twittering needs
http://twitter.com/mece66
I like my coffee black, like my metal.
 
ossipena's Avatar
Posts: 3,159 | Thanked: 2,023 times | Joined on Feb 2008 @ Finland
#29
I could put this into gitorious or similar place.

..after I've cleaned the code a bit

I intended to make a new thread when I get first release to extras-dev. so first quick and dirty and hardly working one for those who need it the most.
__________________
Want to know something?
K.I.S.S. approach:
wiki category:beginners. Browse it through and you'll be much wiser!
If the link doesn't help, just use
Google Custom Search
 
Posts: 282 | Thanked: 337 times | Joined on Dec 2009 @ Austin, TX, USA
#30
I think the new QT mobility stuff would make this VERY easy (specifically the interface with the actual sms system). But I think it is not so useful without the T9 stuff (the predictive text where you don't have to hit a key multiple times). To be uber-geek, I would like to see this with a keypad option and a morse option--a few years ago there was talk of morse being as fast as (or faster than) 9-key text entry.

I wish I had the free time to play with it, but it wouldn't get out of devel until 1.2 appears anyway so it could use the new mobility stuff.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 22:12.