Commit Graph

304 Commits

Author SHA1 Message Date
Robert Knight
04375c4b09 Replace 'INFINITY' with more correct numeric_limits<qreal>::infinity()
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=706983
2007-08-31 17:46:12 +00:00
Robert Knight
536d3749c1 Fix crash when layout argument is null.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=706975
2007-08-31 17:24:03 +00:00
Robert Knight
bb25f62e55 Remove Widget::invalidate(), that is a feature which is part of the layouts. Better attempt at Widget::updateGeometry() which widget subclasses can call when their size hint or min/max size changes. Ultimately should behave like the QWidget methods of the same name. Make Widget return Qt::Horizontal | Qt::Vertical in its default implementation of expandingDirections()
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=706939
2007-08-31 15:32:10 +00:00
Robert Knight
f7861353ba Add a method to change the parent of a layout. Make isEmpty() non-virtual, and instead always equal to (count()==0). Add invalidate() method which is used like the method of the same name in QLayout to invalidate cached information in the layout.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=706937
2007-08-31 15:27:32 +00:00
Robert Knight
af8659fa22 Update the parent of a LayoutItem when calling setLayout
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=706935
2007-08-31 15:23:09 +00:00
Robert Knight
d1aba23cd2 Return 0 for the expanding directions of an icon. At present icons have a fixed size.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=706934
2007-08-31 15:21:30 +00:00
Robert Knight
37b993d8ff Add auto-deletion functionality into LayoutAnimator which can be used to delete the item when its removal animation finishes. Emit a signal when the state of an item in the animator changes. Avoid repeatedly setting an item's geometry with the NoEffect effect. Added a DeadState into which items transition after their removal animation finishes or if they have not been added to the animator. When inserting an item with a fade in effect set the opacity to 0 if the item is a widget.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=706933
2007-08-31 15:19:02 +00:00
Percy Leonhardt
615eae37ba Merged HBoxLayout and VBoxLayout into BoxLayout to avoid duplicate code.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=706645
2007-08-30 23:44:08 +00:00
Thomas Georgiou
44c1f66714 Make other widgets paint when zoomed out. (These 3 commits are just
commenting things out. The code will need to be removed once we are 
sure we do not need it.)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=705868
2007-08-28 19:12:13 +00:00
Thomas Georgiou
d65ab52dd6 Lineedits should display when zoomed out.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=705867
2007-08-28 19:02:38 +00:00
Robert Knight
773612ac44 Default implementations of minimumSize() , maximumSize() in Layout and correct implementations of minimumSize() , maximumSize() in Widget to match equivalents in QLayout , QWidget.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=703547
2007-08-22 20:13:24 +00:00
Thiago Macieira
eca6dc90c0 Remove use of k_funcinfo
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=702583
2007-08-20 21:33:48 +00:00
Matt Broadstone
4fbc948d56 That'll teach me not to test the build before committing :)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=701238
2007-08-17 18:57:28 +00:00
Matt Broadstone
1fb3bef9bb Fix build
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=701237
2007-08-17 18:55:55 +00:00
Robert Knight
93bf2933e4 When updating a Widget's geometry, pass the geometry in the Widget's co-ordinates to layout()->setGeometry() rather than the parent widget's co-ordinates. Call updateGeometry() inside setGeometry().
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=701207
2007-08-17 16:28:54 +00:00
Matt Broadstone
19efbb9108 Respect min/max sizeHints when setting geometry
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=701205
2007-08-17 16:04:49 +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
Percy Leonhardt
c86bf6caea Example for nested layouts
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=701173
2007-08-17 14:36:48 +00:00
Robert Knight
62b2605d0d Add methods to set/get a layout's animator. The various layout implementations need small changes to make use of an animator if set. Add an update() method to Layout to trigger re-layouting.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=701059
2007-08-17 07:02:24 +00:00
Percy Leonhardt
f1855dd6b2 Fixed wrong calculation of width
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=700938
2007-08-16 20:37:29 +00:00
Robert Knight
2475cfed09 Add LayoutAnimator class. This provides a way to animate changes in layouts. eg. Fading in new items, fading out removed items, moving and resizing items smoothly as the layout changes. The layouts themselves need some small changes to make use of this class, and the client code must create the animator, attach it to the layout and choose the animation effects to use.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=700844
2007-08-16 15:56:00 +00:00
Gabriel Anderson
0231bb68fe fixed dpointer
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=700536
2007-08-15 19:53:46 +00:00
Robert Knight
ad83b23dc4 Reimplement sizeHint() in Plasma::Icon, otherwise an invalid size hint gets returned.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=699874
2007-08-14 06:59:36 +00:00
Gabriel Anderson
6fd370952d Fixed krazy issue #8 (Non-const d-pointer)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=699687
2007-08-13 21:51:23 +00:00
Percy Leonhardt
9268590942 Added a signalplotter to plasma.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=699576
2007-08-13 15:15:19 +00:00
Robert Knight
482f9824ba Optimization. Avoid calling prepareGeometryChange() if the new and old geometry have the same size. Added a graphicsItem() method to LayoutItem which returns the associated graphics item (if any). Needed for effects during layouting.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=699494
2007-08-13 09:01:00 +00:00
Robert Knight
ca39faf71a Fix the push button size hint. Make PushButton::boundingRect() side-effect free.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=699467
2007-08-13 06:32:31 +00:00
Robert Knight
1f99ac776a Fix LineEdit::geometry(). Returned ectangle should be in parent coordinates.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=699255
2007-08-12 13:13:06 +00:00
Aaron J. Seigo
b764db9438 use a KIcon here to get the proper loading
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=698791
2007-08-11 03:30:54 +00:00
Aaron J. Seigo
b80d526229 use QIcon in the public API
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=698752
2007-08-10 22:24:49 +00:00
Matias Valdenegro Toro
777d23d06b Change start layout position topLeft point of the Geometry.
CCMAIL: panel-devel@kde.org

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=698656
2007-08-10 16:04:26 +00:00
Matias Valdenegro Toro
0923b77b89 Fix the starting position of VBoxLayout.
CCMAIL: lfranchi@gmail.com

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=698045
2007-08-08 20:37:59 +00:00
Aaron J. Seigo
b4a001e6e1 SVN_SILENT: yeah, (C) is meaningless
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=697686
2007-08-08 12:13:05 +00:00
Matt Broadstone
21394705f1 Provide a valid size before being painted
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=697570
2007-08-08 05:29:50 +00:00
Pino Toscano
99f22093f9 include fixup
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=697353
2007-08-07 14:58:00 +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
Matt Broadstone
26569e231c Add layout test
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696814
2007-08-05 23:05:57 +00:00
Matt Broadstone
6a6c508036 Fix Q_PROPERTY/Q_INVOKABLE's, readd icon accessor
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696719
2007-08-05 18:03:26 +00:00
Matt Broadstone
8a4601f9b0 Remove old unneeded debug calls
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696700
2007-08-05 17:13:07 +00:00
Matt Broadstone
388d1ca167 Cleaned up Plasma::Icon a whole lot, added Fredrik's text drawing code from KFileItemDelegate so we actually draw text correctly.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696698
2007-08-05 17:11:46 +00:00
Matt Broadstone
f33c5ab58b 'fixes' layouts for pushbuttons
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696696
2007-08-05 17:03:18 +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
Aaron J. Seigo
b1d1f1959f comparing doubles for equality with == isn't great
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696628
2007-08-05 12:58:40 +00:00
Richard J. Moore
51e50f0c80 - Tidy up script interface
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696595
2007-08-05 11:05:47 +00:00
Matt Broadstone
2a2348b0e4 _much_ more complete version of the PushButton widget, also fully documented
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696541
2007-08-05 08:10:17 +00:00
Aaron J. Seigo
ecad916f0a set the pos of the lineedit. really, this should become a Widget with a
QGrahpicsTextItem as a child item

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696366
2007-08-04 14:59:21 +00:00
Richard J. Moore
e4f1d2f617 - Prepare for scripting
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696337
2007-08-04 13:14:57 +00:00
Richard J. Moore
e7512b5b77 - Prepare for scripting
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696309
2007-08-04 12:37:59 +00:00
Matt Broadstone
23fe05689a documented Plasma::CheckBox, removed methods now implemented in Plasma::Widget for this widget.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696084
2007-08-03 19:17:30 +00:00
Matt Broadstone
a53be5affe Proper documentation, added setSize
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696079
2007-08-03 18:56:14 +00:00
Matt Broadstone
be3c212374 Make all plasma/widgets inherit Plasma::Widget now. Holding off on committing change for icon as I have a massive patch for the new text drawing
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696028
2007-08-03 16:00:10 +00:00
Aaron J. Seigo
510c39002a fixes the clicked signal.. thanks to Anrdreas, the MAN!
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=695685
2007-08-02 17:15:21 +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
Aaron Eisenberg
d40669a2d2 Do not paint anything inheriting Widget and do not paint LineEdit when in desktop view. LineEdit is currently just a temporary solution, because it doesn't inherit Widget for some reason.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=695323
2007-08-01 20:51:27 +00:00
Matt Broadstone
4823fc0237 More refactoring in preparation for text layout code
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=694895
2007-08-01 01:25:01 +00:00
Matt Broadstone
48700bf813 Refactor these to Private, makes paint more readable and gets us ready for new text layout code
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=694891
2007-08-01 00:52:26 +00:00
Riccardo Iaconelli
5aaccf0489 The applets now can associate with (one or more) certain mimetypes, and be called when that mime is dragged onto the desktop. Very rudimental for the moment, we should pass the name of the file to the applet. Added some copyrights I missed in the past.
Aaron: your turn now to discover the 'Mimetypes' key problem.
CCMAIL: aseigo@kde.org

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=694676
2007-07-31 10:52:05 +00:00
Aaron J. Seigo
7634beebf3 a bit of extra debug output here plus a mod to the icon demo so i can show bibr in a couple days the interesting ways in which event handling is broken
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=694478
2007-07-30 20:29:10 +00:00
Aaron J. Seigo
08fca6641e const fixes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=693768
2007-07-28 23:40:21 +00:00
Matt Broadstone
400e9788a5 Added documentation for Plasm::Icon, also added accessors for infoText-> allow for meta text to be associated with the icon
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=693711
2007-07-28 19:27:56 +00:00
Matt Broadstone
9bc4377eff For posterity's sake
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=693708
2007-07-28 19:27:09 +00:00
Aaron J. Seigo
bf6fba2b27 * implement checkState and fix const'ness of the method signature
* implement updated
* add setChecked(bool)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=693544
2007-07-28 10:06:03 +00:00
Aaron J. Seigo
cfe59991ba const the private pointer; fixme an odd bit of code
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=693533
2007-07-28 09:22:20 +00:00
Aaron J. Seigo
24f6601a48 * set the state on mouse down for the whole icon
* don't go all clicky on the icon when a hover button claims the click

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=693519
2007-07-28 08:22:44 +00:00
Aaron J. Seigo
a8b7589479 someone got confused as to the difference between "the layout that manages my children" and "the layout that manages me". this fixes that and stops crashes in applets that use vbox/hbox
* don't crash when parent=0 is passed in
* don't divid by 0 when we have no children
* have the (fugly) setManagingLayout and unsetManagingLayout and managingLayout methods
* do some memory management so layouts that are thrown around don't get lost in the heap

