Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QKdeThemePrivate Class Reference
Inheritance diagram for QKdeThemePrivate:
Collaboration diagram for QKdeThemePrivate:

Public Types

enum class  KdeSettingType {
  Root , KDE , Icons , ToolBarIcons ,
  ToolBarStyle , Fonts , Colors , Root ,
  KDE , Icons , ToolBarIcons , ToolBarStyle ,
  Fonts , Colors
}
enum class  KdeSetting {
  WidgetStyle , ColorScheme , SingleClick , ShowIconsOnPushButtons ,
  IconTheme , ToolBarIconSize , ToolButtonStyle , WheelScrollLines ,
  DoubleClickInterval , StartDragDistance , StartDragTime , CursorBlinkRate ,
  Font , Fixed , MenuFont , ToolBarFont ,
  ButtonBackground , WindowBackground , ViewForeground , WindowForeground ,
  ViewBackground , SelectionBackground , SelectionForeground , ViewBackgroundAlternate ,
  ButtonForeground , ViewForegroundLink , ViewForegroundVisited , TooltipBackground ,
  TooltipForeground , WidgetStyle , ColorScheme , SingleClick ,
  ShowIconsOnPushButtons , IconTheme , ToolBarIconSize , ToolButtonStyle ,
  WheelScrollLines , DoubleClickInterval , StartDragDistance , StartDragTime ,
  CursorBlinkRate , Font , Fixed , MenuFont ,
  ToolBarFont , ButtonBackground , WindowBackground , ViewForeground ,
  WindowForeground , ViewBackground , SelectionBackground , SelectionForeground ,
  ViewBackgroundAlternate , ButtonForeground , ViewForegroundLink , ViewForegroundVisited ,
  TooltipBackground , TooltipForeground
}
enum class  KdeSettingType {
  Root , KDE , Icons , ToolBarIcons ,
  ToolBarStyle , Fonts , Colors , Root ,
  KDE , Icons , ToolBarIcons , ToolBarStyle ,
  Fonts , Colors
}
enum class  KdeSetting {
  WidgetStyle , ColorScheme , SingleClick , ShowIconsOnPushButtons ,
  IconTheme , ToolBarIconSize , ToolButtonStyle , WheelScrollLines ,
  DoubleClickInterval , StartDragDistance , StartDragTime , CursorBlinkRate ,
  Font , Fixed , MenuFont , ToolBarFont ,
  ButtonBackground , WindowBackground , ViewForeground , WindowForeground ,
  ViewBackground , SelectionBackground , SelectionForeground , ViewBackgroundAlternate ,
  ButtonForeground , ViewForegroundLink , ViewForegroundVisited , TooltipBackground ,
  TooltipForeground , WidgetStyle , ColorScheme , SingleClick ,
  ShowIconsOnPushButtons , IconTheme , ToolBarIconSize , ToolButtonStyle ,
  WheelScrollLines , DoubleClickInterval , StartDragDistance , StartDragTime ,
  CursorBlinkRate , Font , Fixed , MenuFont ,
  ToolBarFont , ButtonBackground , WindowBackground , ViewForeground ,
  WindowForeground , ViewBackground , SelectionBackground , SelectionForeground ,
  ViewBackgroundAlternate , ButtonForeground , ViewForegroundLink , ViewForegroundVisited ,
  TooltipBackground , TooltipForeground
}

Public Member Functions

 QKdeThemePrivate (const QStringList &kdeDirs, int kdeVersion)
 ~QKdeThemePrivate ()
void refresh ()
QVariant readKdeSetting (KdeSetting s) const
void clearKdeSettings () const
void updateColorScheme (const QString &themeName)
 QKdeTheme::updateColorScheme - guess and set a color scheme for unix themes. KDE themes do not have a color scheme property. The key words "dark" or "light" are usually part of the theme name. This is, however, not a mandatory convention.
bool hasRequestedColorScheme () const
 QKdeThemePrivate (const QStringList &kdeDirs, int kdeVersion)
 ~QKdeThemePrivate ()
void refresh ()
QVariant readKdeSetting (KdeSetting s) const
void clearKdeSettings () const
void updateColorScheme (const QString &themeName)
bool hasRequestedColorScheme () const
Public Member Functions inherited from QGenericUnixThemePrivate
 QGenericUnixThemePrivate ()
Public Member Functions inherited from QPlatformThemePrivate
 QPlatformThemePrivate ()
virtual ~QPlatformThemePrivate ()
void initializeSystemPalette ()

Static Public Member Functions

