Commit Graph

3512 Commits

Author SHA1 Message Date
Laurent Montel
950d256e5d Fix mem leak
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=713138
2007-09-16 13:18:04 +00:00
Laurent Montel
a49edd72f0 Add includes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=713136
2007-09-16 13:14:40 +00:00
Ivan Čukić
63164d2cc0 BorderLayout initial import
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=713071
2007-09-16 09:08:08 +00:00
Dirk Mueller
f5d2cac4e7 try installing the header file instead of the .cpp to fix dashboard
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=712775
2007-09-15 08:15:07 +00:00
Robert Knight
7b607e92c9 Fix applets jumping around when they resize. Avoid calling setGeometry() on Applets in a FreeLayout that have not changed their size hint since the last update.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=712674
2007-09-15 04:16:11 +00:00
Aaron J. Seigo
329d912f47 SVN_SILENT: more licensing updates ... all done with this now i think =)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=712581
2007-09-14 20:17:11 +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
Jon de Andres Frias
e726cd04c6 Added to the Plasma widgets library the ProgressBar class. It's included a small program test for the progressbar.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=712543
2007-09-14 18:19:42 +00:00
Aaron J. Seigo
c24d23c1f9 add a note about sync'ing timeouts in SignalRelay's to actual data availability
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=712191
2007-09-13 20:41:01 +00:00
Aaron J. Seigo
6ffbc459ad - when an intervalled visualization triggers an update, but the update is async, we queue up to trigger updated when the data _actually_ arrives.
- timestamp sources on update so we don't over update them due to multiple visualizations hammering on it. improves our tick situation even more.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=712188
2007-09-13 20:34:17 +00:00
Aaron J. Seigo
0fc83b6e76 prevent crashing on exit; layout must not be deleted before the applets which are managed by it.
this is a brittleness in the layout system that really needs to be addressed (and i added a comment and some debug output about this in LayoutItem)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=712164
2007-09-13 19:47:14 +00:00
Aaron J. Seigo
d20c9a010f growing tired of being asked about how to get at the font used in widgets, here's a cute little accessor that provides the answer for now and gives us a way to support font settings in the future much in the way qwidget itself does.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=712158
2007-09-13 19:33:44 +00:00
Aaron J. Seigo
45fe956407 --warnings
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=712135
2007-09-13 18:50:15 +00:00
Aaron J. Seigo
e2b9f9df31 SVN_SILENT: style fixes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=712122
2007-09-13 17:04:04 +00:00
Aaron J. Seigo
fc4b474f5c call init() on the applets after they are added to the scene ... do it all at once in the case of loading applets en mass
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=712120
2007-09-13 17:03:13 +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
Robert Knight
26d4a28aad Use FreeLayout as the Corona's layout in the Planar form factor (vs. BoxLayout in the Horizontal or Vertical form factors)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=712086
2007-09-13 14:59:29 +00:00
Script Kiddy
e5db207cfd SVN_SILENT made messages (.desktop file)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=711906
2007-09-13 05:55:01 +00:00
Aaron J. Seigo
7d533e3472 - missing license header
- fix white space issues
- delete the dptr

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=711899
2007-09-13 05:40:37 +00:00
Aaron J. Seigo
926d039802 SVN_SILENT: why bother with a coding style.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=711898
2007-09-13 05:34:11 +00:00
Robert Knight
465b1d0072 Build the FreeLayout class and install its header.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=711889
2007-09-13 04:38:30 +00:00
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
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
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
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
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