Jump to content

Archived

This topic is now archived and is closed to further replies.

A Nonny Moose

QT4 Portable C++ Programming System

5 posts in this topic Last Reply

Highlighted Posts

  • Original Poster
  • Posted:
    Last Online:  
     

    I've been making mud pies with QT4, which is a drop-in replacement for Visual Studio C++ with a big library of goodies. The authors claim it is portable between many systems without recompilation.

    So far, I've learned to make GUIs with it, and monkeyed around a little with event procedures, but would like to find a kindred soul or two if possible to chat with on this Very High Level programming Language. There is an animation pack I want to explore.


    Beware: Emancipated user.  No Windoze for me.
    The teacher opens the door but the student must enter himself. - Ancient Chinese Saying

    Every minute of hate in which one indulges oneself is sixty seconds of happiness lost.
    Music expresses that which cannot be put into words and that which cannot remain silent. -- Victor Hugo
    If you always do what you've always done, you'll mostly get what you've always got.
    JohnNewSig.gif
    "We have met the enemy, and he is us" - Walt Kelly

    Come join us at the Moose Factory

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I did not know that GUIs could be made in C++. My friends just used SFML or OpenGL and used sprites for the GUI in the game we were working on. Right now, I am taking a C++ class so I can refresh my memory and learn more advanced things.


    Ocram's Razor: Though "more things shouldn't be used than are necessary," they're just too fun to pass up! Expect many verbose arguments from me. I will try to write abstracts before or short summaries after from now on.

    Words to live by:
    "Now there are varieties of gifts, but the same Spirit. But to each one is given the manifestation of the Spirit for the common good. For to one is given the word of wisdom through the Spirit, and to another the word of knowledge according to the same Spirit; to another faith by the same Spirit, and to another gifts of healing by the one Spirit... But one and the same Spirit works all these things, distributing to each one individually..." 1 Corinthians 4-11

    "Do not worry about tomorrow; for tomorrow will care for itself. Each day has enough trouble of its own." Matthew 6:34
    "Do not judge so that you will not be judged. For in the way you judge, you will be judged; and by your standard of measure, it will be measured to you." Matthew 7:1-3

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    I did not know that GUIs could be made in C++. My friends just used SFML or OpenGL and used sprites for the GUI in the game we were working on. Right now, I am taking a C++ class so I can refresh my memory and learn more advanced things.

    If you have the right set of classes in C++, e.g. encapsulating OpenGL, you can do anything. If you need a good C++ reference,

    For QT4, you might like to look at this. The version I have (QT4) is a free version that downloads from the distributor for UBUNTU. Looks rather complete since I added a bunch of libraries to round it out. Objects in the GUI are called gadgets, so don't let that throw you. They are the same beasts as Visual Studios controls, but with a lot of portability and language capability thrown in.

    I may (just may) start working on a new version of SimCity (with a different name, of course, and updated to modern times) using this product, but it will be a long haul, probably five years at least (I should live so long). Just getting the proper classes set up is going to be a chore. I'll be a programmer/librarian for quite a while doing class definitions and testing them out. What would you think of a hexagonal grid (many more angles)? And yes, you do have to have a grid or how can you loop around the city?

    The program will be Open Source, of course.


    Beware: Emancipated user.  No Windoze for me.
    The teacher opens the door but the student must enter himself. - Ancient Chinese Saying

    Every minute of hate in which one indulges oneself is sixty seconds of happiness lost.
    Music expresses that which cannot be put into words and that which cannot remain silent. -- Victor Hugo
    If you always do what you've always done, you'll mostly get what you've always got.
    JohnNewSig.gif
    "We have met the enemy, and he is us" - Walt Kelly

    Come join us at the Moose Factory

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Sounds cool, there are several projects I remember. There are Urbs Urbis (status unknown, possibly dead), Metropolis Project (in design phase, currently no developers), CityMania (currently 2 main programmers, very early), OTTD, and Simutrans. By the way, my class uses Microsoft Visual Studio and gives everyone in the class access to a key (and thus a free download from Microsoft store) even though I am used to Code::Blocks.


    Ocram's Razor: Though "more things shouldn't be used than are necessary," they're just too fun to pass up! Expect many verbose arguments from me. I will try to write abstracts before or short summaries after from now on.

    Words to live by:
    "Now there are varieties of gifts, but the same Spirit. But to each one is given the manifestation of the Spirit for the common good. For to one is given the word of wisdom through the Spirit, and to another the word of knowledge according to the same Spirit; to another faith by the same Spirit, and to another gifts of healing by the one Spirit... But one and the same Spirit works all these things, distributing to each one individually..." 1 Corinthians 4-11

    "Do not worry about tomorrow; for tomorrow will care for itself. Each day has enough trouble of its own." Matthew 6:34
    "Do not judge so that you will not be judged. For in the way you judge, you will be judged; and by your standard of measure, it will be measured to you." Matthew 7:1-3

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Well, I am not even at the Data Flow Diagram stage with this, and it will be strictly a background project. Just playing around, and I have several other irons in the fire. I am simply attracted to modern VHLLs, and am curious as to what can be done with them vs. the effort without them. I know the latter well enough, having started with machine code. I have used, and helped to sell, some of the early rapid prototyping systems, but this seems to be a whole row or more of Christmas trees neater. Comes with its own IDE and Object builder, etc. There is a ginormous library of new classes. The learning curve here will be not only to learn all this but to catch up to the new stuff in the C++ standard as well. I am sort of rusted shut.

    Good luck with Visual Studio's C++. I taught it when I was working at a college. Used VS VB as an intro to OOP, then dumped them straight in to C++. Can't really do much with adult students in one 14 week, 3 hours per week, course except make mud pies. The younger people in the course were much more on the ball, due to stuff they got in high school.

    So far as the project goes, I know the name of the main loop: Simulate. It will return non-zero until told to stop somewhere in there so the main line is:

    {

    SetUp();

    while (Simulate());

    TearDown();

    return 1;

    }

    So, I guess I have the last six lines of code. Did I say I write from the bottom up?


    Beware: Emancipated user.  No Windoze for me.
    The teacher opens the door but the student must enter himself. - Ancient Chinese Saying

    Every minute of hate in which one indulges oneself is sixty seconds of happiness lost.
    Music expresses that which cannot be put into words and that which cannot remain silent. -- Victor Hugo
    If you always do what you've always done, you'll mostly get what you've always got.
    JohnNewSig.gif
    "We have met the enemy, and he is us" - Walt Kelly

    Come join us at the Moose Factory

    Share this post


    Link to post
    Share on other sites

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections