Qt 4.8
Enumerations | Functions | Variables
qwindowsmobilestyle.cpp File Reference
#include "qwindowsmobilestyle.h"
#include "qwindowsmobilestyle_p.h"
#include "qpainterpath.h"
#include "qapplication.h"
#include "qdesktopwidget.h"
#include "qwidget.h"
#include "qdockwidget.h"
#include "qframe.h"
#include "qmenu.h"
#include "qpaintengine.h"
#include "qpainter.h"
#include "qgroupbox.h"
#include "qstyleoption.h"
#include "qlistview.h"
#include "qdrawutil.h"
#include "qtoolbar.h"
#include "qabstractscrollarea.h"
#include "qabstractbutton.h"
#include "qcombobox.h"
#include "qscrollbar.h"
#include "qabstractitemview.h"
#include "qmenubar.h"
#include "qtoolbutton.h"
#include "qtextedit.h"
#include "qdialog.h"
#include "qdebug.h"
#include "qtabwidget.h"
#include "qt_windows.h"
#include "qguifunctions_wince.h"
#include "qstylehelper_p.h"

Go to the source code of this file.

Enumerations

enum  QSliderDirection {
  SlUp, SlDown, SlLeft, SlRight,
  SliderUp, SliderDown, SliderLeft, SliderRight,
  SlUp, SlDown, SlLeft, SlRight
}
 

Functions

bool qt_wince_is_high_dpi ()
 
bool qt_wince_is_smartphone ()
 
bool qt_wince_is_windows_mobile_65 ()
 

Variables

static const char *const arrowdown_big_xpm []
 
static const char *const arrowdown_xpm []
 
static const char *const arrowleft_big_xpm []
 
static const char *const arrowleft_xpm []
 
static const char *const checkedbold_low_xpm []
 
static const char *const checkedbold_xpm []
 
static const char *const checkedlight_low_xpm []
 
static const char *const checkedlight_xpm []
 
static const char *const cross_big_xpm []
 
static const char *const cross_small_xpm []
 
static const char *const highlightedradiobutton_low_xpm []
 
static const char *const highlightedradiobutton_xpm []
 
static const char *const horlines_xpm []
 
static const char *const max_big_xpm []
 
static const char *const max_small_xpm []
 
static const char *const min_big_xpm []
 
static const char *const min_small_xpm []
 
static const char *const normal_big_xpm []
 
static const char *const normal_small_xpm []
 
static const int PE_IndicatorArrowDownBig = 0xf000102
 
static const int PE_IndicatorArrowLeftBig = 0xf000103
 
static const int PE_IndicatorArrowRightBig = 0xf000104
 
static const int PE_IndicatorArrowUpBig = 0xf000101
 
static const char *const radiobutton_low_xpm []
 
static const char *const radiobutton_xpm []
 
static const char *const radiochecked_low_xpm []
 
static const char *const radiochecked_xpm []
 
static const char *const vertlines_xpm []
 
static const int windowsItemFrame = 1
 
static const int windowsMobileExclusiveIndicatorSize = 14
 
static const int windowsMobileFrameGroupBoxOffset = 9
 
static const int windowsMobileIconSize = 16
 
static const int windowsMobileIndicatorSize = 14
 
static const int windowsMobileitemViewCheckBoxSize = 13
 
static const int windowsMobileSliderThickness = 6
 

Enumeration Type Documentation

◆ QSliderDirection

Enumerator
SlUp 
SlDown 
SlLeft 
SlRight 
SliderUp 
SliderDown 
SliderLeft 
SliderRight 
SlUp 
SlDown 
SlLeft 
SlRight 

Definition at line 4039 of file qwindowsmobilestyle.cpp.

Function Documentation

◆ qt_wince_is_high_dpi()

bool qt_wince_is_high_dpi ( )

Definition at line 300 of file qguifunctions_wince.cpp.

Referenced by QWindowsMobileStylePrivate::QWindowsMobileStylePrivate().

300  {
301  if (!qt_wince_is_pocket_pc())
302  return false;
303  HDC deviceContext = GetDC(0);
304  int dpi = GetDeviceCaps(deviceContext, LOGPIXELSX);
305  ReleaseDC(0, deviceContext);
306  if ((dpi < 1000) && (dpi > 0))
307  return dpi > 96;
308  else
309  return false;
310 }
bool qt_wince_is_pocket_pc()

◆ qt_wince_is_smartphone()

bool qt_wince_is_smartphone ( )

Definition at line 293 of file qguifunctions_wince.cpp.

Referenced by QWindowsMobileStylePrivate::QWindowsMobileStylePrivate().

293  {
294  return qt_wince_is_platform(QString::fromLatin1("Smartphone"));
295 }
bool qt_wince_is_platform(const QString &platformString)
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
Definition: qstring.cpp:4188

◆ qt_wince_is_windows_mobile_65()

bool qt_wince_is_windows_mobile_65 ( )

Definition at line 277 of file qguifunctions_wince.cpp.

Referenced by QWindowsMobileStylePrivate::setupWindowsMobileStyle65().

278 {
279  const DWORD dwFirstWM65BuildNumber = 21139;
280  OSVERSIONINFO osvi;
281  osvi.dwOSVersionInfoSize = sizeof(osvi);
282  if (!GetVersionEx(&osvi))
283  return false;
284  return osvi.dwMajorVersion > 5
285  || (osvi.dwMajorVersion == 5 && (osvi.dwMinorVersion > 2 ||
286  (osvi.dwMinorVersion == 2 && osvi.dwBuildNumber >= dwFirstWM65BuildNumber)));
287 }

Variable Documentation

◆ arrowdown_big_xpm

const char* const arrowdown_big_xpm[]
static
Initial value:
= {
"17 9 2 1",
" c None",
". c #000000",
".................",
" ............... ",
" ............. ",
" ........... ",
" ......... ",
" ....... ",
" ..... ",
" ... ",
" . "}

Definition at line 272 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStylePrivate::QWindowsMobileStylePrivate().

◆ arrowdown_xpm

const char* const arrowdown_xpm[]
static
Initial value:
= {
"15 8 2 1",
" c None",
". c #000000",
"...............",
" ............. ",
" ........... ",
" ......... ",
" ....... ",
" ..... ",
" ... ",
" . "}

Definition at line 258 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStylePrivate::QWindowsMobileStylePrivate().

◆ arrowleft_big_xpm

const char* const arrowleft_big_xpm[]
static
Initial value:
= {
"9 17 2 1",
" c None",
". c #000000",
" .",
" ..",
" ...",
" ....",
" .....",
" ......",
" .......",
" ........",
".........",
" ........",
" .......",
" ......",
" .....",
" ....",
" ...",
" ..",
" ."}

Definition at line 158 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStylePrivate::QWindowsMobileStylePrivate().

◆ arrowleft_xpm

const char* const arrowleft_xpm[]
static
Initial value:
= {
"8 15 2 1",
" c None",
". c #000000",
" .",
" ..",
" ...",
" ....",
" .....",
" ......",
" .......",
"........",
" .......",
" ......",
" .....",
" ....",
" ...",
" ..",
" ."}

Definition at line 181 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStylePrivate::QWindowsMobileStylePrivate().

◆ checkedbold_low_xpm

const char* const checkedbold_low_xpm[]
static
Initial value:
= {
"9 8 2 1",
" c None",
". c #000000",
" .",
" ..",
". ...",
".. ... ",
"... ... ",
" ..... ",
" ... ",
" . "}

Definition at line 351 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStylePrivate::QWindowsMobileStylePrivate().

◆ checkedbold_xpm

const char* const checkedbold_xpm[]
static
Initial value:
= {
"26 26 2 1",
" c None",
". c #000000",
" ",
" ",
" ",
" ",
" ",
" ",
" .. ",
" ... ",
" .... ",
" ..... ",
" .. ...... ",
" ... ....... ",
" .... ....... ",
" ..... ....... ",
" ...... ....... ",
" .............. ",
" ............ ",
" .......... ",
" ........ ",
" ...... ",
" .... ",
" .. ",
" ",
" ",
" ",
" "}

Definition at line 319 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStylePrivate::QWindowsMobileStylePrivate().

◆ checkedlight_low_xpm

const char* const checkedlight_low_xpm[]
static
Initial value:
= {
"8 8 2 1",
" c None",
". c #000000",
" .",
" ..",
" ...",
". ... ",
".. ... ",
"..... ",
" ... ",
" . "}

Definition at line 365 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStylePrivate::QWindowsMobileStylePrivate().

◆ checkedlight_xpm

const char* const checkedlight_xpm[]
static
Initial value:
= {
"24 24 2 1",
" c None",
". c #000000",
" ",
" ",
" ",
" ",
" ",
" . ",
" .. ",
" ... ",
" .... ",
" ..... ",
" ...... ",
" . ...... ",
" .. ...... ",
" ... ...... ",
" .... ...... ",
" .......... ",
" ......... ",
" ....... ",
" ..... ",
" ... ",
" . ",
" ",
" ",
" "}

Definition at line 288 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStylePrivate::QWindowsMobileStylePrivate().

◆ cross_big_xpm

const char* const cross_big_xpm[]
static

◆ cross_small_xpm

const char* const cross_small_xpm[]
static
Initial value:
= {
"14 14 4 1",
" c #09454A",
". c #218C98",
"+ c #47D8E5",
"@ c #FCFFFC",
" ",
" ++++++++++++ ",
" +..........+ ",
" +.@@....@@.+ ",
" +.@@@..@@@.+ ",
" +..@@@@@@..+ ",
" +...@@@@...+ ",
" +...@@@@...+ ",
" +..@@@@@@..+ ",
" +.@@@..@@@.+ ",
" +.@@....@@.+ ",
" +..........+ ",
" ++++++++++++ ",
" "}

Definition at line 474 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStylePrivate::QWindowsMobileStylePrivate().

◆ highlightedradiobutton_low_xpm

const char* const highlightedradiobutton_low_xpm[]
static
Initial value:
= {
"15 15 3 1",
" c None",
". c #000000",
"+ c #3192D6",
" ..... ",
" ..+++++.. ",
" .++ ++. ",
" .+ +. ",
" .+ +. ",
".+ +.",
".+ +.",
".+ +.",
".+ +.",
".+ +.",
" .+ +. ",
" .+ +. ",
" .++ ++. ",
" ..+++++.. ",
" ..... "}

Definition at line 416 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStylePrivate::QWindowsMobileStylePrivate().

◆ highlightedradiobutton_xpm

const char* const highlightedradiobutton_xpm[]
static

◆ horlines_xpm

const char* const horlines_xpm[]
static
Initial value:
= {
"2 2 2 1",
" c None",
". c #000000",
" ",
".."}

Definition at line 204 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStylePrivate::drawScrollbarGroove().

◆ max_big_xpm

const char* const max_big_xpm[]
static

◆ max_small_xpm

const char* const max_small_xpm[]
static
Initial value:
= {
"14 14 4 1",
" c #09454A",
". c #218C98",
"+ c #47D8E5",
"@ c #FCFFFC",
" ",
" ++++++++++++ ",
" +..........+ ",
" +..........+ ",
" +.@@@@@@@@.+ ",
" +.@@@@@@@@.+ ",
" +.@......@.+ ",
" +.@......@.+ ",
" +.@......@.+ ",
" +.@@@@@@@@.+ ",
" +..........+ ",
" +..........+ ",
" ++++++++++++ ",
" "}

Definition at line 532 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStylePrivate::QWindowsMobileStylePrivate().

◆ min_big_xpm

const char* const min_big_xpm[]
static

◆ min_small_xpm

const char* const min_small_xpm[]
static
Initial value:
= {
"14 14 4 1",
" c #09454A",
". c #218C98",
"+ c #47D8E5",
"@ c #FCFFFC",
" ",
" ++++++++++++ ",
" +..........+ ",
" +..........+ ",
" +..........+ ",
" +..........+ ",
" +..........+ ",
" +..........+ ",
" +..........+ ",
" +.@@@@@@@@.+ ",
" +..........+ ",
" +..........+ ",
" ++++++++++++ ",
" "}

Definition at line 649 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStylePrivate::QWindowsMobileStylePrivate().

◆ normal_big_xpm

