PDA

View Full Version : (probably newbie) Windows Mobile 5 questions



zeldaknight
25th April 2009, 01:20
Hey guys,
I'm trying to create an application for a friend's PocketPC (running WM5). It's a word processing application, a bit better than my friend's version of Word. However I'm only a newbie to Qt and though I've got most of it to work (on Windows anyway ... haven't tried building it yet ...) there are a few things that I'm not sure of:



Can you make it so that there is a mode where you can write on the screen and it will pick up the letters? You can do this in PocketWord but I don't know how easy it would be to implement with Qt (or has QTopia got something ... anyway is QTopia only for Embedded Linux or can it do WinMobile now:p?)
On my friend's PPC, you can turn the screen horizontal or vertical. Is there a way I can check which orientation the screen is in so I can juggle the layout of my widgets?
This one isn't really to do with PPC at all, but I am trying to make insertion and deletion of columns in a table in a QTextEdit. Is there an easy way to do this - the only way I can think of is to look through the HTML for an opening and closing table tag, look for the row and cell tags and act on them ... even that I'm not sure how to implement ... :confused:

wysota
25th April 2009, 07:04
Can you make it so that there is a mode where you can write on the screen and it will pick up the letters? You can do this in PocketWord but I don't know how easy it would be to implement with Qt (or has QTopia got something ... anyway is QTopia only for Embedded Linux or can it do WinMobile now:p?)
You have to change the input method so that native scribbling capabilities for Mobile are activated. I don't have Windows Mobile so unfortunately I can't tell you how to do it.


On my friend's PPC, you can turn the screen horizontal or vertical. Is there a way I can check which orientation the screen is in so I can juggle the layout of my widgets?
There is QDesktopWidget::availableGeometry() and QDesktopWidget::resized signal


This one isn't really to do with PPC at all, but I am trying to make insertion and deletion of columns in a table in a QTextEdit. Is there an easy way to do this - the only way I can think of is to look through the HTML for an opening and closing table tag, look for the row and cell tags and act on them ... even that I'm not sure how to implement ...

You have to go through the QTextDocument interface - fetch the proper block, get the table from it and then you can manipulate it.

BTW. "PPC" is "PowerPC" not "PocketPC" ;)

zeldaknight
28th April 2009, 02:01
Thanks for that - I'll have a closer look at the docs :).

BTW. "PPC" is "PowerPC" not "PocketPC"
Oh ... PPC turns up PocketPC stuff on Google ... I may or may not remember that :D!

wysota
28th April 2009, 07:09
PocketPC unique abbreviation is P/PC. PPC was hijacked from their former meanings and became ambiguous.

http://en.wikipedia.org/wiki/PPC

zeldaknight
29th April 2009, 01:55
Hmm ... interesting:).
So about the tables ... You'd use the document() method from QTextEdit, then find the QTextCursor and get the table from there? The only thing I'm not sure about is how to get the table from the cursor - is it the same as a block? Or is a block a table cell?

wysota
29th April 2009, 08:06
See QTextCursor::currentTable().

zeldaknight
1st May 2009, 05:07
Thanks :D! And I guess I can use selectedTableCells() to figure out where to put in the new table? So if I said:


int firstRow = -1;
int firstCol = -1;
cursor->selectedTableCells(firstRow, ,firstCol, );
if(firstRow != -1)
cursor->currentTable()->insertRows(firstRow, 1);

But that doesn't work, does it - functions can't return values through their parameters?
:confused:

wysota
4th May 2009, 07:41
But that doesn't work, does it - functions can't return values through their parameters?
:confused:

Take a decent C++ book, read it and answer this question yourself.

zeldaknight
6th May 2009, 05:12
Sorry ... guess that was a bit too noobish:(. I'll see if I can work it out from here.