Privacy
An open-source, flexible 3D physical simulation framework
mars::gui::MarsStyle Class Reference

A custom GUI style. More...

#include <MarsStyle.h>

Public Member Functions

 MarsStyle (std::string stylePath_)
 
void polish (QPalette &palette)
 
void polish (QWidget *widget)
 
void unpolish (QWidget *widget)
 
int pixelMetric (PixelMetric metric, const QStyleOption *option, const QWidget *widget) const
 
int styleHint (StyleHint hint, const QStyleOption *option, const QWidget *widget, QStyleHintReturn *returnData) const
 
void drawPrimitive (PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const
 
void drawControl (ControlElement control, const QStyleOption *option, QPainter *painter, const QWidget *widget) const
 

Static Private Member Functions

static void setTexture (QPalette &palette, QPalette::ColorRole role, const QPixmap &pixmap)
 
static QPainterPath roundRectPath (const QRect &rect)
 

Private Attributes

std::string stylePath
 

Detailed Description

A custom GUI style.

Definition at line 36 of file MarsStyle.h.

Constructor & Destructor Documentation

◆ MarsStyle()

mars::gui::MarsStyle::MarsStyle ( std::string  stylePath_)
inline

Definition at line 41 of file MarsStyle.h.

Member Function Documentation

◆ drawControl()

void mars::gui::MarsStyle::drawControl ( ControlElement  control,
const QStyleOption *  option,
QPainter *  painter,
const QWidget *  widget 
) const

Definition at line 193 of file MarsStyle.cpp.

◆ drawPrimitive()

void mars::gui::MarsStyle::drawPrimitive ( PrimitiveElement  element,
const QStyleOption *  option,
QPainter *  painter,
const QWidget *  widget 
) const

Definition at line 117 of file MarsStyle.cpp.

◆ pixelMetric()

int mars::gui::MarsStyle::pixelMetric ( PixelMetric  metric,
const QStyleOption *  option,
const QWidget *  widget 
) const

Definition at line 89 of file MarsStyle.cpp.

◆ polish() [1/2]

void mars::gui::MarsStyle::polish ( QPalette &  palette)

Definition at line 30 of file MarsStyle.cpp.

◆ polish() [2/2]

void mars::gui::MarsStyle::polish ( QWidget *  widget)

Definition at line 75 of file MarsStyle.cpp.

◆ roundRectPath()

QPainterPath mars::gui::MarsStyle::roundRectPath ( const QRect &  rect)
staticprivate

Definition at line 231 of file MarsStyle.cpp.

◆ setTexture()

void mars::gui::MarsStyle::setTexture ( QPalette &  palette,
QPalette::ColorRole  role,
const QPixmap &  pixmap 
)
staticprivate

Definition at line 222 of file MarsStyle.cpp.

◆ styleHint()

int mars::gui::MarsStyle::styleHint ( StyleHint  hint,
const QStyleOption *  option,
const QWidget *  widget,
QStyleHintReturn *  returnData 
) const

Definition at line 103 of file MarsStyle.cpp.

◆ unpolish()

void mars::gui::MarsStyle::unpolish ( QWidget *  widget)

Definition at line 82 of file MarsStyle.cpp.

Member Data Documentation

◆ stylePath

std::string mars::gui::MarsStyle::stylePath
private

Definition at line 55 of file MarsStyle.h.


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