qTox  Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
Classes | Public Types | Signals | Static Public Member Functions | Private Member Functions | List of all members
Style Class Reference

#include <style.h>

Collaboration diagram for Style:
Collaboration graph

Classes

struct  ThemeNameColor
 

Public Types

enum  ColorPalette {
  TransferGood, TransferWait, TransferBad, TransferMiddle,
  MainText, NameActive, StatusActive, GroundExtra,
  GroundBase, Orange, Yellow, ThemeDark,
  ThemeMediumDark, ThemeMedium, ThemeLight, Action,
  Link, SearchHighlighted, SelectText
}
 
enum  Font {
  ExtraBig, Big, BigBold, Medium,
  MediumBold, Small, SmallLight
}
 
enum  MainTheme { Light, Dark }
 

Signals

void themeChanged ()
 

Static Public Member Functions

static QStringList getThemeColorNames ()
 
static const QString getStylesheet (const QString &filename, const QFont &baseFont=QFont())
 
static const QString getImagePath (const QString &filename)
 
static QString getThemeFolder ()
 
static QString getThemeName ()
 
static QColor getColor (ColorPalette entry)
 
static QFont getFont (Font font)
 
static const QString resolve (const QString &filename, const QFont &baseFont=QFont())
 
static void repolish (QWidget *w)
 
static void setThemeColor (int color)
 
static void setThemeColor (const QColor &color)
 Set theme color. More...
 
static void applyTheme ()
 Reloads some CCS. More...
 
static QPixmap scaleSvgImage (const QString &path, uint32_t width, uint32_t height)
 
static void initPalette ()
 
static void initDictColor ()
 
static QString getThemePath ()
 

Private Member Functions

 Style ()
 

Detailed Description

Definition at line 28 of file style.h.

Member Enumeration Documentation

◆ ColorPalette

Enumerator
TransferGood 
TransferWait 
TransferBad 
TransferMiddle 
MainText 
NameActive 
StatusActive 
GroundExtra 
GroundBase 
Orange 
Yellow 
ThemeDark 
ThemeMediumDark 
ThemeMedium 
ThemeLight 
Action 
Link 
SearchHighlighted 
SelectText 

Definition at line 31 of file style.h.

◆ Font

Enumerator
ExtraBig 
Big 
BigBold 
Medium 
MediumBold 
Small 
SmallLight 

Definition at line 54 of file style.h.

◆ MainTheme

Enumerator
Light 
Dark 

Definition at line 65 of file style.h.

Constructor & Destructor Documentation

◆ Style()

Style::Style ( )
private

Member Function Documentation

◆ applyTheme()

void Style::applyTheme ( )
static

Reloads some CCS.

Definition at line 376 of file style.cpp.

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

◆ getColor()

QColor Style::getColor ( Style::ColorPalette  entry)
static

Definition at line 209 of file style.cpp.

Here is the caller graph for this function:

◆ getFont()

QFont Style::getFont ( Style::Font  font)
static

Definition at line 214 of file style.cpp.

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

◆ getImagePath()

const QString Style::getImagePath ( const QString &  filename)
static

Definition at line 182 of file style.cpp.

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

◆ getStylesheet()

const QString Style::getStylesheet ( const QString &  filename,
const QFont &  baseFont = QFont() 
)
static

Definition at line 165 of file style.cpp.

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

◆ getThemeColorNames()

QStringList Style::getThemeColorNames ( )
static

Definition at line 105 of file style.cpp.

Here is the caller graph for this function:

◆ getThemeFolder()

QString Style::getThemeFolder ( )
static

Definition at line 123 of file style.cpp.

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

◆ getThemeName()

QString Style::getThemeName ( )
static

Definition at line 116 of file style.cpp.

Here is the caller graph for this function:

◆ getThemePath()

QString Style::getThemePath ( )
static

Definition at line 428 of file style.cpp.

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

◆ initDictColor()

void Style::initDictColor ( )
static

Definition at line 408 of file style.cpp.

◆ initPalette()

void Style::initPalette ( )
static

Definition at line 391 of file style.cpp.

Here is the call graph for this function:

◆ repolish()

void Style::repolish ( QWidget *  w)
static

Definition at line 319 of file style.cpp.

Here is the caller graph for this function:

◆ resolve()

const QString Style::resolve ( const QString &  filename,
const QFont &  baseFont = QFont() 
)
static

Definition at line 234 of file style.cpp.

Here is the call graph for this function:

◆ scaleSvgImage()

QPixmap Style::scaleSvgImage ( const QString &  path,
uint32_t  width,
uint32_t  height 
)
static

Definition at line 381 of file style.cpp.

Here is the caller graph for this function:

◆ setThemeColor() [1/2]

void Style::setThemeColor ( const QColor &  color)
static

Set theme color.

Parameters
colorColor to set.

Pass an invalid QColor to reset to defaults.

Definition at line 352 of file style.cpp.

◆ setThemeColor() [2/2]

void Style::setThemeColor ( int  color)
static

Definition at line 333 of file style.cpp.

Here is the caller graph for this function:

◆ themeChanged

void Style::themeChanged ( )
signal

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