static QString kdeGlobals (const QString &kdeDir, int kdeVersion)
static QVariant readKdeSetting (KdeSetting s, const QStringList &kdeDirs, int kdeVersion, QHash< QString, QSettings * > &settings)
static void readKdeSystemPalette (const QStringList &kdeDirs, int kdeVersion, QHash< QString, QSettings * > &kdeSettings, QPalette *pal)
static QFontkdeFont (const QVariant &fontValue)
static QStringList kdeIconThemeSearchPaths (const QStringList &kdeDirs)
static QString kdeGlobals (const QString &kdeDir, int kdeVersion)
static QVariant readKdeSetting (KdeSetting s, const QStringList &kdeDirs, int kdeVersion, QHash< QString, QSettings * > &settings)
static void readKdeSystemPalette (const QStringList &kdeDirs, int kdeVersion, QHash< QString, QSettings * > &kdeSettings, QPalette *pal)
static QFontkdeFont (const QVariant &fontValue)
static QStringList kdeIconThemeSearchPaths (const QStringList &kdeDirs)
Static Public Member Functions inherited from QPlatformThemePrivate
static unsigned currentKeyPlatforms ()

Public Attributes

const QStringList kdeDirs
const int kdeVersion
QString iconThemeName
QString iconFallbackThemeName
QStringList styleNames
int toolButtonStyle = Qt::ToolButtonTextBesideIcon
int toolBarIconSize = 0
bool singleClick = true
bool showIconsOnPushButtons = true
int wheelScrollLines = 3
int doubleClickInterval = 400
int startDragDist = 10
int startDragTime = 500
int cursorBlinkRate = 1000
Qt::ColorScheme m_colorScheme = Qt::ColorScheme::Unknown
Qt::ColorScheme m_requestedColorScheme = Qt::ColorScheme::Unknown
std::unique_ptr< QPalettesystemPalette
QFontfonts [QPlatformTheme::NFonts]
Public Attributes inherited from QGenericUnixThemePrivate
const QFont systemFont
QFont fixedFont
Public Attributes inherited from QPlatformThemePrivate
QPalettesystemPalette
QString name

Detailed Description

Definition at line 24 of file qkdetheme.cpp.

Member Enumeration Documentation

◆ KdeSetting [1/2]

enum class QKdeThemePrivate::KdeSetting
strong
Enumerator
WidgetStyle 
ColorScheme 
SingleClick 
ShowIconsOnPushButtons 
IconTheme 
ToolBarIconSize 
ToolButtonStyle 
WheelScrollLines 
DoubleClickInterval 
StartDragDistance 
StartDragTime 
CursorBlinkRate 
Font 
Fixed 
MenuFont 
ToolBarFont 
ButtonBackground 
WindowBackground 
ViewForeground 
WindowForeground 
ViewBackground 
SelectionBackground 
SelectionForeground 
ViewBackgroundAlternate 
ButtonForeground 
ViewForegroundLink 
ViewForegroundVisited 
TooltipBackground 
TooltipForeground 
WidgetStyle 
ColorScheme 
SingleClick 
ShowIconsOnPushButtons 
IconTheme 
ToolBarIconSize 
ToolButtonStyle 
WheelScrollLines 
DoubleClickInterval 
StartDragDistance 
StartDragTime 
CursorBlinkRate 
Font 
Fixed 
MenuFont 
ToolBarFont 
ButtonBackground 
WindowBackground 
ViewForeground 
WindowForeground 
ViewBackground 
SelectionBackground 
SelectionForeground 
ViewBackgroundAlternate 
ButtonForeground 
ViewForegroundLink 
ViewForegroundVisited 
TooltipBackground 
TooltipForeground 

Definition at line 38 of file qkdetheme.cpp.

◆ KdeSetting [2/2]

enum class QKdeThemePrivate::KdeSetting
strong
Enumerator
WidgetStyle 
ColorScheme 
SingleClick 
ShowIconsOnPushButtons 
IconTheme 
ToolBarIconSize 
ToolButtonStyle 
WheelScrollLines 
DoubleClickInterval 
StartDragDistance 
StartDragTime 
CursorBlinkRate 
Font 
Fixed 
MenuFont 
ToolBarFont 
ButtonBackground 
WindowBackground 
ViewForeground 
WindowForeground 
ViewBackground 
SelectionBackground 
SelectionForeground 
ViewBackgroundAlternate 
ButtonForeground 
ViewForegroundLink 
ViewForegroundVisited 
TooltipBackground 
TooltipForeground 
WidgetStyle 
ColorScheme 
SingleClick 
ShowIconsOnPushButtons 
IconTheme 
ToolBarIconSize 
ToolButtonStyle 
WheelScrollLines 
DoubleClickInterval 
StartDragDistance 
StartDragTime 
CursorBlinkRate 
Font 
Fixed 
MenuFont 
ToolBarFont 
ButtonBackground 
WindowBackground 
ViewForeground 
WindowForeground 
ViewBackground 
SelectionBackground 
SelectionForeground 
ViewBackgroundAlternate 
ButtonForeground 
ViewForegroundLink 
ViewForegroundVisited 
TooltipBackground 
TooltipForeground 

