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

#include <qwindowsmobilestyle_p.h>

Inheritance diagram for QWindowsMobileStylePrivate:
QWindowsStylePrivate QCommonStylePrivate QStylePrivate QObjectPrivate QObjectData

Public Functions

void drawPanelItemViewSelected (QPainter *painter, const QStyleOptionViewItemV4 *option, QRect rect=QRect())
 
void drawScrollbarGrip (QPainter *p, QStyleOptionSlider *newScrollbar, const QStyleOptionComplex *option, bool drawCompleteFrame)
 
void drawScrollbarGroove (QPainter *p, const QStyleOptionSlider *opt)
 
void drawScrollbarHandleDown (QPainter *p, QStyleOptionSlider *opt, bool completeFrame=false, bool secondScrollBar=false)
 
void drawScrollbarHandleUp (QPainter *p, QStyleOptionSlider *opt, bool completeFrame=false, bool secondScrollBar=false)
 
void drawTabBarTab (QPainter *p, const QStyleOptionTab *tab)
 
 QWindowsMobileStylePrivate ()
 
void setupWindowsMobileStyle65 ()
 
- Public Functions inherited from QWindowsStylePrivate
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

bool doubleControls
 
QImage imageArrowDown
 
QImage imageArrowDownBig
 
QImage imageArrowLeft
 
QImage imageArrowLeftBig
 
QImage imageArrowRight
 
QImage imageArrowRightBig
 
QImage imageArrowUp
 
QImage imageArrowUpBig
 
QImage imageChecked
 
QImage imageCheckedBold
 
QImage imageClose
 
QImage imageMaximize
 
QImage imageMinimize
 
QImage imageNormalize
 
QImage imageRadioButton
 
QImage imageRadioButtonChecked
 
QImage imageRadioButtonHighlighted
 
bool smartphone
 
- Public Variables inherited from QWindowsStylePrivate
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

- Public Types inherited from QWindowsStylePrivate
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 **)
 
- 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 67 of file qwindowsmobilestyle_p.h.

Constructors and Destructors

◆ QWindowsMobileStylePrivate()

QWindowsMobileStylePrivate::QWindowsMobileStylePrivate ( )

Definition at line 4521 of file qwindowsmobilestyle.cpp.

4522 
4523 #ifdef Q_WS_WINCE
4526 #else
4527  doubleControls = false;
4528  smartphone = false;
4529 #endif //Q_WS_WINCE
4530 
4531 #ifndef QT_NO_IMAGEFORMAT_XPM
4532 
4536  imageArrowRight = QImage(arrowleft_xpm).mirrored(true, false);
4537  if (doubleControls) {
4547  } else {
4557  }
4558 
4560 
4561 
4566 
4567 #endif
4568 }
static const char *const arrowleft_big_xpm[]
static const char *const max_small_xpm[]
static const char *const cross_small_xpm[]
static const char *const checkedlight_xpm[]
static const char *const radiochecked_xpm[]
static const char *const highlightedradiobutton_low_xpm[]
static const char *const radiochecked_low_xpm[]
static const char *const checkedbold_low_xpm[]
static const char *const arrowdown_big_xpm[]
static const char *const checkedbold_xpm[]
static const char *const min_small_xpm[]
static const char *const arrowleft_xpm[]
static const char *const radiobutton_low_xpm[]
bool qt_wince_is_smartphone()
static const char *const radiobutton_xpm[]
static const char *const normal_small_xpm[]
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
static const char *const checkedlight_low_xpm[]
static const char *const max_big_xpm[]
QImage mirrored(bool horizontally=false, bool vertically=true) const
Returns a mirror of the image, mirrored in the horizontal and/or the vertical direction depending on ...
Definition: qimage.cpp:4922
static const char *const normal_big_xpm[]
static const char *const min_big_xpm[]
static const char *const cross_big_xpm[]
static const char *const arrowdown_xpm[]
bool qt_wince_is_high_dpi()
static const char *const highlightedradiobutton_xpm[]

Functions

◆ drawPanelItemViewSelected()

void QWindowsMobileStylePrivate::drawPanelItemViewSelected ( QPainter painter,
const QStyleOptionViewItemV4 option,
QRect  rect = QRect() 
)

Definition at line 4217 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStyle::drawPrimitive().

4218 {
4219 #ifdef Q_WS_WINCE_WM
4220  if (wm65) {
4221  QRect r;
4222  if (rect.isValid())
4223  r = rect;
4224  else
4225  r = option->rect;
4226  tintImagesHigh(option->palette.highlight().color());
4227 
4228  painter->setPen(QColor(Qt::lightGray));
4229 
4231  painter->drawImage(r, imageListViewHighlightMiddle);
4232  } else if (option->viewItemPosition == QStyleOptionViewItemV4::Beginning) {
4233  painter->drawImage(r.adjusted(10, 0, 0, 0), imageListViewHighlightMiddle);
4234  } else if (option->viewItemPosition == QStyleOptionViewItemV4::End) {
4235  painter->drawImage(r.adjusted(0, 0, -10, 0), imageListViewHighlightMiddle);
4236  } else {
4237  painter->drawImage(r.adjusted(10, 0, -10, 0), imageListViewHighlightMiddle);
4238  }
4239 
4240  QImage cornerLeft = imageListViewHighlightCornerLeft;
4241  QImage cornerRight = imageListViewHighlightCornerRight;
4242 
4243  int width = r.width() > cornerRight.width() ? r.width() : cornerRight.width();
4244 
4245  if ((width * 2) > r.width()) {
4246  width = (r.width() - 5) / 2;
4247  }
4248 
4249  cornerLeft = cornerLeft.scaled(width, r.height());
4250  cornerRight = cornerRight.scaled(width, r.height());
4251 
4253  painter->drawImage(r.topLeft(), cornerLeft);
4254  }
4256  painter->drawImage(r.topRight() - QPoint(cornerRight.width(),0), cornerRight);
4257  }
4258  return;
4259  }
4260 #endif //Q_WS_WINCE_WM
4263 
4264  if (rect.isValid())
4265  painter->fillRect(rect, option->palette.brush(cg, QPalette::Highlight));
4266  else
4267  painter->fillRect(option->rect, option->palette.brush(cg, QPalette::Highlight));
4268 }
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition: qcolor.h:67
const QBrush & highlight() const
Returns the highlight brush of the current color group.
Definition: qpalette.h:140
QRect adjusted(int x1, int y1, int x2, int y2) const
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of ...
Definition: qrect.h:431
const QColor & color() const
Returns the brush color.
Definition: qbrush.h:183
QStyle::State state
the style flags that are used when drawing the control
Definition: qstyleoption.h:88
int width() const
Returns the width of the rectangle.
Definition: qrect.h:303
int height() const
Returns the height of the rectangle.
Definition: qrect.h:306
ColorGroup
Definition: qpalette.h:92
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
const QBrush & brush(ColorGroup cg, ColorRole cr) const
Returns the brush in the specified color group, used for the given color role.
Definition: qpalette.cpp:874
ViewItemPosition viewItemPosition
Gives the position of this view item relative to other items.
Definition: qstyleoption.h:619
QPoint topRight() const
Returns the position of the rectangle&#39;s top-right corner.
Definition: qrect.h:294
QPalette palette
the palette that should be used when painting the control
Definition: qstyleoption.h:92
int width() const
Returns the width of the image.
Definition: qimage.cpp:1557
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
void setPen(const QColor &color)
Sets the painter&#39;s pen to have style Qt::SolidLine, width 0 and the specified color.
Definition: qpainter.cpp:4047
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
void drawImage(const QRectF &targetRect, const QImage &image, const QRectF &sourceRect, Qt::ImageConversionFlags flags=Qt::AutoColor)
Definition: qpainter.cpp:5936
QImage scaled(int w, int h, Qt::AspectRatioMode aspectMode=Qt::IgnoreAspectRatio, Qt::TransformationMode mode=Qt::FastTransformation) const
Definition: qimage.h:232
bool isValid() const
Returns true if the rectangle is valid, otherwise returns false.
Definition: qrect.h:237
QRect rect
the area that should be used for various calculations and painting
Definition: qstyleoption.h:90
void fillRect(const QRectF &, const QBrush &)
Fills the given rectangle with the brush specified.
Definition: qpainter.cpp:7420
QPoint topLeft() const
Returns the position of the rectangle&#39;s top-left corner.
Definition: qrect.h:288

◆ drawScrollbarGrip()

void QWindowsMobileStylePrivate::drawScrollbarGrip ( QPainter p,
QStyleOptionSlider newScrollbar,
const QStyleOptionComplex option,
bool  drawCompleteFrame 
)

Definition at line 4270 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStyle::drawComplexControl().

