Announcement

Collapse
No announcement yet.

Try my hand at creating a plasmoid

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

    Try my hand at creating a plasmoid

    Hello all.

    I would like to create a Plasmoid or two, mostly for personal use but if I feel I did good I will share it on GHNS

    My first idea is a program that displays currently active iptables chains/targets/rules (version 0.1) and then in Version 0.2 I will add a feature to add a new rule to allow or to deny access to a port/address pair. In Version 0.3 I will add the ability to re-organize/order the entries.

    So basically a little firewall management plasmoid. I can do these things from the command line.

    Searching online takes me into hell. Too many tools. Too many platforms. Frameworks. APIs. Help I don't know C++.

    I have some shell scripting and even a little Python experience.

    Do I install Eric? What about something called QtCreator? What is QtQuick?

    The How-Tos and Getting Started Tutorials are a mess, at least the ones I've found are. So maybe if I can find a tool which will help me create the Plasmoid, guide me through the steps, then I can jsut fill in the blanks with the neccesary logic... I hope.

    Cheers,
    _Johan

    #2
    There are many options...

    Plasmate

    http://packages.ubuntu.com/search?ke...ll&section=all

    :~$ apt-cache show plasmate
    Package: plasmate
    Priority: extra
    Section: universe/kde
    ...
    Description: IDE tailored for development of Plasma components
    A small IDE tailored for development of Plasma components,
    such as Widgets, Runners, Dataengines.
    Homepage: http://projects.kde.org/plasmate
    Clicking...

    1. Click - Kmenu



    2. Click - Plasmate create new Addon



    3. Click - Picking poison: QML/JavaScript/Python/Ruby



    4. Click - Installing Project



    5. Click - Greatapp




    Yes - I know that it is not that easy....


    KDE TechBase

    The Plasmate Documentation button will open a window to the: http://techbase.kde.org/Development/Tutorials/Plasma

    Last edited by Rog131; May 08, 2013, 07:44 AM.
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

    Comment


      #3
      Awsome!

      Comment


        #4
        Now what

        I found the reference / list of the plasmacomponents so now I am able to make columns and rows of buttons, check boxes, etc.

        I have not yet figured out how to group together radio buttons.

        But more urgently:

        1. How do I add functionality? For example when a user clicks a button, I want to change the value of a progress bar.

        2. How can I capture and display the output of a command.

        Thank you
        Last edited by Tahaan; May 13, 2013, 02:44 AM. Reason: Fixed a typo

        Comment


          #5
          Bump. How do I display a box of text? How do I put the output of a command, ef "iptables -l" into that text box?

          Comment


            #6
            If you have python experience you should try writing your first plasmoid in python. kdevelop with the python plugin is amazing as it has code completion, code analysis and so much more. However, if you are new t programming you should stay away from an IDE as they can teach bad habits.

            My advice to you:
            • Use kate with syntax highlighting
            • Try writing in a language you know such as python
            • Keep it simple
            • Look at examples online.


            QML is the preferred and probably superior way to write plasmoids but honestly, start small and with what you know. You don't need C++ or anything fancy to make cool things for KDE. I wrote a really simple, tiny utility in python which gives the status of a nvidia optimus card using bumblebee. Unzip it and look at the code for an idea on how easy it is to write a plasmoid.

            http://kde-apps.org/content/show.php...content=154575

            Comment


              #7
              Yes! Thank you.

              I "discovered" that Plasmate allows me to "import" Plasmoids from GHNS and open them as if you want to work on them. This is the secret that has been glossed over too many times.

              All the tutorials stop promptly after writing Hello World. There is no "OK Hello-World v2" which prompts for some input or carry out any actions.

              The examples are the secret to getting you beyond Hello World.

              My python experience is also limited (I am following a python tutorial in parallel to this...) So I can now write CLI python programs... but I don't quite know where I would add that code into the plasmoid IDE.

              Comment

              Working...
              X