[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-29 18:29:09
Message-ID: CAPd6JnGtASzs8WbEDPwHEiH9wms+eTj2gsm_zi1KUjW6G7GJhw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Sat, Oct 29, 2011 at 11:58 AM, Marco Martin <notmart@gmail.com> wrote:

> On Saturday 29 October 2011, Aaron J. Seigo wrote:
> > On Friday, October 28, 2011 22:10:07 Mark wrote:
> > > On Thu, Oct 27, 2011 at 2:24 PM, Aaron J. Seigo <aseigo@kde.org>
> wrote:
> > > > On Thursday, October 27, 2011 14:05:42 Mark wrote:
> > > > > Ah men i hate this.. This is a typical "it's right under your nose"
> > > > > case
> > > > :
> > > > :p
> > > >
> > > > usually only after it's been pointed out is it right under your now;
> > > > before
> > > > that it may as well be very well hidden behind your back ;)
> > > >
> > > > don't worry, with time you'll get to learn the source tree and where
> > > > you can
> > > > expect to look for different kinds of things. it's just a learning
> > > > curve, though hopefully one we've made as level as possible.
> > > >
> > > > > Thanx for helping :)
> > > >
> > > > np :)
> > >
> > > Oke, i finally have the darn QML file working in the position where i
> > > want it. Quite irritating since apparently i need to set the base
> > > position of QDeclarativeView in C++ where i'd expect it to be set from
> > > XML with just X and Y position.. Also the line to set some flags
> doesn't
> > > seem to be working on QDeclerativeView:
> KWindowSystem::setState(winId(),
> > > NET::SkipTaskbar | NET::SkipPager | NET::Sticky | NET::KeepAbove); ...
> > > Or i did something wrong.
> > >
> > > Anyway, i'm gonna try to fill up the QML file with elements so it looks
> > > like the current tool box we all know but for that i need to get some
> > > things working..
> > >
> > > 1. How do i get the PlasmaCore import working:
> > >
> http://techbase.kde.org/Development/Tutorials/Plasma/QML/GettingStarted#P
> > > las ma_Widgets_in_QML My
> >
> > you just include PlasmaCore like:
> >
> > import org.kde.plasma.core 0.1 as PlasmaCore
> >
> > assumng you have a sufficiently new kde-runtime installed, this should
> > "just work"
>
> make sure the proper import path is set in the qml runtime.
> ie if you are using this from plasma you <blink>***M U S T***</blink> use
> Plasma::DeclarativeWidget
>
> if you are doing tests with qmlviewer, add the command line parameter
> -I /usr/lib/kde4/imports
>
> (or whatever prefix kde is installed instead of /usr)
>
>
> > > 2. Which options are possible for plasmacore backgrounds.. Right now i
> > > have "widgets/frame" but what else is there?
> >
> > these come from the SVG theme... in this case you probably want to use
> > dialogs/background
>
>
> http://techbase.kde.org/Development/Tutorials/Plasma/ThemeDetails#Current_Theme_Elements
>
> > > 3. Where are the plasma QML files hidden for a button and such and how
> do
> > > i use them (imports.. same as question 1 only with different files)
> >
> > until the MobileComponents and Plasma::Components become available to you
> > (will be in kde-runtime, and eventually a separate KDE QML repository),
> you
> > can use Plasma widgdets like PlasmaWidgets.PushButton
>
> plasma components are now in runtime master (whether leavng them in for 4.8
> is
> another question, but i would)
>
> Cheers,
> Marco Martin
>

Apparently it isn't "just" working. I was missing a "QML_IMPORT_PATH"
environment variable. Once i set that to the imports it worked.
However, if i run it through QtCreator (just a QML file with no project
behind it) then QtCreator still doesn't see it.. Right now i "work around"
this by making a project and setting the "importPaths" variable in the
<project>.qmlproject, but does anyone know the environment variable i need
to edit for the default import paths? Odly enough QtCreator doesn't seem to
look at QML_IMPORT_PATH ...

Thanx.

