[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Some help for recreating the Plasma Tool Box in QML
From:       Mark <markg85 () gmail ! com>
Date:       2011-10-27 11:36:27
Message-ID: CAPd6JnGEP7fvZz7Sh0TivvkNXU2nPb7-BuT+K9Fh95g-hGbzww () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Thu, Oct 27, 2011 at 12:12 PM, Aaron J. Seigo <aseigo@kde.org> wrote:

> On Wednesday, October 26, 2011 21:26:12 Mark wrote:
> > Oh and what do i do with my qml files?
> > I guess i make them in plasma/desktop/shell/qml <-- new folder
> > But where do i need to "install" them in cmake?
>
> the best thing to do is it to put them into a Plasma Package and install
> them
> in the usual location; then you can use Plasma::Package from the C++ code
> to
> fetch the qml for you.
>
> a good example of this can be found in the kde:plasma-mobile repository.
>
> in there is a subdirectory called qmlpackages with, well, packages of qml
> stuff (along with the CMakeLists.txt that installs them).
>
> then if you look in shell/mobcorona.cpp in the MobCorona::init() method,
> you
> can see usage of Plasma::Package that loads such a package:
>
>    Plasma::PackageStructure::Ptr structure =
> Plasma::PackageStructure::load("Plasma/Generic");
>    m_package = new Plasma::Package(QString(), homeScreenPath, structure);
>
> hth..
>
>
Wow! That is really some awesome help. Thanx a lot.
I'm gonna do some more hacking tonight ;)

I already have the loading of a QML file working (very easy and not through
Plasma::Package yet) and it just loads a very basic QML file with a red
background and no window borders so that is all just fine. One thing i do
have what shouldn't be there is the taskbar entry. I do have the
flag setWindowFlags(Qt::FramelessWindowHint) on the QDeclarativeView object
which is removing the decorations, but i can't find the flag to get rid of
the taskbar entry. I haven't searched for it thoroughly yet, but if someone
knows that flag...? ;)

[Attachment #5 (text/html)]

<div class="gmail_quote">On Thu, Oct 27, 2011 at 12:12 PM, Aaron J. Seigo <span \
dir="ltr">&lt;<a href="mailto:aseigo@kde.org">aseigo@kde.org</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex;">

<div class="im">On Wednesday, October 26, 2011 21:26:12 Mark wrote:<br>
&gt; Oh and what do i do with my qml files?<br>
&gt; I guess i make them in plasma/desktop/shell/qml &lt;-- new folder<br>
&gt; But where do i need to &quot;install&quot; them in cmake?<br>
<br>
</div>the best thing to do is it to put them into a Plasma Package and install \
them<br> in the usual location; then you can use Plasma::Package from the C++ code \
to<br> fetch the qml for you.<br>
<br>
a good example of this can be found in the kde:plasma-mobile repository.<br>
<br>
in there is a subdirectory called qmlpackages with, well, packages of qml<br>
stuff (along with the CMakeLists.txt that installs them).<br>
<br>
then if you look in shell/mobcorona.cpp in the MobCorona::init() method, you<br>
can see usage of Plasma::Package that loads such a package:<br>
<br>
    Plasma::PackageStructure::Ptr structure =<br>
Plasma::PackageStructure::load(&quot;Plasma/Generic&quot;);<br>
    m_package = new Plasma::Package(QString(), homeScreenPath, structure);<br>
<div><div></div><div class="h5"><br>
hth..<br><br></div></div></blockquote><div><br></div><div>Wow! That is really some \
awesome help. Thanx a lot.</div><div>I&#39;m gonna do some more hacking tonight \
;)</div><div><br></div><div>I already have the loading of a QML file working (very \
easy and not through Plasma::Package yet) and it just loads a very basic QML file \
with a red background and no window borders so that is all just fine. One thing i do \
have what shouldn&#39;t be there is the taskbar entry. I do have the flag \
setWindowFlags(Qt::FramelessWindowHint) on the QDeclarativeView object which is \
removing the decorations, but i can&#39;t find the flag to get rid of the taskbar \
entry. I haven&#39;t searched for it thoroughly yet, but if someone knows that \
flag...? ;)</div>

</div>



_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic