QToolTip of Ksnapshot disables the plasma-effects.

jignesh kakadiya jigneshhk1992 at gmail.com
Sun Sep 25 13:09:10 UTC 2011


http://paste.kde.org/126985/ here is the Ksnapshottimer.cpp

On Sun, Sep 25, 2011 at 6:36 PM, jignesh kakadiya
<jigneshhk1992 at gmail.com>wrote:

> Thanks Aaron :).
>
> I used move() and it works fine with the hard coded values.I am in the
> verge of it.Only thing remains
> Is to set the position in the screenGeometry i.e widht ,height format.
>
> I have reimplemented mouseMoveEvent(QMouseEvent*) as it was not there
> earlier.
>
> Now when I used qApp->desktop->screenGeometry() It was giving following
> error. Any Idea how to tackle with this.Is there any other way to getwidth.
>
>
> home/jiggy/kde/src/ksnapshot/snapshottimer.cpp: In member function ‘virtual
> void
> SnapshotTimer::mouseMoveEvent(QMouseEvent*)’:
>
> /home/jiggy/kde/src/ksnapshot/snapshottimer.cpp:76:49: error: invalid use
> of incomplete type ‘struct QDesktopWidget’
> /usr/include/qt4/QtGui/qapplication.h:73:7: error: forward declaration of
> ‘struct QDesktopWidget’
> /home/jiggy/kde/src/ksnapshot/snapshottimer.cpp: In member function
> ‘virtual void SnapshotTimer::mouseMoveEvent(QMouseEvent*)’:
> /home/jiggy/kde/src/ksnapshot/snapshottimer.cpp:76:49: error: invalid use
> of incomplete type ‘struct QDesktopWidget’
> /usr/include/qt4/QtGui/qapplication.h:73:7: error: forward declaration of
> ‘struct QDesktopWidget’
> make[2]: *** [CMakeFiles/kbackgroundsnapshot.dir/snapshottimer.o] Error 1
> make[1]: *** [CMakeFiles/kbackgroundsnapshot.dir/all] Error 2
> make[1]: *** Waiting for unfinished jobs....
> make[2]: *** [CMakeFiles/ksnapshot.dir/snapshottimer.o] Error 1
> make[1]: *** [CMakeFiles/ksnapshot.dir/all] Error 2
> make: *** [all] Error 2
>
> Thanks,
> Jignesh
> On Fri, Sep 23, 2011 at 6:21 PM, Aaron J. Seigo <aseigo at kde.org> wrote:
>
>> On Friday, September 23, 2011 15:24:09 jignesh kakadiya wrote:
>> > I am fixing https://bugs.kde.org/show_bug.cgi?id=235545 .
>>
>> cool :)
>>
>> > Can any one suggest me how to modify the QToolTip positon such that it
>> will
>> > display in the center of the screen
>>
>> displaying it in the center of the screen is probably even worse since it
>> means it will block anything in the center of the screen.
>>
>> instead, i'd suggest moving it when the mouse cursor is moved over it.
>> perhaps
>> to the opposite corner of the screen.
>>
>> it could also be moved to the top center of the screen (be careful about
>> multiple screens, in that case, of course :), though it would still
>> require
>> "move when mouse enters".
>>
>> anyways.. in snapshottimer.cpp, you can move it using move(QPoint) ..
>> e.g.,
>> something like:
>>
>> const QRect screenGeom = qApp->desktop()->screenGeometry();
>> move(screenGeom.x() / 2 - width() / 2, screenGeom.y());
>>
>> then in an enterEvent(QEvent *event) you could do something like:
>>
>> const QRect screenGeom = qApp->desktop()->screenGeometry();
>> move(screenGeom.x() / 2 - width() / 2, screenGeom.bottom());
>>
>> (moving it to the bottom of the screen, and away from the mouse .. )
>>
>> --
>> Aaron J. Seigo
>> humru othro a kohnu se
>> GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43
>>
>> KDE core developer sponsored by Qt Development Frameworks
>>
>> _______________________________________________
>> Plasma-devel mailing list
>> Plasma-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/plasma-devel
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20110925/6468a64e/attachment.html>


More information about the Plasma-devel mailing list