Commit Graph

740 Commits

Author SHA1 Message Date
Marco Martin
d3f1778eac crash--
svn path=/trunk/KDE/kdelibs/; revision=880160
2008-11-04 21:16:48 +00:00
Marco Martin
236cb1aa17 set the pointer at 0, ooops :)
svn path=/trunk/KDE/kdelibs/; revision=880104
2008-11-04 19:23:44 +00:00
Marco Martin
d9a77cf958 add functions setBusy(bool) and isBusy()
used to easily display a busy indicator as an overlay of the applet when
is loading stuff

svn path=/trunk/KDE/kdelibs/; revision=880089
2008-11-04 18:22:55 +00:00
Beat Wolf
daf80c7f17 Fixes a timing issue when starting up plasma (could crash the whole plasma)
svn path=/trunk/KDE/kdelibs/; revision=880077
2008-11-04 17:51:11 +00:00
Allen Winter
25b6627ce8 give context the the i18n string "Miscellaneous"
svn path=/trunk/KDE/kdelibs/; revision=879986
2008-11-04 12:54:19 +00:00
Allen Winter
2c6bab358f fix i18n() calls
svn path=/trunk/KDE/kdelibs/; revision=879982
2008-11-04 12:49:28 +00:00
Aaron J. Seigo
4b08c03726 change KDE includes to use the .h style now that we're in libs
svn path=/trunk/KDE/kdelibs/; revision=879795
2008-11-04 02:04:34 +00:00
Aaron J. Seigo
1b523b9054 ok, this time JUST the plasma dir ;)
svn path=/trunk/KDE/kdelibs/; revision=879759
2008-11-03 23:08:39 +00:00
Aaron J. Seigo
fa5a2d87d9 bum-de-dum! plasma to kdelibs.
svn path=/trunk/KDE/kdelibs/; revision=879757
2008-11-03 23:03:26 +00:00
Albert Astals Cid
45edd84dfc add context
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=879206
2008-11-02 17:38:52 +00:00
Aaron J. Seigo
1c75cca9e2 break out Plasma::ToolTipManager::Content to Plasma::ToolTipContent and prep it for BC
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=878923
2008-11-02 05:58:42 +00:00
Aaron J. Seigo
416090f5da help out the translators a bit
CCMAIL:aacid@kde.org

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=878807
2008-11-01 20:37:59 +00:00
Kevin Ottens
f66b4d819b API changes as announced:
* ConfigXml becomes ConfigLoader
  * Containment::(add|remove)ToolBoxTool(QAction *action) becomes
    Containment::(add|remove)ToolBoxAction(QAction *action)
  * Flash becomes FlashingLabel
  * Icon becomes IconWidget
  * PanelSvg becomes FrameSvg

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=877504
2008-10-29 17:46:33 +00:00
Guillaume Pothier
bd7e7b10c9 Added screen management methods to Corona and removed usage of QDesktopWidget in plasmalibs.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=877451
2008-10-29 15:22:38 +00:00
Simon Edwards
2b932160e6 Added a pluginName() method to DataEngine to match the one in Applet. (Useful for scripting.)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=874609
2008-10-21 22:22:57 +00:00
Aaron J. Seigo
6fe3502be7 we have workspace/libs/ for a reason
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=874257
2008-10-21 02:31:43 +00:00
Aaron J. Seigo
7abb5164a5 remove gratuitous "ToolTip"s
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=874244
2008-10-21 01:33:32 +00:00
Aaron J. Seigo
b5df90348f don't load the wallpaper config until we paint. this means that if we have off-screen containments, even with complex wallpapers, they don't take up unecessary memory or delay start up because they won't render the wallpaper until the first paint event.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=872755
2008-10-18 01:31:52 +00:00
Aaron J. Seigo
2118460d27 applet -> widget
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=871125
2008-10-13 23:16:22 +00:00
Allen Winter
81d09742bb fix spelling
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=870322
2008-10-12 11:12:24 +00:00
Allen Winter
8716f930ec use split('x') instead of split("x")
add single chars instead of single char strings

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=870295
2008-10-12 10:57:42 +00:00
Allen Winter
214ac5f91f clean up some kDebugs and kWarnings.
shorten some extra long lines.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=870290
2008-10-12 10:20:02 +00:00
Allen Winter
a7aebfa60a a bunch more coding style fixes. still some lines longer than 100 chars.
this is definitely helping me find false positives in the Krazy style checker.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=870161
2008-10-11 22:48:38 +00:00
Allen Winter
e88e2faa63 first batch of small coding style fixes.
these were found while testing the Krazy style checker, which I'm adapting
for the kdelibs style.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=870051
2008-10-11 16:19:04 +00:00
Aaron J. Seigo
f7f4a8e821 save/restore the painter before handing it to the wallpaper
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=869679
2008-10-09 18:48:27 +00:00
Marco Martin
57d1f48145 when an applet fails to load only display an icon with a tooltip when
on anel, so it doesn't cause problems to the panel layout

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=869266
2008-10-08 16:44:01 +00:00
Aaron J. Seigo
06e71be8c3 we no longer need to check for spontaneity; move the trick up to Applet as well to avoid repaints where possible
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=868200
2008-10-05 17:48:44 +00:00
Aaron J. Seigo
70f1b85426 blarg. one button is *probably* enough
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=867162
2008-10-02 23:10:55 +00:00
Aaron J. Seigo
165f387e45 be paranoid about it
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=867096
2008-10-02 19:38:41 +00:00
Aaron J. Seigo
a062bbc901 * prevent some possibe crash interactions between extenders and applets
* proper save of geometry, transform and position post startup

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=866823
2008-10-01 23:52:50 +00:00
Aaron J. Seigo
e1a0d5bb9c * save the size/rotation shortly after it's made .. should help preserve those changes in cases of crashes mor consistently
* delete the script before deleting the items it might rely on (e.g. the package!)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=864835
2008-09-25 16:26:04 +00:00
Aaron J. Seigo
56a9ad52ce make it harder for people to fall into the temptation of nesting containments
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=863619
2008-09-22 17:50:23 +00:00
Aaron J. Seigo
c302aa3ff4 * try not to call view() if possible
* code clarifications, simplicity++

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=862852
2008-09-20 06:08:28 +00:00
Aaron J. Seigo
ae3986568f make Applet::name Activity aware
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=862758
2008-09-19 19:16:53 +00:00
Aaron J. Seigo
8d1e6cdf85 call a private constraints event on the PopupApplet so that subclasses don't have to think about it
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=862502
2008-09-19 03:26:24 +00:00
Aaron J. Seigo
6e2506d5cc * use d->extender instead of extender() to prevent accidently creating extenders
* make PopupApplet a friend (PopupAppletPrivate already is)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=862089
2008-09-18 02:47:25 +00:00
Aaron J. Seigo
c5fe5cb285 automatically create a new extender if we don't have one and an extender is requested
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=862085
2008-09-18 02:38:27 +00:00
Aaron J. Seigo
8db733b45a * forget the global shorcut on applet destruction; prevents issues with collisions in the future
* be more agressive with claiming global shortcuts
* add some debug output to track global shorcut registration

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=862007
2008-09-17 19:16:36 +00:00
Aaron J. Seigo
874870aaee because KGlobalShorcuts is not exactly what i'd call symmetrical, we need to ensure the object name is constant at all costs. that design really needs to be rethough in KDE5 as it lacks.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=861708
2008-09-16 22:55:21 +00:00
Rob Scheepmaker
ca2a86dc2e Move the calls to destroy() from save() to Applets dtor. This fixes the crashes with the popup
applet patch on reviewboard (r182).
CCMAIL: notmart@gmail.com


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=860301
2008-09-12 15:50:17 +00:00
Petri Damstén
11317e0d7e add configChanged to Applet and AppletScript
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=860299
2008-09-12 15:21:58 +00:00
Sebastian Kügler
7335ef2e00 warnings--
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=860267
2008-09-12 13:19:37 +00:00
Rob Scheepmaker
11a5a957d0 Renamed extender to internal:extender to avoid possible name clashes.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=860083
2008-09-11 22:51:43 +00:00
Rob Scheepmaker
7d9f3e29c1 The in libplasma embedded ExtenderApplet actually works now!
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=860069
2008-09-11 21:21:18 +00:00
Rob Scheepmaker
cb4d610219 Move ExtenderApplet to libplasma. This doesn't work just yet, but aseigo will take a look at
it, so it will soon. ;)


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=860007
2008-09-11 19:26:05 +00:00
Aaron J. Seigo
c633c8ac57 hook up the containment configuration interface to the generic containment configuration mechanism; now it shows in the toolbox too! whee!
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=859593
2008-09-10 18:51:30 +00:00
Aaron J. Seigo
81ff908a3e * for ghost painting, used when dragging, we only need to know true or false .. we don't need to check the view
* cache the current view as this gets called on every mouse move event when dragging something by the handle.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=858901
2008-09-09 00:23:02 +00:00
Aaron J. Seigo
d3280cee63 even simpler, and preserves the old contentsRect as well
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=858253
2008-09-07 16:22:34 +00:00
Aaron J. Seigo
fa32b0f2b6 be a little more forgiving in trying to find the Best View
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=857615
2008-09-05 20:37:15 +00:00
Aaron J. Seigo
d89ad4cba0 context API adjustments
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=857207
2008-09-05 00:22:42 +00:00
Aaron J. Seigo
35bfe20877 why yes, dani_l, i have looked into this issue. ;)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=856686
2008-09-03 15:06:02 +00:00
Aaron J. Seigo
2963de33e6 just toRect will suffice
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=856498
2008-09-03 04:25:24 +00:00
Aaron J. Seigo
3c7c59d9f8 don't repaint the entire item *every time* if the exposed area is just a small section. this saves huge numbers of whole screen repaints.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=856476
2008-09-02 23:29:54 +00:00
Rob Scheepmaker
56fc76d150 Detaching ExtenderItems from a Plasma::Dialog works now, but resizing the dialog isn't
always done correctly yet. I'm still looking into that.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=852535
2008-08-25 23:16:18 +00:00
Rob Scheepmaker
60a62db177 Make attached ExtenderItems non persistent, since that is more logical default behavior.
Fixed the screwed up positioning of the ExtenderItem toolbox.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=852222
2008-08-25 15:17:54 +00:00
Alex Merry
6f4ccf03c9 Use parenting where appropriate.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=851451
2008-08-23 17:21:55 +00:00
Aaron J. Seigo
2c341a5521 the wallpaper can't be mutually exclusive to the containment's painting, otherwise containments like the folderview don't paint their interface
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=850223
2008-08-21 02:56:41 +00:00
Alex Merry
c8823d1900 Don't call constraintsUpdated() before init(), even if an event loop is created in an applet constructor.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=849656
2008-08-19 21:36:52 +00:00
Marco Martin
abdb0debb5 needsconfigoverlay is way nicer painted to contentsrect when the
standardbackground is on

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=849618
2008-08-19 20:00:40 +00:00
Aaron J. Seigo
03047048bc fixlette
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=849502
2008-08-19 17:37:53 +00:00
Marco Martin
14bb079e79 this size policy seems to behave way better
icons aren't scaled down when taskbar fills up
will backport to 4.1

