Commit Graph

87 Commits

Author SHA1 Message Date
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
Alex Merry
eddb8f294f Change how boundingRect() is calculated and backgrounds are drawn.
Instead of implementing boundingRect(), applets should now implement
contentSize(), to tell Plasma::Applet how much space they need.

I wrote a long commit log, then realised it belonged in the apidocs.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=692519
2007-07-25 19:15:23 +00:00
Aaron J. Seigo
2c251118fd * new background drawing code; 9 segments + center, documented at http://techbase.kde.org/Projects/Plasma/Theme#Current_Theme_Elements
* introduce contentsRect() and pass that into paintInterface instead of a widget

i missed monday so much i wanted to break SOMETHING, so i broke all the plasma widgets. i rock! ;P

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=692002
2007-07-24 21:04:31 +00:00
Aaron J. Seigo
39422a9a6b first draft of the ScriptEngine plugin
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=691244
2007-07-23 07:42:29 +00:00
Aaron J. Seigo
b8a9f72008 add an icon() accessor
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=691201
2007-07-23 06:12:38 +00:00
Aaron J. Seigo
0491b8b112 immutable -> isImmutable.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=691135
2007-07-23 00:24:36 +00:00
Matthias Kretz
1fd776be2e port to value based KPluginInfo
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=691115
2007-07-22 23:10:53 +00:00
Aaron J. Seigo
dd7b8b306b ebn fixes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=691079
2007-07-22 22:01:10 +00:00
Richard J. Moore
23c1f996d2 First steps towards scriptability
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=690375
2007-07-20 21:00:11 +00:00
Aaron J. Seigo
51a0162fae started on docu fixes from ebn until i realized that the line numbers are all messed up in the apidox tests and so moved on
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=690174
2007-07-20 08:12:20 +00:00
Aaron J. Seigo
af043ca588 too tired to do much of anything else, i figured i could fix some ebn issues
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=690173
2007-07-20 08:06:27 +00:00
Aaron J. Seigo
8c8504964e * disable copying of Applet due to dptr-but-no-copy-ctor
* provide an accessor to the Package object.
* some const corrections

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=690105
2007-07-20 03:34:20 +00:00
Aaron J. Seigo
c7b13e477b don't crash when we are asked to create something bogus
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=689221
2007-07-17 22:26:18 +00:00
Aaron J. Seigo
f6a4e9612d * X-PlasmoidCategory => X-KDE-PluginInfo-Category
* allow filtering applets by category and parent app
* allow filtering categories by parent app

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=689200
2007-07-17 21:30:27 +00:00
Aaron J. Seigo
94a57ed051 * appletConfig -> config
* globalAppletConfig -> globalConfig
* add a convenience and safety method for accessing groups in the applet config, which namespaces the groups appropriately

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=687046
2007-07-12 19:14:23 +00:00
Aaron J. Seigo
8ee8f97aa1 * gaurd against an args with less than 2 items in it being passed in
* add a setFailedToLaunch method to applet to allow a generic way to set such status

it's pretty fugly looking at this point, but it works; i'll work with the artists to make it prettier later.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=687027
2007-07-12 18:34:53 +00:00
Alex Merry
71c21577d3 Add categories to plasmoids. The actual category names are subject
to change at some point - a definitive list on techbase will probably
be assembled.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=686945
2007-07-12 13:24:35 +00:00
Alex Merry
2b4b22883d Make the APIDOX not lie, and change the logic to make sense
(loadDataEngine will always return a data engine - it just
might not be valid).

I changed it this way, rather than changing the test to
engine->isValid(), since all the plasmoids written so far
blindly assume a valid pointer is returned.  (In fact, they
all blindly assume the correct data engine is returned, but
at least this way they shouldn't crash plasma :-P)


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=686301
2007-07-11 01:24:43 +00:00
Alex Merry
3d4b57b118 Clean up the APIDOX a little: spelling mistakes, seperating
the "brief description" from the "main description",
"Reimplemented from QGraphicsView" should be a comment, not
an APIDOX (so Doxygen will copy the original APIDOX down),
added docs for the export macro.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=684556
2007-07-06 22:20:57 +00:00