Commit Graph

88 Commits

Author SHA1 Message Date
Marco Martin
454d824d4f removing sizeHint() since it's identical to Widget::sizeHint()
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=757897
2008-01-06 11:41:15 +00:00
Marco Martin
eff9536215 Make icon applets to work in panel:
sizehint of icon widget returns size() instead of the stored one to preventing returning (-1,-1) for the first time
and initialize a size in the icon applet

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=757756
2008-01-05 20:25:18 +00:00
Aaron J. Seigo
f07d73ff53 allow setting the background of icon on/off ... a little sad about this, but no time to do something else atm
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=756868
2008-01-03 21:22:24 +00:00
Christopher Blauvelt
ac040130bf Enable dragging of icons by clicking in the middle of the IconApplet.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=756862
2008-01-03 21:10:07 +00:00
Marco Martin
9a0dcafb8d Substitutes the background svg with a Plasma::roundedRectangle()
this makes the radius of the rounded borders of the background of the icon to look right

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=756763
2008-01-03 18:38:11 +00:00
Marco Martin
bef6adb720 added
bool invertedLayout() const;
returns if the layout of the icons should appear inverted or not

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=755891
2008-01-02 10:39:29 +00:00
Marco Martin
1ca970c48e added the method
void invertLayout(bool invert);
it inverts the layout of the icons if the orientation is horizontal,
normally we get icon on the left with left-to-right languages,
this inverts the behaviour

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=755562
2008-01-01 20:58:36 +00:00
Aaron J. Seigo
d5c9ab0cf6 style fix and remove the extra assignment.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=755558
2008-01-01 20:53:46 +00:00
Aaron J. Seigo
627cb88ccf all members belong in the dptr.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=755512
2008-01-01 19:21:33 +00:00
Marco Martin
a87dcb6b19 draws iconSvg correctly
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=754836
2007-12-30 21:00:38 +00:00
Marco Martin
1743b3d9ef support for text beside icons depending of the layout direction, can be set with
void setOrientation(Qt::Orientation orientation);

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=753744
2007-12-28 11:29:56 +00:00
Christopher Blauvelt
06295ace02 Piggyback on mart's patch. Add the ability to set the number of lines in the display, fixes
Icon::Private::elidedText so the display won't be truncated to one line if the whole text doesn't 
fit, and fixes some crashes.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=753049
2007-12-26 13:44:57 +00:00
Marco Martin
27ce118c91 removed the following methods:
calculateSize()
Private::displaySizeHint(const QStyleOptionGraphicsItem *option)
setIconSize(QSizeF)

added layoutIcons(), similar to calculateSize() but it resizes the icon instead of the widget around the icon

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=753033
2007-12-26 12:37:54 +00:00
Marco Martin
5952e90351 White icon text on a semitransparent black background
BUG: 154108

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=752098
2007-12-23 15:13:44 +00:00
Marco Martin
1f84d4c290 removing an experimental piece of junk in drawTextItems committed for mistake...
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=752044
2007-12-23 12:07:31 +00:00
Marco Martin
43574b0c3e Added the method QSizeF sizeFromIconSize(const qreal iconWidth) that returns an optimal size of the widget given a desidered size of the icon
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=752018
2007-12-23 10:51:00 +00:00
Shawn Starr
8d9aa19d83 Allow rendering of a specific svg element id. You can still render them all if you don't specify a element name but now you can also use a specific element. Doesn't handle resizing.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=751533
2007-12-22 05:31:57 +00:00
Marco Martin
792e8dfba8 icon actions works again (still not drawn correctly)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=751445
2007-12-21 21:35:07 +00:00
Aaron J. Seigo
0946029d25 very basic svg icon painting
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=750938
2007-12-20 16:28:47 +00:00
Shawn Starr
853710deca call setFile() when changing the svg image for Icon
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=750670
2007-12-19 20:58:45 +00:00
Shawn Starr
60769c4c6f Add convenience method setSvg() to set the Icon's Svg file instead of the default widget/iconbutton svg. Useful for custom svg button behavour
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=750654
2007-12-19 20:32:31 +00:00
Marco Martin
d7f413742a Now icons can be resized
BUG: 152695

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=750084
2007-12-18 16:56:34 +00:00
Jason Stubbs
4fb7cbc2d6 Fix handling of click/hover events and add methods to allow callers to
make the icon appear clicked. Getting it in now so that it doesn't
block other work. I believe all discussed issues have been fixed with
this patch, but I'll stay around to fix any issues that remain. ;)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=749016
2007-12-16 10:09:07 +00:00
Jason Stubbs
5db83950c4 Use Widget::view() to find the view rather than emmiting
QGraphicsSceneMouseEvent from Plasma::Icon for only that purpose

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=746549
2007-12-09 13:32:30 +00:00
Aaron J. Seigo
9d936d1d8f still messed up, but less useless confusing code in there now =)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=743202
2007-11-30 01:06:27 +00:00
Aaron J. Seigo
6124183a72 move the blur.cpp into the #define as we don't even really use it right now
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738753
2007-11-19 15:40:55 +00:00
Andre Duffeck
3b6b25445d Do not use space for text if there is none set
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=736901
2007-11-15 06:59:25 +00:00
Alexis Ménard
1294c4e8a4 Add method to set where we want to put the icon.Usefull for applet
Lock/Logout

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=734943
2007-11-10 15:16:33 +00:00
Aaron J. Seigo
fab534cf22 only click on left click
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=731159
2007-10-30 20:59:12 +00:00
Aaron J. Seigo
96accbd236 now that it works properly, we probably don't need to be told about it all the time ;)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=729455
2007-10-26 02:31:44 +00:00
Aaron J. Seigo
49914e5a49 a rather horrific hack, passing the mouse event around, but it's the only way i can find to *reliably* get the event passed around which we must have to locate where on screen to pop things up at
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=729453
2007-10-26 02:15:04 +00:00
Aaron J. Seigo
97ddf36df4 * emit pressed(true) when pressed
* excuse the debuggin, but i need to figure out why events are getting eaten (again) by the icon class

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=728763
2007-10-24 06:52:45 +00:00
Stephan Binner
245e63418e revert "cleanup" breakage of r696698
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=728171
2007-10-22 16:16:30 +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
Matthew Woehlke
407f13404a remove superfluous header
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=717530
2007-09-27 03:52:50 +00:00
Aaron J. Seigo
329d912f47 SVN_SILENT: more licensing updates ... all done with this now i think =)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=712581
2007-09-14 20:17:11 +00:00
Aaron J. Seigo
e0f831373c SVN_SILENT: add "or later" clause. cleared with copyright holders, except for rich moore's ui loader which i need to ask him for permission for first.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=712549
2007-09-14 19:06:18 +00:00
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
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
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
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
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
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
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
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