[Kstars-devel] Problem with dynamic GUI creation
soldan
soldan at obs.unige.ch
Fri Dec 9 11:44:55 CET 2005
Hello,
during the development of INDI driver for SBIG CCD cameras,
I have found two problems described below. The first one is
trivial, the second one may be worse. I am also not saying
that these are really bugs in KStars, but I do not know how
to solve them, especially the second one, where I need to
dynamically update GUI window by deleting and creating properties
according to detected camera. Note, that SBIG produces the
large line of their CCD cameras, which differ in their
capabilities, so the dynamic creation of GUI widgets
(properties) should be very important here.
If not clear from my explanation below, I could put a set of
snapshot images on my web page to see these problems
in a graphical way.
I didn't look into Kstars' src. code to track these possible
problems, but could do this if you navigate me where to look.
I have several years of experience in Qt programming, but
would prefer to concentrate on INDI drivers itself.
1) The INDI Control Panel is not automatically updated, i.e.
repainted and stays blank when I delete all its GUI widgets
and then create new set of them. User have to either close/open
this dialog window or switch to another TAB panel and go back
to see new widgets, i.e. properties offered by the driver.
So, it seems to me that QT's widget update call is missed
somewhere. Although
this is not so horrible problem, using the dynamic creation
of properties is nice feature of INDI. So, first I offer only
DEVICE PORT and CONNECTION properties to detect the SBIG camera,
and after that I delete these properties via IDDelete function
and create new set of properties which depends on the detected
camera.
2) Symptom:
Bad alignment including incomplete visibility of INumber
property if added to the existing set of properties in KStars'
INDI Control Panel.
a)
When I delete _all_ the properties from my Sbig Tab panel
in INDI Control Panel via calling IDDelete function call
and then create _new_ set of properties via IDDef calls,
_all_ of them are properly aligned and fully visible. That's ok.
b)
When I delete only part of GUI widgets and then add new set
to them _except_ the INumber property, all properties are
properly displayed on the GUI Tab panel. That's also ok.
c)
When doing the same as in previous step b) but I add new
INumber property via IDDef call, this property is only partially
visible. For example, the diode and property's label are shifted
by one position to the right and the rest R/W part is not visible
al all. I did a lot of trials moving this property to different
place (up and down), but the result is always the same.
Please note, I am not saying that these are bugs in KStars, but
looks that the dynamic widgets' layout computation may have
some problem.
Best Regards,
Jan
--
Jan Soldan, Phone: +41 22 37 92173
INTEGRAL Science Data Centre Fax : +41 22 37 92133
Chemin d'Ecogia 16, CH-1290 Versoix Jan.Soldan at obs.unige.ch
Switzerland http://isdc.unige.ch/~soldan
More information about the Kstars-devel
mailing list