some unit tests would be nice. hell, a design document on the layout stuff would be nice. i know we're only keeping this around for 4.0, but  ... yeah. ugh.
CCMAIL:panel-devel@kde.org

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=693361
2007-07-27 20:00:07 +00:00
Matias Valdenegro Toro
2120758983 Devirtualize minimumSize() and maximumSize() and add values to d-pointer.
Added setters.

CCMAIL:panel-devel@kde.org


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=693115
2007-07-27 06:35:39 +00:00
Aaron J. Seigo
60f199c791 today's random code quality fixes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=693007
2007-07-26 19:56:16 +00:00
Aaron J. Seigo
bde805dbcf make them not executable
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=692946
2007-07-26 16:45:05 +00:00
Aaron J. Seigo
c4570130f5 tabsbegone
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=692758
2007-07-26 07:25:30 +00:00
Matias Valdenegro Toro
ff936c2a57 Added Alignment and Pen options and getters/setters.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=692757
2007-07-26 07:25:21 +00:00
Aaron J. Seigo
28b20a150a * add hbox to build
* make hbox share the boxlayout superclass with vbox
* profit

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=692756
2007-07-26 07:23:30 +00:00
Matias Valdenegro Toro
bdb1418dbb Use width-for-height Layout Management.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=692753
2007-07-26 07:12:05 +00:00
Matias Valdenegro Toro
4f778d6e2d Add Horizontal Layout class.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=692743
2007-07-26 06:58:33 +00:00
Aaron J. Seigo
aa1dd0b63f add the layout to the parent. this sucks because it isn't done in Layout where it should be, but setLayout results in pure virtuals being called... so child class it is for now.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=692625
2007-07-26 02:30:16 +00:00
Aaron J. Seigo
f82a4cfb55 separate out the stuff the hbox will need from vbox and put it into box.
sprinkle "layout" and some capital letters throughout the above if the above sounds random to you ;)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=692578
2007-07-25 22:20:15 +00:00
Aaron J. Seigo
04d418f4a7 last round of ebn fixes i had kicking around.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=692337
2007-07-25 11:24:07 +00:00
Matt Broadstone
8f619a954b QGraphicsItem::ItemClipsToShape is now default, should fix some nasty painting bugs in the future.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=692061
2007-07-24 23:31:52 +00:00
Alex Merry
aad2d63975 Apidocs mainpage work. Just got Plasma and Solid to do here.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=691959
2007-07-24 18:30:36 +00:00
Andre Duffeck
08c57e9eaf Tweak API
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=691502
2007-07-23 20:01:20 +00:00
Andre Duffeck
6a4841b19a Allow persistant flashs that disappear only when they are killed.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=691487
2007-07-23 18:50:42 +00:00
Matias Valdenegro Toro
ac70498132 Put a small border around text.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=691274
2007-07-23 09:32:54 +00:00
Matias Valdenegro Toro
efa6b9d8b3 setGeometry(geometry()); is a no-op, so remove it.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=691273
2007-07-23 09:29:18 +00:00
Matias Valdenegro Toro
bef5a33ed5 - Full Doxygenization
- Ported PushButton to Plasma::Widget API
- Two new classes, Rectangle and Label.
- All Widgets should now inherit from Plasma::Widget


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=691090
2007-07-22 22:16:40 +00:00
Aaron J. Seigo
dd7b8b306b ebn fixes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=691079
2007-07-22 22:01:10 +00:00
Laurent Montel
cf70eb1f86 Allow to select text into lineedit
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=691055
2007-07-22 20:46:23 +00:00
Aaron J. Seigo
09d1546b2c let's do something a bit more sensible for the default sizeHint(). it's still likely to return 0,0 but it gives us a chance at least at something non-zero
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=691036
2007-07-22 19:59:13 +00:00
Andre Duffeck
e7fa9f4480 Align text centered by default.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=690976
2007-07-22 16:36:36 +00:00
Laurent Montel
c40241f72e Fix mem leak
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=690966
2007-07-22 15:54:56 +00:00
Laurent Montel
3e1f6c75c1 Allow to use it as multiline (need by notes plasma)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=690899
2007-07-22 13:41:34 +00:00
Andre Duffeck
17b3de682f Allow to define the position of the text/pixmap.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=690864
2007-07-22 12:01:01 +00:00
Andre Duffeck
4798c5e3a8 Center flashed pixmap.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=690856
2007-07-22 11:37:21 +00:00
Andre Duffeck
b58baaef6b Import Flash widget.
It allows to show text or an image in order to notify the user about some change.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=690844
2007-07-22 11:02:34 +00:00
Andre Duffeck
6c25a3b98e fix boundingRect.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=690596
2007-07-21 14:04:37 +00:00
Aaron J. Seigo
fc0938d3bb * don't show the test action on every icon; we know it works ;)
* set the rects on the other actions properly
* shift the rects around when the icon resizes

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=690431
2007-07-21 04:19:00 +00:00
Aaron J. Seigo
01ab982d54 * coding style guides are not a cute suggestion but a promise to be fulfilled.
* take QAction*s, which belong to whatever throws them at us
* don't polute the public API with unecessary classes
* avoid subclassing Private classes

