Results 1 to 5 of 5

Thread: Professional Classes & Objects Structure

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2008
    Posts
    3
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question Professional Classes & Objects Structure

    Hello, All!

    I am new to this site and really new to Qt (but I learned it for a half of year and read almost all most popular books about it). So I am newbie partially :-)

    I have a question to real Qt professionals about correct and professional classes structure.

    I do a development of software that in future will be marketed, so it needs to be coded correctly and professionally from the first line of code.

    I need your advices how to call classes, and how to model them - make them as part of one big file, or as part of small files. Then how to name it better?

    Here is what I have:
    1) Software has a main window class (QMainWindow) with QTabWidget as central widget.
    2) Software must work with projects and each project loaded in own tab on Tab Widget at main window
    3) Each project has own Properties and several working Threads.

    The good example of similar software is a Teleport Pro (that do a download of whole websites - and each project has own options, and then it can be saved/loaded/started)

    I need your advice how to assign a correct class names and how to combine these classes.

    I was read a "Designing Qt-Style C++ APIs" but didn't found all answers there.

    Exactly questions are:
    1) How to name a Projects class? Is "Project" a reserved word? If not is it good to have a class named "Projects"? Then if this class must be as collection of separate "Project" objects with own properties and methods like save/load? How better outline this? How you name your projects class?
    2) Each project will have a results buffer that will be updated by Project Threads. Does these Threads must be in the same file as projects? Or separate?
    3) Each project visually has own widgets at the Tab Widget (like progress bar, start, stop buttons etc). Do functionality to draw these widgets related to particular project must be a part of Projects file (I mean it will be like a ProjectWidget - with draw, properties and methods)? Currently I have it in MainWindow class - there is a method - CreateProject that do insert a new tab and add a widgets to tab.

    Please help.

    I know my questions maybe stupid, but I just want to have a professional software developed so need your help for every small detail. Just imagine that you creating website downloader. How you will make a classes model there? How you will name the projects and how to integrate them with threads and main window?

    Thanks.

    Dmitry
    Last edited by webstylemedia; 3rd August 2008 at 20:01.

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
  •  
Qt is a trademark of The Qt Company.