[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: plasma::applet painter
From: Toussis Manolis <manolis () koppermind ! homelinux ! org>
Date: 2009-02-21 13:26:27
Message-ID: 200902211526.27589.manolis () koppermind ! homelinux ! org
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
I want to add some effect to an applet
I am really stuck on how I can get a QPixmap of my applet
after i painted the applet
I need something like
QPixmap* m_oldPixmap;
void PlasmaApplet::paintInterface(QPainter *p,
const QStyleOptionGraphicsItem *option, const QRect &contentsRect)
{
.... do the painting....
and now:
store the current image of the applet for future use in a QPixmap/QImage
something like that:
m_oldPixmap=new QPixmap(PlasmaApplet::pixmap())
};
any ideas?
[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:'Arial'; font-size:11pt; font-weight:400; \
font-style:normal;">I want to add some effect to an applet<br> I am really stuck on \
how I can get a QPixmap of my applet<br> after i painted the applet<br>
I need something like <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><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>QPixmap* m_oldPixmap;<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>void PlasmaApplet::paintInterface(QPainter \
*p,<br>
const QStyleOptionGraphicsItem *option, const QRect &contentsRect)<br>
{<br>
.... do the painting....<br>
and now:<br>
store the current image of the applet for future use in a QPixmap/QImage <br>
something like that:<br>
m_oldPixmap=new QPixmap(PlasmaApplet::pixmap())<br>
};<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><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>any ideas?<br> </p></body></html>
_______________________________________________
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