i'm still not overly happy with this class as it stands right now.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=690430
2007-07-21 04:07:41 +00:00
Urs Wolfer
001cce34dc compile fix
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=690407
2007-07-20 22:54:56 +00:00
Matt Broadstone
55be0c7a1c icons draw text now, moved corner items to qaction based objects, and support 4 corners. still a bit messy.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=690398
2007-07-20 22:30:33 +00:00
Aaron J. Seigo
af043ca588 too tired to do much of anything else, i figured i could fix some ebn issues
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=690173
2007-07-20 08:06:27 +00:00
Aaron J. Seigo
d692c9f3d5 boundingRect should be public, not protected
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=690166
2007-07-20 07:42:02 +00:00
Matt Broadstone
6ea5d0771b Icon now draws text, also lots of api love
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=690149
2007-07-20 06:28:51 +00:00
Matt Broadstone
9dcd34a521 Fix icon drawing
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=690092
2007-07-20 02:19:42 +00:00
Andre Duffeck
40ae48275a The bounding rect is relative to the item's local coordinate system, not
the parent's one.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=689841
2007-07-19 09:37:08 +00:00
Aaron J. Seigo
089082c050 put the inherited classes on one line. even though it gets long sometimes, it makes grepping easier =)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=689235
2007-07-17 22:56:28 +00:00
Lukas Kropatschek
50ee468b54 Added setStyled(bool) function for switching background and border of the widget on or off, to
have a transparent text-item for example.