Definition at line 38 of file qkdetheme.cpp.

◆ KdeSettingType [1/2]

Enumerator
Root 
KDE 
Icons 
ToolBarIcons 
ToolBarStyle 
Fonts 
Colors 
Root 
KDE 
Icons 
ToolBarIcons 
ToolBarStyle 
Fonts 
Colors 

Definition at line 28 of file qkdetheme.cpp.

◆ KdeSettingType [2/2]

Enumerator
Root 
KDE 
Icons 
ToolBarIcons 
ToolBarStyle 
Fonts 
Colors 
Root 
KDE 
Icons 
ToolBarIcons 
ToolBarStyle 
Fonts 
Colors 

Definition at line 28 of file qkdetheme.cpp.

Constructor & Destructor Documentation

◆ QKdeThemePrivate() [1/2]

QKdeThemePrivate::QKdeThemePrivate ( const QStringList & kdeDirs,
int kdeVersion )

Definition at line 174 of file qkdetheme.cpp.

References QKdeThemePrivate(), and kdeVersion.

Referenced by QKdeThemePrivate().

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

◆ ~QKdeThemePrivate() [1/2]

QKdeThemePrivate::~QKdeThemePrivate ( )
inline

Definition at line 71 of file qkdetheme.cpp.

◆ QKdeThemePrivate() [2/2]

QKdeThemePrivate::QKdeThemePrivate ( const QStringList & kdeDirs,
int kdeVersion )

◆ ~QKdeThemePrivate() [2/2]

QKdeThemePrivate::~QKdeThemePrivate ( )
inline

Definition at line 71 of file qkdetheme.cpp.

Member Function Documentation

◆ clearKdeSettings() [1/2]

void QKdeThemePrivate::clearKdeSettings ( ) const

Definition at line 464 of file qkdetheme.cpp.

Referenced by refresh().

Here is the caller graph for this function:

◆ clearKdeSettings() [2/2]

void QKdeThemePrivate::clearKdeSettings ( ) const

◆ hasRequestedColorScheme() [1/2]

bool QKdeThemePrivate::hasRequestedColorScheme ( ) const
inline

Definition at line 108 of file qkdetheme.cpp.

◆ hasRequestedColorScheme() [2/2]

bool QKdeThemePrivate::hasRequestedColorScheme ( ) const
inline

Definition at line 108 of file qkdetheme.cpp.

◆ kdeFont() [1/2]

QFont * QKdeThemePrivate::kdeFont ( const QVariant & fontValue)
static

Definition at line 555 of file qkdetheme.cpp.

◆ kdeFont() [2/2]

QFont * QKdeThemePrivate::kdeFont ( const QVariant & fontValue)
static

◆ kdeGlobals() [1/2]

QString QKdeThemePrivate::kdeGlobals ( const QString & kdeDir,
int kdeVersion )
inlinestatic

Definition at line 73 of file qkdetheme.cpp.

◆ kdeGlobals() [2/2]

QString QKdeThemePrivate::kdeGlobals ( const QString & kdeDir,
int kdeVersion )
inlinestatic

Definition at line 73 of file qkdetheme.cpp.

◆ kdeIconThemeSearchPaths() [1/2]

QStringList QKdeThemePrivate::kdeIconThemeSearchPaths ( const QStringList & kdeDirs)
static

Definition at line 583 of file qkdetheme.cpp.

◆ kdeIconThemeSearchPaths() [2/2]

QStringList QKdeThemePrivate::kdeIconThemeSearchPaths ( const QStringList & kdeDirs)
static

◆ readKdeSetting() [1/4]

QVariant QKdeThemePrivate::readKdeSetting ( KdeSetting s) const

Definition at line 459 of file qkdetheme.cpp.

◆ readKdeSetting() [2/4]

QVariant QKdeThemePrivate::readKdeSetting ( KdeSetting s) const

◆ readKdeSetting() [3/4]

QVariant QKdeThemePrivate::readKdeSetting ( KdeSetting s,
const QStringList & kdeDirs,
int kdeVersion,
QHash< QString, QSettings * > & settings )
static

Definition at line 438 of file qkdetheme.cpp.

◆ readKdeSetting() [4/4]

QVariant QKdeThemePrivate::readKdeSetting ( KdeSetting s,
const QStringList & kdeDirs,
int kdeVersion,
QHash< QString, QSettings * > & settings )
static

