Commit Graph

105 Commits

Author SHA1 Message Date
Aaron J. Seigo
81909190eb after porting applets, it occurred to me that this naming is nicer.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=755617
2008-01-01 22:54:33 +00:00
Aaron J. Seigo
e12dbeb000 provide a way for applets to signal that they'd like their config saved out to disk, please.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=755616
2008-01-01 22:44:56 +00:00
Richard J. Moore
94170b9e65 Fix breakage
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=751220
2007-12-21 12:34:40 +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
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
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
Sebastian Kügler
792274b1da SVN_SILENT --typo
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=745297
2007-12-05 22:31:23 +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
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
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
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
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
bfcc1e31e6 * get rid of the paintHover, that's deprecated by kevin's hover stuff in the coronal world
* don't paint the interface of containments being shown on views that don't want a background

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=737026
2007-11-15 09:39:46 +00:00
Aaron J. Seigo
cc34fc3365 signal for geometry updates. used right now for xrandr updates, but may also be useful for layouts and such things ...
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=734485
2007-11-09 00:42:18 +00:00
Aaron J. Seigo
25fdb2adf5 drawing the background by default requires us setting that up on applet start for the case of odd applets that don't ever change their size or do any other geometry upsetting things. plasmoidviewer weather was the testcase for this one.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=734138
2007-11-08 07:53:56 +00:00
Aaron J. Seigo
da0e4e39e2 * performance: allow delayed setting of constraints so we get one call per set[Screen|Position..etc] set of calls
* save the geometry properly by just using geometry() now that we have that =)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=729442
2007-10-26 01:04:56 +00:00
Frerich Raabe
6180c8c433 - Fixed a typo
- showConfigurationInterface needs to be (as the API documentation points
  out correctly) a slot, otherwise it won't work. So put it into the slots
  section.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=727149
2007-10-19 21:43:27 +00:00
Aaron J. Seigo
6cd4da671d provide a default param for updateConstraints so existing code has fewer changes to be done
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=719839
2007-10-01 23:30:47 +00:00
Aaron J. Seigo
b51cc728fd actually pass around what constraints are being updated. this allows preventing of unecessary processing (for one) and also can avoid recursion where someone calls a constraints setter from inside constraintsUpdated.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=719831
2007-10-01 23:24:38 +00:00
Petri Damstén
79a32822ac - Override setGeometry so we can give correct rect to layout
- Delete white space from line ends

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=718078
2007-09-28 05:46:37 +00:00
Aaron J. Seigo
9fa4ea3ec3 - remove deprecated createInstance call
- as Containment is going to remain an Applet, we can put the context menu hack in Applet instead which is nicer on the widgets anyways. also make it a bit less of a hack...

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=717489
2007-09-26 23:01:57 +00:00
Aaron J. Seigo
2c63daad12 - add a way to get at the Containment
- fix some apidox
- add a method for state saving, but for the main applet class info as well as subclasses (plasmoids, e.g.)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=714174
2007-09-18 21:22:45 +00:00
Aaron J. Seigo
e0f831373c SVN_SILENT: add "or later" clause. cleared with copyright holders, except for rich moore's ui loader which i need to ask him for permission for first.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=712549
2007-09-14 19:06:18 +00:00
Aaron J. Seigo
7d3327c884 add an init() method that will be called only after the applet is completely set up for those applets that care; also allows us to do delayed init in the case of expensive set up
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=712119
2007-09-13 17:00:57 +00:00
Aaron J. Seigo
b42db6a2ea should be using paintWidget, not paint
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=710733
2007-09-10 18:50:36 +00:00
Robert Knight
a29ae57a7d This breaks the existing Plasma applet API, see the contentSize()
comments below.

* New Flow Layout.  This provides simple icon view-esque layout of items.
  Useful for icons for documents , applications or other tasks on the desktop
  for example.  Supports non-equally sized items.

  Works well when used with the LayoutAnimator class to animate insertions
  and removals.

* Re-wrote BoxLayout and removed old HBoxLayout,VBoxLayout classes which had
  a lot of code duplication.  BoxLayout class now takes a direction argument
  in the constructor, ala. QBoxLayout.  New BoxLayout class actually takes
  minimumSize() , maximumSize() of items into account.  The Qt layout code
  for box and grid layouts is surprisingly sophisticated, so the results
  from BoxLayout probably will not be as good in certain situations but
  it should do for the panel.  New BoxLayout also has support for LayoutAnimator

* Fix Plasma::HBoxLayout and Plasma::VBoxLayout to use margin() 
  rather than spacing() for the distance from the top and left
  margins respectively.

