Transport

Plasma 4 Widgets

Source (required if based on other people's work):

3
Score 59%
Description:

Transport is Plasma applet for searching public transport connections from your location to target destination via online services. The goal is to make it as most straightforward as possible.

Online services are based on simple and swift QtScript (JavaScript) API.

Supported services:
* Czech Railways (IDOS, vlak.cz, cd.cz/spojeni)

Install
* Download latest git or source code package
* mkdir build && cd build
* cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` ..
* make && sudo make install
* Logout & login or restart Plasma and you're done :-)

Javascript service is pretty straightforward, please contact me for service requests.
Last changelog:

8 years ago

trunk
* Created OpenSUSE BuildService
* Bugfixes for Qt

smihael

8 years ago

It works for Slovenia as well.

Thanks!

Report

C

vavrusa

8 years ago

Wow, thanks for checking - never knew Czech Railways have so wide database. :-)

Report

brucew

8 years ago

Even with new git package, another error occurs:

<code>

desktop:~/Downloads/KDE/Plasmoids/vavrusa-plasma-transport-ee0998e/build$ make
[ 0%] Built target plasma_applet_transport_automoc
[ 20%] Building CXX object CMakeFiles/plasma_applet_transport.dir/routedelegate.o
/home/Downloads/KDE/Plasmoids/vavrusa-plasma-transport-ee0998e/routedelegate.cpp: In member function ‘virtual void RouteDelegate::paint(QPainter*, const QStyleOptionViewItem&, const QModelIndex&) const’:
/home/Downloads/KDE/Plasmoids/vavrusa-plasma-transport-ee0998e/routedelegate.cpp:93: error: ‘class QVariant’ has no member named ‘toReal’
make[2]: *** [CMakeFiles/plasma_applet_transport.dir/routedelegate.o] Error 1
make[1]: *** [CMakeFiles/plasma_applet_transport.dir/all] Error 2
make: *** [all] Error 2

</code>


*Please advise.*

Report

C

vavrusa

8 years ago

Sorry, QVariant.toReal() was introduced in Qt 4.6, for compatibility reasons I replaced it with toDouble(), latest git should work for you :-)

Report

brucew

8 years ago

Even with new git package, same error occurs:

<code>

desktop:~/Downloads/KDE/Plasmoids/vavrusa-plasma-transport-ee0998e/build$ make
[ 0%] Built target plasma_applet_transport_automoc
[ 20%] Building CXX object CMakeFiles/plasma_applet_transport.dir/routedelegate.o
/home/Downloads/KDE/Plasmoids/vavrusa-plasma-transport-ee0998e/routedelegate.cpp: In member function ‘virtual void RouteDelegate::paint(QPainter*, const QStyleOptionViewItem&, const QModelIndex&) const’:
/home/Downloads/KDE/Plasmoids/vavrusa-plasma-transport-ee0998e/routedelegate.cpp:93: error: ‘class QVariant’ has no member named ‘toReal’
make[2]: *** [CMakeFiles/plasma_applet_transport.dir/routedelegate.o] Error 1
make[1]: *** [CMakeFiles/plasma_applet_transport.dir/all] Error 2
make: *** [all] Error 2

</code>


*Please advise.*

Report

Kirilo

8 years ago

Hi, what's the difference between your plasmoid and the public transport plasmoid (http://www.kde-look.org/content/show.php/PublicTransport?content=106175)?

Sorry if I don't see an obvious difference...

Report

C

vavrusa

8 years ago

Hi, the most visible thing is, that it's not a "departure table". - it's focused on searching journeys from live services, which didn't work for me in PublicTransport.

Search bar - in this applet it's designed more like KRunner. The only attribute it supports right now is "at 00:00", but it will be extended in future for queries like "Prague on 12.6. at 6:00" and so.

Home stop oriented - it is planned to recognize your position from given rules based on IP, WiFi SSID etc.

The major (although invisible) thing is JavaScript based services. Since PublicTransport is XML and RegExp based, it's not always possible to fetch live data from some sites, as many providers (like Czech Railways) make it as difficult as possible to parse them. JavaScript based services give you much more freedom to parse more complex pages and still remain understandable.
Who loves to debug complex RegExp? :-)

The interface is quite similar, which may be confusing and PublicTransport is very nice applet, but it didn't suit my needs. I hope I made it a bit clear :-)

Report

markum

8 years ago

I think your approach is something which is more useful for me in daily use. But still, wouldn't it be useful to combine the functionality of both plasmoids? I would rather prefer a feature rich "travel" plasmoid which can be configured to do different things than finally having 20 of them and having to find out which one supports what. :-)

Another wish: Support for car polling via mitfahrgelegenheit.de and mitfahrzentrale.de (both are european wide and have pages in different languages)

Report

C

vavrusa

8 years ago

Hi, I think I anwered most in the second reply to fpuelz :)
I'd like to join efforts in creating powerful data engine for KDE workspace and even merge some stuff
in plasmoid itself. But I still think it's a good idea to have several different plasmoids for different approaches, but the very same powerful data engine.

Remember - different tasks, different tools :)

Report

fpuelz

8 years ago

Hi vavrusa!
I'm the developer of publicTransport and I would also like to combine the power of our both plasmoids :) Or better: Your timetable/journey fetching code with the public transport data engine.
I tried to design publicTransport mostly independent of the method used to fetch the data. I could add another level of abstraction to the timetable accessor classes, if that's needed (haven't looked at your sources for now). Having your fetching algorithm inside the publicTransport-Data engine would be great, I think. And: Both plasmoids could use it. Hm.. Are you already using a data engine?
The RegExp-Code to get departures could also be replaced with JavaScript based services where needed.
What do you think?

Report

C

vavrusa

8 years ago

Hi, I had exactly the same thought :) I think, that powerful data engine for public transportation should be present in KDE workspace. Probably better as a separate package (dependencies) to encourage more developers to create great features and UIs, and I'd definitely like to join our efforts in that!

Concerning the UI, I could definitely merge some planned features, but that's not as important as powerful data engine, which should be accessible from anywhere like KRunner and so.
What do you think?

Sorry about the late reply, I've taken semestral exams, so I'm still quite busy :)

Report

fpuelz

8 years ago

Hi,
yes, I should contact some KDE person to move the data engine out of playground. I have little time currently, too, because of the end of the semester ;)
But I have played a little bit with the script engine stuff and have implemented a new "accessor" type, that uses a script to do the actual parsing (just like you did). It does work for one of the simplest providers now :) Great idea to use scripts here.
So the next step is to move the data engine to kde-review, I think (never done that before). After contacting someone of course.

Report

vejha

8 years ago

/home/vejha/downloads/vavrusa-plasma-transport-8b181cf/transport.cpp: In member function ‘virtual void Transport::init()’:
/home/vejha/downloads/vavrusa-plasma-transport-8b181cf/transport.cpp:111: error: ‘class Plasma::TreeView’ has no member named ‘setFocusProxy’
make[2]: *** [CMakeFiles/plasma_applet_transport.dir/transport.o] Error 1
make[1]: *** [CMakeFiles/plasma_applet_transport.dir/all] Error 2
make: *** [all] Error 2

Report

C

vavrusa

8 years ago

Thanks, removed focusProxy() for now. It's handy but I'm not sure if it doesn't clash with other plasmoids. Please try recent git snapshot :)

Report

8 years ago

trunk
* Created OpenSUSE BuildService
* Bugfixes for Qt

product-maker 6 11

File (click to download) Version Description Packagetype Architecture Downloads Date Filesize DL OCS-Install
Pling
Details
license
version
0.1
updated Jan 01 2010
added Dec 30 2009
downloads today
0
page views today 1