Revision 1222270

Go back to digest for 27th February 2011

Features in KDE Base

Friedrich Karl Tilman Pülz committed changes in /trunk/playground/base/plasma/applets/publictransport:

Replace QWidget proxies with QGraphicsWidgets, nicer route items, more animations, nicer popup icon.

- Moved KNewStuff configuration file to the library, where it's used for the StopSettingsDialog.
- Replaced the QWidget based treeviews used to show the departure/arrival/journey timetables with new QGraphicsWidgets, named TimetableWidget and JourneyTimetableWidget. These graphics widgets are derived from Plasma::ScrollWidget, to enable nice scrolling animations. The TimetableWidget/JourneyTimetableWidget classes offer the same functionality as the previous treeviews, except for headers and header column resizing (is now done automatically, the journey view doesn't use columns now) and moving/sorting (not really needed?). It allows more flexible animations, eg. a custom easing curve for the expand/collapse animation.
- Routes are now drawn as line with markers at the stop positions. For each marker the stop name is drawn rotated to fit multiple stop names (using the smallest readable font as configured in KDEs settings). Uses QPainterPath to draw the text better readable than with QPainter::drawText. This new route item takes much less space than the previous simple route stop list. The end of the exact route (if any) is visualized by adding multiple smaller stop markers after the last exact stop. The route item offers nice animations.
- Journey routes are now also represented by a new nice QGraphicsWidget, showing a vertical timeline.
- The only thing using HtmlDelegate in the applet is now the JourneySearchSuggestionWidget, still needs to be converted to a QGraphicsWidget.
- Dropped PublicTransportTreeView and some functions in the PublicTransport class, which are no longer needed, because of the switch from QWidget to QGraphicsWidget.
- The title of the applet (the name of the used stop) now gets elided if neccessary, allowing smaller applet sizes without painting outside of the applet.
- The icon shown in panels now shows a vehicle icon for the next departure(s) with the minutes until the departure. The transport line string is drawn into the vehicle type SVG for local public transport. The drawing code comes from the GraphicalTimetableLine applet.
- Scrolling the mouse wheel on the icon in a panel cycles through the first few departures and the next alarm departure, if there is one (with nice animations).
- Made the icon showing an alarm departure look consistant with the other new icon appearances.

File Changes

Added 5 files
  • /trunk/playground/base/plasma/applets/publictransport
  •   /routegraphicsitem.cpp
  •   /routegraphicsitem.h
  •   /timetablewidget.cpp
  •   /timetablewidget.h
  •   /publictransporthelper/publictransport.knsrc
Deleted 3 files
  • /trunk/playground/base/plasma/applets/publictransport
  •   /publictransport.knsrc
  •   /publictransporttreeview.cpp
  •   /publictransporttreeview.h
Modified 25 files
  • /trunk/playground/base/plasma/applets/publictransport
  •   /CMakeLists.txt
  •   /departureinfo.cpp
  •   /departureinfo.h
  •   /departuremodel.cpp
  •   /departuremodel.h
  •   /departureprocessor.cpp
  •   /filterwidget.cpp
  •   /global.cpp
  •   /global.h
  •   /overlaywidget.cpp
  •   /publictransport.cpp
  •   /publictransport.h
  •   /settings.cpp
  •   /titlewidget.cpp
  •   /titlewidget.h
  •   /publictransporthelper/checkcombobox.cpp
  •   /publictransporthelper/CMakeLists.txt
  •   /publictransporthelper/dynamicwidget.h
  •   /publictransporthelper/global.cpp
  •   /publictransporthelper/global.h
  •   /publictransporthelper/locationmodel.cpp
  •   /publictransporthelper/stoplineedit.cpp
  •   /publictransporthelper/stopsettingsdialog.cpp
  •   /publictransporthelper/vehicletypemodel.cpp
  •   /publictransporthelper/tests/PublicTransportHelperGuiTest.cpp
33 files changed in total