BUG:164857

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=848940
2008-08-18 18:49:04 +00:00
Aaron J. Seigo
46ef63168e allow applets to query for their context, update the context via a constraint (we're running out of them!)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=848820
2008-08-18 14:04:30 +00:00
Petri Damstén
0183db7d30 Base for Plasma::Wallpaper plugins.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=842590
2008-08-05 15:27:48 +00:00
Aaron J. Seigo
684a1b4e4e SVN_SILENT: some ws fixes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=841831
2008-08-04 08:00:07 +00:00
Rob Scheepmaker
3bfb1bf662 Fixed a type, making destroy() function again. Move the destruction of temporary extender
items to applet, since in extender's dtor, applet's config isn't accessible anymore. Only 
fire itemDetached when an item is really moved, not only when being dragged away.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=841509
2008-08-03 12:16:41 +00:00
Aaron J. Seigo
577a64f563 extender is not a Plasma Widget (it doesn't follow the API pattern, isn't a button/menu/etc, isn't meant to be used as a general widget in a random layout...)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=841164
2008-08-02 17:46:32 +00:00
Rob Scheepmaker
a6293d363f Extenders enter trunk! The implementation still has some rough edges and fixmes, but the api
is in quite nice shape and basides a couple of bugs, it basically works. So what are you 
still doing reading this? Port your favourite applet to extenders today! ;)


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=840978
2008-08-02 11:48:56 +00:00
Chani Armitage
db8bb180e8 let's not have overzealous shorcuts.
(will this need to be changed back when we have proper qgraphicswidget shortcuts?)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=840837
2008-08-01 23:25:24 +00:00
Aaron J. Seigo
63bce9d1b4 move all the prive code into private/; makes it much clearer with the division lines are
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=839792
2008-07-30 20:35:42 +00:00
Aaron J. Seigo
f0c70f7c41 cut some fat; we don't actually use the shadow item, and haven't since before 4.0
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=839264
2008-07-29 16:52:44 +00:00
Marco Martin
aaab3a310a API change:
changed paintPanel(QPainter* painter, const QRectF& rect, const
QPointF& pos = QPointF(0, 0));
into
 void paintPanel(QPainter* painter, const QRectF& target, const QRectF&
source);   
and
 void paintPanel(QPainter* painter, const QPointF& pos = QPointF(0, 0));

to be more similat di QPainter::drawPixmap api

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=838379
2008-07-27 17:20:27 +00:00
Aaron J. Seigo
538272d133 make Theme::currentThemeHasImage check for compressedsvg files
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=836139
2008-07-21 19:36:47 +00:00
Chani Armitage
d7bc9f3898 add security check in showConfigurationInterface too
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=834476
2008-07-19 03:22:41 +00:00
Chani Armitage
bbcc79fc0e only allow configuration while widgets are unlocked
something went wrong, very wrong, when pulling from gitorious. I don't know what or why. but this is a copy of the last commit I made on my laptop...

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=834472
2008-07-19 03:00:36 +00:00
Aaron J. Seigo
bfd552b776 add the word Activity now that we've essentially committed to using it
BUG:166875

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=834030
2008-07-17 20:52:04 +00:00
Pino Toscano
bec3fc7541 fix i18n() usage
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=833977
2008-07-17 18:40:11 +00:00
Aaron J. Seigo
9fce6a940f one less string freeze todo
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=833969
2008-07-17 18:25:50 +00:00
Dirk Mueller
5a2b46c73e - coding style
- more plugins to version

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=833560
2008-07-17 01:27:43 +00:00
Dirk Mueller
02a008da35 introduce plugin versioning for plasma and ensure
that only applets with a matching major.minor version
are loaded. needs porting to plugins other than applets.

CCMAIL: aseigo@kde.org

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=833550
2008-07-17 01:11:25 +00:00
Aaron J. Seigo
19b3401af9 * get rid of ToolTipManager::getItemItsApplet
* introduce Plasma::viewFor and Plasma::popupPosition

generally nicer code all around.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=833534
2008-07-16 23:48:41 +00:00
Alexis Ménard
24d494fd5a Install event filter is better than reimplement sceneEvent.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=833521
2008-07-16 23:11:51 +00:00
Alexis Ménard
f4ec3034df Add api doc comments + delete old stuff in applet
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=833277
2008-07-16 15:18:08 +00:00
Alexis Ménard
6a9bf59888 lot of API changes for more clarity, fix some bugs
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=833276
2008-07-16 15:18:02 +00:00
Alexis Ménard
0628f7dcb3 New ToolTip manager that create tool tips easier than before
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=833272
2008-07-16 15:17:44 +00:00
Aaron J. Seigo
0e5f15dc50 * add Corona::addContainmentDelayed for more control on the Corona subclass side during default layout loading
* accept bad config objectsin Applet::save and Containment::save
* move some initialization code around to be more robust with external use (will make more sense in next commit to workspace/plasma/plasma)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=828940
2008-07-07 02:16:08 +00:00
Aaron J. Seigo
9ccc9336a5 * prevent removing active containments (brute force mechanism: just ignore the request totally)
* select the correct containment for removal when zoomed out (will have isses on multi-screen; see FIXME)
* move containment destruction logic out of Corona; it really doesn't belong there
* remove the hack to not set focus on a containment when clicked as that doesn't seem to reliably trigger it for me here and it doesn't address the issue of a new containment still messing things up, so we really ought to have a generic solution instead of a slightly ugly hack

BUG:id=165670

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=828906
2008-07-06 22:43:53 +00:00
Aaron J. Seigo
762be363ec rework the toolbox creation, containment type setting and isContainment setting code to make it resilient against when and where those properties are set
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=828636
2008-07-06 10:03:10 +00:00
Aaron J. Seigo
a404763830 don't check the view for regular applets; the problem only affect containments
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=828205
2008-07-04 21:48:25 +00:00
Marco Martin
f203f0ffff don't setFocus on applets or containments when the view is zoomed out,
that would drive to an automatic scrolling of the view when clicking on
it, hiding other containments

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=828193
2008-07-04 21:13:48 +00:00
Aaron J. Seigo
92ee66d578 be extra sure that the applet has an entry in the config on being added so when we config sync we're guaranteed they are in there
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=827479
2008-07-03 05:46:25 +00:00
Marijn Kruisselbrink
21b148b963 change all ClassName::Private classes to ClassNamePrivate, and adjust friends accordingly; this makes plasma compilable with gcc < 4.2
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=826893
2008-07-01 18:56:43 +00:00
Marco Martin
878966df21 immutability() doesn't always return d->immutability()
it cause the clock to be moved also in locked mode


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=826501
2008-06-30 21:05:16 +00:00
Aaron J. Seigo
07613b5b41 SVN_SILENT: ssh.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=826347
2008-06-30 14:39:25 +00:00
Aaron J. Seigo
350bb8c48e AppletScript::shape()
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=824153
2008-06-25 00:33:46 +00:00
Aaron J. Seigo
2fc9fca715 make setConfigurationRequired match setFailedToLaunch by adding a reason string. this allows more than just a mysterious "Configure" button. thanks to Chani for spotting the API irregularity.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=823770
2008-06-24 03:17:38 +00:00
Marco Martin
f359a0f551 removes the modifications of the maximum and minimum size hints made in
flushPendingConstraintsEvents, now it changes only the sizepolicy
and the enforcing is done by returning the proper values in sizeHint.
ConstrainedSquare behaves like square with sizes less than
Liconloader::sizeLarge, otherwise the size is not much controllable and
would be hard to have the right (not blurry) icon sizes when the panel
is not so big

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=823640
2008-06-23 18:49:10 +00:00
Richard Dale
eb2b4126ae * Fix typo in warning message, and make the english scan a bit better
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=823161
2008-06-22 17:29:59 +00:00
Marijn Kruisselbrink
b10a0bcbe3 fix qMax calls on platforms where qreal is not double
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=821243
2008-06-16 22:20:49 +00:00
Aaron J. Seigo
659844e273 use the caching (!), don't crash if we get a 0 widget parameter
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=821186
2008-06-16 19:10:38 +00:00
Marco Martin
b5855d7b20 set a minimum size of 0,0 when an applet is moved in the panel, it still
can happen that it exits from top of the screen but at least it won't
totally destroy the panel layout anymore

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=820917
2008-06-15 19:10:50 +00:00
Davide Bettio
d489ddc1ea BUGFIX: Applet::setConfigurationRequired(bool needsConfig) now destroys also the button when needsConfig is false.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=820338
2008-06-13 22:12:23 +00:00
Aaron J. Seigo
681ddb5cdc prepare ourselves for upstream fixes ;-P
CCBUG:163459

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=818610
2008-06-09 00:03:25 +00:00
Jason Stubbs
21367769e7 Fix systray icon positioning on initial layouts and take svg margins
into account. When the size is too small to allow the svg and a single
icon, disable the svg.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=818155
2008-06-07 22:51:51 +00:00
Aaron J. Seigo
d222baf2f2 emit geom changed signal on size changes as well as a SizeConstraint. one should one or the other but not both, i suppose.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=817989
2008-06-07 10:52:34 +00:00
Aaron J. Seigo
f1ce0ee124 safety in removing panels, aka "work around the inane requirement to first remove items from the scene before deleting them if they are a QGraphicsWidget and have a layout"
BUG:163205

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=816760
2008-06-04 19:04:34 +00:00
Marco Martin
1cb044332c new aspect ratio mode ConstrainedSquare
it makes applets in panel to not
be wider than tall in horizontal panels and not taller than wider in
vertical panels, but can be for instance less wide than tall in
horizontal panels, as opposed to square applets.
it makes poossible to have icons with a reasonable size in very big
panels as vertical panels usually are for instance

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=816757
2008-06-04 18:58:38 +00:00
Aaron J. Seigo
3d45aae7fb more code clean ups
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=816745
2008-06-04 18:20:58 +00:00
Marco Martin
5ddceb467b add Theme::currentThemeHasImage() that checks if the current theme has a
certain svg or if it would fallback to the default theme if loaded.
this makes possible an alternative fallback mechanism between images of
the same theme, used now for the TransparentBackground background hint

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=816734
2008-06-04 17:44:37 +00:00
Chani Armitage
8e9bd0ff09 revert my last commit; this does work after all, sorry.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=815996
2008-06-03 00:24:51 +00:00
Marco Martin
dedc5eac8f deactivate translucent background when the containment becomes the
panel, prevents weird margins

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=815657
2008-06-02 13:27:20 +00:00
Chani Armitage
62a32a22a7 don't try to associate with widgets.
it's not needed for global shortcuts, and it wouldn't work that way for local shortcuts anyways.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=815532
2008-06-02 05:43:05 +00:00
Aaron J. Seigo
b228fb7c49 save shortcut settings
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=815055
2008-06-01 03:03:43 +00:00
Aaron J. Seigo
4878d04cc3 allow setting and getting of global shortcuts
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=815050
2008-06-01 02:53:50 +00:00
Aaron J. Seigo
40e4b3e88e * global keyboard shortcuts for applets
* move the contents of setGeometry to itemChange and resizeEvent for greater reliability

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=815043
2008-06-01 02:13:53 +00:00
Albert Astals Cid
cc3f0c3a90 Don't show Apply button as it doesn't work correctly, acked by Aaron
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=815001
2008-05-31 21:26:49 +00:00
Aaron J. Seigo
6e71a7adc3 use Plasma::PushButton
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=814353
2008-05-30 06:16:37 +00:00
Aaron J. Seigo
1d5979e532 check that we have children; prevents crash. will continue polishing from the fairgrounds later today.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=814045
2008-05-29 08:49:40 +00:00
Marco Martin
5f3a757bae new BackgroundHint:
TranslucentBackground, now used by folder view.
when an applet has TranslucentBackground set, it loads
"widgets/tranlucentbackground" as its own background
when that svg does not exists in theh them it falls back to
"widgets/background" instead of translucentbackground of the default
theme

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=813283
2008-05-27 10:57:09 +00:00
Marco Martin
83a5c1ee6f corrected a bug that led to 100% cpu usage in some cases (endless
resizing loop) had to use maximum and minimum sizes, layouts seems to be
sooo stoopid :(

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=813266
2008-05-27 10:04:52 +00:00
Aaron J. Seigo
05d6ec6401 remove the args Applet injects to hide that impl detail from subclasses
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=812568
2008-05-25 18:38:07 +00:00
Jason Stubbs
f478ae1ca4 geometry() isn't up to date at the time that an ItemPositionHasChanged
notification is received, so don't use it in calculating the correct
position. Also some other small WoC cleanups.

BUG: 161969

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=812493
2008-05-25 15:40:29 +00:00
Marco Martin
8c285fdee5 don't allow to drag applets registered as drag handle when the
containment is locked
BUG: 162584

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=812459
2008-05-25 14:10:47 +00:00
Kevin Ottens
8edc0b399f Remove the "ghost view" from public API. It's completely internal and
used nowhere.

"ervin, fighting feature creep in APIs since 1980."

(BTW, at this rate I'm less and less convinced that it'd be wise to not
have a second round of API review post 4.1)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=812172
2008-05-24 18:33:40 +00:00
Marco Martin
fb80af2962 update applet margins when the theme changes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=812116
2008-05-24 15:58:40 +00:00
Aaron J. Seigo
bea0906806 finish yet another 4.1 feature gap: allow the user to select what to do on drop. the text is a bit lame for icon, it should be "link to file" or something similar but that string doesn't seem to be handy and we're in a string freeze =/ at least it works =)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=811949
2008-05-24 07:47:20 +00:00
Rob Scheepmaker
e9989989c5 Check if containment() actually returns a containment, and if view() actually returns a
view. Should fix a crash reported by chani.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=811785
2008-05-23 17:21:14 +00:00
Thiago Macieira
f6e555fdbc Initialise variable.
Valgrind rationale:
==18955== Conditional jump or move depends on uninitialised value(s)
==18955==    at 0x40E2295: Plasma::Applet::paint(QPainter*, QStyleOptionGraphicsItem const*, QWidget*) (applet.cpp:765)
==18955==    by 0x65259FF: _ZL12_q_paintItemP13QGraphicsItemP8QPainterPK24QStyleOptionGraphicsItemP7QWidgetb (qgraphicsscene.cpp:3766)
==18955==    by 0x6525AE3: QGraphicsScenePrivate::drawItemHelper(QGraphicsItem*, QPainter*, QStyleOptionGraphicsItem const*, QWidget*) (qgraphicsscene.cpp:3790)
==18955==    by 0x652B61E: QGraphicsScene::drawItems(QPainter*, int, QGraphicsItem**, QStyleOptionGraphicsItem const*, QWidget*) (qgraphicsscene.cpp:4015)
==18955==    by 0x6541637: QGraphicsView::drawItems(QPainter*, int, QGraphicsItem**, QStyleOptionGraphicsItem const*) (qgraphicsview.cpp:3294)
==18955==    by 0x6546C08: QGraphicsView::paintEvent(QPaintEvent*) (qgraphicsview.cpp:3042)
==18955==    by 0x5EDD149: QWidget::event(QEvent*) (qwidget.cpp:7082)
==18955==    by 0x62D12B1: QFrame::event(QEvent*) (qframe.cpp:627)
==18955==    by 0x63804C8: QAbstractScrollArea::viewportEvent(QEvent*) (qabstractscrollarea.cpp:914)
==18955==    by 0x6544410: QGraphicsView::viewportEvent(QEvent*) (qgraphicsview.cpp:2299)
==18955==    by 0x6383611: QAbstractScrollAreaPrivate::viewportEvent(QEvent*) (qabstractscrollarea_p.h:72)
==18955==    by 0x638363F: QAbstractScrollAreaFilter::eventFilter(QObject*, QEvent*) (qabstractscrollarea_p.h:83)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=811619
2008-05-23 14:41:55 +00:00
Aaron J. Seigo
1ff027988b be more lenient with the requirement for a service
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=811335
2008-05-22 18:43:34 +00:00
Aaron J. Seigo
26f7e83a53 give proper control over saving/restoring to the containment
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=811211
2008-05-22 15:53:48 +00:00
Marco Martin
73c4847a75 remove an unused variable
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=811184
2008-05-22 14:34:30 +00:00
Chani Armitage
30dd547919 SVN_SILENT: really minor style cleanup.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=810602
2008-05-21 04:37:10 +00:00
Chani Armitage
ccde7ded20 replace Panel::remove() with Containment::destroy()
now I can remove some of the ten desktop containments I accumulated :)
oh, and the code is cleaner too, yay!

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=810129
2008-05-20 04:02:36 +00:00
Marco Martin
812d870086 enforce square aspect ratio when aspectRatioMode() is square of applets
in the panel

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=809947
2008-05-19 19:34:13 +00:00
Alexis Ménard
5f6b242127 This magic line seems to fix our crash with embeeded widget
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=809939
2008-05-19 19:19:47 +00:00
Rob Scheepmaker
8b20aab3fb Couple of improvements to applet drag&drop:
* Only move applet to toplevel window when overlapping other plasma views, ignoring other windows and such.
* Drag & drop now works reasonably well when using multiple desktop containments ('activities'), both when
  zoomed in as when zoomed out. Only a couple of issues remaining.
* Containment's addApplet function now cleans up the pointer to the applethandle in the preview containment,
  Avoiding some nasty crashes when moving applets between containments.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=809841
2008-05-19 16:20:27 +00:00
Aaron J. Seigo
d242cde2cf use Plasma::Label
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=809570
2008-05-19 05:25:16 +00:00
Aaron J. Seigo
f561b7f861 set the text color for the label.
another bug in QGraphicsProxyWidget? labels appear as innactive until you click on them!

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=808983
2008-05-18 01:26:29 +00:00
Chani Armitage
1d8eb91e89 keyboard shortcuts.
the defaults are kinda lame right now, but I'm planning to do a lot more with this.
applet focus and the shorcut hooks work properly, however.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=808610
2008-05-17 03:39:24 +00:00
Dan Meltzer
26dc704a5a remove the FOCUS! FOCUS! FOCUS! debugspam
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=808417
2008-05-16 15:03:39 +00:00
Rob Scheepmaker
9f6d033578 Couple of improvements to applet drag & drop:
* when dropping on another containment, the center of the applet is used to determine where 
to drop the applet, instead of the position of the mousepointer.
* movement now works correctly if multiple drag&drops are performed while not removing the 
mouse away from the applet handle.
* now works correctly on rotated applets.
* various code style fixes.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=808379
2008-05-16 13:28:33 +00:00
Aaron J. Seigo
caa2fdc688 isValid
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=807410
2008-05-13 19:42:17 +00:00
Alexis Ménard
ff9832433d fix restaure of applet geometry
aaron can you check?

CCMAIL:aseigo@kde.org


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=807088
2008-05-12 21:49:55 +00:00
Rob Scheepmaker
df22556806 Improved drag&drop: now the toplevel window appears correctly when zoomed out.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=806544
2008-05-11 17:21:55 +00:00
Rob Scheepmaker
1172ef79e9 Start of improved applet drag & drop. What works now is:
* dragging an applet creates a top level window so the applet won't appear behind the panel 
when dragging, as is the case now.
* dragging leaves a semi transparent version of the applet at the original location, so it's
clear to the user where the applet came from and where it will go when the drag is cancelled.

There are still some open issues, I'm working on those...


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=806484
2008-05-11 13:56:35 +00:00
Chani Armitage
61ae3df3fc *Applet::destroy() now handles everything needed for removing an applet prettily and safely.
*removed Containment::Private::destroyApplet in favour of just calling Applet::destroy() directly.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=805666
2008-05-09 04:43:21 +00:00
Aaron J. Seigo
5de8aff8ce don't need this timer to keep running indefinitely
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=805650
2008-05-09 02:35:29 +00:00
Aaron J. Seigo
1b437f7954 * make the layout removal general to all layout types, not just linear layouts
* call the ScriptEngine's config method if we fail on the automatic generation
* use an internal timer id to trigger flush updated constraints calls so that if it gets called manually we prevent a future unecessary signal from happening

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=805631
2008-05-08 23:30:29 +00:00
Alexis Ménard
987ca211c7 put the remove of the layout if the applet is removed in destroy function, then if we call
it from other place we will be sure the applet will be remove from the layout

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=805590
2008-05-08 20:26:56 +00:00
Richard Dale
61d69ba939 * Oops, the scripting method 'showConfigurationInterface()' was correctly named after all, so
revert the commit to change it

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=805532
2008-05-08 17:46:28 +00:00
Richard Dale
580df25f72 * Rename the applet scripting method showConfigurationInterface() as createConfigurationInterface()
to match the name of the equivalent C++ api method

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=805387
2008-05-08 12:12:31 +00:00
Chani Armitage
2a6a5fa6db :%s/NotImmutable/Mutable/g
because double negatives hurt my brain.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=805296
2008-05-08 04:26:52 +00:00
Marco Martin
e8ebd60879 SVN_SILENT: make it compile with DYNAMIC_SHADOWS on
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=803838
2008-05-04 10:17:03 +00:00
Sebastian Kügler
f3cf6a2167 Make the digiclock paint into contentsRect, not into geometry()
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=803608
2008-05-03 13:21:16 +00:00
Aaron J. Seigo
a329771ad5 symmetry
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=803323
2008-05-02 15:12:52 +00:00
Fredrik Höglund
4b05a1b05f Subtract the margins from the contents rect passed to paintInterface().
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=803098
2008-05-01 22:39:18 +00:00
Marco Martin
703b6c2ffa * adds a new convenience method getMargins(&qreal,&qreal,&qreal,&qreal)
to fetch all the four margins at a time
* now applet uses it

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802928
2008-05-01 09:49:30 +00:00
Aaron J. Seigo
207968b217 resetConfigurationObject()->pimpl
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802892
2008-05-01 03:24:20 +00:00
Aaron J. Seigo
43e6bac986 Plasma::AspectRatioMode, just like Qt::AspectRatioMode. the setter/getter in Applet even used Mode.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802866
2008-04-30 22:13:27 +00:00
Aaron J. Seigo
b81b6ad8de split out the private applet classes into a _p.h
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802860
2008-04-30 21:50:43 +00:00
Davide Bettio
0916889c58 API REVIEW:
* watchForMouseMove() -> registerAsDragHandle() / unregisterDragHandle()
* Added isRegisteredAsDragHandle() (I'm not really sure If it's a good idea to add this method).

ping me if you find better names for registerAsDragHandle() / unregisterDragHandle().

CCMAIL: panel-devel@kde.org

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802774
2008-04-30 15:04:49 +00:00
Alexis Ménard
1eee210264 fix default layout and label when a label fail to load
FIXME : get the correct color for the label with the theme

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802598
2008-04-29 22:57:08 +00:00
Marco Martin
43066e49ce API review:
remainSquare(), aspectRatioMode() and their setters are merged in
aspectRatioMode() + setAspectRatioMode(Plasma::AspectRatio)
Plasma::AspectRatio has IgnoreAspectRatio, KeepAspectRatio and Square

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802561
2008-04-29 20:31:18 +00:00
Aaron J. Seigo
9165b11235 at tokamak i said i regretted using the term "Language" to describe what is really "API". i meant it.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802486
2008-04-29 16:24:14 +00:00
Aaron J. Seigo
daf3d7a4a2 API REVIEW: needsConfiguring() => configurationRequired
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802288
2008-04-29 02:34:21 +00:00
Aaron J. Seigo
0402391d17 we don't need our own shape() here anymore; it really hardly worked at the best of times and was we move to window decos it'll become irrelevant anyhow
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802287
2008-04-29 02:30:23 +00:00
Aaron J. Seigo
1847d60a1d API REVIEW: launchActivated -> releaseVisualFocus; more generic and a bit more obvious as to its purpose
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802286
2008-04-29 02:28:35 +00:00
Aaron J. Seigo
2dd5891029 with some intriguing grotesqueness internal to the library, we can simplify the API and remove location/formFactor from Containment and just use the ones in Applet; externally this is probably rather safer
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802277
2008-04-29 00:49:10 +00:00
Aaron J. Seigo
fa166c72ef SVN_SILENT: small ws fix that was laying around on disk here
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802253
2008-04-28 22:56:02 +00:00
Marco Martin
f06d25a00c API reviews:
globalName(), instanceName()->pimpl

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802135
2008-04-28 16:22:01 +00:00
Marco Martin
9bee311b96 API reviews:
ThemeChanged()->Q_PRIVATE_SLOT

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802130
2008-04-28 15:55:13 +00:00
Marco Martin
48be92bdab API reviews:
checkImmutability()->Q_PRIVATE_SLOT
added a q-pointer into Applet needed for this and themeChanged the other
Q_PRIVATE_SLOT that will be added

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802124
2008-04-28 15:41:18 +00:00
Marco Martin
dfa4623a68 don't try to set StandardBackground if FormFactor is Horizontal or
Vertical
this fixes the panel layout on the first load when there is no
plasma-appletsrc

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802089
2008-04-28 14:18:19 +00:00
Aaron J. Seigo
85f7ded2b4 SVN_SILENT: get rid of some dead code; with all the api changing happening, no point in keeping stuff around that isn't compiled
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801808
2008-04-27 20:09:20 +00:00
Aaron J. Seigo
df1ba079e8 go back is isContainment. ActAs is just ugly ugly. i don't think anyone really gets confused over isContainment (e.g. confusing it with IsA ;)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801792
2008-04-27 19:05:06 +00:00
Davide Bettio
1474ed7cbc API REVIEW: color() --> die
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801697
2008-04-27 13:37:53 +00:00
Davide Bettio
7672b1620c constraintsUpdated() -> constraintsEvent()
Probably it should be protected and we need also updateConstraints() like in applet.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801661
2008-04-27 11:23:09 +00:00
Davide Bettio
8cd95e4ae7 API REVIEW: updated containment to the new API (constraintsUpdated() -> constraintsEvent() + protected)
CCMAIL: aseigo@kde.org

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801659
2008-04-27 11:13:43 +00:00
Davide Bettio
ff16201431 API REVIEW: constraintsUpdated() -> constraintsEvent()
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801656
2008-04-27 11:04:43 +00:00
Davide Bettio
5bc429daa9 API REVIEW: topLeft() -> dies
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801647
2008-04-27 10:26:42 +00:00
Davide Bettio
41d2aa43e4 watchForFocus() dies
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801641
2008-04-27 09:53:49 +00:00
Davide Bettio
624f8d0fb3 API REVIEW: needsFocus()->dies
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801640
2008-04-27 09:29:25 +00:00
Davide Bettio
55881aa054 API REVIEW: requestFocus() dies
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801637
2008-04-27 09:18:44 +00:00
Marco Martin
694c822bb0 API reviews:
flushUpdatedConstraints()->flushPendingCostraintEvents()

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801443
2008-04-26 17:13:59 +00:00
Albert Astals Cid
4068f45cf9 const & in foreach
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801430
2008-04-26 16:19:00 +00:00
Marco Martin
6d8a1752a7 API review:
isContainment(), setIsContainment() -> actAsContainment(),
setActAsContainment()
 set is protected

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801425
2008-04-26 15:52:48 +00:00
Marco Martin
26732125cc removed unused Private::applyBackgroundHints
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801416
2008-04-26 15:27:17 +00:00
Marco Martin
0c283924be API reviews:
killed drawStandardBackground() and shadowShown()
now the two properties are merged in backgroundHints() and
setBackgroundHints() using the combination of BackgroundHints flags

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801282
2008-04-26 09:13:57 +00:00
Alexis Ménard
13f4fae5f3 +contentSizeHint -> died
+contextActions -> contextualActions 

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801150
2008-04-25 19:55:24 +00:00
Aaron J. Seigo
a915bf7e6b * move containmentConstraintsUpdated to the pimpl
* move Containment::Private to it's own header (eventually subclass Applet::private?)
* have applet use Containment::Private methods to hide gory internal details ;)
* Toolbox -> ToolBox

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801127
2008-04-25 18:44:09 +00:00
Aaron J. Seigo
a3ad7dca00 launch activation sanity: added it back to Corona since it is PUI relevant (and not just desktop specific), move the signal to Applet and chain them so that Applet -> Containment -> Corona
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801102
2008-04-25 17:21:24 +00:00
Aaron J. Seigo
de3ab77f26 paint -> paintPanel. allows one to use the Svg api directly when you have a PanelSvg class and falls into line with the resize->resizePanel change as well.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801077
2008-04-25 16:18:51 +00:00
Aaron J. Seigo
9425318d08 * don't emit updateGeometry twice
* fix coding style

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800757
2008-04-24 19:48:04 +00:00
Marco Martin
7d057a2bc2 API review:
isImmutable(), setIsImmutable() and isKioskImmutable() of applet and
corona are merged in one property so they becamed
immutability() and setImmutability() using the new type
ImmutabilityType defined in plasma.h as:
NotImmutable: normal behaviour
UserImmutable: the user locked the desktop, can unlock it
SystemImmutable: the system locked the desktop and the user can't unlock
it

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800724
2008-04-24 18:24:11 +00:00
Aaron J. Seigo
cb896a4ed2 setIsContainment wasn't virtual anyways, so don't reimp in containment; do it all in applet
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800682
2008-04-24 16:29:23 +00:00
Aaron J. Seigo
8e8d6ea060 remove desktop from the options; that can be discovered simply by having the View, and it's a desktopy concept anyways so doesn't belong in the lib
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800662
2008-04-24 16:01:09 +00:00
Marco Martin
06f5b7bc72 API review:
remove IsKioskImmutable() from the public api

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800623
2008-04-24 14:32:47 +00:00
Aaron J. Seigo
d28a4c277a consolidate color and font methods into one method for each with a role enumeration
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800334
2008-04-23 22:36:00 +00:00
Aaron J. Seigo
c087260537 use resizePanel instead of resize
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800287
2008-04-23 20:42:10 +00:00
Marco Martin
710be86ffd pi changes:
raise() is now a slot, a new lower() slot was added

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800280
2008-04-23 20:27:44 +00:00
Chani Armitage
afc9290365 dataenginemanager api review: (un)load()->(un)loadEngine()
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800275
2008-04-23 20:04:53 +00:00
Chani Armitage
931d7b0d6c dataenginemanager api review: get()->engine()
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800256
2008-04-23 19:05:47 +00:00
Anne-Marie Mahfouf
970e72245c API review
more SIGNAL changed() -> themeChanged()
thanks Alexis for your vigilance!

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800244
2008-04-23 18:35:03 +00:00
Marco Martin
d0ba4e77ec Api change:
Plasma::Svg(imagePath, parent) -> Plasma::Svg(parent)  and
Plasma::PanelSvg(imagePath, parent) -> Plasma::PanelSvg(parent)
updated as needed every class that was using Svg or PanelSvg

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800143
2008-04-23 13:07:41 +00:00
Anne-Marie Mahfouf
36bc2c4e97 Plasma::Theme::self() -> Plasma::Theme::defaultTheme() as planned during the sprint
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=799919
2008-04-22 21:10:14 +00:00
Rob Scheepmaker
f27fb3fc1b Applied some of the API changes to Plasma::View:
- renamed drawWallpaper
- made config() protected
- moved updateSceneRect() and initGraphicsView to pimpl


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=798623
2008-04-18 17:40:57 +00:00
Marco Martin
1e77632048 api changes:
init() and setFailedToLaunch are now protected
containment and corona are friends of applet

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=798585
2008-04-18 16:05:20 +00:00
Marco Martin
bfcbfd2662 restoring the minimum size alteration in setDrawStandardBackground()
but now when standard background is disabled the minimum size shrinks.
now some applets are starting to look good on the desktop, for instance
tasks, but not pager or clock

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=798173
2008-04-17 17:49:33 +00:00
Marco Martin
8c41b89090 make the applets to behave well when resizing the panel
as a bonus, applets with standard background appears a little bit less
wrong (but still wrong) on the desktop

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=798154
2008-04-17 17:09:13 +00:00
Dmitry Suzdalev
c2b28413dd /me done another round of simple stuff renaming :)
(corresponding wiki items <s>-ed out)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=797824
2008-04-16 21:15:38 +00:00
Marco Martin
6024f48475 Api changes to PanelSvg finished:
-now it's a Plasma::Svg
-DrawTopBorder DrawLeftBorder etc -> TopBorder LeftBorder etc
-contentAtOrigin -> out of flags
-setFile() -> setImagePath()
-setBorderFlags() -> setEnabledBorders()
-added resize(qreal,qreal)
-setPrefix() -> setElementsPrefix()
-updateSizes() -> Q_PRIVATE_SLOT
-pos() setPos() removed, now pos is a parameter of paint
-setLocation() -> setElementPrefix(enum)
-location() removed


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=797736
2008-04-16 20:17:36 +00:00
Marco Martin
d07a60c581 Rename SvnPanel into PanelSvg and update accordingly who is using that,
as discussed in api reviews

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=797663
2008-04-16 17:23:58 +00:00
Dan Meltzer
5dec314c85 More tabs that have been eradicated from plasma.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=797218
2008-04-15 02:47:16 +00:00
Dan Meltzer
6a13421595 begone you wretched tabs.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=797216
2008-04-15 02:38:48 +00:00
Aaron J. Seigo
4381fdfafa they beginning of keyboard focus possibilities; hardly works at the moment, but this is the groundwork
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=797091
2008-04-14 21:50:41 +00:00
Alexis Ménard
d5753f1fba welcome back to the background that will be a little modified soon with window frame (that
will include the applet handle No More Seperate Item ;) ) + delete in layouts in 
containments when removing applets

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=797066
2008-04-14 20:37:54 +00:00
Alexis Ménard
d5dd4e16ac Ammmaaziiing grace!!
Widget class is dead..

