UI crackrock therapy...

    geiseri's picture
    2004
    15
    Mar

    After wasting a few hours converting some old C++ GUI code to UI files for easier management I decided to write a small tool to move C++ based GUI code to Qt's UI files.

    The UI Recovery Toolkit or uirtk for short [image:379] was developed to help me move convoluted C++ UI code into UI files. The image on the left is the orignal C++ code and the image on the right is the UI file rendered in KUIViewer. After this XML is generated the UI can be subclassed and used from the C++ code. This keeps the autogenerated UI code from the more business logic code.

    Basicly I take in a root widget, and dig through the properties until i get the XML representation of the UI. Currently Im limited to a few simple properties, such as sizes and geometries. Also you are limited to widgets that can be created by QWidgetFactory.

    I currently can handle QHBox and QVBox layouts, along with support for QLayout based code.

    Ideally I can clean this up and we can convert a few troublesome GUIs in kde over to UI files where usability developers can beat them back into submission.

    Comments

    Comment viewing options

    Select your preferred way to display the comments and click "Save settings" to activate your changes.
    smt's picture

    Extremely cool stuff

    Extremely cool stuff indeed. /me waits for the code to be checked in somewhere in cvs

    Comment viewing options

    Select your preferred way to display the comments and click "Save settings" to activate your changes.