[Rock-dev] Rock GUI - location for qt ruby related stuff / plug-in widgets
Alexander Duda
Alexander.Duda at dfki.de
Tue Jan 11 19:00:32 CET 2011
Hi all,
recently, I was writing some ruby code to have a nice integration
between Qt and the ruby part of rock.
The hole script consists of two parts. One is completely orocos.rb
depended and overloads the connect_to method for ports. The other part
is basically an extended Qt::UiLoader and has no dependencies to rock.
The question is, in which package should they go? (If you do not know
what the script is about, please see below.)
I would prefer to put everything into in vizkit/lib/qgui/
namespace Orocos::QGui
All c++ based widgets like ImageView or PlotWidget would go into
separate repositories because they are quiet heavy and are shared
libraries.
All ruby based widgets would go into vizkit/lib/qgui/plugins/
Any ideas or comments?
Alex
The aim of the script is:
- using qtruby to access custom c++ widgets without writing bindings
- loading qt designer plug-ins at runtime from ruby
- loading ui files at runtime from ruby
- adding user specific methods to each plug-in class to specify how
rock data are mapped to qt slots
- providing a way to register default widgets for specific
rock data
- common create interface for ruby and c++ based widgets
The work flow for creating a new gui would be:
a) qt designer based
- design your gui with the qt designer
- call "form = load(ui_file)" from the ruby start script
- connect all widgets with the Orocos::OutputPorts
- start the event loop
Example for displaying video data:
camera = Orocos::TaskContext.get 'camera'
form = loader.load("test.ui")
camera.frame.connect_to form.imageview
$qApp.exec
b) script based
- use UiLoader.WidgetName to create rock widgets (c++ and ruby based)
- connect all widgets with the Orocos::OutputPorts
- start the event loop
Example for displaying video data:
widget = loader.ImageView
camera = Orocos::TaskContext.get 'camera'
camera.frame.connect_to widget
widget.show
$qApp.exec
--
Dipl.-Ing. Alexander Duda
Unterwasserrobotik
DFKI Bremen
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany
Phone: +49 (0)421 178-456620
Fax: +49 (0)421 178-454150
E-Mail: alexander.duda at dfki.de
Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.: DE 148646973
Steuernummer: 19/673/0060/3
More information about the Rock-dev
mailing list