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
QAndroidStyle Class Reference

#include <qandroidstyle_p.h>

+ Inheritance diagram for QAndroidStyle:
+ Collaboration diagram for QAndroidStyle:

Classes

struct  Android9PatchChunk
 
class  Android9PatchDrawable
 
class  AndroidClipDrawable
 
class  AndroidColorDrawable
 
class  AndroidCompoundButtonControl
 
class  AndroidControl
 
class  AndroidDrawable
 
class  AndroidGradientDrawable
 
class  AndroidImageDrawable
 
struct  AndroidItemStateInfo
 
class  AndroidLayerDrawable
 
class  AndroidProgressBarControl
 
class  AndroidSeekBarControl
 
class  AndroidSpinnerControl
 
class  AndroidStateDrawable
 

Public Types

enum  ItemType {
  QC_UnknownType = -1 , QC_View , QC_GroupBox , QC_Button ,
  QC_Checkbox , QC_RadioButton , QC_Slider , QC_Switch ,
  QC_EditText , QC_Combobox , QC_BusyIndicator , QC_ProgressBar ,
  QC_Tab , QC_TabButton , QC_RatingIndicator , QC_SearchBox ,
  QC_CustomControl =0xf00 , QC_ControlMask =0xfff
}
 
enum  AndroidDrawableType {
  Color , Image , Clip , NinePatch ,
  Gradient , State , Layer
}
 
typedef QList< AndroidItemStateInfo * > AndroidItemStateInfoList
 

Public Member Functions

 QAndroidStyle ()
 
 ~QAndroidStyle ()
 
virtual void drawPrimitive (PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w=nullptr) const
 
virtual void drawControl (QStyle::ControlElement element, const QStyleOption *opt, QPainter *p, const QWidget *w=nullptr) const
 
virtual QRect subElementRect (SubElement subElement, const QStyleOption *option, const QWidget *widget=nullptr) const
 
virtual void drawComplexControl (ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget=nullptr) const
 
virtual SubControl hitTestComplexControl (ComplexControl cc, const QStyleOptionComplex *opt, const QPoint &pt, const QWidget *widget=nullptr) const
 
virtual QRect subControlRect (ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, const QWidget *widget=nullptr) const
 
