kopete/libkopete
#include <kopetelistviewitem.h>
Public Types | |
enum | RttiValues { Rtti_Component, Rtti_BoxComponent, Rtti_TextComponent, Rtti_ImageComponent, Rtti_DisplayNameComponent, Rtti_HSpacerComponent, Rtti_VSpacerComponent } |
Public Member Functions | |
virtual | ~Component ()=0 |
virtual int | heightForWidth (int width) |
void | hide () |
bool | isHidden () |
bool | isShown () |
virtual void | layout (const QRect &rect) |
int | minHeight () |
int | minWidth () |
virtual void | paint (QPainter *painter, const QPalette &pal) |
QRect | rect () |
void | relayout () |
void | repaint () |
virtual int | rtti () const |
void | setToolTipSource (ToolTipSource *source=0) |
void | show () |
std::pair< QString, QRect > | toolTip (const QPoint &relativePos) |
virtual int | widthForHeight (int height) |
Public Member Functions inherited from Kopete::UI::ListView::ComponentBase | |
ComponentBase () | |
virtual | ~ComponentBase ()=0 |
Component * | component (uint n) |
Component * | componentAt (const QPoint &pt) |
uint | components () |
Static Public Attributes | |
static int | RTTI = Rtti_Component |
Protected Member Functions | |
Component (ComponentBase *parent) | |
void | componentAdded (Component *component) |
void | componentRemoved (Component *component) |
bool | setMinHeight (int height) |
bool | setMinWidth (int width) |
Protected Member Functions inherited from Kopete::UI::ListView::ComponentBase | |
virtual void | clear () |
virtual void | componentResized (Component *component) |
void | updateAnimationPosition (int p, int s) |
Friends | |
void | ComponentBase::updateAnimationPosition (int p, int s) |
Detailed Description
This class represents a rectangular subsection of a ListItem.
Definition at line 103 of file kopetelistviewitem.h.
Member Enumeration Documentation
RTTI: Runtime Type Information Exactly the same as Qt's approach to identify types of QCanvasItems.
Enumerator | |
---|---|
Rtti_Component | |
Rtti_BoxComponent | |
Rtti_TextComponent | |
Rtti_ImageComponent | |
Rtti_DisplayNameComponent | |
Rtti_HSpacerComponent | |
Rtti_VSpacerComponent |
Definition at line 189 of file kopetelistviewitem.h.
Constructor & Destructor Documentation
|
protected |
Definition at line 155 of file kopetelistviewitem.cpp.
|
pure virtual |
Definition at line 164 of file kopetelistviewitem.cpp.
Member Function Documentation
|
protectedvirtual |
A child item has been added to this item.
Reimplemented from Kopete::UI::ListView::ComponentBase.
Reimplemented in Kopete::UI::ListView::BoxComponent.
Definition at line 268 of file kopetelistviewitem.cpp.
|
protectedvirtual |
A child item has been removed from this item.
Reimplemented from Kopete::UI::ListView::ComponentBase.
Reimplemented in Kopete::UI::ListView::BoxComponent.
Definition at line 274 of file kopetelistviewitem.cpp.
|
virtual |
Returns the height this component desires for a given width.
By default this function returns minHeight().
Reimplemented in Kopete::UI::ListView::VSpacerComponent, and Kopete::UI::ListView::BoxComponent.
Definition at line 213 of file kopetelistviewitem.cpp.
void Kopete::UI::ListView::Component::hide | ( | ) |
Prevents this component to be drawn.
Definition at line 171 of file kopetelistviewitem.cpp.
bool Kopete::UI::ListView::Component::isHidden | ( | ) |
Definition at line 186 of file kopetelistviewitem.cpp.
bool Kopete::UI::ListView::Component::isShown | ( | ) |
Definition at line 181 of file kopetelistviewitem.cpp.
|
virtual |
Set the size and position of this item relative to the list view item.
Should only be called by the containing item.
- Parameters
-
rect the new rectangle this component will paint in, relative to the painter passed to the paint() function by the parent item.
Reimplemented in Kopete::UI::ListView::DisplayNameComponent, and Kopete::UI::ListView::BoxComponent.
Definition at line 232 of file kopetelistviewitem.cpp.
int Kopete::UI::ListView::Component::minHeight | ( | ) |
Returns the smallest this component can become vertically while still being useful.
Definition at line 211 of file kopetelistviewitem.cpp.
int Kopete::UI::ListView::Component::minWidth | ( | ) |
Returns the smallest this component can become horizontally while still being useful.
Definition at line 210 of file kopetelistviewitem.cpp.
Paint this item, inside the rectangle returned by rect().
The default implementation calls paint on all children.
Reimplemented in Kopete::UI::ListView::ImageComponent, and Kopete::UI::ListView::TextComponent.
Definition at line 247 of file kopetelistviewitem.cpp.
QRect Kopete::UI::ListView::Component::rect | ( | ) |
- Returns
- the rect this component was allocated last time it was laid out
Definition at line 206 of file kopetelistviewitem.cpp.
|
virtual |
Relayout this item.
Implements Kopete::UI::ListView::ComponentBase.
Definition at line 263 of file kopetelistviewitem.cpp.
|
virtual |
Repaint this item.
Implements Kopete::UI::ListView::ComponentBase.
Definition at line 258 of file kopetelistviewitem.cpp.
|
inlinevirtual |
Reimplemented in Kopete::UI::ListView::VSpacerComponent, Kopete::UI::ListView::HSpacerComponent, Kopete::UI::ListView::DisplayNameComponent, Kopete::UI::ListView::ImageComponent, Kopete::UI::ListView::TextComponent, and Kopete::UI::ListView::BoxComponent.
Definition at line 196 of file kopetelistviewitem.h.
|
protected |
Change the minimum height, in pixels, this component requires in order to be at all useful.
Note: do not call this from your layout() function.
- Parameters
-
height the minimum height
- Returns
- true if the size has actually changed, false if it's been set to the existing values. If it returns true, you do not need to relayout, since the parent component will do that for you.
Definition at line 223 of file kopetelistviewitem.cpp.
|
protected |
Change the minimum width, in pixels, this component requires in order to be at all useful.
Note: do not call this from your layout() function.
- Parameters
-
width the minimum width
- Returns
- true if the size has actually changed, false if it's been set to the existing values. if it returns true, you do not need to relayout, since the parent component will do that for you.
Definition at line 215 of file kopetelistviewitem.cpp.
void Kopete::UI::ListView::Component::setToolTipSource | ( | ToolTipSource * | source = 0 | ) |
Set a tool tip source for this item.
The tool tip source object is still owned by the caller, and must live for at least as long as this component.
Definition at line 191 of file kopetelistviewitem.cpp.
void Kopete::UI::ListView::Component::show | ( | ) |
Makes this component to be drawn.
Definition at line 176 of file kopetelistviewitem.cpp.
|
virtual |
Get the tool tip string and rectangle for a tip request at position relativePos relative to this item.
If a tooltip source is set, it will be used. Otherwise calls the base class.
- Returns
- a pair where the first element is the tooltip, and the second is the rectangle within the item for which the tip should be displayed.
Reimplemented from Kopete::UI::ListView::ComponentBase.
Reimplemented in Kopete::UI::ListView::ContactComponent.
Definition at line 196 of file kopetelistviewitem.cpp.
|
virtual |
Returns the width this component desires for a given height.
By default this function returns minWidth().
Reimplemented in Kopete::UI::ListView::HSpacerComponent, Kopete::UI::ListView::TextComponent, and Kopete::UI::ListView::BoxComponent.
Definition at line 212 of file kopetelistviewitem.cpp.
Friends And Related Function Documentation
|
friend |
Member Data Documentation
|
static |
Definition at line 195 of file kopetelistviewitem.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.