maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   i just KNOW this could work... (https://talk.maemo.org/showthread.php?t=50927)

thecubed 2010-04-27 18:22

Re: i just KNOW this could work...
 
Quote:

Originally Posted by ossipena (Post 630261)
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...

aspidites 2010-04-27 18:28

Re: i just KNOW this could work...
 
Quote:

Originally Posted by thecubed (Post 630284)
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.

thecubed 2010-04-27 18:35

Re: i just KNOW this could work...
 
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...

ossipena 2010-04-27 18:59

Re: i just KNOW this could work...
 
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.

ossipena 2010-04-27 19:03

Re: i just KNOW this could work...
 
Quote:

Originally Posted by aspidites (Post 630273)
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.

ossipena 2010-04-29 15:54

Re: i just KNOW this could work...
 
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.

aspidites 2010-04-30 06:02

Re: i just KNOW this could work...
 
Quote:

Originally Posted by ossipena (Post 633477)
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?

mece 2010-04-30 06:25

Re: i just KNOW this could work...
 
@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.

ossipena 2010-04-30 06:42

Re: i just KNOW this could work...
 
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.

rmerren 2010-04-30 06:52

Re: i just KNOW this could work...
 
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.


All times are GMT. The time now is 05:35.

vBulletin® Version 3.8.8