[Attachment #5 (text/html)]

<div class="gmail_quote">On Sat, Oct 29, 2011 at 11:58 AM, Marco Martin <span \
dir="ltr">&lt;<a href="mailto:notmart@gmail.com">notmart@gmail.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex;">

<div><div></div><div class="h5">On Saturday 29 October 2011, Aaron J. Seigo \
wrote:<br> &gt; On Friday, October 28, 2011 22:10:07 Mark wrote:<br>
&gt; &gt; On Thu, Oct 27, 2011 at 2:24 PM, Aaron J. Seigo &lt;<a \
href="mailto:aseigo@kde.org">aseigo@kde.org</a>&gt; wrote:<br> &gt; &gt; &gt; On \
Thursday, October 27, 2011 14:05:42 Mark wrote:<br> &gt; &gt; &gt; &gt; Ah men i hate \
this.. This is a typical &quot;it&#39;s right under your nose&quot;<br> &gt; &gt; \
&gt; &gt; case<br> &gt; &gt; &gt; :<br>
&gt; &gt; &gt; :p<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; usually only after it&#39;s been pointed out is it right under your \
now;<br> &gt; &gt; &gt; before<br>
&gt; &gt; &gt; that it may as well be very well hidden behind your back ;)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; don&#39;t worry, with time you&#39;ll get to learn the source tree and \
where<br> &gt; &gt; &gt; you can<br>
&gt; &gt; &gt; expect to look for different kinds of things. it&#39;s just a \
learning<br> &gt; &gt; &gt; curve, though hopefully one we&#39;ve made as level as \
possible.<br> &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Thanx for helping :)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; np :)<br>
&gt; &gt;<br>
&gt; &gt; Oke, i finally have the darn QML file working in the position where i<br>
&gt; &gt; want it. Quite irritating since apparently i need to set the base<br>
&gt; &gt; position of QDeclarativeView in C++ where i&#39;d expect it to be set \
from<br> &gt; &gt; XML with just X and Y position.. Also the line to set some flags \
doesn&#39;t<br> &gt; &gt; seem to be working on QDeclerativeView: \
KWindowSystem::setState(winId(),<br> &gt; &gt; NET::SkipTaskbar | NET::SkipPager | \
NET::Sticky | NET::KeepAbove); ...<br> &gt; &gt; Or i did something wrong.<br>
&gt; &gt;<br>
&gt; &gt; Anyway, i&#39;m gonna try to fill up the QML file with elements so it \
looks<br> &gt; &gt; like the current tool box we all know but for that i need to get \
some<br> &gt; &gt; things working..<br>
&gt; &gt;<br>
&gt; &gt; 1. How do i get the PlasmaCore import working:<br>
&gt; &gt; <a href="http://techbase.kde.org/Development/Tutorials/Plasma/QML/GettingStarted#P" \
target="_blank">http://techbase.kde.org/Development/Tutorials/Plasma/QML/GettingStarted#P</a><br>
 </div></div>&gt; &gt; las ma_Widgets_in_QML My<br>
<div class="im">&gt;<br>
&gt; you just include PlasmaCore like:<br>
&gt;<br>
&gt; import org.kde.plasma.core 0.1 as PlasmaCore<br>
&gt;<br>
&gt; assumng you have a sufficiently new kde-runtime installed, this should<br>
&gt; &quot;just work&quot;<br>
<br>
</div>make sure the proper import path is set in the qml runtime.<br>
ie if you are using this from plasma you &lt;blink&gt;***M U S T***&lt;/blink&gt; \
use<br> Plasma::DeclarativeWidget<br>
<br>
if you are doing tests with qmlviewer, add the command line parameter<br>
-I /usr/lib/kde4/imports<br>
<br>
(or whatever prefix kde is installed instead of /usr)<br>
<div class="im"><br>
<br>
&gt; &gt; 2. Which options are possible for plasmacore backgrounds.. Right now i<br>
&gt; &gt; have &quot;widgets/frame&quot; but what else is there?<br>
&gt;<br>
&gt; these come from the SVG theme... in this case you probably want to use<br>
&gt; dialogs/background<br>
<br>
</div><a href="http://techbase.kde.org/Development/Tutorials/Plasma/ThemeDetails#Current_Theme_Elements" \
target="_blank">http://techbase.kde.org/Development/Tutorials/Plasma/ThemeDetails#Current_Theme_Elements</a><br>
 <div class="im"><br>
&gt; &gt; 3. Where are the plasma QML files hidden for a button and such and how \
do<br> &gt; &gt; i use them (imports.. same as question 1 only with different \
files)<br> &gt;<br>
&gt; until the MobileComponents and Plasma::Components become available to you<br>
&gt; (will be in kde-runtime, and eventually a separate KDE QML repository), you<br>
&gt; can use Plasma widgdets like PlasmaWidgets.PushButton<br>
<br>
</div>plasma components are now in runtime master (whether leavng them in for 4.8 \
is<br> another question, but i would)<br>
<br>
Cheers,<br>
<font color="#888888">Marco Martin<br>
</font><div><div></div><div \
class="h5"></div></div></blockquote></div><br><div>Apparently it isn&#39;t \
&quot;just&quot; working. I was missing a &quot;QML_IMPORT_PATH&quot; environment \
variable. Once i set that to the imports it worked.</div>

<div>However, if i run it through QtCreator (just a QML file with no project behind \
it) then QtCreator still doesn&#39;t see it.. Right now i &quot;work around&quot; \
this by making a project and setting the &quot;importPaths&quot; variable in the \
&lt;project&gt;.qmlproject, but does anyone know the environment variable i need to \
edit for the default import paths? Odly enough QtCreator doesn&#39;t seem to look at \
QML_IMPORT_PATH ...<br>

</div><div><br></div><div>Thanx.</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