Qt 4.8
Public Types | Public Functions | Public Variables | List of all members
QWindowsStylePrivate Class Reference

#include <qwindowsstyle_p.h>

Inheritance diagram for QWindowsStylePrivate:
QCommonStylePrivate QStylePrivate QObjectPrivate QObjectData QCleanlooksStylePrivate QPlastiqueStylePrivate QStyleSheetStylePrivate QWindowsCEStylePrivate QWindowsMobileStylePrivate QWindowsXPStylePrivate QGtkStylePrivate QWindowsVistaStylePrivate

Public Types

enum  {
  windowsItemFrame = 2, windowsSepHeight = 9, windowsItemHMargin = 3, windowsItemVMargin = 2,
  windowsArrowHMargin = 6, windowsRightBorder = 15, windowsCheckMarkWidth = 12
}
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 

Public Functions

bool altDown () const
 
bool hasSeenAlt (const QWidget *widget) const
 
 QWindowsStylePrivate ()
 
void startAnimation (QObject *o, QProgressBar *bar)
 
void stopAnimation (QObject *o, QProgressBar *bar)
 
- 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
 

Public Variables

QColor activeCaptionColor
 
QColor activeGradientCaptionColor
 
bool alt_down
 
QList< QProgressBar * > animatedProgressBars
 
int animateStep
 
int animateTimer
 
int animationFps
 
QColor inactiveCaptionColor
 
QColor inactiveCaptionText
 
QColor inactiveGradientCaptionColor
 
int menuBarTimer
 
QList< const QWidget * > seenAlt
 
QElapsedTimer startTime
 
- 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
 

Additional Inherited Members

- 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)
 

Detailed Description

Definition at line 69 of file qwindowsstyle_p.h.

Enumerations

◆ anonymous enum

anonymous enum
Enumerator
windowsItemFrame 
windowsSepHeight 
windowsItemHMargin 
windowsItemVMargin 
windowsArrowHMargin 
windowsRightBorder 
windowsCheckMarkWidth 

Definition at line 93 of file qwindowsstyle_p.h.

93  {
94  windowsItemFrame = 2, // menu item frame width
95  windowsSepHeight = 9, // separator item height
96  windowsItemHMargin = 3, // menu item hor text margin
97  windowsItemVMargin = 2, // menu item ver text margin
98  windowsArrowHMargin = 6, // arrow horizontal margin
99  windowsRightBorder = 15, // right border on windows
100  windowsCheckMarkWidth = 12 // checkmarks width on windows
101  };

Constructors and Destructors

◆ QWindowsStylePrivate()

QWindowsStylePrivate::QWindowsStylePrivate ( )

Definition at line 123 of file qwindowsstyle.cpp.

124  : alt_down(false), menuBarTimer(0), animationFps(10), animateTimer(0), animateStep(0)
125 {
126 #if defined(Q_WS_WIN) && !defined(Q_OS_WINCE)
129  QSystemLibrary shellLib(QLatin1String("shell32"));
130  pSHGetStockIconInfo = (PtrSHGetStockIconInfo)shellLib.resolve("SHGetStockIconInfo");
131  }
132 #endif
133  startTime.start();
134 }
QElapsedTimer startTime
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
static const WinVersion WindowsVersion
the version of the Windows operating system on which the application is run (Windows only) ...
Definition: qglobal.h:1613
HRESULT(WINAPI * PtrSHGetStockIconInfo)(int siid, int uFlags, QSHSTOCKICONINFO *psii)
void start()
Starts this timer.
static PtrSHGetStockIconInfo pSHGetStockIconInfo

Functions

◆ altDown()

bool QWindowsStylePrivate::altDown ( ) const
inline

Definition at line 77 of file qwindowsstyle_p.h.

77 { return alt_down; }

◆ hasSeenAlt()

bool QWindowsStylePrivate::hasSeenAlt ( const QWidget widget) const

Definition at line 157 of file qwindowsstyle.cpp.

158 {
159  widget = widget->window();
160  return seenAlt.contains(widget);
161 }
QBool contains(const T &t) const
Returns true if the list contains an occurrence of value; otherwise returns false.
Definition: qlist.h:880
QList< const QWidget * > seenAlt
QWidget * window() const
Returns the window for this widget, i.e.
Definition: qwidget.cpp:4492

◆ startAnimation()

void QWindowsStylePrivate::startAnimation ( QObject o,
QProgressBar bar 
)

Definition at line 136 of file qwindowsstyle.cpp.

137 {
138  if (!animatedProgressBars.contains(bar)) {
139  animatedProgressBars << bar;
140  if (!animateTimer) {
141  Q_ASSERT(animationFps > 0);
142  animateTimer = o->startTimer(1000 / animationFps);
143  }
144  }
145 }
int startTimer(int interval)
Starts a timer and returns a timer identifier, or returns zero if it could not start a timer...
Definition: qobject.cpp:1623
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
QBool contains(const T &t) const
Returns true if the list contains an occurrence of value; otherwise returns false.
Definition: qlist.h:880
QList< QProgressBar * > animatedProgressBars

◆ stopAnimation()

void QWindowsStylePrivate::stopAnimation ( QObject o,
QProgressBar bar 
)

Definition at line 147 of file qwindowsstyle.cpp.

148 {
152  animateTimer = 0;
153  }
154 }
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
Definition: qlist.h:152
QList< QProgressBar * > animatedProgressBars
void killTimer(int id)
Kills the timer with timer identifier, id.
Definition: qobject.cpp:1650
int removeAll(const T &t)
Removes all occurrences of value in the list and returns the number of entries removed.
Definition: qlist.h:770

Properties

◆ activeCaptionColor

QColor QWindowsStylePrivate::activeCaptionColor

Definition at line 88 of file qwindowsstyle_p.h.

Referenced by QWindowsStyle::polish().

◆ activeGradientCaptionColor

QColor QWindowsStylePrivate::activeGradientCaptionColor

Definition at line 89 of file qwindowsstyle_p.h.

Referenced by QWindowsStyle::polish().

◆ alt_down

bool QWindowsStylePrivate::alt_down

Definition at line 78 of file qwindowsstyle_p.h.

Referenced by altDown().

◆ animatedProgressBars

QList<QProgressBar *> QWindowsStylePrivate::animatedProgressBars

Definition at line 82 of file qwindowsstyle_p.h.

Referenced by startAnimation(), and stopAnimation().

◆ animateStep

int QWindowsStylePrivate::animateStep

Definition at line 86 of file qwindowsstyle_p.h.

◆ animateTimer

int QWindowsStylePrivate::animateTimer

Definition at line 84 of file qwindowsstyle_p.h.

Referenced by startAnimation(), and stopAnimation().

◆ animationFps

int QWindowsStylePrivate::animationFps

◆ inactiveCaptionColor

QColor QWindowsStylePrivate::inactiveCaptionColor

Definition at line 90 of file qwindowsstyle_p.h.

Referenced by QWindowsStyle::polish().

◆ inactiveCaptionText

QColor QWindowsStylePrivate::inactiveCaptionText

Definition at line 87 of file qwindowsstyle_p.h.

Referenced by QWindowsStyle::polish().

◆ inactiveGradientCaptionColor

QColor QWindowsStylePrivate::inactiveGradientCaptionColor

Definition at line 91 of file qwindowsstyle_p.h.

Referenced by QWindowsStyle::polish().

◆ menuBarTimer

int QWindowsStylePrivate::menuBarTimer

Definition at line 80 of file qwindowsstyle_p.h.

◆ seenAlt

QList<const QWidget *> QWindowsStylePrivate::seenAlt

Definition at line 79 of file qwindowsstyle_p.h.

Referenced by hasSeenAlt().

◆ startTime

QElapsedTimer QWindowsStylePrivate::startTime

Definition at line 85 of file qwindowsstyle_p.h.

Referenced by QWindowsStylePrivate().


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