Commit Graph

52 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
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
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
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
87429288bc removing Icon::setAlignment again
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=754369
2007-12-29 17:09:06 +00:00
Marco Martin
296069a3c1 fixed a typo
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=753790
2007-12-28 14:18:52 +00:00
Marco Martin
3893a56543 bring back a dummy setAlignment, otherwise it breaks too many things
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=753789
2007-12-28 14:16:59 +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
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
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
Urs Wolfer
5510140da1 cleanup header
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=749677
2007-12-17 15:57:54 +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
Alexis Ménard
6553519076 fix comment
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=734976
2007-11-10 16:06:22 +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
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
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
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
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
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
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
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
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
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
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
Aaron J. Seigo
dd7b8b306b ebn fixes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=691079
2007-07-22 22:01:10 +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
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
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
André Wöbbeking
7aaec35dad constify url()
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=678187
2007-06-20 21:08: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
059a64583d phased.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=677783
2007-06-19 21:56:40 +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
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
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
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