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

#include <qproxystyle_p.h>

Inheritance diagram for QProxyStylePrivate:
QCommonStylePrivate QStylePrivate QObjectPrivate QObjectData

Public Functions

void ensureBaseStyle () const
 
- Public Functions inherited from QCommonStylePrivate
bool isViewItemCached (const QStyleOptionViewItemV4 &option) const
 
 QCommonStylePrivate ()
 
void tabLayout (const QStyleOptionTabV3 *opt, const QWidget *widget, QRect *textRect, QRect *pixmapRect) const
 
void viewItemDrawText (QPainter *p, const QStyleOptionViewItemV4 *option, const QRect &rect) const
 
void viewItemLayout (const QStyleOptionViewItemV4 *opt, QRect *checkRect, QRect *pixmapRect, QRect *textRect, bool sizehint) const
 Set sizehint to false to layout the elements inside opt->rect. More...
 
QSize viewItemSize (const QStyleOptionViewItemV4 *option, int role) const
 
 ~QCommonStylePrivate ()
 
- Public Functions inherited from QStylePrivate
 QStylePrivate ()
 
- Public Functions inherited from QObjectPrivate
void _q_reregisterTimers (void *pointer)
 
void addConnection (int signal, Connection *c)
 
void cleanConnectionLists ()
 
void connectNotify (const char *signal)
 
void deleteChildren ()
 
void disconnectNotify (const char *signal)
 
bool isSender (const QObject *receiver, const char *signal) const
 
bool isSignalConnected (uint signalIdx) const
 Returns true if the signal with index signal_index from object sender is connected. More...
 
void moveToThread_helper ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
QObjectList receiverList (const char *signal) const
 
QObjectList senderList () const
 
void setParent_helper (QObject *)
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData)
 
int signalIndex (const char *signalName) const
 Returns the signal index used in the internal connectionLists vector. More...
 
virtual ~QObjectPrivate ()
 
- Public Functions inherited from QObjectData
virtual ~QObjectData ()=0
 

Private Functions

 QProxyStylePrivate ()
 

Properties

QPointer< QStylebaseStyle
 

Additional Inherited Members

- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
- Static Public Functions inherited from QObjectPrivate
static void clearGuards (QObject *)
 
static QObjectPrivateget (QObject *o)
 
static void resetCurrentSender (QObject *receiver, Sender *currentSender, Sender *previousSender)
 
static SendersetCurrentSender (QObject *receiver, Sender *sender)
 
static void signalSignature (const QMetaMethod &signal, QVarLengthArray< char > *result)
 
- Public Variables inherited from QCommonStylePrivate
QStyleOptionViewItemV4cachedOption
 
QRect checkRect
 
QRect decorationRect
 
QRect displayRect
 
QIcon tabBarcloseButtonIcon
 
- Public Variables inherited from QStylePrivate
int layoutSpacingIndex
 
QStyleproxyStyle
 
- Public Variables inherited from QObjectPrivate
union {
   QObject *   currentChildBeingDeleted
 
   QAbstractDeclarativeData *   declarativeData
 
}; 
 
quint32 connectedSignals [2]
 
QObjectConnectionListVectorconnectionLists
 
SendercurrentSender
 
QList< QPointer< QObject > > eventFilters
 
ExtraDataextraData
 
QString objectName
 
Connectionsenders
 
QAtomicPointer< QtSharedPointer::ExternalRefCountData > sharedRefcount
 
QThreadDatathreadData
 
void * unused
 
- Public Variables inherited from QObjectData
uint blockSig: 1
 
QObjectList children
 
uint hasGuards: 1
 
uint inEventHandler: 1
 
uint inThreadChangeEvent: 1
 
uint isWidget: 1
 
QMetaObjectmetaObject
 
uint ownObjectName: 1
 
QObjectparent
 
uint pendTimer: 1
 
int postedEvents
 
QObjectq_ptr
 
uint receiveChildEvents: 1
 
uint sendChildEvents: 1
 
uint unused: 22
 
uint wasDeleted: 1
 

Detailed Description

Definition at line 64 of file qproxystyle_p.h.

Constructors and Destructors

◆ QProxyStylePrivate()

QProxyStylePrivate::QProxyStylePrivate ( )
inlineprivate

Definition at line 70 of file qproxystyle_p.h.

70  :
QPointer< QStyle > baseStyle
Definition: qproxystyle_p.h:72

Functions

◆ ensureBaseStyle()

void QProxyStylePrivate::ensureBaseStyle ( ) const

Definition at line 81 of file qproxystyle.cpp.

82 {
83  Q_Q(const QProxyStyle);
84 
85  if (baseStyle)
86  return;
87 
90  if (baseStyle) {
91  // If baseStyle is an instance of the same proxyStyle
92  // we destroy it and fall back to the desktop style
94  q->metaObject()->className()) == 0) {
95  delete baseStyle;
96  baseStyle = 0;
97  }
98  }
99  }
100 
101  if (!baseStyle) // Use application desktop style
103 
104  if (!baseStyle) // Fallback to windows style
106 
107  baseStyle->setProxy(const_cast<QProxyStyle*>(q));
108  baseStyle->setParent(const_cast<QProxyStyle*>(q)); // Take ownership
109 }
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
static QStyle * create(const QString &)
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
void setParent(QObject *)
Makes the object a child of parent.
Definition: qobject.cpp:1950
#define Q_Q(Class)
Definition: qglobal.h:2483
static bool isEmpty(const char *str)
QPointer< QStyle > baseStyle
Definition: qproxystyle_p.h:72
static QString desktopStyleKey()
const char * className() const
Returns the class name.
Definition: qobjectdefs.h:491
static QString styleOverride
int qstrcmp(const QByteArray &str1, const char *str2)
Definition: qbytearray.cpp:336
void setProxy(QStyle *style)
Definition: qstyle.cpp:2557
virtual const QMetaObject * metaObject() const
Returns a pointer to the meta-object of this object.

Properties

◆ baseStyle

QPointer<QStyle> QProxyStylePrivate::baseStyle
mutableprivate

Definition at line 72 of file qproxystyle_p.h.

Referenced by ensureBaseStyle().


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