Commit Graph

12944 Commits

Author SHA1 Message Date
Aaron J. Seigo
50485408b7 check timing alignment right away
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=711756
2007-09-12 18:32:41 +00:00
Aaron J. Seigo
e15c950bc3 introduce interval alignment, so it is possible to align a time interval to the minute or hour (we can add arbitrary ones to the mix should we choose; e.g. "every 10 mins" or whatever..but there needs to be good use cases =)
this is needed by clocks, as the obvious example, since "once a minute" isn't enough: it needs to be once a minute *on* the minute

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=711737
2007-09-12 17:53:54 +00:00
Aaron J. Seigo
705e4d9148 - use DataContainer::connectVisualization
- add internalUpdateSource so that we can automate the call to checkForUpdates

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=711719
2007-09-12 17:04:21 +00:00
Aaron J. Seigo
8415f49e55 - add connectVisualization so now the DataContainer manages all connect/disconnecting
- keep track of objects that are connected even at interval == 0
- remove disconnectNotify due to these changes
- allow multiple calls to connectVisualization to work properly without resulting in
  multiple connections to the same object and allowing the update interval to be
  adjusted for a given source/vis pair

this makes it pretty important to use connectVisualization and disconnectVisualization rather than QObject::connect and QObject::disconnect for the updated signal stuff

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=711717
2007-09-12 17:03:06 +00:00
Script Kiddy
fd2b10be2f SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdebase/workspace/plasma/desktoptheme/; revision=711498
2007-09-12 06:00:50 +00:00
Aaron J. Seigo
32948264d0 the private header for datacontainer
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=710852
2007-09-11 00:55:46 +00:00
Aaron J. Seigo
fc89eff135 first run at per-visualization timeouts, as per the design worked out on panel-devel.
i'm sure there are several bugs at this point (so don't try and use it quite yet ;) but most importantly:

- all methods are implemented
- it compiles ;)
- it does not have any negative impact on existing engines and applets as they currently are written

next will be to put it all through its paces, starting with the time engine and analog clock applet. i may not get to that until tomorrow, hoever.

this commit also fixed a number of buglettes along the way that had creeped in, e.g. not properly connecting all signals in connectAllSources (moved that ccode to the Private class to avoid code dupe and similar bugs in the future)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=710849
2007-09-11 00:49:51 +00:00
Andreas Aardal Hanssen
1cf7d7c0f6 Enable DeviceCoordinateCacheMode by default. Overload update() to give
it invalidate-like behavior, and remove invalidate(). Revert last change
to analogclock, cached behavior is now enabled for all applets. If you
want to disable caching, call setCachePaintMode(NoCacheMode) from your
applet's constructor.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=710764
2007-09-10 20:44:24 +00:00
Robert Knight
6828d212bb Add FreeLayout layout, which resizes its children to their sizeHint() whenever it is invalidated. Useful for desktop-like workspaces so that widgets can be agnostic of whether they are being used in a panel or a 'constraint free' area.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=710761
2007-09-10 20:38:59 +00:00
Andreas Aardal Hanssen
55e02ca70a Add CachePaintMode, as a temporary local back-port of
QGraphicsItem::CacheMode, which will appear in 4.4. I've chosen names
that aren't really good, but they're not misleading, and they don't
clash with the API in 4.4.

My first KDE submit :-DDD.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=710738
2007-09-10 19:06:58 +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
Petri Damstén
2fc4fb59c3 Support for rest of the datatypes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=710654
2007-09-10 15:07:29 +00:00
Pino Toscano
8c176c556d extra ';'
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=710427
2007-09-09 22:34:10 +00:00
Richard J. Moore
fad4e891b9 - Build the uiloader class
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=710413
2007-09-09 21:40:24 +00:00
Script Kiddy
f3718c04da SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdebase/workspace/menu/; revision=710142

The following changes were in SVN, but were removed from git:

M	pics/oxygen/index.theme
2007-09-09 06:15:09 +00:00
Script Kiddy
2db5dcf7c9 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=710142
2007-09-09 06:15:09 +00:00
Robert Knight
37b4ea6334 managingLayout() is a better way to get the layout managing the widget's geometry than parent()->layout() which doesn't work for top-level Widget instances.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=709899
2007-09-08 14:01:03 +00:00
Robert Knight
3dc0a4795f Correct the layout invalidation logic. As with Qt, when a layout is invalidated it finds its top-level layout and causes that to be updated. Calling Widget::updageGeometry() causes the parent widget's layout to be invalidated.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=709495
2007-09-07 16:15:46 +00:00
Ivan Čukić
45f7769d44 Added stretched paint mode for background painting
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=709407
2007-09-07 13:05:28 +00:00
Script Kiddy
9ebd9091b6 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdebase/runtime/; revision=709300

The following changes were in SVN, but were removed from git:

M	pics/oxygen/index.theme
2007-09-07 05:45:38 +00:00
Richard J. Moore
f2cf7e782a - Since rectangle is disabled elsewhere
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=708888
2007-09-05 22:39:03 +00:00
Richard J. Moore
834a572004 - For now the parent must be a Widget
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=708885
2007-09-05 22:35:54 +00:00
Richard J. Moore
2e506845e9 - Added a factory class analogous to QUiLoader for plasma widgets. It
it not currently compiled, and does not yet support loading of full
  forms. Note that this shows up that the APIs defined by the widgets
  are still woefully inconsistent.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=708875
