Results 1 to 8 of 8

Thread: integration help

  1. #1
    Join Date
    May 2006
    Location
    Philadelphia, PA USA
    Posts
    11
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Question integration help

    i have an integration problem. There is a pre existing standalone program that I need to put a gui
    on top of. Its only one function that I need to use. The gui displays images that the program sends it.
    Qt Code:
    1. #include <Magick++.h>
    2. using namespace Magick;
    3.  
    4. void loadImage() {
    5. Image image;
    6.  
    7. image.read("image.gif");
    8. image.write("output.gif");
    9. }
    10.  
    11. int main() {
    12. loadImage();
    13.  
    14. return 0;
    15. }
    To copy to clipboard, switch view to plain text mode 

    this program already has its own makefile which is attached. How do I integrate my
    gui with this program
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: integration help

    What should that GUI do?

  3. #3
    Join Date
    May 2006
    Location
    Philadelphia, PA USA
    Posts
    11
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: integration help

    Quote Originally Posted by jacek
    What should that GUI do?
    the gui displays images sent to it by the main program

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: integration help

    Quote Originally Posted by chap19150
    the gui displays images sent to it by the main program
    You can use QLabel to display images, to load the image you need QPixmap and QProcess to run that program.

  5. #5
    Join Date
    May 2006
    Location
    Philadelphia, PA USA
    Posts
    11
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: integration help

    Quote Originally Posted by jacek
    You can use QLabel to display images, to load the image you need QPixmap and QProcess to run that program.
    I guess I wasn't clear enough in my explaination. I already have a qui that can handle this.
    but I need this on one executable so I can call a specific function, so QProcess wouldn't
    work in my situation. I attached the makefile because I figure I would have to combine the
    make files somehow.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: integration help

    Quote Originally Posted by chap19150
    I guess I wasn't clear enough in my explaination. I already have a qui that can handle this. but I need this on one executable so I can call a specific function,
    In that case you have to integrate main() routine of the non-GUI program with the GUI and link together all object files from both projects. Another solution is to turn non-GUI program into library.

    I attached the makefile because I figure I would have to combine the make files somehow.
    I guess that this Makefile is for the non-GUI program. Qt Makefiles are bit complicated, so it will be easier for you to use qmake or CMake.

  7. #7
    Join Date
    May 2006
    Location
    Philadelphia, PA USA
    Posts
    11
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: integration help

    Quote Originally Posted by jacek
    In that case you have to integrate main() routine of the non-GUI program with the GUI and link together all object files from both projects.
    Do you have any ideas of how I would go about doing this?

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: integration help

    Quote Originally Posted by chap19150
    Do you have any ideas of how I would go about doing this?
    Just take the code from main() and put in Appropriate Place(tm) in the GUI program. There is no generic solution, everything depends on the way your programs work.

Similar Threads

  1. Help sought on console + GUI Integration...
    By mysearch05 in forum Newbie
    Replies: 7
    Last Post: 28th January 2006, 14:41
  2. Qt Integration
    By ToddAtWSU in forum Newbie
    Replies: 4
    Last Post: 23rd January 2006, 17:54

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.