4271 {
4272 #ifdef Q_WS_WINCE_WM
4273  if (wm65) {
4274  if (newScrollbar->orientation == Qt::Horizontal) {
4275  QTransform transform;
4276  transform.rotate(-90);
4277  QRect r = newScrollbar->rect;
4278  p->drawImage(r.adjusted(10, 0, -10, 0), imageScrollbarGripMiddle.transformed(transform));
4279  p->drawImage(r.topLeft(), imageScrollbarGripUp.transformed(transform));
4280  p->drawImage(r.topRight() - QPoint(imageScrollbarGripDown.height() - 1, 0), imageScrollbarGripDown.transformed(transform));
4281  } else {
4282  QRect r = newScrollbar->rect;
4283  p->drawImage(r.adjusted(0, 10, 0, -10), imageScrollbarGripMiddle);
4284  p->drawImage(r.topLeft(), imageScrollbarGripUp);
4285  p->drawImage(r.bottomLeft() - QPoint(0, imageScrollbarGripDown.height() - 1), imageScrollbarGripDown);
4286  }
4287  return ;
4288  }
4289 #endif
4290  if (newScrollbar->orientation == Qt::Horizontal) {
4291  p->fillRect(newScrollbar->rect,option->palette.button());
4292  QRect r = newScrollbar->rect;
4293  p->drawLine(r.topLeft(), r.bottomLeft());
4294  p->drawLine(r.topRight(), r.bottomRight());
4295  if (smartphone) {
4296  p->drawLine(r.topLeft(), r.topRight());
4297  p->drawLine(r.bottomLeft(), r.bottomRight());
4298  }
4299  }
4300  else {
4301  p->fillRect(newScrollbar->rect,option->palette.button());
4302  QRect r = newScrollbar->rect;
4303  p->drawLine(r.topLeft(), r.topRight());
4304  p->drawLine(r.bottomLeft(), r.bottomRight());
4305  if (smartphone) {
4306  p->drawLine(r.topLeft(), r.bottomLeft());
4307  p->drawLine(r.topRight(), r.bottomRight());
4308  }
4309  }
4310  if (newScrollbar->state & QStyle::State_HasFocus) {
4311  QStyleOptionFocusRect fropt;
4312  fropt.QStyleOption::operator=(*newScrollbar);
4313  fropt.rect.setRect(newScrollbar->rect.x() + 2, newScrollbar->rect.y() + 2,
4314  newScrollbar->rect.width() - 5,
4315  newScrollbar->rect.height() - 5);
4316  }
4317  int gripMargin = doubleControls ? 4 : 2;
4318  int doubleLines = doubleControls ? 2 : 1;
4319  //If there is a frame around the scrollbar (abstractScrollArea),
4320  //then the margin is different, because of the missing frame
4321  int gripMarginFrame = doubleControls ? 3 : 1;
4322  if (drawCompleteFrame)
4323  gripMarginFrame = 0;
4324  //draw grips
4325  if (!smartphone)
4326  if (newScrollbar->orientation == Qt::Horizontal) {
4327  for (int i = -3; i < 3; i += 2) {
4328  p->drawLine(
4329  QPoint(newScrollbar->rect.center().x() + i * doubleLines + 1,
4330  newScrollbar->rect.top() + gripMargin +gripMarginFrame),
4331  QPoint(newScrollbar->rect.center().x() + i * doubleLines + 1,
4332  newScrollbar->rect.bottom() - gripMargin));
4333  }
4334  } else {
4335  for (int i = -2; i < 4 ; i += 2) {
4336  p->drawLine(
4337  QPoint(newScrollbar->rect.left() + gripMargin + gripMarginFrame ,
4338  newScrollbar->rect.center().y() + 1 + i * doubleLines - 1),
4339  QPoint(newScrollbar->rect.right() - gripMargin,
4340  newScrollbar->rect.center().y() + 1 + i * doubleLines - 1));
4341  }
4342  }
4343  if (!smartphone) {
4344  QRect r;
4345  if (doubleControls)
4346  r = option->rect.adjusted(1, 1, -1, 0);
4347  else
4348  r = option->rect.adjusted(0, 0, -1, 0);
4349  if (drawCompleteFrame && doubleControls)
4350  r.adjust(0, 0, 0, -1);
4351  //Check if the scrollbar is part of an abstractItemView and draw the frame according
4352  if (drawCompleteFrame)
4353  p->drawRect(r);
4354  else
4355  if (newScrollbar->orientation == Qt::Horizontal)
4356  p->drawLine(r.topLeft(), r.topRight());
4357  else
4358  p->drawLine(r.topLeft(), r.bottomLeft());
4359  }
4360 }
QRect adjusted(int x1, int y1, int x2, int y2) const
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of ...
Definition: qrect.h:431
QStyle::State state
the style flags that are used when drawing the control
Definition: qstyleoption.h:88
int left() const
Returns the x-coordinate of the rectangle&#39;s left edge.
Definition: qrect.h:240
int width() const
Returns the width of the rectangle.
Definition: qrect.h:303
void drawLine(const QLineF &line)
Draws a line defined by line.
Definition: qpainter.h:573
int height() const
Returns the height of the rectangle.
Definition: qrect.h:306
int bottom() const
Returns the y-coordinate of the rectangle&#39;s bottom edge.
Definition: qrect.h:249
QPoint bottomRight() const
Returns the position of the rectangle&#39;s bottom-right corner.
Definition: qrect.h:291
QTransform & rotate(qreal a, Qt::Axis axis=Qt::ZAxis)
Rotates the coordinate system counterclockwise by the given angle about the specified axis and return...
Definition: qtransform.cpp:615
void adjust(int x1, int y1, int x2, int y2)
Adds dx1, dy1, dx2 and dy2 respectively to the existing coordinates of the rectangle.
Definition: qrect.h:434
The QStyleOptionFocusRect class is used to describe the parameters for drawing a focus rectangle with...
Definition: qstyleoption.h:103
QPoint topRight() const
Returns the position of the rectangle&#39;s top-right corner.
Definition: qrect.h:294
QPalette palette
the palette that should be used when painting the control
Definition: qstyleoption.h:92
QPoint center() const
Returns the center point of the rectangle.
Definition: qrect.h:300
int top() const
Returns the y-coordinate of the rectangle&#39;s top edge.
Definition: qrect.h:243
int right() const
Returns the x-coordinate of the rectangle&#39;s right edge.
Definition: qrect.h:246
QPoint bottomLeft() const
Returns the position of the rectangle&#39;s bottom-left corner.
Definition: qrect.h:297
int y() const
Returns the y-coordinate of the rectangle&#39;s top edge.
Definition: qrect.h:255
int x() const
Returns the x-coordinate of the rectangle&#39;s left edge.
Definition: qrect.h:252
void setRect(int x, int y, int w, int h)
Sets the coordinates of the rectangle&#39;s top-left corner to ({x}, {y}), and its size to the given widt...
Definition: qrect.h:400
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
void drawRect(const QRectF &rect)
Draws the current rectangle with the current pen and brush.
Definition: qpainter.h:650
int y() const
Returns the y coordinate of this point.
Definition: qpoint.h:131
void drawImage(const QRectF &targetRect, const QImage &image, const QRectF &sourceRect, Qt::ImageConversionFlags flags=Qt::AutoColor)
Definition: qpainter.cpp:5936
Qt::Orientation orientation
the slider&#39;s orientation (horizontal or vertical)
Definition: qstyleoption.h:707
return(isPopup||isToolTip)
int x() const
Returns the x coordinate of this point.
Definition: qpoint.h:128
const QBrush & button() const
Returns the button brush of the current color group.
Definition: qpalette.h:125
QRect rect
the area that should be used for various calculations and painting
Definition: qstyleoption.h:90
void fillRect(const QRectF &, const QBrush &)
Fills the given rectangle with the brush specified.
Definition: qpainter.cpp:7420
The QTransform class specifies 2D transformations of a coordinate system.
Definition: qtransform.h:65
QPoint topLeft() const
Returns the position of the rectangle&#39;s top-left corner.
Definition: qrect.h:288

