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

List:       kde-panel-devel
Subject:    Re: need help in containments development
From:       Giulio Camuffo <giuliocamuffo () gmail ! com>
Date:       2010-07-21 8:57:44
Message-ID: AANLkTinMpNFpdywMrfg91GRlTJKg11Pl6qR86ab81hf6 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


2010/7/20 Aaron J. Seigo <aseigo@kde.org>

> > so if I had previously swapped
> > from my own containment to the default one it will first create the
> default
> > one and then restore the previously saved object, resulting in one
> useless
> > object.
>
> is this "object" a Plasma::Applet, and the default containment is restoring
> it? otherwise, i'm completely lost by what you mean here :)
>
> perhaps you could provide a clearer description of exactly what you are
> trying
> to achieve?
>
> I know I've the bad habit to try to keep the talk abstract. :)
It isn't an Applet. It is a QGraphicsWidget I use to group applets together.
It saves its config information in the rc file, just like Applet does. So in
restoreContents if the containment finds its entry it restores it. But if
there isn't the entry or if restoreContents isn't called i need to create a
default one.
init() is the first method after the constructor that gets called, and there
it can't know if restoreContents will get called and if it will restore my
qgw, so i can't create the default one there.
If you need to look at the code look at
playground/base/plasma/containments/groupingdesktop/lib/groupingcontainment.cpp

Giulio

[Attachment #5 (text/html)]

<div class="gmail_quote">2010/7/20 Aaron J. Seigo <span dir="ltr">&lt;<a \
href="mailto:aseigo@kde.org">aseigo@kde.org</a>&gt;</span><br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex;"> <div class="im">&gt; so if I had previously \
swapped</div><div class="im"> &gt; from my own containment to the default one it will \
first create the default<br> &gt; one and then restore the previously saved object, \
resulting in one useless<br> &gt; object.<br>
<br>
</div>is this &quot;object&quot; a Plasma::Applet, and the default containment is \
restoring<br> it? otherwise, i&#39;m completely lost by what you mean here :)<br>
<br>
perhaps you could provide a clearer description of exactly what you are trying<br>
to achieve?<br>
<div class="im"><br></div></blockquote><div>I know I&#39;ve the bad habit to try to \
keep the talk abstract. :) </div><div>It isn&#39;t an Applet. It is a QGraphicsWidget \
I use to group applets together. It saves its config information in the rc file, just \
like Applet does. So in restoreContents if the containment finds its entry it \
restores it. But if there isn&#39;t the entry or if restoreContents isn&#39;t called \
i need to create a default one.</div> <div>init() is the first method after the \
constructor that gets called, and there it can&#39;t know if restoreContents will get \
called and if it will restore my qgw, so i can&#39;t create the default one \
there.</div><div> If you need to look at the code look at \
playground/base/plasma/containments/groupingdesktop/lib/groupingcontainment.cpp</div><div> \
</div><div>Giulio</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