const char* const normal_big_xpm[]
static

◆ normal_small_xpm

const char* const normal_small_xpm[]
static
Initial value:
= {
"14 14 4 1",
" c #09454A",
". c #218C98",
"+ c #47D8E5",
"@ c #FCFFFC",
" ",
" ++++++++++++ ",
" +..........+ ",
" +.@@@@@@@@.+ ",
" +.@......@.+ ",
" +.@......@.+ ",
" +.@......@.+ ",
" +.@......@.+ ",
" +.@......@.+ ",
" +.@......@.+ ",
" +.@@@@@@@@.+ ",
" +..........+ ",
" ++++++++++++ ",
" "}

Definition at line 590 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStylePrivate::QWindowsMobileStylePrivate().

◆ PE_IndicatorArrowDownBig

const int PE_IndicatorArrowDownBig = 0xf000102
static

◆ PE_IndicatorArrowLeftBig

const int PE_IndicatorArrowLeftBig = 0xf000103
static

Definition at line 97 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStyle::drawPrimitive().

◆ PE_IndicatorArrowRightBig

const int PE_IndicatorArrowRightBig = 0xf000104
static

Definition at line 98 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStyle::drawPrimitive().

◆ PE_IndicatorArrowUpBig

const int PE_IndicatorArrowUpBig = 0xf000101
static

◆ radiobutton_low_xpm

const char* const radiobutton_low_xpm[]
static
Initial value:
= {
"15 15 2 1",
" c None",
". c #000000",
" ..... ",
" .. .. ",
" . . ",
" . . ",
" . . ",
". .",
". .",
". .",
". .",
". .",
" . . ",
" . . ",
" . . ",
" .. .. ",
" ..... "}

Definition at line 137 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStylePrivate::QWindowsMobileStylePrivate().

◆ radiobutton_xpm

const char* const radiobutton_xpm[]
static

◆ radiochecked_low_xpm

const char* const radiochecked_low_xpm[]
static
Initial value:
= {
"9 9 2 1",
" c None",
". c #000000",
" ... ",
" ....... ",
" ....... ",
".........",
".........",
".........",
" ....... ",
" ....... ",
" ... "}

Definition at line 244 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStylePrivate::QWindowsMobileStylePrivate().

◆ radiochecked_xpm

const char* const radiochecked_xpm[]
static
Initial value:
= {
"18 18 2 1",
" c None",
". c #000000",
" ...... ",
" .......... ",
" .............. ",
" .............. ",
" ................ ",
" ................ ",
"..................",
"..................",
"..................",
"..................",
"..................",
"..................",
" ................ ",
" ................ ",
" .............. ",
" .............. ",
" .......... ",
" ...... "}

Definition at line 220 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStylePrivate::QWindowsMobileStylePrivate().

◆ vertlines_xpm

const char* const vertlines_xpm[]
static
Initial value:
= {
"2 2 2 1",
" c None",
". c #000000",
". ",
". "}

Definition at line 212 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStylePrivate::drawScrollbarGroove().

◆ windowsItemFrame

const int windowsItemFrame = 1
static

Definition at line 87 of file qwindowsmobilestyle.cpp.

◆ windowsMobileExclusiveIndicatorSize

const int windowsMobileExclusiveIndicatorSize = 14
static

Definition at line 92 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStyle::pixelMetric().

◆ windowsMobileFrameGroupBoxOffset

const int windowsMobileFrameGroupBoxOffset = 9
static

Definition at line 90 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStyle::drawPrimitive().

◆ windowsMobileIconSize

const int windowsMobileIconSize = 16
static

Definition at line 94 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStyle::pixelMetric().

◆ windowsMobileIndicatorSize

const int windowsMobileIndicatorSize = 14
static

Definition at line 91 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStyle::pixelMetric().

◆ windowsMobileitemViewCheckBoxSize

const int windowsMobileitemViewCheckBoxSize = 13
static

Definition at line 89 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStyle::drawPrimitive().

◆ windowsMobileSliderThickness

const int windowsMobileSliderThickness = 6
static

Definition at line 93 of file qwindowsmobilestyle.cpp.

Referenced by QWindowsMobileStyle::pixelMetric().