◆ drawScrollbarGroove()

void QWindowsMobileStylePrivate::drawScrollbarGroove ( QPainter p,
const QStyleOptionSlider opt 
)

Definition at line 4480 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStyle::drawComplexControl().

4481 {
4482 #ifndef QT_NO_SCROLLBAR
4483 #ifdef Q_OS_WINCE_WM
4484  if (wm65) {
4485  p->fillRect(opt->rect, QColor(231, 231, 231));
4486  return ;
4487  }
4488 #endif
4489  QBrush fill;
4490  if (smartphone) {
4491  fill = opt->palette.light();
4492  p->fillRect(opt->rect, fill);
4493  fill = opt->palette.button();
4494  QImage image;
4495 #ifndef QT_NO_IMAGEFORMAT_XPM
4496  if (opt->orientation == Qt::Horizontal)
4497  image = QImage(vertlines_xpm);
4498  else
4499  image = QImage(horlines_xpm);
4500 #endif
4501  image.setColor(1, opt->palette.button().color().rgb());
4502  fill.setTextureImage(image);
4503  }
4504  else {
4505  fill = opt->palette.light();
4506  }
4507  p->fillRect(opt->rect, fill);
4508 #endif //QT_NO_SCROLLBAR
4509 }
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition: qcolor.h:67
static const char *const vertlines_xpm[]
void setColor(int i, QRgb c)
Sets the color at the given index in the color table, to the given to colorValue. ...
Definition: qimage.cpp:1850
const QColor & color() const
Returns the brush color.
Definition: qbrush.h:183
const QBrush & light() const
Returns the light brush of the current color group.
Definition: qpalette.h:126
static const char *const horlines_xpm[]
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
QPalette palette
the palette that should be used when painting the control
Definition: qstyleoption.h:92
The QBrush class defines the fill pattern of shapes drawn by QPainter.
Definition: qbrush.h:76
void setTextureImage(const QImage &image)
Sets the brush image to image.
Definition: qbrush.cpp:856
Qt::Orientation orientation
the slider&#39;s orientation (horizontal or vertical)
Definition: qstyleoption.h:707
return(isPopup||isToolTip)
const QBrush & button() const
Returns the button brush of the current color group.
Definition: qpalette.h:125
QRect rect
the area that should be used for various calculations and painting
Definition: qstyleoption.h:90
QRgb rgb() const
Returns the RGB value of the color.
Definition: qcolor.cpp:1051
void fillRect(const QRectF &, const QBrush &)
Fills the given rectangle with the brush specified.
Definition: qpainter.cpp:7420

◆ drawScrollbarHandleDown()

void QWindowsMobileStylePrivate::drawScrollbarHandleDown ( QPainter p,
QStyleOptionSlider opt,
bool  completeFrame = false,
bool  secondScrollBar = false 
)

Definition at line 4418 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStyle::drawComplexControl().

4419 {
4420 #ifndef QT_NO_SCROLLBAR
4421 #ifdef Q_WS_WINCE_WM
4422  if (wm65) {
4423  tintImagesHigh(opt->palette.highlight().color());
4424  QRect r = opt->rect;
4425  if (opt->orientation == Qt::Horizontal) {
4426  QTransform transform;
4427  transform.rotate(-90);
4428  if (opt->state & QStyle::State_Sunken)
4429  p->drawImage(r.topLeft(), imageScrollbarHandleDownHigh.transformed(transform));
4430  else
4431  p->drawImage(r.topLeft(), imageScrollbarHandleDown.transformed(transform));
4432  } else {
4433  if (opt->state & QStyle::State_Sunken)
4434  p->drawImage(r.topLeft(), imageScrollbarHandleDownHigh);
4435  else
4436  p->drawImage(r.topLeft(), imageScrollbarHandleDown);
4437  }
4438  return ;
4439  }
4440 #endif //Q_WS_WINCE_WM
4441 
4442  QBrush fill = opt->palette.button();
4443  if (opt->state & QStyle::State_Sunken)
4444  fill = opt->palette.shadow();
4445 
4446  QStyleOption arrowOpt = *opt;
4447  if (doubleControls)
4448  arrowOpt.rect = opt->rect.adjusted(4, 0, -5, 3);
4449  else
4450  arrowOpt.rect = opt->rect.adjusted(5, 6, -4, -3);
4451 
4452  bool horizontal = (opt->orientation == Qt::Horizontal);
4453 
4454  if (horizontal) {
4455  p->fillRect(opt->rect,fill);
4456  QRect r = opt->rect.adjusted(0, 0, 0, 0);
4457  p->drawLine(r.topLeft(), r.bottomLeft());
4458  if (secondScrollBar)
4459  p->drawLine(r.topRight(), r.bottomRight());
4460  if (doubleControls)
4461  arrowOpt.rect.adjust(0, 4, 0, 4 );
4462  q_func()->proxy()->drawPrimitive(QStyle::PE_IndicatorArrowRight, &arrowOpt, p, 0);
4463  } else {
4464  p->fillRect(opt->rect,fill);
4465  QRect r = opt->rect.adjusted(0, -1, 0, -1);
4466  p->drawLine(r.topLeft(), r.topRight());
4467  if (secondScrollBar)
4468  p->drawLine(r.bottomLeft() + QPoint(0,1), r.bottomRight() + QPoint(0, 1));
4469  if (completeFrame)
4470  arrowOpt.rect.adjust(-2, 0, -2, 0);
4471  if (doubleControls)
4472  arrowOpt.rect.adjust(1, 0, 1, 0 );
4473  if (completeFrame && doubleControls)
4474  arrowOpt.rect.adjust(1, 0, 1, 0);
4475  q_func()->proxy()->drawPrimitive(QStyle::PE_IndicatorArrowDown, &arrowOpt, p, 0);
4476  }
4477 #endif //QT_NO_SCROLLBAR
4478 }
const QBrush & highlight() const
Returns the highlight brush of the current color group.
Definition: qpalette.h:140
QRect adjusted(int x1, int y1, int x2, int y2) const
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of ...
Definition: qrect.h:431
const QColor & color() const
Returns the brush color.
Definition: qbrush.h:183
QStyle::State state
the style flags that are used when drawing the control
Definition: qstyleoption.h:88
void drawLine(const QLineF &line)
Draws a line defined by line.
Definition: qpainter.h:573
QPoint bottomRight() const
Returns the position of the rectangle&#39;s bottom-right corner.
Definition: qrect.h:291
The QStyleOption class stores the parameters used by QStyle functions.
Definition: qstyleoption.h:67
QTransform & rotate(qreal a, Qt::Axis axis=Qt::ZAxis)
Rotates the coordinate system counterclockwise by the given angle about the specified axis and return...
Definition: qtransform.cpp:615
void adjust(int x1, int y1, int x2, int y2)
Adds dx1, dy1, dx2 and dy2 respectively to the existing coordinates of the rectangle.
Definition: qrect.h:434
QPoint topRight() const
Returns the position of the rectangle&#39;s top-right corner.
Definition: qrect.h:294
QPalette palette
the palette that should be used when painting the control
Definition: qstyleoption.h:92
The QBrush class defines the fill pattern of shapes drawn by QPainter.
Definition: qbrush.h:76
const QBrush & shadow() const
Returns the shadow brush of the current color group.
Definition: qpalette.h:139
QPoint bottomLeft() const
Returns the position of the rectangle&#39;s bottom-left corner.
Definition: qrect.h:297
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
void drawImage(const QRectF &targetRect, const QImage &image, const QRectF &sourceRect, Qt::ImageConversionFlags flags=Qt::AutoColor)
Definition: qpainter.cpp:5936
Qt::Orientation orientation
the slider&#39;s orientation (horizontal or vertical)
Definition: qstyleoption.h:707
return(isPopup||isToolTip)
const QBrush & button() const
Returns the button brush of the current color group.
Definition: qpalette.h:125
QRect rect
the area that should be used for various calculations and painting
Definition: qstyleoption.h:90
void fillRect(const QRectF &, const QBrush &)
Fills the given rectangle with the brush specified.
Definition: qpainter.cpp:7420
The QTransform class specifies 2D transformations of a coordinate system.
Definition: qtransform.h:65
QPoint topLeft() const
Returns the position of the rectangle&#39;s top-left corner.
Definition: qrect.h:288

◆ drawScrollbarHandleUp()

void QWindowsMobileStylePrivate::drawScrollbarHandleUp ( QPainter p,
QStyleOptionSlider opt,
bool  completeFrame = false,
bool  secondScrollBar = false 
)