virtual int pixelMetric (PixelMetric metric, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const
 
virtual QSize sizeFromContents (ContentsType ct, const QStyleOption *opt, const QSize &contentsSize, const QWidget *w=nullptr) const
 
virtual QPixmap standardPixmap (StandardPixmap standardPixmap, const QStyleOption *opt=nullptr, const QWidget *widget=nullptr) const
 
virtual QPixmap generatedIconPixmap (QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *opt) const
 
int styleHint (StyleHint hint, const QStyleOption *option=nullptr, const QWidget *widget=nullptr, QStyleHintReturn *returnData=nullptr) const
 
virtual QPalette standardPalette () const
 
void polish (QWidget *widget)
 
void unpolish (QWidget *widget)
 

Detailed Description

Definition at line 27 of file qandroidstyle_p.h.

Member Typedef Documentation

◆ AndroidItemStateInfoList

Member Enumeration Documentation

◆ AndroidDrawableType

Enumerator
Color 
Image 
Clip 
NinePatch 
Gradient 
State 
Layer 

Definition at line 72 of file qandroidstyle_p.h.

◆ ItemType

Enumerator
QC_UnknownType 
QC_View 
QC_GroupBox 
QC_Button 
QC_Checkbox 
QC_RadioButton 
QC_Slider 
QC_Switch 
QC_EditText 
QC_Combobox 
QC_BusyIndicator 
QC_ProgressBar 
QC_Tab 
QC_TabButton 
QC_RatingIndicator 
QC_SearchBox 
QC_CustomControl 
QC_ControlMask 

Definition at line 32 of file qandroidstyle_p.h.

Constructor & Destructor Documentation

◆ QAndroidStyle()

QAndroidStyle::QAndroidStyle ( )

Definition at line 29 of file qandroidstyle.cpp.

References QPixmapCache::clear(), QSet< T >::constBegin(), QSet< T >::constEnd(), it, item, QPlatformNativeInterface::nativeResourceForIntegration(), QGuiApplication::platformNativeInterface(), Q_UNLIKELY, QC_Checkbox, QC_Combobox, QC_ProgressBar, QC_RadioButton, QC_Slider, QC_UnknownType, qWarning, QApplication::setFont(), and standardPalette().

+ Here is the call graph for this function:

◆ ~QAndroidStyle()

QAndroidStyle::~QAndroidStyle ( )

Definition at line 99 of file qandroidstyle.cpp.

References qDeleteAll().

+ Here is the call graph for this function:

Member Function Documentation

◆ drawComplexControl()

◆ drawControl()

◆ drawPrimitive()

void QAndroidStyle::drawPrimitive ( PrimitiveElement pe,
const QStyleOption * opt,
QPainter * p,
const QWidget * w = nullptr ) const
virtual

Definition at line 250 of file qandroidstyle.cpp.

References QHash< int, AndroidControl * >::const_iterator, copy(), QHash< Key, T >::end(), QHash< Key, T >::find(), QStyleOptionFrame::Flat, frame, QRect::height(), it, QFrame::lineWidth, QFrame::midLineWidth, opt, p1, p2, QWidget::palette, QC_EditText, QC_UnknownType, qDrawShadeLine(), qDrawShadeRect(), QWidget::rect, QRect::width(), QRect::x(), and QRect::y().

Referenced by drawComplexControl().

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

◆ generatedIconPixmap()

QPixmap QAndroidStyle::generatedIconPixmap ( QIcon::Mode iconMode,
const QPixmap & pixmap,
const QStyleOption * opt ) const
virtual

Definition at line 625 of file qandroidstyle.cpp.

References opt, and pixmap.

◆ hitTestComplexControl()

QStyle::SubControl QAndroidStyle::hitTestComplexControl ( ComplexControl cc,
const QStyleOptionComplex * opt,
const QPoint & pt,
const QWidget * widget = nullptr ) const
virtual

Definition at line 442 of file qandroidstyle.cpp.

References QHash< int, AndroidControl * >::const_iterator, QHash< Key, T >::end(), QHash< Key, T >::find(), it, opt, QC_UnknownType, and widget.

+ Here is the call graph for this function:

◆ pixelMetric()

int QAndroidStyle::pixelMetric ( PixelMetric metric,
const QStyleOption * option = nullptr,
const QWidget * widget = nullptr ) const
virtual

Definition at line 533 of file qandroidstyle.cpp.

References QAndroidStyle::AndroidCompoundButtonControl::size(), and widget.

Referenced by sizeFromContents(), and subControlRect().

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

◆ polish()

void QAndroidStyle::polish ( QWidget * widget)

Definition at line 657 of file qandroidstyle.cpp.

References QWidget::setAttribute(), Qt::WA_StyledBackground, and widget.

+ Here is the call graph for this function:

◆ sizeFromContents()

◆ standardPalette()

QPalette QAndroidStyle::standardPalette ( ) const
virtual

Definition at line 652 of file qandroidstyle.cpp.

Referenced by QAndroidStyle().

+ Here is the caller graph for this function:

◆ standardPixmap()

QPixmap QAndroidStyle::standardPixmap ( StandardPixmap standardPixmap,
const QStyleOption * opt = nullptr,
const QWidget * widget = nullptr ) const
virtual

Definition at line 618 of file qandroidstyle.cpp.

References opt, standardPixmap(), and widget.

Referenced by standardPixmap().

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

◆ styleHint()

int QAndroidStyle::styleHint ( StyleHint hint,
const QStyleOption * option = nullptr,
const QWidget * widget = nullptr,
QStyleHintReturn * returnData = nullptr ) const

Definition at line 632 of file qandroidstyle.cpp.

References hint(), Qt::LeftButton, and widget.

Referenced by drawComplexControl().

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

◆ subControlRect()

QRect QAndroidStyle::subControlRect ( ComplexControl cc,
const QStyleOptionComplex * opt,
SubControl sc,
const QWidget * widget = nullptr ) const
virtual

Definition at line 472 of file qandroidstyle.cpp.

References QRect::adjust(), QRect::adjusted(), QFontMetrics::boundingRect(), QHash< int, AndroidControl * >::const_iterator, QStyleOption::direction, QHash< Key, T >::end(), QHash< Key, T >::find(), QStyleOption::fontMetrics, groupBox, QFontMetrics::height(), QRect::height(), it, opt, pixelMetric(), QC_UnknownType, qMax(), rect, QStyleOption::rect, QStyle::SC_GroupBoxCheckBox, QRect::setHeight(), QRect::setSize(), QRect::setWidth(), QRect::size(), QAndroidStyle::AndroidCompoundButtonControl::size(), textRect, QRect::translate(), visualRect(), and widget.

Referenced by drawComplexControl(), and QAndroidStyle::AndroidSpinnerControl::subControlRect().

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

◆ subElementRect()

QRect QAndroidStyle::subElementRect ( SubElement subElement,
const QStyleOption * option,
const QWidget * widget = nullptr ) const
virtual

Definition at line 350 of file qandroidstyle.cpp.

References QHash< int, AndroidControl * >::const_iterator, QHash< Key, T >::end(), QHash< Key, T >::find(), it, QC_UnknownType, and widget.

Referenced by drawControl(), and QAndroidStyle::AndroidControl::subControlRect().

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

◆ unpolish()

void QAndroidStyle::unpolish ( QWidget * widget)

Definition at line 662 of file qandroidstyle.cpp.

References QWidget::setAttribute(), Qt::WA_StyledBackground, and widget.

+ Here is the call graph for this function:

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