Import add-on for Qt Designer.
Contents
Summary
Installation
How to use Knut
Configuration
As of yet unsupported
in short:
more precisely:
You may need to be root, depending on the permissions of the directories where you choose to install Knut.
. | XX | . | XX | . |
Note: This section applies only to the freely available non-commercial version of Knut. Customers having obtained the commercial version will find the files properly installed in their respective directories after runing the usual rpm -i ... command. Of course, customers of the commercial version also have the option of building Knut from source themselves. cd ~ gunzip knut-version.tar.gz # uncompress the archive tar xf knut-version.tar # unpack it Compile the sources and build the binary as usual: Linux cd knut-version # directory was created by tar qmake knut.pro # generate all the Makefiles make # (of course QTDIR must be set) This creates the Knut plugin file ~/knut-version/build/libknutplugin.so.1.0.0. Please copy file libknutplugin.so.1.0.0 into directory $QTDIR/plugins/designer/: cp build/libknutplugin.so.1.0.0 $QTDIR/plugins/designer/Knut uses its own shared library which you might want to copy into /usr/lib: cp build/libknut.so.1.0.0 /usr/lib/ or set your PATH and LD_LIBRARY_PATH export PATH=~/knut-version/build/:$PATH export LD_LIBRARY_PATH=~/knut-version/build/:$LD_LIBRARY_PATH Windows cd knut-version # directory was created by tar qmake knut.pro # generate all the Makefiles nmake # (of course QTDIR must be set) This creates the Knut plugin files.
Please copy those files into directory %QTDIR%\plugins\designer\:
cp C:\knut-version\build\knutplugin.lib knutplugin.dll %QTDIR%\plugins\designer\ Set your PATH variable: set PATH=C:\knut-version\build\;%PATH% |
||||
. | XX | . | XX | . |
You're done. Knut is now installed.
To perform a little test please act as described in the following section.
Usage of Knut is as easy as opening a normal .ui file by File/Open in Qt Designer.
All the scanning, analyzing and converting is done in background - only indicated by a little progress window telling you what is happening.
You start by opening your old file and after a short while end up seeing all your dialoges pop up in Designer's workspace.
To show how Knut works let us pretend you own a self-written Windows
program that should be migrated to Linux.
The following screenshot represents an old Windows program - let's just
call it CCOffice - you are going to replace by its cute Qt
version:
To import the dialoges stored in that old Windows program please perform the following steps:
While processing the resources stored in your old program Knut will display a status window like this:
After Knut has read the resources and converted them into dialog_*.ui files in Designer's XLM file format, you will see the dialoges appearing in your Designer workspace where you may edit/modify/adjust them.
NOTE:
Whenever you have modified the imported dialoges you should consider saving
the dialog_*.ui files to other names or to another location - just in
case you might want to convert your *.EXE file (or *.DLL
file, resp.) again.
By doing so you will avoid
loosing your changes which will otherwise be overwritten
without further notification when you start conversion of the old
binary a second time!
[replace fonts] MS Shell Dlg:helvetica:0.8
original-font-nameCOLONreplacement-font-nameCOLONscaling-factor
NOTE: | Unknown fonts not mentioned in this file will
be replaced by helvetica and scaled down by 0.8 factor. |
[replace controls] BorShade:GROUPBOX SysListView32:LISTBOX
user-defined-control-classCOLONreplacement-control-class
BUTTON CHECKBOX GROUPBOX RADIOBUTTON EDIT EDITLEFT EDITRIGHT EDITCENTER STATIC LISTBOX SCROLLBAR COMBOBOX
NOTE: | User defined controls not mentioned in this file will
be replaced by placeholders to visually indicate that there is something missing. The placeholder will shown the size and position of the unknown resource and as well as the class name and title. ![]() class: SysAnimation32 title: Animation1 |
Though being very useful already, Knut's capabilities will be enhanced to make the following releases even more compelling.
At the moment Knut converts DIALOG resources and ICONs that are used in these dialoges, support for BITMAPs is scheduled for the near future.
Depending on user demand, processing of other resources (like e.g. the New Dialog or menus) will be considered.
In addition to the supported controls there are plans to import the definitions of Tab Pages, but user wishes for other control classes will be taken into account as well.
Currently Knut is able to import resources stored inside Win32 .exe and .dll files since these are most frequently used binary file formats today.
For the future, we aim at supporting OS/2 and/or Mac binaries - this will be scheduled according to user demand.
top
Copyright 2001-2002
Klarälvdalens Datakonsult AB