Definition at line 4362 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStyle::drawComplexControl().

4363 {
4364 #ifdef Q_WS_WINCE_WM
4365  if (wm65) {
4366  tintImagesHigh(opt->palette.highlight().color());
4367  QRect r = opt->rect;
4368  if (opt->orientation == Qt::Horizontal) {
4369  QTransform transform;
4370  transform.rotate(-90);
4371  if (opt->state & QStyle::State_Sunken)
4372  p->drawImage(r.topLeft(), imageScrollbarHandleUpHigh.transformed(transform));
4373  else
4374  p->drawImage(r.topLeft(), imageScrollbarHandleUp.transformed(transform));
4375  } else {
4376  if (opt->state & QStyle::State_Sunken)
4377  p->drawImage(r.topLeft(), imageScrollbarHandleUpHigh);
4378  else
4379  p->drawImage(r.topLeft(), imageScrollbarHandleUp);
4380  }
4381  return ;
4382  }
4383 #endif //Q_WS_WINCE_WM
4384 
4385  QBrush fill = opt->palette.button();
4386  if (opt->state & QStyle::State_Sunken)
4387  fill = opt->palette.shadow();
4388 
4389  QStyleOption arrowOpt = *opt;
4390  if (doubleControls)
4391  arrowOpt.rect = opt->rect.adjusted(4, 6, -5, -3);
4392  else
4393  arrowOpt.rect = opt->rect.adjusted(5, 6, -4, -3);
4394 
4395  bool horizontal = (opt->orientation == Qt::Horizontal);
4396 
4397  if (horizontal) {
4398  p->fillRect(opt->rect,fill);
4399  QRect r = opt->rect.adjusted(0,0,1,0);
4400  p->drawLine(r.topRight(), r.bottomRight());
4401  if (doubleControls)
4402  arrowOpt.rect.adjust(0, -2 ,0, -2);
4403  q_func()->proxy()->drawPrimitive(QStyle::PE_IndicatorArrowLeft, &arrowOpt, p, 0);
4404  } else {
4405  p->fillRect(opt->rect,fill);
4406  QRect r = opt->rect.adjusted(0, 0, 0, 1);
4407  p->drawLine(r.bottomLeft(), r.bottomRight());
4408  if (completeFrame)
4409  arrowOpt.rect.adjust(-2, 0, -2, 0);
4410  if (doubleControls)
4411  arrowOpt.rect.adjust(0, -4 , 0, -4);
4412  if (completeFrame && doubleControls)
4413  arrowOpt.rect.adjust(2, 0, 2, 0);
4414  q_func()->proxy()->drawPrimitive(QStyle::PE_IndicatorArrowUp, &arrowOpt, p, 0);
4415  }
4416 }
const QBrush & highlight() const
Returns the highlight brush of the current color group.
Definition: qpalette.h:140
QRect adjusted(int x1, int y1, int x2, int y2) const
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of ...
Definition: qrect.h:431
const QColor & color() const
Returns the brush color.
Definition: qbrush.h:183
QStyle::State state
the style flags that are used when drawing the control
Definition: qstyleoption.h:88
void drawLine(const QLineF &line)
Draws a line defined by line.
Definition: qpainter.h:573
QPoint bottomRight() const
Returns the position of the rectangle&#39;s bottom-right corner.
Definition: qrect.h:291
The QStyleOption class stores the parameters used by QStyle functions.
Definition: qstyleoption.h:67
QTransform & rotate(qreal a, Qt::Axis axis=Qt::ZAxis)
Rotates the coordinate system counterclockwise by the given angle about the specified axis and return...
Definition: qtransform.cpp:615
void adjust(int x1, int y1, int x2, int y2)
Adds dx1, dy1, dx2 and dy2 respectively to the existing coordinates of the rectangle.
Definition: qrect.h:434
QPoint topRight() const
Returns the position of the rectangle&#39;s top-right corner.
Definition: qrect.h:294
QPalette palette
the palette that should be used when painting the control
Definition: qstyleoption.h:92
The QBrush class defines the fill pattern of shapes drawn by QPainter.
Definition: qbrush.h:76
const QBrush & shadow() const
Returns the shadow brush of the current color group.
Definition: qpalette.h:139
QPoint bottomLeft() const
Returns the position of the rectangle&#39;s bottom-left corner.
Definition: qrect.h:297
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
void drawImage(const QRectF &targetRect, const QImage &image, const QRectF &sourceRect, Qt::ImageConversionFlags flags=Qt::AutoColor)
Definition: qpainter.cpp:5936
Qt::Orientation orientation
the slider&#39;s orientation (horizontal or vertical)
Definition: qstyleoption.h:707
return(isPopup||isToolTip)
const QBrush & button() const
Returns the button brush of the current color group.
Definition: qpalette.h:125
QRect rect
the area that should be used for various calculations and painting
Definition: qstyleoption.h:90
void fillRect(const QRectF &, const QBrush &)
Fills the given rectangle with the brush specified.
Definition: qpainter.cpp:7420
The QTransform class specifies 2D transformations of a coordinate system.
Definition: qtransform.h:65