getter is bool styled()


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=688835
2007-07-16 23:56:57 +00:00
Aaron J. Seigo
b82624429e - make it possible to instantiate a Plasma::Widget itself (implement all pure virtuals from QGraphicsItem)
- allow parenting it to a QGraphicsItem

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=687019
2007-07-12 18:11:50 +00:00
Aaron J. Seigo
ac35242c5d fix the indentation before i add anything to this
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=687015
2007-07-12 17:54:58 +00:00
Riccardo Iaconelli
349e57629d Let's use the right cursor on the lineedit
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=686047
2007-07-10 13:16:33 +00:00
Zack Rusin
0e274e2017 We've made SourceOver the default compositionMode in QPainter.
This in turn makes the default:
QPainter::fillRect(QRect(...), Qt::transparent); 
a no-op. The commit makes the fillrect actually do what, I bet
it was supposed to be doing. (but i ain't much of a gambler since
i'm not sure what it's supposed to be doin in the first place. at
least now it's doing something "weird" faster)


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=680260
2007-06-25 19:20:54 +00:00
Aaron J. Seigo
49f9cd42f8 adapt to new Phase API
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=679872
2007-06-25 06:02:33 +00:00
Tim Beaulen
2e78ff6e5e From EBN:
Check for QString compares to ""... OOPS! 1 issue found!
 ./libs/plasma/widgets/lineedit.cpp: line#178 (1) 
 Do not compare a QString to "". Instead use the .isEmpty() method. For example, if(str == "") becomes if(str.isEmpty())

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=679628
2007-06-24 12:50:58 +00:00
Thomas Georgiou
40d9432574 Revert HTML too when defaultText is removed.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=679088
2007-06-22 23:36:38 +00:00
Fredrik Höglund
55b7bc3219 Use pix.fill(Qt::transparent) to initialize the button pixmap to fully transparent.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=678647
2007-06-21 21:54:42 +00:00
Thomas Georgiou
35b86c492e Add defaultText graying.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=678576
2007-06-21 19:18:08 +00:00
Aaron J. Seigo
5ff761af6f * move members to the private class
* style guide fixes
* simplify the code in some places

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=678573
2007-06-21 18:47:04 +00:00
Aaron J. Seigo
5f8c6be988 make Applet (and lineedit) usable with qgraphics_item cast. we probably want to do this with all of our QGI subclasses.
i introduced a new enum in the Plasma namespace, ItemType, so we can keep track of these id's centrally.
however, the right click mechanism is rather broken in its implementation; we need a way to offer a centralized menu on appets no metter where they are clicked.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=678562
2007-06-21 18:07:39 +00:00
Thomas Georgiou
c37fabf01c Add "defaultText" functionality: when the lineedit does not have focus
and it is empty, the can be "defaultText" that will be displayed.  See 
dict applet for example.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=678514
2007-06-21 15:42:05 +00:00
André Wöbbeking
7aaec35dad constify url()
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=678187
2007-06-20 21:08:30 +00:00
Thomas Georgiou
32a450bb4d Fix coding style.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=678168
2007-06-20 20:28:55 +00:00
Thomas Georgiou
c4ff3b9135 Add textChanged(QString&) signal.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=678161
2007-06-20 20:12:38 +00:00
Thomas Georgiou
40c39333a1 Emit editingFinished() when enter/return is pressed.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=678157
2007-06-20 19:49:31 +00:00
Thomas Georgiou
0ffa2dcc29 Emit the clicked() signal when clicked.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=678145
2007-06-20 19:13:30 +00:00
Aaron J. Seigo
2d0a8aa271 add a getter for the url property
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=677940
2007-06-20 08:10:38 +00:00
Aaron J. Seigo
f29bc49788 comment out the debug we know is working so i can read debug from stuff that isn't
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=677928
2007-06-20 07:39:04 +00:00
Aaron J. Seigo
65f98b0246 don't make the icon movable by default.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=677927
2007-06-20 07:36:48 +00:00
Aaron J. Seigo
a3b156c7d8 SVN_SILENT: some white space fixes i didn't want to mix in with the functional changes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=677816
2007-06-19 23:32:04 +00:00
Aaron J. Seigo
b2da6b36ac always stop the anim, but only if we have one going on
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=677807
2007-06-19 22:48:42 +00:00
Aaron J. Seigo
059a64583d phased.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=677783
2007-06-19 21:56:40 +00:00
Aaron J. Seigo
229c60eae9 erm. yeah. that's what i *really* meant.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=676882
2007-06-17 21:24:50 +00:00
Aaron J. Seigo
60a844195e * make mini buttons "click" on mouse release like a proper button
* don't click when moving (either the icon or the mini buttons)
* only show the buttons on hovered states, allowing for proper button/hover/pressed painting
* try and avoid unecessary if/else's and other codedamage
* get rid of some dead code

now it's about ready to be phased =)


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=676842
2007-06-17 20:56:03 +00:00
Aaron J. Seigo
1fa0feaa48 * use EaseIn for the icon button show
* show the button(s) in .2s rather than the very slow feeling .5s
* don't leak the timeline
* don't connect to the timeline signal more than once
* comment in code that is ifdef'd out anyways
* don't set the svg element for fg and bg unless it exists
* remove some dead code

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=676786
2007-06-17 17:49:49 +00:00
Pino Toscano
bbabb1fea4 headers cleanup
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=676483
2007-06-16 23:38:56 +00:00
Riccardo Iaconelli
7a70eac7fe Much nicer icons.
Implemented the concept for icons from David Vignoni (screencast coming...).
Context menu now shows "Plasma".

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=676455
2007-06-16 22:35:31 +00:00
Aaron J. Seigo
c62b683dbd for the pussies who don't have srcdir==buildir for qt ;)
svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=672777
2007-06-08 05:39:34 +00:00
Aaron J. Seigo
58277a7608 plug a bunch of memory leaks
svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=672687
2007-06-07 20:57:18 +00:00
Aaron J. Seigo
df0e5f74a0 * build
* only blur on hover to mask some of the artifacts

svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=672649
2007-06-07 19:10:48 +00:00
Aaron J. Seigo
6193f93785 proof of concept for composited effects by toying with the backing store
svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=672646
2007-06-07 19:07:45 +00:00
Aaron J. Seigo
a80c5349e4 * let's not bother with the blur here quite yet; let's do it Right(tm) later in an image effects lib, and when we can actually operate on the backing store
* if there is not -pressed element, still paint something proper

svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=672363
2007-06-06 20:48:06 +00:00
Riccardo Iaconelli
a043e502f3 * Saner resizing of the icon when pressed
* Nicer SVG, also fixed the corners, now are pixel perfect
* Prepared the code for the upcoming blur of the wallpaper....

svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=672328
2007-06-06 19:45:00 +00:00
Aaron J. Seigo
a2b7f5fc43 shrink and center on click; not that it matters since this will move into Phase for great beauty and flexibility ... but this should llook a little nicer in the screencasts...
svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=672120
2007-06-06 05:19:44 +00:00
Aaron J. Seigo
83eed9ccd4 * build
* use KUrl::List

svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=672119
2007-06-06 05:12:51 +00:00
Siraj Razick
013fae0a0d slight shrik effect on the pixmap
svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=671927
2007-06-05 20:44:28 +00:00
Aaron J. Seigo
11651586c0 center the icons properly and cut down on the amount of duplicated information we keep in here
svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=671917
2007-06-05 19:48:14 +00:00
Siraj Razick
9d778637b5 ifndef typo fixed now the item can be used
svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=671898
2007-06-05 18:39:59 +00:00
Aaron J. Seigo
c2f7734144 icon; doesn't actually work the way i expect it to. need to talk to bibr about some things.
svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=671576
2007-06-05 02:54:48 +00:00
Inge Wallin
60032d6779 Some krazy fixes while waiting for a compile:
22: Check for spelling errors.


svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=671493
2007-06-04 21:40:44 +00:00
Laurent Montel
65be58f69e Remove not necessary "class classname;"
svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=671233
2007-06-04 08:24:29 +00:00
Aaron J. Seigo
bbaebc6b1b move workspace/plasma/lib to workspace/lib/plasma so that we can do:
#include <plasma/foo.h>

in headers in libplasma. this is important so that they can be used post-install by third party plugins, apps, etc.

also, changed Applet::loadDataEngine to just Applet::dataEngine and make it actually return the data engine; move the applets to using it. safer and fewer LoC

svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=670850
2007-06-02 17:29:39 +00:00
Matt Williams
f93b9f7396 EBN Krazy header fixes
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=669864
2007-05-30 16:47:36 +00:00
Aaron J. Seigo
77307ba1dd icon buttons generally work now. huzzah. you can theme them with iconbutton.svg with the following elements, all of which are optional:
- background
 - background-hover
 - background-pressed
 - foreground
 - foregound-hover
 - foreground-pressed

what each does is left as an exercise for the reader ;)

svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=669620
2007-05-29 20:37:21 +00:00
Aaron J. Seigo
429d8fd708 apparently i missed this entire directory when introducing PLASMA_EXPORT. but i got 'em this time! ;)
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=669395
2007-05-29 08:02:01 +00:00