still in the repo for tooltip code

CCMAIL : aseigo@kde.org


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=796973
2008-04-14 16:02:23 +00:00
Alexis Ménard
d91b8a94d4 remove useless function
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=796939
2008-04-14 15:15:26 +00:00
Alexis Ménard
1b7a9a14e0 +bye bye paintwidget method
+remove tooltip that will be replaced by the tooltip manager
+port some used stuff in applet class

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=796924
2008-04-14 14:50:02 +00:00
Alexis Ménard
1b15d951a9 API clean : bye bye opacity, wich is bas implemented in all cases
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=796900
2008-04-14 14:09:13 +00:00
Sebastian Kügler
b32216ac24 Take border sizes into account when drawing applets with background.
It's still busted right now though, since geometry() returns an
empty rect (dunno why ... )

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=796898
2008-04-14 14:04:00 +00:00
Sebastian Kügler
940bb176b6 whitespace cleanups
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=796860
2008-04-14 12:42:50 +00:00
Alexis Ménard
548d250d59 say hello again to the panel, and fix some performance issue
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=796806
2008-04-14 10:48:32 +00:00
Laurent Montel
f8ddf5cfc6 Fix include
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=796796
2008-04-14 10:33:37 +00:00
Chani Armitage
d3cc6149a8 introduce the concept of transient applets, or applets that are still in existence, but which should not end up written out to disk, e.g. when they are marked for deletion.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=796768
2008-04-14 09:42:57 +00:00
Alexis Ménard
aa3c3eccce no more old layouts in libplasma, new stuff on API can start
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=796624
2008-04-13 22:01:18 +00:00
Alexis Ménard
88b25b7468 solve a performance issue : a crazy number of repaint
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=796375
2008-04-13 13:38:21 +00:00
Alexis Ménard
4467261c95 Merge woc branch to trunk, say good bye to old plasma, there is a lot of stuff to port
applets, 
please update to another revision to use the version that works

