Results 1 to 3 of 3

Thread: how to make selectable a text in a plasmoid

  1. #1

    Default how to make selectable a text in a plasmoid

    I have a self made plasmoid, it shows libreoffice version, how can I have the text in the plasmoid selectable??
    manythanks :-) ciao :-) pier
    metadata.desktop file is this:
    Code:
    [Desktop Entry]
    Name=libreofficeversion-mini-qml
    Comment=A user plasmoid in QML that shows current libreoffice version version in carattere piccolo
    Icon=chronometer
     
    X-Plasma-API=declarativeappletscript
    X-Plasma-MainScript=ui/main.qml
    X-Plasma-DefaultSize=600,150
     
    X-KDE-PluginInfo-Author=Frederik Gladhorn
    X-KDE-PluginInfo-Email=gladhorn@kde.org
    X-KDE-PluginInfo-Website=http://plasma.kde.org/
    X-KDE-PluginInfo-Category=Examples
    X-KDE-PluginInfo-Name=org.kde.user-libreofficeversion-mini-qml
    X-KDE-PluginInfo-Version=0.0
     
    X-KDE-PluginInfo-Depends=
    X-KDE-PluginInfo-License=GPL
    X-KDE-PluginInfo-EnabledByDefault=true
    X-KDE-ServiceTypes=Plasma/Applet
    Type=Service
    main.qml file is this
    Code:
    import QtQuick 1.1
    import org.kde.plasma.core 0.1 as PlasmaCore
    import org.kde.plasma.components 0.1 as PlasmaComponents
    
    
    Item {
        width: 10
        height: 10
        id: mainitem
        property string userName
    
    
        PlasmaComponents.Label {
        
            text: i18n(userName)
        font.pointSize : 12
        color: "blue"
        }
    
    
        PlasmaCore.DataSource {
            id: whoamisource
            engine: "executable"
           
            connectedSources: ["libreoffice --version"]
            onNewData:{
                mainitem.userName = data.stdout
            }
        }
    }

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,853
    Blog Entries
    2

    Default Re: how to make selectable a text in a plasmoid

    Well,
    Without actually deploying your code, typically anything that's text can be selected by a cursor by wiping across the text. You can then do something with the text with keystroke combination or if enabled rt-click to expose a context sensitive menu.

    If what you see is deployed as an image, typically only then the text is not selectable.

    If this still doesn't provide what you want, I image you could easily add an object (eg button) that could write output to a file.

    HTH,
    TSU

  3. #3

    Default Re: how to make selectable a text in a plasmoid

    Quote Originally Posted by tsu2 View Post
    Well,
    Without actually deploying your code, typically anything that's text can be selected by a cursor by wiping across the text. You can then do something with the text with keystroke combination or if enabled rt-click to expose a context sensitive menu.
    trying all ctrl alt uppercase altgr left right click combinations, but text result not selectable, in other plasmoid as network text result unselectable but in hardware info plasmoid results selectable, so I supposed that some option added in one of the two files could make text selectable...
    Quote Originally Posted by tsu2 View Post
    If what you see is deployed as an image, typically only then the text is not selectable.
    If this still doesn't provide what you want, I image you could easily add an object (eg button) that could write output to a file.
    HTH,
    TSU
    I don't know if plasmoids deploy text as image...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •