Qt 4.8
Public Functions | Properties | List of all members
QGraphicsWidgetStyles Class Reference

Public Functions

void setStyleForWidget (QGraphicsWidget *widget, QStyle *style)
 
QStylestyleForWidget (const QGraphicsWidget *widget) const
 

Properties

QMutex mutex
 
QMap< const QGraphicsWidget *, QStyle * > styles
 

Detailed Description

Definition at line 209 of file qgraphicswidget.cpp.

Functions

◆ setStyleForWidget()

void QGraphicsWidgetStyles::setStyleForWidget ( QGraphicsWidget widget,
QStyle style 
)
inline

Definition at line 218 of file qgraphicswidget.cpp.

219  {
220  QMutexLocker locker(&mutex);
221  if (style)
222  styles[widget] = style;
223  else
224  styles.remove(widget);
225  }
QPointer< QWidget > widget
QMap< const QGraphicsWidget *, QStyle * > styles
int remove(const Key &key)
Removes all the items that have the key key from the map.
Definition: qmap.h:662
The QMutexLocker class is a convenience class that simplifies locking and unlocking mutexes...
Definition: qmutex.h:101

◆ styleForWidget()

QStyle* QGraphicsWidgetStyles::styleForWidget ( const QGraphicsWidget widget) const
inline

Definition at line 212 of file qgraphicswidget.cpp.

213  {
214  QMutexLocker locker(&mutex);
215  return styles.value(widget, 0);
216  }
QMap< const QGraphicsWidget *, QStyle * > styles
const T value(const Key &key) const
Returns the value associated with the key key.
Definition: qmap.h:499
The QMutexLocker class is a convenience class that simplifies locking and unlocking mutexes...
Definition: qmutex.h:101

Properties

◆ mutex

QMutex QGraphicsWidgetStyles::mutex
mutableprivate

Definition at line 229 of file qgraphicswidget.cpp.

◆ styles

QMap<const QGraphicsWidget *, QStyle *> QGraphicsWidgetStyles::styles
private

Definition at line 228 of file qgraphicswidget.cpp.


The documentation for this class was generated from the following file: