Results 1 to 5 of 5

Thread: Ladder logic editor

  1. #1
    Join Date
    Aug 2008
    Location
    Porto Alegre
    Posts
    65
    Thanks
    7
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Ladder logic editor

    I would like to develop a ladder diagram logic editor using qt. I would like sugestions about how to do it.
    What class to use?

  2. #2
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    288
    Thanks
    23
    Thanked 32 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: Ladder logic editor

    Humm... You will need to draw, what about QGraphicsWidget and QGraphicsScene ?
    Also check the "Diagram Scene" example from Qt Examples and Demos, it may help you.

  3. #3
    Join Date
    Aug 2008
    Location
    Porto Alegre
    Posts
    65
    Thanks
    7
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Ladder logic editor

    Thank you for the fast answer. I'm checking the Diagram Scene.
    Any other sugestion?

  4. #4
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    288
    Thanks
    23
    Thanked 32 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: Ladder logic editor

    I would do it in small steps, first create the aplication interface, e.g. a mainwindow with a mdi child window, or whatever. Than populate the mainwindow menu with drawing buttons, each button for a ladder drawing element. Even if this does nothing yet, you will have something to show, and you will be entusiastic to continue. I usally use Icofx freeware to create the icons. Than I would create one class for each drawing element, or you can create a drawing abstract base class and create derived classes for each element (althougt I think this approach is more difficult).The example I point it's good, instead of drawing triangules and squares, you will have to ajust the geometry you need for the ladder elements. Also has the mouse click for drawind line conector between elements. What else do you plan for your aplication, do want something like a text editor for PL7 programming language, or something like that ? This would be more complex. I thing you have enought to start, and wish you the best of luck for your project.

  5. #5
    Join Date
    Aug 2008
    Location
    Porto Alegre
    Posts
    65
    Thanks
    7
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Ladder logic editor

    I started working in a company that develop PLCs in the end of August 2009. We already have a working Ladder Diagram Editor, and I became responsible for the development. I want to port it to QT, today it is built with c++ builder 5 (its quite old, I know).

    This version is very dificult to maintain, because it uses Canvas to draw everything. Every time the hole screen is redrawn, that's the hard part. I have to deal with every aspect of the action the user have done and everything is around that action.

    So, I need some kind of widget, class, whatever, that might give me less trouble.
    I will take a look at the sugestions you gave me this weekend.

    I also need develop some code editor. I thought of QScinttila. Is it good?
    Anybody has any other sugestion?

Similar Threads

  1. Replies: 0
    Last Post: 2nd October 2009, 18:57
  2. Help using the QTreeWidget persistent editor.
    By Billy Lee Black in forum Qt Programming
    Replies: 13
    Last Post: 18th July 2007, 20:59
  3. Model/View: Custom Persistent Editor
    By No-Nonsense in forum Qt Programming
    Replies: 2
    Last Post: 7th February 2007, 15:55
  4. FYI: Free LaTex Editor written using QT4.1 !!!
    By GreyGeek in forum Qt-based Software
    Replies: 3
    Last Post: 19th July 2006, 19:05

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.