Commit Graph

178 Commits

Author SHA1 Message Date
Chani Armitage
75c4518154 SVN_SILENT:
less noise.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=772576
2008-02-09 03:41:57 +00:00
Chani Armitage
613d5ef850 it's not safe to delete the layout directly
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=771845
2008-02-07 01:58:48 +00:00
Aaron J. Seigo
7f3aea19ff move MarginEdge to the Plasma namespace to avoid coupling to the layout stuff in innapropriate places
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=771704
2008-02-06 19:12:21 +00:00
Aaron J. Seigo
070781d480 build svpanel into the lib, make applet use it
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=771693
2008-02-06 18:50:25 +00:00
Aaron J. Seigo
92304b6d2c * fix contentSizeHint for square applets when the maximum size is smaller than the resulting size of the widget (resulting in non-square applets)
* move the (broken) size constraining commit to flushUpdatedConstraints, not why it is broken and add a comment into constraintsUpdated() noting why code should never be added to that method directly (and what to do instead)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=770949
2008-02-04 20:09:45 +00:00
Marco Martin
dfb3854a10 Sets on Applet::constraintsUpdated() the maximum content width for horizontal panels and the maximum content height for vertical panels as IconSize(KIconLoader::Panel)
this makes vertical larger panels actually usable. 

Some notes:
-it works only for applets that aren't forced to square 
-in horizontal panels only for applets that don't have expandingDirections()=Qt::Horizontal  
-in vertical panels only for applets that don't have expandingDirections()=Qt::Vertical

On other news the kickoff applets are modified to use this new feature

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=770423
2008-02-03 18:21:01 +00:00
Riccardo Iaconelli
c99bda9dde Remove useless variable
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=766292
2008-01-25 14:53:12 +00:00
Aaron J. Seigo
67aae7bf6e don't produce errors if our content is empty
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=766098
2008-01-25 08:31:32 +00:00
Aaron J. Seigo
f2674c9a51 * setRemainSquare(bool) to allow applets to say "yes, keep my width == height, thank you"
* use AppletScript

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=765975
2008-01-25 00:08:25 +00:00
Aaron J. Seigo
467eadedda api fixes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=762849
2008-01-18 00:09:33 +00:00
Aaron J. Seigo
16dab9574f * move the header bits around a bit for a more logical ordering (e.g. all static methods together, all reimp'd methods that are really imp details together at the bottom, etc)
* implement a generic shape() method. this is experimental, so will be interesting to see how it goes. it does show we need a good shape hint in the applet background svg =)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=760187
2008-01-12 06:02:29 +00:00
Aaron J. Seigo
f02a65c95e make globalConfig() work properly even for containments
BUG:155454

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=760003
2008-01-11 18:21:53 +00:00
Aaron J. Seigo
311f2380ce per applet aspect ratio guidance with setAspectRatioMode
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=759497
2008-01-10 19:02:05 +00:00
Aaron J. Seigo
ee32d3c996 remove the use of 1209 explicitly now that i have Winter's Magic Formula for default debug space. makes backporting way easier; sorry for the noise of the earlier commit. suppose i should read planetkde.org more closely ;)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=758498
2008-01-08 01:25:09 +00:00
Aaron J. Seigo
12ef6308cb use the plasma debug area (1209); i considered wrapping this in Plasma::debug() but that seems overkill ;)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=758415
2008-01-07 20:50:31 +00:00
Aaron J. Seigo
32c6c94c76 some kiosk/immutability logic fixes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=758174
2008-01-07 04:00:39 +00:00
Laurent Montel
ed93750db3 Make text selectable just by mouse (Qt::TextSelectableByMouse) in
fealure applet text (otherwise we was able to change text...)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=757582
2008-01-05 13:00:10 +00:00
Aaron J. Seigo
11d08f34b3 default implementation for saveState so that saving to random files works even if nobody implements saveState
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=755693
2008-01-02 02:05:47 +00:00
Jason Stubbs
c3c755f68b Setting the minimum size based on the border size is no good because the
borders can later be removed without the minimum size being updated causing a
minimum size that's way too big

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=752322
2007-12-24 07:10:56 +00:00
Jason Stubbs
5e465d9f89 Give applets a default minimum content size of 16x16. This shouldn't be too
big for the panel and can still be overridden by applets.

BUG: 154565

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=752292
2007-12-24 03:53:17 +00:00
Jason Stubbs
55437fafb6 Notify applets when their LocationConstraint has changed. Also, don't bother
emitting geometryChanged() and doing an update() if the geometry hasn't
actually changed.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=751543
2007-12-22 07:35:42 +00:00
Riccardo Iaconelli
e4665a938a Implement Applet::shouldConserveResources(), a method to help plasmoid developers to know whether they should conserve resources.
Peer reviewed by Chani and Richmoore.

CCMAIL:aseigo@kde.org

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=751216
2007-12-21 12:27:29 +00:00
Aaron J. Seigo
f0637a2e9a restore the painter
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=750290
2007-12-19 02:52:41 +00:00
Aaron J. Seigo
65af194560 convenience methods for content size access
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=750257
2007-12-19 00:45:29 +00:00
Tobias Koenig
92e6a35a80 Reset the d->failureText to 0 at that point, as the qDeleteAll below
will first delete the d->failureText object and than trigger a relayout
which will access the invalid d->failureText in Applet::contentSize().

