MGridItem is a combiner class for displaying thumbnail, title and subTitle, used by MList, MGrid and MPopupList.
More...
Inherits MWidgetController.
List of all members.
Detailed Description
MGridItem is a combiner class for displaying thumbnail, title and subTitle, used by MList, MGrid and MPopupList.
Overview
Using this class it is possible to display one image and two text label. You can set image by id in theme system or QPixmap
There are 4 different look of MGridItem MImage, set imageVisible = true, titleVisible = false, subtitleVisible = false MLabel, set imageVisible = false, titleVisible = true, subtitleVisible = false MImage+MLabel, set imageVisible = true, titleVisible = true, subtitleVisible = false MImage+2 MLabel, set imageVisible = true, titleVisible = true, subtitleVisible = true
You can change the image alignment to LeftAlign/RightAlign by modify CSS
- Deprecated:
- Please use MContentItem, MBasicListItem, MAdvancedListItem, MDetailedListItem
Constructor & Destructor Documentation
Constructs a GridItem with a parent.
- Parameters:
-
MGridItem::~MGridItem |
( |
|
) |
[virtual] |
Member Function Documentation
Get the image name.
- Returns:
- image id in theme system
bool MGridItem::isImageVisible |
( |
|
) |
const |
Returns true if the image is visible.
bool MGridItem::isSubtitleVisible |
( |
|
) |
const |
Returns true if the subtitle is visible.
bool MGridItem::isTitleVisible |
( |
|
) |
const |
Returns true if the title is visible.
QPixmap MGridItem::pixmap |
( |
|
) |
const |
Get the thumbnail pixmap.
- Returns:
- thumbnail pixmap
void MGridItem::pixmapChanged |
( |
|
) |
[signal] |
This signal is emitted when the pixmap is changed.
void MGridItem::setImage |
( |
const QString & |
id |
) |
[slot] |
Sets image id.
- Parameters:
-
| id | the image id in theme system |
void MGridItem::setImageVisible |
( |
bool |
visible |
) |
[slot] |
Set the visibility of the image.
void MGridItem::setPixmap |
( |
const QPixmap & |
pixmap |
) |
[slot] |
Sets thumbnail pixmap.
- Parameters:
-
void MGridItem::setSelected |
( |
bool |
selected |
) |
|
set GridItem be selected Override the base function in QGraphicsItem
void MGridItem::setSubtitle |
( |
const QString & |
text |
) |
[slot] |
Set subtitle text.
- Parameters:
-
void MGridItem::setSubtitleVisible |
( |
bool |
visible |
) |
[slot] |
Set the visibility of the subtitle.
void MGridItem::setTitle |
( |
const QString & |
text |
) |
[slot] |
Set title text.
- Parameters:
-
void MGridItem::setTitleVisible |
( |
bool |
visible |
) |
[slot] |
Set the visibility of the title.
QString MGridItem::subtitle |
( |
|
) |
const |
Get the subtitle.
- Returns:
- subtitle text string.
Get the title.
- Returns:
- title text string.
Property Documentation
MGridItem::image [read, write] |
MGridItem::imageVisible [read, write] |
MGridItem::pixmap [read, write] |
pixmap which will be displayed
MGridItem::subtitle [read, write] |
MGridItem::subtitleVisible [read, write] |
MGridItem::title [read, write] |
MGridItem::titleVisible [read, write] |