| Home · All Classes · Main Classes · Deprecated |

Public Member Functions | |
| void | setModeDefault () |
| void | initialize (const QString &objectName, const QString &type, const MWidgetController *parent) |
| void | setObjectName (const QString &objectName) |
| void | setType (const QString &type) |
| QString | objectName () const |
| QString | type () const |
| void | setParent (const MWidgetController *parent) |
| const MWidgetController * | parent () const |
Protected Member Functions | |
| void | reloadStyles () |
| const MStyle * | currentStyle () const |
| void | setCurrentMode (const QString &mode) |
| QString | currentMode () const |
Definition at line 119 of file corelib/style/mstyle.h.
| QString MStyleContainer::currentMode | ( | ) | const [protected] |
Definition at line 232 of file mstyle.cpp.
{
return d_ptr->currentMode;
}
| const MStyle * MStyleContainer::currentStyle | ( | ) | const [protected] |
Definition at line 199 of file mstyle.cpp.
{
M::Orientation orientation = M::Landscape;
const MWindow *activeWindow = MApplication::activeWindow();
if (activeWindow)
orientation = activeWindow->orientation();
if (d_ptr->cachedCurrentStyle[orientation] != 0) {
return d_ptr->cachedCurrentStyle[orientation];
}
const MStyle* style;
QHash<QString, const MStyle*>::iterator iter = d_ptr->cachedStyles[orientation].find(currentMode());
if (iter != d_ptr->cachedStyles[orientation].end()) {
style = *iter;
} else {
style = MTheme::style(styleType(), objectName(), currentMode(), type(), orientation, parent());
d_ptr->cachedStyles[orientation].insert(currentMode(), style);
}
d_ptr->cachedCurrentStyle[orientation] = style;
return style;
}

| void MStyleContainer::initialize | ( | const QString & | objectName, | |
| const QString & | type, | |||
| const MWidgetController * | parent | |||
| ) |
Definition at line 137 of file mstyle.cpp.
{
// The style type should never be "default" - that would probably be a view type
// that's mistakenly being used as a style type.
// The caller probably means "" instead.
Q_ASSERT(type != "default");
d_ptr->objectName = objectName;
d_ptr->type = type;
d_ptr->parent = parent;
reloadStyles();
}

| QString MStyleContainer::objectName | ( | ) | const |
Definition at line 174 of file mstyle.cpp.
{
return d_ptr->objectName;
}
| const MWidgetController * MStyleContainer::parent | ( | ) | const |
Definition at line 193 of file mstyle.cpp.
{
return d_ptr->parent;
}
| void MStyleContainer::reloadStyles | ( | ) | [protected] |
Definition at line 245 of file mstyle.cpp.
{
d_ptr->releaseStyles();
}
| void MStyleContainer::setCurrentMode | ( | const QString & | mode | ) | [protected] |
Definition at line 223 of file mstyle.cpp.
{
if (mode != d_ptr->currentMode) {
d_ptr->cachedCurrentStyle[0] = 0;
d_ptr->cachedCurrentStyle[1] = 0;
d_ptr->currentMode = mode;
}
}
| void MStyleContainer::setModeDefault | ( | ) |
Definition at line 251 of file mstyle.cpp.
{
setCurrentMode("");
}

| void MStyleContainer::setObjectName | ( | const QString & | objectName | ) |
Definition at line 152 of file mstyle.cpp.
{
if (objectName != d_ptr->objectName) {
d_ptr->objectName = objectName;
reloadStyles();
}
}

| void MStyleContainer::setParent | ( | const MWidgetController * | parent | ) |
Definition at line 185 of file mstyle.cpp.
{
if (d_ptr->parent != parent) {
d_ptr->parent = parent;
reloadStyles();
}
}

| void MStyleContainer::setType | ( | const QString & | type | ) |
Definition at line 161 of file mstyle.cpp.
{
// The style type should never be "default" - that would probably be a view type
// that's mistakenly being used as a style type.
// The caller probably means "" instead.
Q_ASSERT(type != "default");
if (type != d_ptr->type) {
d_ptr->type = type;
reloadStyles();
}
}

| QString MStyleContainer::type | ( | ) | const |
Definition at line 180 of file mstyle.cpp.
{
return d_ptr->type;
}
| Copyright © 2010 Nokia Corporation | Generated on Thu Nov 4 2010 18:14:27 (PDT) Doxygen 1.7.1 |
MeeGo Touch |