Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qcommonstyle.cpp File Reference

(bbff35a343f607fde64a71b651db9f35365e3c67)

#include "qcommonstyle.h"
#include "qcommonstyle_p.h"
#include <qfile.h>
#include <qapplication.h>
#include <private/qguiapplication_p.h>
#include <qpa/qplatformtheme.h>
#include <qbitmap.h>
#include <qcache.h>
#include <qdrawutil.h>
#include <qlayout.h>
#include <qmath.h>
#include <qpainter.h>
#include <qpaintengine.h>
#include <qpainterpath.h>
#include <qstyleoption.h>
#include <private/qcommonstylepixmaps_p.h>
#include <private/qmath_p.h>
#include <qdebug.h>
#include <qtextformat.h>
#include <qfileinfo.h>
#include <qdir.h>
#include <qvariant.h>
#include <qpixmapcache.h>
#include <qloggingcategory.h>
#include <limits.h>
#include <private/qtextengine_p.h>
#include <private/qstylehelper_p.h>
#include "moc_qcommonstyle.cpp"
+ Include dependency graph for qcommonstyle.cpp:

Go to the source code of this file.

Classes

struct  QPainterStateSaver
 

Functions

QT_BEGIN_NAMESPACE Q_LOGGING_CATEGORY (lcCommonStyle, "qt.widgets.commonstyle")
 
static qreal qt_getDevicePixelRatio (const QWidget *widget)
 
static QSizeF viewItemTextLayout (QTextLayout &textLayout, int lineWidth, int maxHeight=-1, int *lastVisibleLine=nullptr)
 
static uint qt_intensity (uint r, uint g, uint b)
 

Function Documentation

◆ Q_LOGGING_CATEGORY()

QT_BEGIN_NAMESPACE Q_LOGGING_CATEGORY ( lcCommonStyle ,
"qt.widgets.commonstyle"  )

◆ qt_getDevicePixelRatio()

static qreal qt_getDevicePixelRatio ( const QWidget * widget)
static

Definition at line 94 of file qcommonstyle.cpp.

References QPaintDevice::devicePixelRatio(), qApp, and widget.

Referenced by QCommonStylePrivate::iconFromApplicationTheme(), QCommonStylePrivate::iconFromWindowsTheme(), QCommonStyle::standardPixmap(), and QCommonStyle::subElementRect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qt_intensity()

static uint qt_intensity ( uint r,
uint g,
uint b )
inlinestatic

Definition at line 6150 of file qcommonstyle.cpp.

Referenced by QCommonStyle::generatedIconPixmap().

+ Here is the caller graph for this function:

◆ viewItemTextLayout()

static QSizeF viewItemTextLayout ( QTextLayout & textLayout,
int lineWidth,
int maxHeight = -1,
int * lastVisibleLine = nullptr )
static

Definition at line 861 of file qcommonstyle.cpp.

References QTextLayout::beginLayout(), QTextLayout::createLine(), QTextLayout::endLayout(), i, QTextLine::isValid(), line, and qMax().

Referenced by QCommonStylePrivate::calculateElidedText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: