Commit Graph

100 Commits

Author SHA1 Message Date
Petri Damstén
8a15088888 Scripting update.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=770587
2008-02-04 04:41:40 +00:00
Chani Armitage
17ddc75c3a fix bug where one signalrelay requests an update right after another and gets nothing
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=764821
2008-01-22 17:03:34 +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
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
b4bcccace7 durrrrrrrrrrrrrrrr
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738149
2007-11-18 02:39:37 +00:00
Aaron J. Seigo
bf7580d942 DataEngine::isEmpty() for shawn
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738136
2007-11-18 01:32:11 +00:00
Aaron J. Seigo
44297aaddb this can, and should, return 0 if it doesn't exist. this isn't a create-on-demand method.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=736897
2007-11-15 06:32:54 +00:00
Aaron J. Seigo
faaaf298a7 call the dataUpdated method if a delayed update is requested. fixes clocks.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=734094
2007-11-08 03:37:57 +00:00
Aaron J. Seigo
28bde9f027 only invoke the method manually if the source is pre-existing.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=733714
2007-11-07 06:10:57 +00:00
Aaron J. Seigo
b9b99b4fd2 updated -> dataUpdated to make it really clear what's going on. there are too many update* methods, esp in applets where there is update() and updated()... a painful change, but it will only get worse if it happens any later.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=733314
2007-11-06 07:20:08 +00:00
Andreas Pakulat
70f0a9f9be Merge the KConfig branch. This are the 3 main modules (+kdeadmin), which are
needed now because friday is the last BC day. The rest of the modules will
follow as fast as my laptop allows.

svn path=/trunk/KDE/kdelibs/; revision=721704
2007-10-05 22:21:25 +00:00
Michael Olbrich
3c250783cf rename minUpdateFreq -> minUpdateInterval
it's an interval not a frequency

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=713201
2007-09-16 16:28:16 +00:00
Michael Olbrich
038de158d1 cleanups
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=713200
2007-09-16 16:25:59 +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
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
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
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
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
Thiago Macieira
0ad0b8c21f You don't need QAtomic if you're not thread-safe
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=705296
2007-08-27 17:27:27 +00:00
Michael Olbrich
17e17536b1 DataEngine::query should not create an empty source but do what
DataEngine::connectSource does: ask the engine


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=698833
2007-08-11 08:19:20 +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
ac918ad4bf kdebug fixes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=695587
2007-08-02 13:12:59 +00:00
Sebastian Kügler
8ccfa4e4dd QMetaObject::invokeMethod is called incorrectly in
DataEngine::connectSource / DataEngine::connectAllSources

also: If a DataEngine fails to create the source in
sourceRequested(source), an empty source is created in d->source(source)
and then used during QMetaObject::invokeMethod, which calls updated for
the applet.
Better: don't create the source. This forces DataEngines to create the
source.

Patch by Michael Olbrich <michael-olbrich@web.de>

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=695097
2007-08-01 11:22:53 +00:00
Aaron J. Seigo
26b3b62ed7 DataSource -> DataContainer, so it's more obvious that it isn't the -source- of the data.
the api remains the same however.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=691134
2007-07-23 00:22:16 +00:00
Aaron J. Seigo
8f056a022a convenience setData method for when one gets a DataEngine::Data to set. useful for chaining engines together
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=689132
2007-07-17 18:08:57 +00:00
Aaron J. Seigo
606b1862a7 add clearData() methods
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=685602
2007-07-09 09:33:15 +00:00
Aaron J. Seigo
32ea32d1c7 - fix the init() method not being called
- improve the API docu to be more obvious

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=682278
2007-07-02 10:16:39 +00:00
Will Stephenson
4d6c186bac Warn that calling virtuals in a base constructor won't have the intended effect
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=677452
2007-06-19 07:17:50 +00:00
Aaron J. Seigo
a452da7dd2 * removeData method added to DataEngine which allows one to, well, remove data from a source
* passing a null or invalid QVariant to DataSource::setData now results in the removal of the entry if it exists

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=676783
2007-06-17 17:38:54 +00:00
Aaron J. Seigo
029b2e8a54 API consistency fixes; all methods now use "Source" to mean "DataSource"
svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=674784
2007-06-13 04:56:49 +00:00
Aaron J. Seigo
5957c71110 naming consistency
svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=674143
2007-06-11 21:10:44 +00:00
Aaron J. Seigo
0fbe1e47c1 * count the number of objects connected to each datasource
* data sources now signal when the are unused
* listen to the unused signal for sources created on demand via dataSourceRequested

svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=673389
2007-06-10 05:39:27 +00:00
Aaron J. Seigo
b86f3f6209 when a data source is requested but does not exist, allow the engine the opportunity to add it by reimplementing dataSourceRequested(const QString&). this makes it trivial to add timezones to the time engine, rss feeds to an rss engine, weather stations to a weather engine or hardware data to solid engines.
svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=673373
2007-06-10 04:03:50 +00:00
Dirk Mueller
ab560f1242 fix return value
svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=671375
2007-06-04 16:11:55 +00:00
Aaron J. Seigo
2638b6031b * introduce a NullEngine
* return an instance of the NullEngine on engine loading failure; this way applets don't have to test for engine existence and can just assume something gets returned
* DataEngine::isValid() in case someone really cares to know whether they have a non-functional engine (e.g. the NullEngine)

svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=670900
2007-06-02 22:23:26 +00:00
Aaron J. Seigo
10dd76c794 * when connecting sources, invoke the updated method so they get the current values immediately
* add the ability to limit the number of data sources in an engine; least used items drop off. the algorithm for this is pretty simplistic and not overly scalable, but that's something that can be fixed when we run into problems (e.g. setLimit(1000) or something silly =)

svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=668927
2007-05-28 05:43:54 +00:00
Aaron J. Seigo
1835680cf3 * get rid of Interface hack now that DataEngineManager is in libplasma
* provide a singleton accessor to DataEngineManager
* port code to API changes

svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=668668
2007-05-27 07:59:17 +00:00
Aaron J. Seigo
dacd91f859 constification.
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=667619
2007-05-23 08:27:09 +00:00
Aaron J. Seigo
22015aa3c9 add icons to data engines. a bit superfluous, but can be nice when showing engines to the user as we do in the engine explorer
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=667592
2007-05-23 07:13:00 +00:00
Aaron J. Seigo
479a977830 * api documentation
* void addSource(DataSource* source): allows adding of DataSources directly; useful for more complex engines where setData would be inneficient and clumsy or just not powerful enough

svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=667584
2007-05-23 06:38:44 +00:00
Matt Williams
a6c0d7a952 DataVisualisation isn't actually used in here
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=667493
2007-05-22 23:11:21 +00:00
Aaron J. Seigo
879e215a43 * make DataSource emit the name of the source along with the data; this makes it possible widgets connected to multiple DataSources to have a chance of doing the right thing
* make DataEngine take a QObject in the connect, making DataVisualization somewhere superfluous. unless it ends up doing something useful soon, DataVisualization as a class will be going away.

svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=667167
2007-05-22 02:49:54 +00:00
Matt Williams
dfb58b44c1 EBN Fixes
* Include own header file first
* Make d-pointer const
* Use references-to-const

svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=667001
2007-05-21 14:28:03 +00:00
Aaron J. Seigo
b8cc485705 * split DataSource into its own files
* move DataSource::Data to DataEngine::Data; this means consumers of DataEngine have no need to know about DataSource as a class

svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=666756
2007-05-20 20:36:59 +00:00
Aaron J. Seigo
4c4b013b89 * implement the engine, source and visualization classes
* queue updates so that multiple calls to setData don't result in a storm of updated signals
* some API cleanups, e.g. connect -> connectSource
* provide and install a ServiceType .desktop; this adds the X-EngineName QString symbol. maybe that's too generic.

svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=666241
2007-05-19 08:38:46 +00:00
Stephan Kulow
302bfadf77 compile
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=638222
2007-03-01 08:22:38 +00:00
Matt Broadstone
b49680140c Get things actually building here
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=638147
2007-02-28 23:35:26 +00:00
Aaron J. Seigo
3de9c853b7 get this to compile at least so i can start to exercise it with krunner
and other such bits. no point on having this just sit on my disk i
suppose =)

svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=614239
2006-12-16 23:04:44 +00:00