Good: I've moved the tests under a tests subdir, a.l.a. kdelibs.
To compile them:
$ cd tests
$ unsermake check
In this way, less code is compiled and installed as default
Bad: I've commented with #if 0 a pair of constructors that don't compile
here, and I don't know how to fix, sorry :(
Jason Harris [Fri, 2 Sep 2005 07:08:50 +0000 (07:08 +0000)]
ExtDate enhancements and fixes:
+ Added new variant of the static function ExtDate::fromString( string,
format ). Until now, the format was restricted to Qt::TextDate or
Qt::ISODate. Now, the format argument can be a string specifying the
format with KDE-compliant date-element tokens. For example, to create
an ExtDate for September 2nd, 2005, you could use ExtDate::fromString(
"2005-09-02", "%Y-%m-%d" ). I need this flexibility for the ExtDateEdit
widget I am writing.
+ Speaking of which: Added new ExtDateEdit and ExtDateTimeEdit widgets.
In KDE-3.x, these were copies of the Qt versions, but now I am writing
them from scratch (because the Qt4 versions rely on QVariant, which only
work with standard Qt data types). The class compiles but is not
complete yet. I have not even done any testing so far, so even the part
that is coded may not work. At least we are a bit closer to being able
to compile trunk, since several of our tools use ExtDateEdit.
+ Added tests of the various fromString() functions to the test_extdate
program.
Jason Harris [Thu, 4 Aug 2005 06:12:58 +0000 (06:12 +0000)]
libkdeedu/extdate for kde-4 now compiles. I had to disable the
ExtDateTimeEdit class, because making it work is going to require a
major reimplementation. Since we need this library in order to work on
the rest of KStars, I don't want to let this minor widget stand in the
way.
libkde/kdeeduplot already compiles, but there is still a compile problem
with libkdeedu/kdeeduui (specifically, the glossary widget that we use).
I will see if I can get that library compiling as well, then we can
finally start porting kstars itself.
Adding the first version of KdeEduGlossary. This class will be shared by
Kalzium and KStars, at least.
Currently, we have three classes:
GlossaryDialog: The dialog, derived from KDialogBase
GlossaryItem: An item, consists of a name, the content
potentially references and pictures, stored
as QStringLists.
Glossary: This class stores and manages the items. It
also has the xml-parser.
Jason Harris [Sat, 29 Jan 2005 20:54:08 +0000 (20:54 +0000)]
cleaning up some of the horrors in ExtDateTimeEdit. Lots of stale code
here, and not very robust (was causing a crash in PlanetViewer).
Fixed some of this, and lots of cosmetic whitespace fixes too.
I am planning a more complete overhaul here, "soon".
Jason Harris [Sun, 24 Oct 2004 07:01:29 +0000 (07:01 +0000)]
Eliminating flicker in KPlotWidget. Added "WNoAutoErase" flag to
QWidget ctor. It works well!
(note: I first tried to add "setBackgroundMode( QWidget::NoBackground )"
to the KPlotWidget ctor, but this didn't stop the flicker. This is
strange, because that's how I got rid of the flicker in the SkyMap
widget. SkyMap doesn't use WNoAutoErase, yet it is flicker-free. Odd.)
Jason Harris [Mon, 20 Sep 2004 14:51:08 +0000 (14:51 +0000)]
2 Fixes to ExtDateTime and the test program 'test_extdate'.
There were missing validity checks in the new ExtDate code, and
test_extdate needed the new date format strings.
Backporting to 3_3_BRANCH
Jason Harris [Mon, 20 Sep 2004 05:53:07 +0000 (05:53 +0000)]
Update ExtDatePicker to use the new KDE-like date format strings. One
problem: KGlobal::locale()->dateFormatShort() uses a 2-digit year,
which is especially ambiguous considering the huge range of dates
accessible with ExtDate.
Jason Harris [Mon, 20 Sep 2004 05:38:39 +0000 (05:38 +0000)]
Fixing bug #89098 (Date not localized in What's Up Tonight tool).
This is part one of a two-part fix. ExtDate used to use Qt's format strings for expressing dates. However, to localize the expression of the date, we need KGlobal::locale()->dateFormat(), which uses KDE's format strings (which are totally different from Qt's). This commit makes ExtDate and ExtDateTime use KDE format strings.
Jason Harris [Thu, 19 Aug 2004 04:09:41 +0000 (04:09 +0000)]
Fix highlighting of the selected date in the ExtDatePicker widget
for years < 2000. The highlighted date was off by one week because of a
bug in ExtDate::dayOfWeek().
Also, make ExtDate::addMonths() more robust.
This time I actually committed to the correct branch...
Jason Harris [Tue, 1 Jun 2004 01:33:18 +0000 (01:33 +0000)]
Fixing crash condition in ExtDateWidget. If initialized without a date
argument, it was initialized to an invalid date, which caused a crash in the
function ExtDate::daysInMonth(). Two fixes make the widget much more robust:
+ ExtDate::daysInMonth() and ExtDate::leapYear() now check the validity of the
date first, and return sensible default values if the date is invalid.
+ the default ctor ExtDateWidget() now initializes to the current date, rather
than an invalid date.
Jason Harris [Thu, 13 May 2004 07:07:35 +0000 (07:07 +0000)]
Fixing some problems in ExtDate and friends:
Fixed ExtDate::setJD() (did not set calendar date)
Fixed ExtDateTime::addSecs() (bad conversion from int to uint; simplified code)
(added author comment to extdatetbl.cpp)
Jason Harris [Wed, 28 Apr 2004 05:44:59 +0000 (05:44 +0000)]
ExtDate now stores the date internally as the actual Julian Day number, rather than the count of days since 1 Jan 0001. Added function ExtDate::jd() to return the Julian Day and ExtDate::setJD(long int) to set it. Some other code cleanups as well.
Jason Harris [Sun, 18 Apr 2004 07:58:44 +0000 (07:58 +0000)]
Adding ExtDate library to libkdeedu. ExtDate is a replacement for
QDate that eliminates its arbitrary date-range limits (QDate cannot
accept dates prior to year 1752 or after year 8000). There is no
theoretical limit to the range of dates that ExtDate can accept, but
I have imposed a range of -50000 to +50000 for now.
The ExtDate library is based on the initial work of Michel Guitel, who
wrote the original ExtDate class. I have added the following classes:
Most of the work was simply pasting in the class to be replaced, and
global-replacing QDate with ExtDate. However, there are some
remaining issues:
+ currently, only the Gregorian calendar is supported
+ using KLocale to set the date string format does not work
+ API docs are needed
Once the issues have been worked out, I would like to propose to
kde-core-devel that these classes be added to kdelibs for KDE4.
However, I am not sure if any other apps besides KStars really need
very remote dates.
The library includes two test-programs for verifying the performance
of ExtDate. The first (test_extdate) is a command-line program that
simply outputs the results of 9 tests comparing the performance of
ExtDate and QDate. If ExtDate is working correctly, then the only
differences will be for dates outside of QDate's valid range. The
second (test_extdatepicker) is a GUI app showing a KDatePicker and an
ExtDatePicker side-by-side (there is a slight rendering difference
between ExtDatePicker and KDatePicker on my system; I don't know
why this is happening).
The other way to test it is to run kstars; I am going to commit the
ExtDate code in kstars shortly...
Jason Harris [Mon, 15 Sep 2003 21:23:59 +0000 (21:23 +0000)]
when drawing KPlotObject::LABEL items, the position of the label is now
centered on the data point's X-coordinate, and slightly below the data
point in Y. This is useful for (and in fact assumes that one is) plotting
the labels next to KPlotObject::POINT items that have the same
coordinates. (This change was implemented in order to add planet labels
to the solar system plotter in KStars).
TODO: make the vertical offset adjustable. Should be zero by default.
(have to wait for after 3.2)
Jason Harris [Sun, 20 Jul 2003 04:52:06 +0000 (04:52 +0000)]
Added ability to add axis labels to the plot
(setXAxisLabel(QString)/setYAxisLabel(QString)).
The "padding" space around the plot area is no longer hard-coded.
The amount of padding can be set explicitly with setXXXPadding(int),
where XXX={Left, Right, Top, Bottom}. If not explicitly set, the code
will automatically choose a good amount of padding, depending on whether
there are Axis Labels and/or Tick Mark Labels present.
Also, the placement of Tick Mark Labels is a bit smarter now; the labels
should be better centered on the corresponding tick.
Jason Harris [Fri, 11 Jul 2003 13:11:18 +0000 (13:11 +0000)]
Adding files for libkdeeduplot...sorry for the confusion; I had trouble
adding these initially, but I thought I had finally committed them. Hope
it works this time.
Scott Wheeler [Sat, 12 Oct 2002 18:03:00 +0000 (18:03 +0000)]
Don't install the headers for libkdeedu. We don't really want this to have
to be binary compatible with future releases.
Also, I removed the "libkdeedu/kdeeduui" from the Makefile.am since it's
not currently being used for anything (and there hasn't been a commit since
June).
Scott Wheeler [Fri, 7 Jun 2002 15:08:07 +0000 (15:08 +0000)]
Removed the old sources for libkdeedu -- they confused me, as there were
two versions. I also updated the Makefile.am and FlashKard to reflect
the new location.
Scott Wheeler [Wed, 29 May 2002 23:59:11 +0000 (23:59 +0000)]
Added the beginnings of a kde-edu library, libkdeedu, which at the moment
just contains a simple kvtml parser. I also made changes to FlashKard to
have it make use of this lib.