=> No crash anymore

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=749708
2007-12-17 17:21:34 +00:00
Jason Stubbs
1dc5cc58fc Move the "call the parent's contextMenuEvent()" hack from Applet into
Widget so that applets with embedded widgets also get the containment's
context menu.

BUG: 152698

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=749078
2007-12-16 13:21:16 +00:00
Aaron J. Seigo
706585b270 avoid negative sizes in absurd situations
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=746404
2007-12-08 21:40:59 +00:00
Sebastian Trueg
2a34006fcd Do not crash if the scene is not a Corona.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=746210
2007-12-08 09:16:06 +00:00
Aaron J. Seigo
059505f639 save/restore lock status
CCMAIL:tokoe@kde.org

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=745809
2007-12-07 05:02:54 +00:00
Aaron J. Seigo
5c257fce5a * update constraints on immutability changes
* introduce QRectF contentRect() const method so applets can easily get the content rect

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=745244
2007-12-05 20:24:40 +00:00
Aaron J. Seigo
e2249860fd differentiate between runtime and kiosk immutability
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=744675
2007-12-04 04:15:21 +00:00
Aaron Eisenberg
f7a0308982 Added the ability to lock desktop widgets and assigned icons to all the desktop context menu actions.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=744659
2007-12-04 02:17:21 +00:00
Jason Stubbs
4627a3770c Call the immediate parent's version rather than skipping to QGraphicsItem's
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=743925
2007-12-02 11:30:48 +00:00
Aaron J. Seigo
5b65d5c54c * load packages properly
* handle scriptegines properly
* add a setContentSize so applets can use that and not get screwed by the borders

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=743089
2007-11-29 20:38:13 +00:00
Aaron J. Seigo
1c91abba17 export the class, clean up the api
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=742874
2007-11-29 04:30:48 +00:00
Aaron J. Seigo
f73b97780a min/max setters and getters for content size
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=742754
2007-11-28 21:08:12 +00:00
Aaron J. Seigo
165a2ce9f1 * cache the config object, which means:
* we have to be able to reset it when, e.g. removing the applet or moving it to another, so introduce resetConfigurationObject for internal use
* make it possible to get the containment for an applet by outsiders (e.g. other containments)
* don't access the config object until after we've been assigned to a scene

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=742098
2007-11-27 06:01:06 +00:00
Aaron J. Seigo
f339cb9dcb config().deleteGroup() doesn't removethe applet, just the configuration for the applet. we need to remove the applet's main group to properly delete an apple from the config.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=741916
2007-11-26 18:26:32 +00:00
Sebastian Trueg
05ae38296c Do not run into an endless loop in case we have no containment
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=741866
2007-11-26 16:25:12 +00:00
Aaron J. Seigo
f54dcc2cc1 future proof the ConfigXml API a bit by pretending we actually know what to do with a KConfigGroup
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=741174
2007-11-25 00:14:27 +00:00
Aaron J. Seigo
ed8c50e03f completely change how we save and load containments and panels.
it all happens from one file now using nested groups. this has two major effects:

 - one file to rule them all for any given corona; this makes things even nicer for use in other apps, btw.
 - the ability to easily save, send/share and restore corona configuration layouts; something i've wanted from the start


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=741158
2007-11-24 23:38:37 +00:00
Aaron J. Seigo
e614df56d0 * consolidate geometry() and setGeometry() from the layouts into Layout
* introduce relayout() which does only that
* place guards around relayout() calls in Layout class to prevent recursion

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738923
2007-11-19 23:45:56 +00:00
Alexis Ménard
ff0b3da511 Fix include for layout
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738921
2007-11-19 23:40:03 +00:00
Aaron J. Seigo
364b0dca90 minor cleanups and better use of convenience api's
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738770
2007-11-19 16:37:46 +00:00
Aaron J. Seigo
71b89ebb5f don't show categories with no visible items in them
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738621
2007-11-19 09:46:52 +00:00
Aaron J. Seigo
523c2971c6 * save the transform to the config file
* clean up some dead code
* try and get rid of a few of the jaggies that happen when rotating

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738594
2007-11-19 09:21:11 +00:00
Aaron J. Seigo
67b7161912 * call containmentConstraintsChanged appropriately
* don't use another bool to maintain the state of stretched borders

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738504
2007-11-19 01:21:41 +00:00
Aaron J. Seigo
bcb4268c19 only paint the part of the background that is needed; avoid creating lots of variables when we're using the cached version
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738450
2007-11-18 22:46:46 +00:00
Aaron J. Seigo
5b4dbbe303 we do actually still want context menus on applets, even with the hover thing.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738430
2007-11-18 22:02:01 +00:00
Aaron J. Seigo
c28155b585 when we change our border painting status, we need to update the geometry, not just prepare a movement change; the former also re-jigs our layouts
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738039
2007-11-17 19:03:17 +00:00