◆ readKdeSystemPalette() [1/2]

void QKdeThemePrivate::readKdeSystemPalette ( const QStringList & kdeDirs,
int kdeVersion,
QHash< QString, QSettings * > & kdeSettings,
QPalette * pal )
static

Definition at line 482 of file qkdetheme.cpp.

◆ readKdeSystemPalette() [2/2]

void QKdeThemePrivate::readKdeSystemPalette ( const QStringList & kdeDirs,
int kdeVersion,
QHash< QString, QSettings * > & kdeSettings,
QPalette * pal )
static

◆ refresh() [1/2]

void QKdeThemePrivate::refresh ( )

Definition at line 324 of file qkdetheme.cpp.

References clearKdeSettings(), cursorBlinkRate, doubleClickInterval, kdeVersion, showIconsOnPushButtons, singleClick, startDragDist, startDragTime, toolBarIconSize, and wheelScrollLines.

Here is the call graph for this function:

◆ refresh() [2/2]

void QKdeThemePrivate::refresh ( )

◆ updateColorScheme() [1/2]

void QKdeThemePrivate::updateColorScheme ( const QString & themeName)

QKdeTheme::updateColorScheme - guess and set a color scheme for unix themes. KDE themes do not have a color scheme property. The key words "dark" or "light" are usually part of the theme name. This is, however, not a mandatory convention.

If

Parameters
themeNamecontains a valid key word, the respective color scheme is set. If it doesn't, the color scheme is heuristically determined by comparing text and base color of the system palette.

Definition at line 719 of file qkdetheme.cpp.

◆ updateColorScheme() [2/2]

void QKdeThemePrivate::updateColorScheme ( const QString & themeName)

Member Data Documentation

◆ cursorBlinkRate

int QKdeThemePrivate::cursorBlinkRate = 1000

Definition at line 102 of file qkdetheme.cpp.

Referenced by refresh().

◆ doubleClickInterval

int QKdeThemePrivate::doubleClickInterval = 400

Definition at line 99 of file qkdetheme.cpp.

Referenced by refresh().

◆ fonts

QFont * QKdeThemePrivate::fonts

Definition at line 106 of file qkdetheme.cpp.

◆ iconFallbackThemeName

QString QKdeThemePrivate::iconFallbackThemeName

Definition at line 92 of file qkdetheme.cpp.

◆ iconThemeName

QString QKdeThemePrivate::iconThemeName

Definition at line 91 of file qkdetheme.cpp.

◆ kdeDirs

const QStringList QKdeThemePrivate::kdeDirs

Definition at line 88 of file qkdetheme.cpp.

◆ kdeVersion

const int QKdeThemePrivate::kdeVersion

Definition at line 89 of file qkdetheme.cpp.

Referenced by QKdeThemePrivate(), and refresh().

◆ m_colorScheme

Qt::ColorScheme QKdeThemePrivate::m_colorScheme = Qt::ColorScheme::Unknown

Definition at line 103 of file qkdetheme.cpp.

◆ m_requestedColorScheme

Qt::ColorScheme QKdeThemePrivate::m_requestedColorScheme = Qt::ColorScheme::Unknown

Definition at line 104 of file qkdetheme.cpp.

◆ showIconsOnPushButtons

bool QKdeThemePrivate::showIconsOnPushButtons = true

Definition at line 97 of file qkdetheme.cpp.

Referenced by refresh().

◆ singleClick

bool QKdeThemePrivate::singleClick = true

Definition at line 96 of file qkdetheme.cpp.

Referenced by refresh().

◆ startDragDist

int QKdeThemePrivate::startDragDist = 10

Definition at line 100 of file qkdetheme.cpp.

Referenced by refresh().

◆ startDragTime

int QKdeThemePrivate::startDragTime = 500

Definition at line 101 of file qkdetheme.cpp.

Referenced by refresh().

◆ styleNames

QStringList QKdeThemePrivate::styleNames

Definition at line 93 of file qkdetheme.cpp.

◆ systemPalette

std::unique_ptr< QPalette > QKdeThemePrivate::systemPalette

Definition at line 105 of file qkdetheme.cpp.

◆ toolBarIconSize

int QKdeThemePrivate::toolBarIconSize = 0

Definition at line 95 of file qkdetheme.cpp.

Referenced by refresh().

◆ toolButtonStyle

int QKdeThemePrivate::toolButtonStyle = Qt::ToolButtonTextBesideIcon

Definition at line 94 of file qkdetheme.cpp.

◆ wheelScrollLines

int QKdeThemePrivate::wheelScrollLines = 3

Definition at line 98 of file qkdetheme.cpp.

Referenced by refresh().


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