Qt 4.8
Classes | Macros | Typedefs | Enumerations | Functions | Variables
qwindowsstyle.cpp File Reference
#include "qwindowsstyle.h"
#include "qwindowsstyle_p.h"
#include <private/qsystemlibrary_p.h>
#include "qapplication.h"
#include "qbitmap.h"
#include "qdrawutil.h"
#include "qevent.h"
#include "qmenu.h"
#include "qmenubar.h"
#include <private/qmenubar_p.h>
#include "qpaintengine.h"
#include "qpainter.h"
#include "qprogressbar.h"
#include "qrubberband.h"
#include "qstyleoption.h"
#include "qtabbar.h"
#include "qwidget.h"
#include "qdebug.h"
#include "qmainwindow.h"
#include "qfile.h"
#include "qtextstream.h"
#include "qpixmapcache.h"
#include "qwizard.h"
#include "qlistview.h"
#include <private/qmath_p.h>
#include <qmath.h>
#include "qfileinfo.h"
#include "qdir.h"
#include <private/qt_x11_p.h>
#include <private/qstylehelper_p.h>
#include "qt_windows.h"
#include <limits.h>

Go to the source code of this file.

Classes

struct  QSHSTOCKICONINFO
 

Macros

#define _SHGFI_ICON   0x000000100
 
#define _SHGFI_LARGEICON   0x000000000
 
#define _SHGFI_SMALLICON   0x000000001
 
#define _SIID_SHIELD   77
 
#define COLOR_GRADIENTACTIVECAPTION   27
 
#define COLOR_GRADIENTINACTIVECAPTION   28
 
#define PTSARRLEN(x)   sizeof(x)/(sizeof(QPoint))
 

Typedefs

typedef HRESULT(WINAPI * PtrSHGetStockIconInfo) (int siid, int uFlags, QSHSTOCKICONINFO *psii)
 

Enumerations

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

Functions

static QRgb colorref2qrgb (COLORREF col)
 
static QPixmap loadIconFromShell32 (int resourceId, int size)
 

Variables

static const char *const critical_xpm []
 
static const char * dock_widget_close_xpm []
 
static const char *const information_xpm []
 
static PtrSHGetStockIconInfo pSHGetStockIconInfo = 0
 
static const char *const qt_close_xpm []
 
static const char *const qt_help_xpm []
 
static const char *const qt_maximize_xpm []
 
static const char *const qt_menu_xpm []
 
static const char *const qt_minimize_xpm []
 
static const char *const qt_normalizeup_xpm []
 
static const char *const qt_shade_xpm []
 
static const char *const qt_unshade_xpm []
 
static const char *const question_xpm []
 
static const char *const warning_xpm []
 

Macro Definition Documentation

◆ _SHGFI_ICON

#define _SHGFI_ICON   0x000000100

◆ _SHGFI_LARGEICON

#define _SHGFI_LARGEICON   0x000000000

Definition at line 105 of file qwindowsstyle.cpp.

Referenced by QWindowsStyle::standardIconImplementation().

◆ _SHGFI_SMALLICON

#define _SHGFI_SMALLICON   0x000000001

Definition at line 104 of file qwindowsstyle.cpp.

Referenced by QWindowsStyle::standardPixmap().

◆ _SIID_SHIELD

#define _SIID_SHIELD   77

◆ COLOR_GRADIENTACTIVECAPTION

#define COLOR_GRADIENTACTIVECAPTION   27

Definition at line 88 of file qwindowsstyle.cpp.

Referenced by QWindowsStyle::polish().

◆ COLOR_GRADIENTINACTIVECAPTION

#define COLOR_GRADIENTINACTIVECAPTION   28

Definition at line 91 of file qwindowsstyle.cpp.

Referenced by QWindowsStyle::polish().

◆ PTSARRLEN

#define PTSARRLEN (   x)    sizeof(x)/(sizeof(QPoint))

Typedef Documentation

◆ PtrSHGetStockIconInfo

typedef HRESULT(WINAPI * PtrSHGetStockIconInfo) (int siid, int uFlags, QSHSTOCKICONINFO *psii)

