SchedulerJob rendering rework
ClosedPublic

Authored by TallFurryMan on Apr 18 2018, 7:37 PM.

Details

Summary
  • Added sequence completion column

Added a column to the Scheduler list, with light frame currently captured, and
required. These are connected to SchedulerJob attributes. The scheduler fills
the current and required capture counts when it estimates the duration of the
job, displaying "<current>/<required>" in the new column. Note that several
issues make the actual count incorrect in some cases, this will be reworked
later on.

  • Enum-defined jobs columns and positions

Used an enum to position jobs columns in the UI. While this eases repositioning
in code, .ui still needs to be updated because column headers are not populated
dynamically (yet). Also removed a useless cell reset in SchedulerJob (will be
reworked later on).

  • Reworked SchedulerJob cell widget management

Improved the shortcuts to update cell widgets in queueTable from
SchedulerJob instances, even if SchedulerJob should only be a data
model. Centralized updates in updateJobCell, but will somehow optimize
it by relocating the code to the relevant functions instead.
Rewriting this also makes it obvious that when a job is scheduled, there's
something weird happening with the startup time.

  • Added score column

Added a widget cell for the score, now displayed in queueTable. Because
negative scores are a bit of an ergonomy issue, those will simply render as
"<0". Basically, negative scores are a no-go for now. Current rework makes a
few issues more obvious, in order to fix them later on.

  • Connected completion time to widget cell

Now completion time will update its widget cell when a job is scheduled to end
at a particular time. This is not very helpful for other states right now, but
also makes it obvious that there are no other states using that column.

FIXME on altitude cutoff, which sometimes cancels a rising target.
FIXME on location of cell updates, either UpdateJobCell or in each setter.
FIXME on resetting a scheduler job when adding it, in the case there is no change.
FIXME on proper "reset" function for scheduler jobs.
FIXME on KNotification on error state from SchedulerJob.
FIXME on special case where estimatedTime is zero, set when job is complete.
FIXME on displaying negative scores.

Test Plan

This patch doesn't really add any functionality change. The user interface gets a
few cell refreshes and two new views on score and capture counts in order to ease
bug detection later on. Although the capture counts are new, the values filled in
already exist in estimateJobTime. No real fix yet in there.

Diff Detail

Repository
R321 KStars
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
TallFurryMan created this revision.Apr 18 2018, 7:37 PM
Restricted Application added a project: KDE Edu. · View Herald TranscriptApr 18 2018, 7:37 PM
Restricted Application added a subscriber: KDE Edu. · View Herald Transcript
TallFurryMan requested review of this revision.Apr 18 2018, 7:37 PM
This revision was not accepted when it landed; it landed in state Needs Review.Apr 19 2018, 7:31 AM
This revision was automatically updated to reflect the committed changes.