green flag from aaron


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=796368
2008-04-13 13:23:39 +00:00
Davide Bettio
8e45bf56db Added overlay support. To use it add to your theme overlay.svg.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=796088
2008-04-12 14:07:44 +00:00
Andre Duffeck
f6a2a14a2d group _is_ used here
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=794715
2008-04-08 12:31:08 +00:00
Aaron J. Seigo
0cee130c4e add the View to the Containment::StyleOption, and some apidox for the members of the option
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=794325
2008-04-07 03:27:10 +00:00
Andre Duffeck
ef0c0375c3 Add an opacity attribute. GUI portion coming later
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=793581
2008-04-04 13:16:55 +00:00
Aaron J. Seigo
e781f69687 make PackageStructure loading actually work and abstract that all away into a cute little method elsewhere
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=793416
2008-04-03 22:45:09 +00:00
Aaron J. Seigo
2558d5c305 introduce createConfigurationInterface, it's now the prefered mechanism. showConfigurationInterface remains for the convenience of Applet itself, and remains virtual so as not to break existing applets.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=792927
2008-04-02 15:37:17 +00:00
Aaron J. Seigo
0ae288d250 * set zValue so it floats above all other children
* don't change the default background painting setting, as we now rely on the applet to be set up properly on its own

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=792405
2008-04-01 00:20:28 +00:00
Aaron J. Seigo
1833641e3b make setNeedsConfiguring behave nicely
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=792371
2008-03-31 22:06:35 +00:00
Aaron J. Seigo
213fa7106d copy and paste error; thanks to Kent Hansen for spotting it
CCMAIL:khansen@trolltech.com

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=791158
2008-03-28 15:15:44 +00:00
Aaron J. Seigo
ac473c1b7e we need to specifically call update in case the geometry doesn't change, and therefore the cached painting isn't invalidated.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=786447
2008-03-17 00:26:35 +00:00
Aaron J. Seigo
f118a132f1 this param is used
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=784841
2008-03-12 15:22:08 +00:00
Sebastian Sauer
71c660cb29 *uarg* ... seems the additional ! slipped in between without any logical reason. SVN_SILENT
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=782731
2008-03-05 21:19:48 +00:00
Sebastian Sauer
1420d4ba60 Enables ScriptEngine's like Apple's Dashboard Widgets or SuperKaramba's to implement containments too. Right, that means you are now able to write your own Panel or even Desktop using a scripting language :)
FEATURE

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=782729
2008-03-05 21:12:33 +00:00
Aaron J. Seigo
56eda6927e LocationConstraint isn't about pos(), but Plasma::Location
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=782307
2008-03-04 20:24:42 +00:00
Aaron J. Seigo
3fd5752be8 some minor fixes to immutability checking and comments
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=781771
2008-03-03 18:15:49 +00:00
Aaron J. Seigo
6fc81a860f take corona immutability into consideration as well
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=781758
2008-03-03 18:03:27 +00:00
Sebastian Sauer
ae6880bc15 redirect also the constraintsUpdated(), contextActions() and showConfigurationInterface() methods to the scriptengine.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=781447
2008-03-02 21:36:59 +00:00
Aaron J. Seigo
3c4a946af7 and don't access the view unless we actually have one
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=781390
2008-03-02 19:32:37 +00:00
Aaron J. Seigo
7de5776f8e support non-Plasma::View's as well
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=781389
2008-03-02 19:27:08 +00:00
Dan Meltzer
7f624f85d9 Revert one large git mess
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=780657
2008-02-29 17:50:57 +00:00
Dan Meltzer
64f0ce7739 Fix some problems aseigo pointed out in the code.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=780655
2008-02-29 17:43:35 +00:00
Dan Meltzer
a081559257 Commit initial progress of work to port to qt4.4
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=780654
2008-02-29 17:43:31 +00:00
Aaron J. Seigo
427c61de9b * check the write attribute in the service for the Package type
* set the path of the loaded PackageStructure
* more verbose failure messages

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=780461
2008-02-29 08:11:45 +00:00
Aaron J. Seigo
bed3c1d927 * share the package structures by using a single shared ptr
* use the script's contentSizeHint if we are a script

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=779417
2008-02-26 04:08:51 +00:00
Aaron J. Seigo
2f78de3142 * make it possible for applets to define what package structure they use
* update to api tweakages

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=779404
2008-02-26 01:48:52 +00:00
Aaron J. Seigo
2b68bb49ee This lets the View have a desktop set to it and when drawing a Containment we pass in the effective desktop # being currently painted. The Containment is free to ignore this information, or it can try and cast the passed in options to a Containment::StyleOption to retrieve this information. This should be used for any per-desktop painting that happens (e.g. separate background per desktop) and opens the way to having View-per-Desktop for better composite manager support (think: desktop grid or cube where more than one desktop is simultaneously visible)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=778239
2008-02-22 23:41:44 +00:00
Marco Martin
b1a362b67f transplant of sceneEventFilter and mouseMoveEvent from the icon applet to the applet class, this will cause a lot less duplication.
if you want to make a widget draggable around just call the new function
  void watchForMouseMove(QGraphicsItem * watched, bool watch)

also, some style fixes.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=777705
2008-02-21 10:26:40 +00:00
Aaron J. Seigo
2aa51ef338 well that was an easy fix: make scripts work in apps !plasma, e.g. plasmoidviewer
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=776978
2008-02-19 08:31:49 +00:00
Aaron J. Seigo
777b8083f8 * moves the idea of margins up to LayoutItem, allowing any LayoutItem to have a margin
* moves the idea of the size of the item up to LayoutItem, as both Widget and Layout implemented it separately
* provides a way in LayoutItem to adjust a rect within an item to its margins (that is what LayoutItem::topLeft() is there for)
* fix several bugs, both painting and sizing, in LineEdit
* Applet sets margins now based on the existence of setDrawBackground


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=776380
2008-02-17 23:02:46 +00:00
Aaron J. Seigo
cf89bd58d1 make it possible to get at the package structures using Theme::packageStructure() and Applet::packageStructure() without having to export the package definitions from the library itself.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=775272
2008-02-15 10:35:00 +00:00
Aaron J. Seigo
1f5e98edec * allow restoring from applet itself (something i've wanted to to do for a while, have it all in corona isn't a good idea)
* restore lock status
* save/restore zorder
* allow "raising" and applet (increase zorder above all others)
* some layout fixes for next monday's big layout fix patch

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=774337
2008-02-13 01:52:02 +00:00
Andre Duffeck
70b12916b2 react to changes of Plasma::Theme
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=773942
2008-02-12 07:33:07 +00:00
Aaron J. Seigo
a438b53373 die, setSize, die, and all the problems you represent. silly duplicated, not-like-qwidget API anyways. ;)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=773505
2008-02-11 08:24:09 +00:00
Aaron J. Seigo
e83f329de0 the proper fix for stupid compilers *sigh* setSize(int, int) isn't virtual in Widget, but that doesn't matter in this case at all.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=773493
2008-02-11 07:56:53 +00:00
Aaron J. Seigo
eed0410c56 * make setSize virtual as well since it sets d->size internally, so Applet needs to intercept that call
* remove some dead code in widgets.cpp

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=773475
2008-02-11 06:11:13 +00:00
Chani Armitage
75c4518154 SVN_SILENT:
less noise.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=772576
2008-02-09 03:41:57 +00:00
Chani Armitage
613d5ef850 it's not safe to delete the layout directly
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=771845
2008-02-07 01:58:48 +00:00
Aaron J. Seigo
7f3aea19ff move MarginEdge to the Plasma namespace to avoid coupling to the layout stuff in innapropriate places
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=771704
2008-02-06 19:12:21 +00:00
Aaron J. Seigo
070781d480 build svpanel into the lib, make applet use it
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=771693
2008-02-06 18:50:25 +00:00
Aaron J. Seigo
92304b6d2c * fix contentSizeHint for square applets when the maximum size is smaller than the resulting size of the widget (resulting in non-square applets)
* move the (broken) size constraining commit to flushUpdatedConstraints, not why it is broken and add a comment into constraintsUpdated() noting why code should never be added to that method directly (and what to do instead)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=770949
2008-02-04 20:09:45 +00:00
Marco Martin
dfb3854a10 Sets on Applet::constraintsUpdated() the maximum content width for horizontal panels and the maximum content height for vertical panels as IconSize(KIconLoader::Panel)
this makes vertical larger panels actually usable. 

Some notes:
-it works only for applets that aren't forced to square 
-in horizontal panels only for applets that don't have expandingDirections()=Qt::Horizontal  
-in vertical panels only for applets that don't have expandingDirections()=Qt::Vertical

On other news the kickoff applets are modified to use this new feature

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=770423
2008-02-03 18:21:01 +00:00
Riccardo Iaconelli
c99bda9dde Remove useless variable
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=766292
2008-01-25 14:53:12 +00:00
Aaron J. Seigo
67aae7bf6e don't produce errors if our content is empty
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=766098
2008-01-25 08:31:32 +00:00
Aaron J. Seigo
f2674c9a51 * setRemainSquare(bool) to allow applets to say "yes, keep my width == height, thank you"
* use AppletScript

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=765975
2008-01-25 00:08:25 +00:00
Aaron J. Seigo
467eadedda api fixes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=762849
2008-01-18 00:09:33 +00:00
Aaron J. Seigo
16dab9574f * move the header bits around a bit for a more logical ordering (e.g. all static methods together, all reimp'd methods that are really imp details together at the bottom, etc)
* implement a generic shape() method. this is experimental, so will be interesting to see how it goes. it does show we need a good shape hint in the applet background svg =)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=760187
2008-01-12 06:02:29 +00:00
Aaron J. Seigo
f02a65c95e make globalConfig() work properly even for containments
BUG:155454

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=760003
2008-01-11 18:21:53 +00:00
Aaron J. Seigo
311f2380ce per applet aspect ratio guidance with setAspectRatioMode
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=759497
2008-01-10 19:02:05 +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
32c6c94c76 some kiosk/immutability logic fixes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=758174
2008-01-07 04:00:39 +00:00
Laurent Montel
ed93750db3 Make text selectable just by mouse (Qt::TextSelectableByMouse) in
fealure applet text (otherwise we was able to change text...)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=757582
2008-01-05 13:00:10 +00:00
Aaron J. Seigo
11d08f34b3 default implementation for saveState so that saving to random files works even if nobody implements saveState
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=755693
2008-01-02 02:05:47 +00:00
Jason Stubbs
c3c755f68b Setting the minimum size based on the border size is no good because the
borders can later be removed without the minimum size being updated causing a
minimum size that's way too big

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=752322
2007-12-24 07:10:56 +00:00
Jason Stubbs
5e465d9f89 Give applets a default minimum content size of 16x16. This shouldn't be too
big for the panel and can still be overridden by applets.

BUG: 154565

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=752292
2007-12-24 03:53:17 +00:00
Jason Stubbs
55437fafb6 Notify applets when their LocationConstraint has changed. Also, don't bother
emitting geometryChanged() and doing an update() if the geometry hasn't
actually changed.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=751543
2007-12-22 07:35:42 +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
f0637a2e9a restore the painter
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=750290
2007-12-19 02:52:41 +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
Tobias Koenig
92e6a35a80 Reset the d->failureText to 0 at that point, as the qDeleteAll below
will first delete the d->failureText object and than trigger a relayout
which will access the invalid d->failureText in Applet::contentSize().

=> No crash anymore

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=749708
2007-12-17 17:21:34 +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
Aaron J. Seigo
706585b270 avoid negative sizes in absurd situations
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=746404
2007-12-08 21:40:59 +00:00
Sebastian Trueg
2a34006fcd Do not crash if the scene is not a Corona.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=746210
2007-12-08 09:16:06 +00:00
Aaron J. Seigo
059505f639 save/restore lock status
CCMAIL:tokoe@kde.org

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=745809
2007-12-07 05:02:54 +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
Jason Stubbs
4627a3770c Call the immediate parent's version rather than skipping to QGraphicsItem's
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=743925
2007-12-02 11:30:48 +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
1c91abba17 export the class, clean up the api
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=742874
2007-11-29 04:30:48 +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
f339cb9dcb config().deleteGroup() doesn't removethe applet, just the configuration for the applet. we need to remove the applet's main group to properly delete an apple from the config.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=741916
2007-11-26 18:26:32 +00:00
Sebastian Trueg
05ae38296c Do not run into an endless loop in case we have no containment
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=741866
2007-11-26 16:25:12 +00:00
Aaron J. Seigo
f54dcc2cc1 future proof the ConfigXml API a bit by pretending we actually know what to do with a KConfigGroup
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=741174
2007-11-25 00:14:27 +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
e614df56d0 * consolidate geometry() and setGeometry() from the layouts into Layout
* introduce relayout() which does only that
* place guards around relayout() calls in Layout class to prevent recursion

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738923
2007-11-19 23:45:56 +00:00
Alexis Ménard
ff0b3da511 Fix include for layout
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738921
2007-11-19 23:40:03 +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
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
523c2971c6 * save the transform to the config file
* clean up some dead code
* try and get rid of a few of the jaggies that happen when rotating

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738594
2007-11-19 09:21:11 +00:00
Aaron J. Seigo
67b7161912 * call containmentConstraintsChanged appropriately
* don't use another bool to maintain the state of stretched borders

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738504
2007-11-19 01:21:41 +00:00
Aaron J. Seigo
bcb4268c19 only paint the part of the background that is needed; avoid creating lots of variables when we're using the cached version
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738450
2007-11-18 22:46:46 +00:00
Aaron J. Seigo
5b4dbbe303 we do actually still want context menus on applets, even with the hover thing.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738430
2007-11-18 22:02:01 +00:00
Aaron J. Seigo
c28155b585 when we change our border painting status, we need to update the geometry, not just prepare a movement change; the former also re-jigs our layouts
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738039
2007-11-17 19:03:17 +00:00
Andre Duffeck
7a333aee4c Try harder to find the containment
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=737050
2007-11-15 11:01:17 +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
Kevin Ottens
bf77e378a6 Add support for applet handles in plasma containments.
Still a couple of issues to flesh out, but that's usable already.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=735845
2007-11-12 19:27:21 +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
834ece1ae6 * only reset the shadow on form factor constraint changes
* auto handle the whole draw standard background thing. it now does the right thing for panels, containments and applets for 99% of the cases

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=733970
2007-11-07 19:20:33 +00:00
Aaron J. Seigo
cb63cd59a6 use the color scheme. (and boy, is that KStatefulBrush api .. verbose)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=732536
2007-11-04 06:58:20 +00:00
Aaron J. Seigo
af2752eb1c * make the error presentation look nicer. hopefully now frerich won't feel so compelled to pop up a dialog box.
* invalidate the managing layout on geometry changes, which is what i expected it to do in the first place. calling setGeometry and then updateGeometry is just damaged

CCMAIL:raabe@kde.org

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=732526
2007-11-04 05:31:18 +00:00
Aaron J. Seigo
b041f44c12 yeah, actually get the layout right. man layouts suck.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=732195
2007-11-03 02:52:45 +00:00
Aaron J. Seigo
d71b8d5a5a some useful debug output, which helped me realize just how badly we need PanelLayout ... and perhaps just how broken BoxLayout is? hm.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=730535
2007-10-29 05:01:35 +00:00
Aaron J. Seigo
84881131e6 now that we can store QRectF again.... and now to fix bugs on loading. =/
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=730531
2007-10-29 04:39:23 +00:00
Aaron J. Seigo
b279428cad kconfig no longer supports QRectF.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=730520
2007-10-29 04:08:58 +00:00
Aaron J. Seigo
7afcb9ffca slightly less debug output ... plasma is a bit noisy atm.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=729443
2007-10-26 01:06:03 +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
Aaron J. Seigo
96712a50a8 --warnings; --deprecations;
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=728720
2007-10-24 02:04:02 +00:00
Aaron J. Seigo
c810963a94 minor housecleaning bits: double click in applet dialog works now; put back lines for what the center background painting *shoudl* be were it not for QSvgRenderer being buggy
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=728613
2007-10-23 20:14:29 +00:00
Aaron J. Seigo
22de66fdc0 * fix order of constraints init so that geometry is done before screen affinity
* only adjust the size of the containment to the screen size if it is a DesktopContainMent

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=724225
2007-10-11 19:16:01 +00:00
Chani Armitage
5e275a216c SVN_SILENT:
couple extra debug statements

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=724056
2007-10-11 08:36:22 +00:00
Keith Neuse
a6d04f9ea4 A hack is submitted in order to fix the transparent area between the black center and border of an applet.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=722766
2007-10-08 03:41:56 +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
Rafael Fernández López
0f7e4e52ab Code adaptation because of changes on libraries related to revision 719630
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=719642
2007-10-01 15:09:41 +00:00
Aaron J. Seigo
5935c799dc fix background center painting; the svg painting is doing something funky still (i'm getting a 1-2px blue border) but the coordinates in paintBackground are all correct at this point (verified with a call to fillRect). but i'm tired and need to go to bed now.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=719410
2007-10-01 05:50:57 +00:00
Aaron J. Seigo
c545f4f86c only paint the standard background we have right now for Planar FormFactors
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=719255
2007-09-30 18:07:44 +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
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
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
Thomas Georgiou
2bd7c794ba Paint applets when zoomed out.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=705864
2007-08-28 18:49:44 +00:00
Jarosław Staniek
79323a4399 GCC 3.3.5: fixed error before '.'
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=704155
2007-08-24 07:14:24 +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
c68077c56e use the standard MimeTypes key, not our own messed up variant of it
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696780
2007-08-05 21:52:35 +00:00
Aaron J. Seigo
5d05c8ac7e more comparison fixes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696656
2007-08-05 14:24:24 +00:00