* Fix Plasma::Applet::contentSize() to return the actual content size
  rather than a size hint.  Added a new method contentSizeHint() which
  applets use to provide a hint about suitable content size.  

  Existing implementations of contentSize() in applets need to be renamed
  to contentSizeHint().  The arguments and return type are the same as before.

* Install the LayoutAnimator header so that applets can use it

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=707275
2007-09-01 12:34:22 +00:00
Aaron J. Seigo
559647f5cc make Applet use the newer plugin loading mechanisms
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=705972
2007-08-29 02:33:22 +00:00
Robert Knight
93070ce1fd Implement the same sizeHint() logic in Plasma::Widget as QWidget. It returns the layout's sizeHint() if there is a layout or an invalid QSizeF otherwise. Implement sizeHint() in Plasma::Applet. It returns the same as contentSize() if there is no border or the content size hint plus the border size otherwise. Many of the applets need changes for setGeometry() to work properly on them. Fix various warnings.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=701192
2007-08-17 15:05:01 +00:00
Aaron J. Seigo
db4a7ebe61 copyright cleanups:
* Copyright (C) -> Copyright
* add "or later" clause to files that i have the sole copyright on
* add current year (2007) to my copyrights where it was missing

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696946
2007-08-06 11:20:02 +00:00
Aaron J. Seigo
d10dba893e * Misc => Miscellaneous
* provide acccess to the applet id and plugin name

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696629
2007-08-05 13:01:09 +00:00
Richard J. Moore
8d7e06a09d - Steps towards dataengine access from scripts
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696620
2007-08-05 12:39:13 +00:00
Aaron J. Seigo
0eafb46fc4 * save applet config on exit
* introduce Applet::destroy which will perform cleanups, like deleting
  config files, etc..

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696586
2007-08-05 09:39:32 +00:00
Aaron J. Seigo
21c804908e * add an updateConstraints to be used to do things globally that need to
prefix or suffix constraintsUpdated, e.g. manage the shadow
* add experimental support for dynamic shadow, based on a patch by
  zrusin; still issues to be addressed but it gives us the start of a
  layer-based means to do effects

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696561
2007-08-05 08:41:55 +00:00
Matt Broadstone
be3c212374 Make all plasma/widgets inherit Plasma::Widget now. Holding off on committing change for icon as I have a massive patch for the new text drawing
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696028
2007-08-03 16:00:10 +00:00
Aaron J. Seigo
8fce372a7c allow applets to register that they need to be configured before use
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696023
2007-08-03 15:23:56 +00:00
Riccardo Iaconelli
075c1315ec Const QStrings
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=694679
2007-07-31 10:56:05 +00:00
Riccardo Iaconelli
5aaccf0489 The applets now can associate with (one or more) certain mimetypes, and be called when that mime is dragged onto the desktop. Very rudimental for the moment, we should pass the name of the file to the applet. Added some copyrights I missed in the past.
Aaron: your turn now to discover the 'Mimetypes' key problem.
CCMAIL: aseigo@kde.org

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=694676
2007-07-31 10:52:05 +00:00
Thomas Georgiou
999cd6ed57 Cache standard applet background.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=694542
2007-07-31 00:21:08 +00:00
Sebastian Sauer
d66a988732 added the QList<QAction*> Applet::contextActions() method. thanks aaron :)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=694540
2007-07-31 00:20:19 +00:00
Aaron J. Seigo
8d5d8daeb3 give the configxml object our config object; probably works better that way ;)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=694408
2007-07-30 16:19:07 +00:00
Aaron J. Seigo
947ed386ab * remove the lock/move stuff as it ignores kiosk and is already covered nicely by isImmutable and setImmutable
* on the base implementation of contentSize, check to see if we have a layout and if so use that to determine the size we ought to be

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=693769
2007-07-28 23:41:40 +00:00
Aaron J. Seigo
cedc2934c4 make it clear what services Applet provides in the apidox
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=693718
2007-07-28 19:59:22 +00:00
Laurent Montel
e94eba8882 Some applet mustn't be move (for example desktop applets)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=693187
2007-07-27 11:42:43 +00:00
Aaron Eisenberg
8d4d0e0631 Applets in group mode change color based on category (Currently only date and time category)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=693065
2007-07-26 22:58:30 +00:00
Laurent Montel
1553ae4492 Allow to lock applet position
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=693020
2007-07-26 20:22:04 +00:00
Alex Merry
b7187ab807 Make the local co-ordinate system clearer.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=692598
2007-07-25 23:48:15 +00:00
Alex Merry
f49f45411b More apidox
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=692591
2007-07-25 23:00:25 +00:00