Announcement

Collapse
No announcement yet.

How to make a widget

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to make a widget

    So I have a python script which I run in terminal and it returns me some data which is only text. I need some tutorials of how to make a desktop widget so the script would run itself and the widget would then show the output data.

    #2
    KDE techbase - Development tutorials, Plasma: http://techbase.kde.org/Development/Tutorials/Plasma

    Python

    Plasmoids
    Getting Started
    Creating and running your first plasmoid in Python

    Using widgets
    Introduction to using Plasma widgets

    Using DataEngines
    How to use DataEngines from a plasmoid

    DataEngines

    Writing DataEngines
    How to write your own Plasma DataEngine

    Writing a Plasmoid in Python
    Writing a simple battery graph in python

    Runners

    Writing a KRunner plugin in Python
    Writing a simple krunner plugin in python
    Last edited by OneLine; May 18, 2012, 06:52 AM.
    Have you tried ?

    - How to Ask a Question on the Internet and Get It Answered
    - How To Ask Questions The Smart Way

    Comment


      #3
      Are you looking to create a widget, or just a better output from your script? It's pretty easy to make a .desktop file or servicemenu that can run a script and have an icon and all that. How to control the output will depend on your script.

      I wanted an easy way to check the md5sum of files I download so I wrote a little desktop servicemenu (an available action that takes place with a right-click over a file icon) that reads the md5sum of a file and sends it to the notifier wigdet.

      Why don't you describe what you're trying to accomplish and even attach your script for a look-see. Maybe one of us can come up with an idea.

      Please Read Me

      Comment


        #4
        Actually it is a python script that fetches a list of unsubmitted homeworks from moodle. Here is the source: https://github.com/hamax/moodle-todo

        Comment


          #5
          Python, PyQt, PyKDE and KDialog

          Documentation and tutorials here:
          http://techbase.kde.org/Development/Languages/Python
          PyKDE builds on top of PyQt and adds Python support for KDE's libraries and technologies.
          Search for PyQt and PyKDE in Muon and you'll find the installables.

          Other Examples:

          http://nullege.com/codes/search/PyKDE4.kdeui.KDialog
          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
          – John F. Kennedy, February 26, 1962.

          Comment

          Working...
          X