[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
On many platforms Trolltechs Designer is available, a tool that lets you create graphical user interfaces like Dialogs, Forms etc. It saves the interface description in an easy to read format (XML - even though i was not able to locate a formal document type description (DTD) for it, it's format is pretty obvious).
You should be aware that not all features the Designer is capable of can be translated into AWS simply because they are not available in AWS. The same is true for features available in AWS but not in Designer.
Since Designer saves its interface description in XML writing an extensible stylesheet to transform it into AWS format was an obvious choice. So you will need a XSLT stylesheet processor. You can either choose a commercial product or the excellent Xalan which is part of the Apache project. You can get it for free here: http://xml.apache.org For development i used the Xalan Java 2 version at: http://xml.apache.org/xalan-j/index.html
Design your dialog or widget in Designer and save it somewhere. To process the stylesheet with the java version of Xalan you call:
java org.apache.xalan.xslt.Process \ -IN path/to/the/saved/designer/file.ui \ -XSL path/to/CS/scripts/aws/qt2aws.xsl |
Append the output to a file containing skin definitions.
QT Class | AWS Class | |
QPushButton | ==> | Command Button |
QRadioButton | ==> | Radio Button |
QSlider | ==> | Scroll Bar |
QButtonGroup | ==> | Group Frame |
QGroupBox | ==> | Group Frame |
QFrame | ==> | Group Frame |
QCheckBox | ==> | Check Box |
QLineEdit | ==> | Text Box |
QLabel | ==> | Label |
QLabel with Pixmap | ==> | Image View |
QListBox | ==> | List Box |
QListView | ==> | List Box |
QDialog | ==> | Window |
QWidget | ==> | Window |
QTabWidget | ==> | Notebook |
You can place special information in the controls whatsThis property. The content will be broken into tokens separated by the pipe ("|"). A token consist of a token identifier, the colon : and token text. The following tokens are recognized:
c:signalClicked,mySink::OnClick,signalBreak,mySink::ByeBye |
This will be translated into
connect { signalClicked -> mySink::OnClick signalBreak -> mySink::ByeBye } |
l:LeftEye: "Blue" |
This will be translated into
LeftEye: "Blue" |
Both examples from above would be concatenated and placed in the whatsThis property and would look like this:
c:signalClicked,mySink::OnClick,signalBreak, mySink::ByeBye|l:LeftEye: "Blue" |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |