[Qt-interest] Motif and QT another query

phil prentice philp.cheer at talktalk.net
Thu Mar 5 13:17:13 CET 2009


Hi again

  I've been thinking that maybe I should take your advice and attempt a 
re-write of the application...nothing ventured nothing gained.  However I do 
have another little problem that may decide me against this.

One of these applications links in dynamic libraries with the main 
application.  Each library represents an instrument interface.  So for 
example if you choose a particular instrument type then a set of graphical 
tools( e.g. check boxes..multi-choices etc) will be displayed inside a window 
within the main application.  The user can then inter-act with these.

As part of the build process of the set of graphical tools making up the 
instrument there is an ascii file which describes the positioning, 
multi-choice options etc which make up the tools. 

My (potentially stupid) question is:- I am wondering if I could translate 
these files into user interface code (like the user interface code called as 
part of QT designer applications i.e. setupUI()).  At least then I have an 
automatic translation from these files which might take care of the layout of 
these tools within a sub-window. There are hundreds of these files, so if 
something like this cant be done then I will have to give up.

Basically I am wondering if I can have a QT sub-window of some sort which I 
could create a different set of tools into using a user interface function 
for that instrument..and then destroy them for another selected instrument 
etc.  The user interface function for that instrument could automatically be 
generated as part of the dynamic library (using the build) and linked into 
the main application to be run.

The build process would create a UI function for each instrument.

Does what I am suggesting sound in any way plausible???

Thanks

On Wednesday 04 March 2009 20:06, you wrote:
>Short Answer: re-write it.  less pain in the long run
>
> Longer Answer: Go to
>
> > <http://www.ics.com/learning/learning_center_downloads/> and get a copy
> > of
>
>the white paper called "Porting Motif Applications to Qt"  (I cannot include
>a direct link 'cause of the way they have it hidden)
>
>Motif was king in the days before C++.  Motif is written in C.  It is
> LINEAR. Motif and C++ do not play nice together.  I speak from first-hand
>experience.
>
> phil prentice wrote:
> > Hi
> >
> >   I have a number of old applications that use Motif and make calls to
> > functions like XCreateSimpleWindow(....) and XDefineCursor(..) etc etc
> > etc.
> >
> >   I would very much like to be able to move these applications over to
> > QT.  I have written new QT GUI's from scratch but have not looked at
> > moving whats already there over.  Some of these applications I would
> > re-write from scratch ripping off the code as necessary.  However some of
> > them are very big and it would be nice if I could somehow think about the
> > possibility of substituting these functions with QT equivalents and so
> > replace the lower level interface from X/motif to QT.  There are many
> > reasons why I would want to do this.  Is what I am asking fairly possible
> > or should I be looking at some other better method?  I have not even
> > began to think about how I would introduce these QT objects into my C
> > code..but thats another story(use new to create them somehow or
> > whatever).
> >
> >   By the way I know that QT does provide a motif extension, which I have
> > not looked at yet...but for a number of reasons I am initially wondering
> > if there is any point in me considering trapping the calls myself.
> >
> > Thank you for all your help
> >   Phil
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-interest

-------------------------------------------------------



More information about the Qt-interest-old mailing list