[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: Question about KoShape::notifyChanged();
From: Cyrille Berger <cberger () cberger ! net>
Date: 2009-05-23 19:49:31
Message-ID: 200905232149.31562.cberger () cberger ! net
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
On Saturday 23 May 2009, Thomas Zander wrote:
> So, I'd suggest you do something in your plugin; naturally you can just add
> the observer/listener pattern to your own shape.
> Your docker (via the tool perhaps) should then be shipped in the same
> plugin so it can use the private API of your shape. This can then listen to
> the signal from the shape(s) as it changes.
Since the url is set through a KoShapeConfigWidgetBase (in the properties
docker), it's still doable in making a "connection" between the current shape
and the widget that inherits KoShapeConfigWidgetBase. That said since it's
bound to affect all shapes that provides a KoShapeConfigWidgetBase, I wonder if
it wouldn't be a good idea to have something more generic ? Like a
notifyPropertiesChanges() that would then (by whatever means) make the shape
properties reload the option of the shape ?
> > I also wonder what is the best solution to monitor a bunch of shapes ?
> > Create a shapemanager, add them to the shape manager and then monitor
> > selectionContentChanged() ?
>
> Well, sure, you can do that :)
> Are the shapes you want to watch not all in the selection?
> And if they are not, then why would you want to monitor them? I'm trying to
> understand the usecase to see how this fits best. Or if its a good example
> of how we should indeed extend Flake ;)
My main use case would be to monitor size and position, since I brain dump I
want dynamic layout of shapes (like QGridLayout, QHorizontalLayout,
QVerticalLayout), and changing size/position of a shape should affect that
layout or the shape itself. But maybe that can be solved in a similar way as
what you describe for the multi-column thing.
> ps. after writing this mail I'll turn off the laptop and then I'll be
> offline for 3 days. Trekking through the woods.
have fun :)
--
Cyrille Berger
[Attachment #5 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" \
content="1" /><style type="text/css">p, li { white-space: pre-wrap; \
}</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; \
font-weight:400; font-style:normal;">On Saturday 23 May 2009, Thomas Zander \
wrote:<br> > So, I'd suggest you do something in your plugin; naturally you can \
just add<br> > the observer/listener pattern to your own shape.<br>
> Your docker (via the tool perhaps) should then be shipped in the same<br>
> plugin so it can use the private API of your shape. This can then listen to<br>
> the signal from the shape(s) as it changes.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"><br></p>Since the url is set through a KoShapeConfigWidgetBase (in \
the properties docker), it's still doable in making a "connection" between the \
current shape and the widget that inherits KoShapeConfigWidgetBase. That said since \
it's bound to affect all shapes that provides a KoShapeConfigWidgetBase, I wonder if \
it wouldn't be a good idea to have something more generic ? Like a \
notifyPropertiesChanges() that would then (by whatever means) make the shape \
properties reload the option of the shape ?<br> <p style="-qt-paragraph-type:empty; \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>> > I also \
wonder what is the best solution to monitor a bunch of shapes ?<br> > > Create \
a shapemanager, add them to the shape manager and then monitor<br> > > \
selectionContentChanged() ?<br> ><br>
> Well, sure, you can do that :)<br>
> Are the shapes you want to watch not all in the selection?<br>
> And if they are not, then why would you want to monitor them? I'm trying to<br>
> understand the usecase to see how this fits best. Or if its a good example<br>
> of how we should indeed extend Flake ;)<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"><br></p>My main use case would be to monitor size and position, \
since I brain dump I want dynamic layout of shapes (like QGridLayout, \
QHorizontalLayout, QVerticalLayout), and changing size/position of a shape should \
affect that layout or the shape itself. But maybe that can be solved in a similar way \
as what you describe for the multi-column thing.<br> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"><br></p>> ps. after writing this mail I'll turn off the laptop \
and then I'll be<br> > offline for 3 days. Trekking through the woods.<br>
have fun :)<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"><br></p>-- <br> Cyrille Berger</p></body></html>
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic