Commit Graph

29 Commits

Author SHA1 Message Date
Aaron Seigo
dd122bc011 move applet handle handling (*cough*) to applet instead of contaiment
much cleaner and eliminates the possibility of odd crashes

BUG:253421
2011-05-28 00:23:37 +02:00
Aaron Seigo
3e3bfe89b0 protect with a weak pointer
BUG:268752
2011-03-17 16:48:14 +01:00
Aaron J. Seigo
8fda2f23c9 repaint when the svgs change
svn path=/trunk/KDE/kdelibs/; revision=1203978
2010-12-05 20:40:12 +00:00
André Wöbbeking
1f08f5e5bb -pedantic
svn path=/trunk/KDE/kdelibs/; revision=1080061
2010-01-25 14:09:38 +00:00
Igor Trindade Oliveira
d7e63f903c move applethandle to new animation api.
svn path=/trunk/KDE/kdelibs/; revision=1077217
2010-01-19 17:59:24 +00:00
André Wöbbeking
4c1f9b51d3 removed some QT_VERSION checks, we're requiring 4.6 now
svn path=/trunk/KDE/kdelibs/; revision=1066716
2009-12-27 20:00:30 +00:00
Marco Martin
4988229770 support for touchEvents
svn path=/trunk/KDE/kdelibs/; revision=1049191
2009-11-14 17:33:00 +00:00
Aaron J. Seigo
5a36b63df8 use QGraphicsObject, another nicety in Qt 4.6
svn path=/trunk/KDE/kdelibs/; revision=1035320
2009-10-14 18:59:44 +00:00
Laurent Montel
ce0cb1e916 Fix "Warning: Class ToolBox implements the interface QGraphicsItem but does not list it in Q_INTERFACES. qobject_cast to QGraphicsItem will not work!" with qt-4.6
svn path=/trunk/KDE/kdelibs/; revision=1025997
2009-09-20 12:53:16 +00:00
Marco Martin
08d49e6fd0 introducing the concept of associated application:
an an application and/or an url list can be associated with an aplet
and a context menu entry and an applet handle button will be added to
launch that application.
the applet will be considered a preview of something, where the
application its full view, for example the picture frame can open
gwenview

svn path=/trunk/KDE/kdelibs/; revision=1024487
2009-09-16 17:08:45 +00:00
Aaron J. Seigo
85defb5470 start of making the applet handle a child of the applet, stacked behind. a lot less code, preserves the geometry caches in the scene. also removes a ton of update() calls that aren't necessary these days. result -> a lot snappier/smoother. still some positioning bugs due to the change in parenting in the code, but definitely the direction we need to be going in.
svn path=/trunk/KDE/kdelibs/; revision=1021595
2009-09-09 16:14:20 +00:00
Ambroz Bizjak
205a1700b2 Fix handle possibly moving to the other side if the cursor exist for a short time.
Remove the handle if the cursor goes away before we even appear, previously the handle
was kept invisible until the cursor next entered.

svn path=/trunk/KDE/kdelibs/; revision=929233
2009-02-20 23:23:55 +00:00
Ambroz Bizjak
476fd1a6a3 Added signals appletTransformedByUsed and appletTransformedItself to
Plasma::Applet. This makes it easier for layouts to know when applets 
are transformed (moved/resized/rotated), and know whether the change
was by the user or the applet itself.

svn path=/trunk/KDE/kdelibs/; revision=923848
2009-02-09 15:09:28 +00:00
Ambroz Bizjak
69eccb04ce Make sure aspect ratio is preserved when size limits are hit, minor
cleanup

svn path=/trunk/KDE/kdelibs/; revision=901264
2008-12-24 21:23:27 +00:00
Ambroz Bizjak
32e0e2ed35 Rewrite resize and rotate logic.
Fixes inconsistent resize behaviour, e.g. if mouse was moved more
than the applet could be shrunk, and then moved back a small amount,
the applet would immediately start expanding, instead of starting to
expand where it stopped shrinking.

svn path=/trunk/KDE/kdelibs/; revision=901173
2008-12-24 15:13:09 +00:00
Beat Wolf
073c56b8de removed some dead code after recent code change
svn path=/trunk/KDE/kdelibs/; revision=896893
2008-12-14 17:19:02 +00:00
Aaron J. Seigo
4a7699ce82 since it leads to confusion for users, breaks occassionally in svn due to its complexity, incurs overhead on every applet paint but especially when dragging, doesn't look nice at all without composite ... just kill the top level view thing and when you drag something it just "pops" into the right containment.
BUG:176298

svn path=/trunk/KDE/kdelibs/; revision=890331
2008-11-28 22:39:29 +00:00
Aaron J. Seigo
766dc8ab60 patch by Andrew Lake to free-resize applets from the corner rather than the center; need to do some work on applet handle right now and i don't want this patch going sideways and he's not online right now, so ...
svn path=/trunk/KDE/kdelibs/; revision=890316
2008-11-28 22:01:39 +00:00
Aaron J. Seigo
4e964a2ec8 update the hover pos to make the entry point the last hovered location
BUG:172075

svn path=/trunk/KDE/kdelibs/; revision=882611
2008-11-11 00:57:08 +00:00
Aaron J. Seigo
1b523b9054 ok, this time JUST the plasma dir ;)
svn path=/trunk/KDE/kdelibs/; revision=879759
2008-11-03 23:08:39 +00:00
Aaron J. Seigo
fa5a2d87d9 bum-de-dum! plasma to kdelibs.
svn path=/trunk/KDE/kdelibs/; revision=879757
2008-11-03 23:03:26 +00:00
Kevin Ottens
f66b4d819b API changes as announced:
* ConfigXml becomes ConfigLoader
  * Containment::(add|remove)ToolBoxTool(QAction *action) becomes
    Containment::(add|remove)ToolBoxAction(QAction *action)
  * Flash becomes FlashingLabel
  * Icon becomes IconWidget
  * PanelSvg becomes FrameSvg

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=877504
2008-10-29 17:46:33 +00:00
Allen Winter
3674a94a99 more coding style fixes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=870169
2008-10-11 23:28:20 +00:00
Marco Martin
2e8dba5df2 smooth animation until the end ensuring the repaint is scheduled before
the delete by emitting the signal in the paint event and with a
singleshot timer

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=863664
2008-09-22 19:28:11 +00:00
Marco Martin
1cb382a09a new look and animation for applet handles, based on an old Nuno mockup,
that uses the standard applet background (will have new graphics).

also, don't use painter->setOpacity anymore, so should be a bit faster

the look is slightly different in 3 cases:
-the applet is smaller than the handle, the panelsvg gets drawn
completely and looks like the old thing
-shape not rectangular: the panelsvg is wider, so it's visible also for
instance behind the clock circle
-normal: only a bit of the panelsvg exits from the applet and is
visible, the hidden part has a few pixels fade out gradient to look less wrong with
transparent backgrounds like folderview or themes with all backgrounds
more transparent

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=862411
2008-09-18 19:40:46 +00:00
Marco Martin
0e4ad264c3 a new widget that contains little monocrome svg icons to be used around
plasma and make the applet handle use that

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=861319
2008-09-15 20:08:21 +00:00
Aaron J. Seigo
81ff908a3e * for ghost painting, used when dragging, we only need to know true or false .. we don't need to check the view
* cache the current view as this gets called on every mouse move event when dragging something by the handle.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=858901
2008-09-09 00:23:02 +00:00
Ambroz Bizjak
b7e61e34c4 Fix a rare bug when a new applet handle is created before the previous one is
destroyed, causing the applet not to follow the handle when moved or fail to appear.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=849828
2008-08-20 09:14:27 +00:00
Aaron J. Seigo
63bce9d1b4 move all the prive code into private/; makes it much clearer with the division lines are
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=839792
2008-07-30 20:35:42 +00:00