2007-09-05 21:58:10 +00:00
Pino Toscano
cec28bebac use QtModule/QFoo for public headers
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=708026
2007-09-03 17:16:40 +00:00
Robert Knight
15fbaba2ac Move duplicated animation starting code into Layout::startAnimation() which layout subclasses can call at the end of their setGeometry() implementation to start the layout animator's timer.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=707803
2007-09-03 00:52:29 +00:00
Robert Knight
ecd23d6e67 Always restart timeline from 0 when setGeometry() is called. QTimeLine::start() is a no-op if already running.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=707800
2007-09-03 00:41:57 +00:00
Richard J. Moore
4663b82555 - More Q_PROPERTY additions
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=707687
2007-09-02 17:49:34 +00:00
Richard J. Moore
b09f73ac86 - Add support for opacity property of Widget
- Add Q_PROPERTIES and missing Q_OBJECT to signalplotter


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=707684
2007-09-02 17:41:05 +00:00
Michael Olbrich
56429d3adc check for unused DataContainers in a way that actually works.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=707450
2007-09-01 22:23:03 +00:00
Pino Toscano
c27291a3fc slots -> Q_SLOTS
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=707337
2007-09-01 15:02:09 +00:00
Robert Knight
fea627e08d * Add support for an SVG background in the panel. The SVG used is
in desktoptheme/widgets/panel-background.svg.  Path is currently hard-coded.
  Added programmer-art edition of panel-background.svg

  TODO: Discuss with artists what they need from the code to get the 
        desired background look in the panel and how to manage different
        backgrounds depending on where the panel is positioned.

* Horizontal panel layout now works

svn path=/trunk/KDE/kdebase/workspace/plasma/desktoptheme/; revision=707284
2007-09-01 12:44:57 +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
Robert Knight
04375c4b09 Replace 'INFINITY' with more correct numeric_limits<qreal>::infinity()
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=706983
2007-08-31 17:46:12 +00:00
Robert Knight
536d3749c1 Fix crash when layout argument is null.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=706975
2007-08-31 17:24:03 +00:00
Robert Knight
bb25f62e55 Remove Widget::invalidate(), that is a feature which is part of the layouts. Better attempt at Widget::updateGeometry() which widget subclasses can call when their size hint or min/max size changes. Ultimately should behave like the QWidget methods of the same name. Make Widget return Qt::Horizontal | Qt::Vertical in its default implementation of expandingDirections()
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=706939
2007-08-31 15:32:10 +00:00
Robert Knight
f7861353ba Add a method to change the parent of a layout. Make isEmpty() non-virtual, and instead always equal to (count()==0). Add invalidate() method which is used like the method of the same name in QLayout to invalidate cached information in the layout.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=706937
2007-08-31 15:27:32 +00:00
Robert Knight
af8659fa22 Update the parent of a LayoutItem when calling setLayout
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=706935
2007-08-31 15:23:09 +00:00
Robert Knight
d1aba23cd2 Return 0 for the expanding directions of an icon. At present icons have a fixed size.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=706934
2007-08-31 15:21:30 +00:00
Robert Knight
37b993d8ff Add auto-deletion functionality into LayoutAnimator which can be used to delete the item when its removal animation finishes. Emit a signal when the state of an item in the animator changes. Avoid repeatedly setting an item's geometry with the NoEffect effect. Added a DeadState into which items transition after their removal animation finishes or if they have not been added to the animator. When inserting an item with a fade in effect set the opacity to 0 if the item is a widget.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=706933
2007-08-31 15:19:02 +00:00
Robert Knight
b329ddb69a Fix elementSize() , elementRect() always returning 0 in Plasma::Svg if called before resize(). Set the size to the document's default size when the renderer is created. Makes it possible to determine the aspect ratio of the graphic.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=706931
2007-08-31 15:15:04 +00:00
Script Kiddy
d5dc5287cb SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdebase/runtime/; revision=706753

The following changes were in SVN, but were removed from git:

M	pics/oxygen/index.theme
2007-08-31 07:59:14 +00:00
Script Kiddy
b3831c1f44 SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=706753
2007-08-31 07:59:14 +00:00
Percy Leonhardt
615eae37ba Merged HBoxLayout and VBoxLayout into BoxLayout to avoid duplicate code.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=706645
2007-08-30 23:44:08 +00:00
Aaron J. Seigo
432bfaf165 make paintGLInterface non-pure virtual to make it more similar to Applet
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=706360
2007-08-30 04:34:09 +00:00
Aaron J. Seigo
243f835253 a micropatch i had sitting on the laptop
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=706359
2007-08-30 04:33:12 +00:00
Aaron J. Seigo
bf30d19c41 improve error reporting when a plugin fails to load
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=705985
2007-08-29 03:06:48 +00:00
Aaron J. Seigo
e600dbe4c3 * fix typo in PLASMA_EXPORT_SCRIPTENGINE name; guess nobody is using this yet? ;)
* port to new plugin system
* forget about taking a QVariantList in the ScriptEngine ctor. it's not going to be used

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=705983
2007-08-29 03:00:00 +00:00
Aaron J. Seigo
1316a45e7e * make connectSource apidox a bit clearer
* add DataContainer* containerForSource() for script engine authors to use

CCMAIL:rich@kde.org

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=705981
2007-08-29 02:57:04 +00:00
Aaron J. Seigo
b34983f356 remove an unecessary include and a compile warning
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=705980
2007-08-29 02:55:49 +00:00
Aaron J. Seigo
904c1b13f8 move animator to the new plugin system
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=705975
2007-08-29 02:45:20 +00:00