[Kstars-devel] KDE/kdeedu/kstars/kstars/tools
Jason Harris
kstars at 30doradus.org
Fri Mar 17 15:18:15 CET 2006
SVN commit 519561 by harris:
Make Calculator work. Instead of deleting and creating widgets when a
module is selected, all modules are now loaded into a QStackedWidget.
This presizes the calculator to fit the largest module (LSR velocity).
I also solved one problem with layouts of UI-designed widgets. I kept
getting crashes when opening the calculator with messages like "Cannot
add layout to 'modCalcJD', it already has a layout. This will cause
memory leaks". I tried several things to solve it, but what finally
worked was simply modifying the setupUi line in each of the classes
derived from a UI-generated class. For example, modCalcJD is derived
from modCalcJdDlg (created in Qt designer). It's ctor looked like this:
modCalcJD::modCalcJD(QWidget *parentSplit) : QFrame(parentSplit) {
setupUi(parentSplit);
showCurrentTime();
show();
}
I simply changed the first line to "setupUi(this);". The argument to
setupUi(QWidget*) must be the derived widget itself, *not* the parent
of that widget. This problem exists elsewhere in the code; I'm going to
fix that next.
I suspect this is the same issue Jasem was having with layouts of the
Details window a while ago.
CCMAIL: kstars-devel at kde.org
M +1 -1 Makefile.am
M +128 -257 astrocalc.cpp
M +6 -48 astrocalc.h
M +1 -1 modcalcangdist.cpp
M +5 -5 modcalcangdistdlg.ui
M +1 -1 modcalcapcoord.cpp
M +6 -6 modcalcapcoorddlg.ui
M +3 -3 modcalcazel.cpp
M +8 -8 modcalcazeldlg.ui
M +3 -3 modcalcdaylength.cpp
M +15 -20 modcalcdaylengthdlg.ui
M +1 -1 modcalceclipticcoords.cpp
M +10 -10 modcalceclipticcoordsdlg.ui
M +3 -3 modcalcequinox.cpp
M +7 -7 modcalcequinoxdlg.ui
M +1 -1 modcalcgalcoord.cpp
M +10 -10 modcalcgalcoorddlg.ui
M +2 -2 modcalcgeodcoord.cpp
M +16 -16 modcalcgeoddlg.ui
M +1 -1 modcalcjd.cpp
M +8 -8 modcalcjddlg.ui
M +2 -2 modcalcplanets.cpp
M +9 -9 modcalcplanetsdlg.ui
M +1 -1 modcalcprec.cpp
M +7 -7 modcalcprecdlg.ui
M +1 -1 modcalcsidtime.cpp
M +9 -9 modcalcsidtimedlg.ui
M +3 -3 modcalcvlsr.cpp
M +584 -597 modcalcvlsrdlg.ui
More information about the Kstars-devel
mailing list