Definition at line 109 of file qwindowsstyle.cpp.

Enumeration Type Documentation

◆ QSliderDirection

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

Definition at line 118 of file qwindowsstyle.cpp.

Function Documentation

◆ colorref2qrgb()

static QRgb colorref2qrgb ( COLORREF  col)
inlinestatic

Definition at line 302 of file qwindowsstyle.cpp.

Referenced by QWindowsStyle::polish().

303 {
304  return qRgb(GetRValue(col), GetGValue(col), GetBValue(col));
305 }
QRgb qRgb(int r, int g, int b)
Returns the ARGB quadruplet (255, {r}, {g}, {b}).
Definition: qrgb.h:69

◆ loadIconFromShell32()

static QPixmap loadIconFromShell32 ( int  resourceId,
int  size 
)
static

Definition at line 944 of file qwindowsstyle.cpp.

Referenced by QWindowsStyle::standardIconImplementation(), and QWindowsStyle::standardPixmap().

945 {
946 #ifdef Q_OS_WINCE
947  HMODULE hmod = LoadLibrary(L"ceshell");
948 #else
949  HMODULE hmod = QSystemLibrary::load(L"shell32");
950 #endif
951  if( hmod ) {
952  HICON iconHandle = (HICON)LoadImage(hmod, MAKEINTRESOURCE(resourceId), IMAGE_ICON, size, size, 0);
953  if( iconHandle ) {
954  QPixmap iconpixmap = QPixmap::fromWinHICON( iconHandle );
955  DestroyIcon(iconHandle);
956  return iconpixmap;
957  }
958  }
959  return QPixmap();
960 }
static QPixmap fromWinHICON(HICON hicon)
bool load(bool onlySystemDirectory=true)
The QPixmap class is an off-screen image representation that can be used as a paint device...
Definition: qpixmap.h:71

Variable Documentation

◆ critical_xpm

const char* const critical_xpm[]
static

Definition at line 862 of file qwindowsstyle.cpp.

Referenced by QWindowsStyle::standardPixmap().

◆ dock_widget_close_xpm

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

Definition at line 769 of file qwindowsstyle.cpp.

Referenced by QWindowsStyle::standardPixmap().

◆ information_xpm

const char* const information_xpm[]
static

Definition at line 783 of file qwindowsstyle.cpp.

Referenced by QWindowsStyle::standardPixmap().

◆ pSHGetStockIconInfo

PtrSHGetStockIconInfo pSHGetStockIconInfo = 0
static

◆ qt_close_xpm

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

Definition at line 664 of file qwindowsstyle.cpp.

Referenced by QWindowsStyle::standardPixmap().

◆ qt_help_xpm

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

Definition at line 724 of file qwindowsstyle.cpp.

Referenced by QWindowsStyle::standardPixmap().

◆ qt_maximize_xpm

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

Definition at line 679 of file qwindowsstyle.cpp.

Referenced by QWindowsStyle::standardPixmap().

◆ qt_menu_xpm

const char* const qt_menu_xpm[]
static

Definition at line 573 of file qwindowsstyle.cpp.

Referenced by QWindowsStyle::standardPixmap().

◆ qt_minimize_xpm

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

Definition at line 694 of file qwindowsstyle.cpp.

Referenced by QWindowsStyle::standardPixmap().

◆ qt_normalizeup_xpm

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

Definition at line 709 of file qwindowsstyle.cpp.

Referenced by QWindowsStyle::standardPixmap().

◆ qt_shade_xpm

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

Definition at line 739 of file qwindowsstyle.cpp.

Referenced by QWindowsStyle::standardPixmap().

◆ qt_unshade_xpm

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

Definition at line 754 of file qwindowsstyle.cpp.

Referenced by QWindowsStyle::standardPixmap().

◆ question_xpm

const char* const question_xpm[]
static

Definition at line 901 of file qwindowsstyle.cpp.

Referenced by QWindowsStyle::standardPixmap().

◆ warning_xpm

const char* const warning_xpm[]
static

Definition at line 823 of file qwindowsstyle.cpp.

Referenced by QWindowsStyle::standardPixmap().