Guitar
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
DarkStyle Class Reference

#include <DarkStyle.h>

Inheritance diagram for DarkStyle:
Inheritance graph
[legend]
Collaboration diagram for DarkStyle:
Collaboration graph
[legend]

Classes

class  ButtonImages
 
struct  Private
 
struct  ScrollBarTextures
 

Public Member Functions

 DarkStyle (const QColor &base_color=QColor())
 
 ~DarkStyle () override
 
bool isDpiScalingEnabled () const
 
QColor baseColor () const
 
void setBaseColor (const QColor &color)
 
void setScrollBarExtent (int n)
 
void setDpiScalingEnabled (bool f)
 
QPalette standardPalette () const
 
QSize sizeFromContents (ContentsType type, const QStyleOption *option, const QSize &size, const QWidget *widget) const override
 
void polish (QPalette &palette) override
 
int pixelMetric (PixelMetric metric, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const override
 
QRect subControlRect (ComplexControl cc, const QStyleOptionComplex *option, SubControl sc, const QWidget *widget) const override
 
int styleHint (StyleHint stylehint, const QStyleOption *option=nullptr, const QWidget *widget=nullptr, QStyleHintReturn *returnData=nullptr) const override
 
void drawPrimitive (PrimitiveElement pe, const QStyleOption *option, QPainter *p, const QWidget *widget) const override
 
void drawControl (ControlElement ce, const QStyleOption *option, QPainter *p, const QWidget *widget) const override
 
void drawComplexControl (ComplexControl cc, const QStyleOptionComplex *option, QPainter *p, const QWidget *widget) const override
 

Private Member Functions

QImage colorizeImage (QImage image)
 
QImage loadColorizedImage (QString const &path, QString const &role=QString())
 
ButtonImages generateButtonImages (QString const &path)
 
QImage generateHoverImage (const QImage &source)
 
QPixmap pixmapFromImage (QImage const &image, QSize size) const
 
void loadImages ()
 
QColor selectionColor () const
 
QColor colorForItemView (QStyleOption const *opt) const
 
void drawNinePatchImage (QPainter *p, QImage const &image, QRect const &r, int w, int h) const
 
void drawGutter (QPainter *p, QRect const &r) const
 
void drawSelectedItemFrame (QPainter *p, QRect rect, bool focus) const
 
void drawFocusFrame (QPainter *p, const QRect &rect, int margin) const
 
void drawButton (QPainter *p, QStyleOption const *option, bool mac_margin=true) const
 
void drawToolButton (QPainter *p, QStyleOption const *option) const
 
void drawMenuBarBG (QPainter *p, const QStyleOption *option, const QWidget *widget) const
 
QColor color (int level, int alpha=255) const
 
void drawItemViewText (QPainter *p, const QStyleOptionViewItem *option, const QRect &rect, bool abbreviation) const
 
QRect indicatorRect (const QStyleOption *option, const QWidget *widget, const QRect &rect) const
 
qreal dpiScaled (qreal value, qreal dpi) const
 
qreal dpiScaled (qreal value, const QPaintDevice *device) const
 
qreal dpiScaled (qreal value, const QStyleOption *option) const
 

Private Attributes

Privatem
 

Constructor & Destructor Documentation

◆ DarkStyle()

DarkStyle::DarkStyle ( const QColor &  base_color = QColor())
Here is the call graph for this function:

◆ ~DarkStyle()

DarkStyle::~DarkStyle ( )
override

Member Function Documentation

◆ baseColor()

QColor DarkStyle::baseColor ( ) const

◆ color()

QColor DarkStyle::color ( int  level,
int  alpha = 255 
) const
private
Here is the call graph for this function:

◆ colorForItemView()

QColor DarkStyle::colorForItemView ( QStyleOption const *  opt) const
private

◆ colorizeImage()

QImage DarkStyle::colorizeImage ( QImage  image)
private
Here is the call graph for this function:

◆ dpiScaled() [1/3]

qreal DarkStyle::dpiScaled ( qreal  value,
const QPaintDevice *  device 
) const
private

◆ dpiScaled() [2/3]

qreal DarkStyle::dpiScaled ( qreal  value,
const QStyleOption *  option 
) const
private

◆ dpiScaled() [3/3]

qreal DarkStyle::dpiScaled ( qreal  value,
qreal  dpi 
) const
private

◆ drawButton()

void DarkStyle::drawButton ( QPainter *  p,
QStyleOption const *  option,
bool  mac_margin = true 
) const
private
Here is the call graph for this function:

◆ drawComplexControl()

void DarkStyle::drawComplexControl ( ComplexControl  cc,
const QStyleOptionComplex *  option,
QPainter *  p,
const QWidget *  widget 
) const
override
Here is the call graph for this function:

◆ drawControl()

void DarkStyle::drawControl ( ControlElement  ce,
const QStyleOption *  option,
QPainter *  p,
const QWidget *  widget 
) const
override
Here is the call graph for this function:

◆ drawFocusFrame()

void DarkStyle::drawFocusFrame ( QPainter *  p,
const QRect &  rect,
int  margin 
) const
private
Here is the call graph for this function:

◆ drawGutter()

void DarkStyle::drawGutter ( QPainter *  p,
QRect const &  r 
) const
private
Here is the call graph for this function:

◆ drawItemViewText()

void DarkStyle::drawItemViewText ( QPainter *  p,
const QStyleOptionViewItem *  option,
const QRect &  rect,
bool  abbreviation 
) const
private

◆ drawMenuBarBG()

void DarkStyle::drawMenuBarBG ( QPainter *  p,
const QStyleOption *  option,
const QWidget *  widget 
) const
private

◆ drawNinePatchImage()

void DarkStyle::drawNinePatchImage ( QPainter *  p,
QImage const &  image,
QRect const &  r,
int  w,
int  h 
) const
private
Here is the call graph for this function:

◆ drawPrimitive()

void DarkStyle::drawPrimitive ( PrimitiveElement  pe,
const QStyleOption *  option,
QPainter *  p,
const QWidget *  widget 
) const
override
Here is the call graph for this function:

◆ drawSelectedItemFrame()

void DarkStyle::drawSelectedItemFrame ( QPainter *  p,
QRect  rect,
bool  focus 
) const
private
Here is the call graph for this function:

◆ drawToolButton()

void DarkStyle::drawToolButton ( QPainter *  p,
QStyleOption const *  option 
) const
private
Here is the call graph for this function:

◆ generateButtonImages()

DarkStyle::ButtonImages DarkStyle::generateButtonImages ( QString const &  path)
private
Here is the call graph for this function:

◆ generateHoverImage()

QImage DarkStyle::generateHoverImage ( const QImage &  source)
private
Here is the call graph for this function:

◆ indicatorRect()

QRect DarkStyle::indicatorRect ( const QStyleOption *  option,
const QWidget *  widget,
const QRect &  rect 
) const
private

◆ isDpiScalingEnabled()

bool DarkStyle::isDpiScalingEnabled ( ) const

◆ loadColorizedImage()

QImage DarkStyle::loadColorizedImage ( QString const &  path,
QString const &  role = QString() 
)
private
Here is the call graph for this function:

◆ loadImages()

void DarkStyle::loadImages ( )
private
Here is the call graph for this function:

◆ pixelMetric()

int DarkStyle::pixelMetric ( PixelMetric  metric,
const QStyleOption *  option = nullptr,
const QWidget *  widget = nullptr 
) const
override
Here is the call graph for this function:

◆ pixmapFromImage()

QPixmap DarkStyle::pixmapFromImage ( QImage const &  image,
QSize  size 
) const
private
Here is the call graph for this function:

◆ polish()

void DarkStyle::polish ( QPalette &  palette)
override
Here is the call graph for this function:

◆ selectionColor()

QColor DarkStyle::selectionColor ( ) const
private

◆ setBaseColor()

void DarkStyle::setBaseColor ( const QColor &  color)
Here is the call graph for this function:

◆ setDpiScalingEnabled()

void DarkStyle::setDpiScalingEnabled ( bool  f)

◆ setScrollBarExtent()

void DarkStyle::setScrollBarExtent ( int  n)

◆ sizeFromContents()

QSize DarkStyle::sizeFromContents ( ContentsType  type,
const QStyleOption *  option,
const QSize &  size,
const QWidget *  widget 
) const
override
Here is the call graph for this function:

◆ standardPalette()

QPalette DarkStyle::standardPalette ( ) const

◆ styleHint()

int DarkStyle::styleHint ( StyleHint  stylehint,
const QStyleOption *  option = nullptr,
const QWidget *  widget = nullptr,
QStyleHintReturn *  returnData = nullptr 
) const
override

◆ subControlRect()

QRect DarkStyle::subControlRect ( ComplexControl  cc,
const QStyleOptionComplex *  option,
SubControl  sc,
const QWidget *  widget 
) const
override
Here is the call graph for this function:

Member Data Documentation

◆ m

Private* DarkStyle::m
private

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