◆ drawTabBarTab()

void QWindowsMobileStylePrivate::drawTabBarTab ( QPainter p,
const QStyleOptionTab tab 
)

Definition at line 4125 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStyle::drawControl().

4126 {
4127 #ifndef QT_NO_TABBAR
4128 #ifdef Q_WS_WINCE_WM
4129  if (wm65) {
4130  tintImagesButton(tab->palette.button().color());
4131  QRect r;
4132  r.setTopLeft(tab->rect.topRight() - QPoint(imageTabMiddle.width(), 0));
4133  r.setBottomRight(tab->rect.bottomRight());
4134  if (tab->state & QStyle::State_Selected) {
4135  painter->fillRect(tab->rect, tab->palette.window());
4136  } else {
4137  painter->fillRect(tab->rect, QColor(imageTabMiddle.pixel(0,0)));
4138  }
4140  painter->drawImage(r, imageTabSelectedBegin);
4141  } else if (tab->position == QStyleOptionTab::End ||
4143  if (!(tab->state & QStyle::State_Selected)) {
4144  painter->drawImage(r, imageTabEnd);
4145  }
4146  } else if (tab->state & QStyle::State_Selected) {
4147  painter->drawImage(r, imageTabSelectedEnd);
4148  } else {
4149  painter->drawImage(r, imageTabMiddle);
4150  }
4152  painter->drawImage(tab->rect.topLeft() - QPoint(imageTabMiddle.width() * 0.60, 0), imageTabSelectedEnd);
4153  }
4154  //imageTabBarBig
4155  return;
4156  }
4157 #endif //Q_WS_WINCE_WM
4158  painter->save();
4159  painter->setPen(tab->palette.shadow().color());
4160  if (doubleControls) {
4161  QPen pen = painter->pen();
4162  pen.setWidth(2);
4163  pen.setCapStyle(Qt::FlatCap);
4164  painter->setPen(pen);
4165  }
4166  if(tab->shape == QTabBar::RoundedNorth) {
4167  if (tab->state & QStyle::State_Selected) {
4168  painter->fillRect(tab->rect, tab->palette.light());
4169  painter->drawLine(tab->rect.topRight(), tab->rect.bottomRight());
4170  }
4171  else {
4172  painter->fillRect(tab->rect, tab->palette.button());
4173  painter->drawLine(tab->rect.bottomLeft() , tab->rect.bottomRight());
4174  painter->drawLine(tab->rect.topRight(), tab->rect.bottomRight());
4175  }
4176  }
4177  else if(tab->shape == QTabBar::RoundedSouth) {
4178  if (tab->state & QStyle::State_Selected) {
4179  painter->fillRect(tab->rect.adjusted(0,-2,0,0), tab->palette.light());
4180  painter->drawLine(tab->rect.topRight(), tab->rect.bottomRight());
4181  }
4182  else {
4183  painter->fillRect(tab->rect, tab->palette.button());
4184  if (doubleControls)
4185  painter->drawLine(tab->rect.topLeft() + QPoint(0,1), tab->rect.topRight() + QPoint(0,1));
4186  else
4187  painter->drawLine(tab->rect.topLeft(), tab->rect.topRight());
4188  painter->drawLine(tab->rect.topRight(), tab->rect.bottomRight());
4189  }
4190  }
4191  else if(tab->shape == QTabBar::RoundedEast) {
4192  if (tab->state & QStyle::State_Selected) {
4193  painter->fillRect(tab->rect, tab->palette.light());
4194  painter->drawLine(tab->rect.topLeft(), tab->rect.topRight());
4195  }
4196  else {
4197  painter->fillRect(tab->rect, tab->palette.button());
4198  painter->drawLine(tab->rect.topLeft(), tab->rect.bottomLeft());
4199  painter->drawLine(tab->rect.topLeft(), tab->rect.topRight());
4200  }
4201  }
4202  else if(tab->shape == QTabBar::RoundedWest) {
4203  if (tab->state & QStyle::State_Selected) {
4204  painter->fillRect(tab->rect, tab->palette.light());
4205  painter->drawLine(tab->rect.bottomLeft(), tab->rect.bottomRight());
4206  }
4207  else {
4208  painter->fillRect(tab->rect, tab->palette.button());
4209  painter->drawLine(tab->rect.topRight(), tab->rect.bottomRight());
4210  painter->drawLine(tab->rect.bottomLeft(), tab->rect.bottomRight());
4211  }
4212  }
4213  painter->restore();
4214 #endif //QT_NO_TABBAR
4215 }
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition: qcolor.h:67
QRect adjusted(int x1, int y1, int x2, int y2) const
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of ...
Definition: qrect.h:431
const QColor & color() const
Returns the brush color.
Definition: qbrush.h:183
QStyle::State state
the style flags that are used when drawing the control
Definition: qstyleoption.h:88
void setCapStyle(Qt::PenCapStyle pcs)
Sets the pen&#39;s cap style to the given style.
Definition: qpen.cpp:723
TabPosition position
the position of the tab in the tab bar
Definition: qstyleoption.h:320
The QPen class defines how a QPainter should draw lines and outlines of shapes.
Definition: qpen.h:64
QTabBar::Shape shape
the tab shape used to draw the tab; by default QTabBar::RoundedNorth
Definition: qstyleoption.h:316
QPoint bottomRight() const
Returns the position of the rectangle&#39;s bottom-right corner.
Definition: qrect.h:291
const QBrush & light() const
Returns the light brush of the current color group.
Definition: qpalette.h:126
void setTopLeft(const QPoint &p)
Set the top-left corner of the rectangle to the given position.
Definition: qrect.h:270
QPoint topRight() const
Returns the position of the rectangle&#39;s top-right corner.
Definition: qrect.h:294
QPalette palette
the palette that should be used when painting the control
Definition: qstyleoption.h:92
const QBrush & shadow() const
Returns the shadow brush of the current color group.
Definition: qpalette.h:139
SelectedPosition selectedPosition
the position of the selected tab in relation to this tab
Definition: qstyleoption.h:321
QPoint bottomLeft() const
Returns the position of the rectangle&#39;s bottom-left corner.
Definition: qrect.h:297
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
const QBrush & button() const
Returns the button brush of the current color group.
Definition: qpalette.h:125
const QBrush & window() const
Returns the window (general background) brush of the current color group.
Definition: qpalette.h:135
QRect rect
the area that should be used for various calculations and painting
Definition: qstyleoption.h:90
void setWidth(int width)
Sets the pen width to the given width in pixels with integer precision.
Definition: qpen.cpp:667
QPoint topLeft() const
Returns the position of the rectangle&#39;s top-left corner.
Definition: qrect.h:288

◆ setupWindowsMobileStyle65()

void QWindowsMobileStylePrivate::setupWindowsMobileStyle65 ( )

Definition at line 4101 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStylePrivate().

4102 {
4103 #ifdef Q_WS_WINCE_WM
4105  if (wm65) {
4106  imageScrollbarHandleUp = QImage(sbhandleup_xpm);
4107  imageScrollbarHandleDown = QImage(sbhandledown_xpm);
4108  imageScrollbarGripUp = QImage(sbgripup_xpm);
4109  imageScrollbarGripDown = QImage(sbgripdown_xpm);
4110  imageScrollbarGripMiddle = QImage(sbgripmiddle_xpm);
4111 
4112  if (!doubleControls) {
4113  imageScrollbarHandleUp = imageScrollbarHandleUp.scaledToHeight(imageScrollbarHandleUp.height() / 2);
4114  imageScrollbarHandleDown = imageScrollbarHandleDown.scaledToHeight(imageScrollbarHandleDown.height() / 2);
4115  imageScrollbarGripMiddle = imageScrollbarGripMiddle.scaledToHeight(imageScrollbarGripMiddle.height() / 2);
4116  imageScrollbarGripUp = imageScrollbarGripUp.scaledToHeight(imageScrollbarGripUp.height() / 2);
4117  imageScrollbarGripDown = imageScrollbarGripDown.scaledToHeight(imageScrollbarGripDown.height() / 2);
4118  } else {
4119  }
4120  tintImagesHigh(Qt::blue);
4121  }
4122 #endif //Q_WS_WINCE_WM
4123 }
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
bool qt_wince_is_windows_mobile_65()

Properties

◆ doubleControls

bool QWindowsMobileStylePrivate::doubleControls

◆ imageArrowDown

QImage QWindowsMobileStylePrivate::imageArrowDown

◆ imageArrowDownBig

QImage QWindowsMobileStylePrivate::imageArrowDownBig

◆ imageArrowLeft

QImage QWindowsMobileStylePrivate::imageArrowLeft

◆ imageArrowLeftBig

QImage QWindowsMobileStylePrivate::imageArrowLeftBig

◆ imageArrowRight

QImage QWindowsMobileStylePrivate::imageArrowRight

◆ imageArrowRightBig

QImage QWindowsMobileStylePrivate::imageArrowRightBig

◆ imageArrowUp

QImage QWindowsMobileStylePrivate::imageArrowUp

◆ imageArrowUpBig

QImage QWindowsMobileStylePrivate::imageArrowUpBig

◆ imageChecked

QImage QWindowsMobileStylePrivate::imageChecked

◆ imageCheckedBold

QImage QWindowsMobileStylePrivate::imageCheckedBold

◆ imageClose

QImage QWindowsMobileStylePrivate::imageClose

◆ imageMaximize

QImage QWindowsMobileStylePrivate::imageMaximize

◆ imageMinimize

QImage QWindowsMobileStylePrivate::imageMinimize

◆ imageNormalize

QImage QWindowsMobileStylePrivate::imageNormalize

◆ imageRadioButton

QImage QWindowsMobileStylePrivate::imageRadioButton

◆ imageRadioButtonChecked

QImage QWindowsMobileStylePrivate::imageRadioButtonChecked

◆ imageRadioButtonHighlighted

QImage QWindowsMobileStylePrivate::imageRadioButtonHighlighted

◆ smartphone

bool QWindowsMobileStylePrivate::smartphone

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