MythUIHelper Class Reference

#include <mythuihelper.h>

List of all members.

Public Member Functions

void Init (MythUIMenuCallbacks &cbs)
MythUIMenuCallbacksGetMenuCBs (void)
void LoadQtConfig (void)
void UpdateImageCache (void)
MythImageGetImageFromCache (const QString &url)
MythImageCacheImage (const QString &url, MythImage *im, bool nodisk=false)
void RemoveFromCacheByURL (const QString &url)
void RemoveFromCacheByFile (const QString &fname)
bool IsImageInCache (const QString &url)
QString GetThemeCacheDir (void)
void IncludeInCacheSize (MythImage *im)
void ExcludeFromCacheSize (MythImage *im)
Settingsqtconfig (void)
bool IsScreenSetup (void)
bool IsTopScreenInitialized (void)
void GetScreenSettings (float &wmult, float &hmult)
void GetScreenSettings (int &width, float &wmult, int &height, float &hmult)
void GetScreenSettings (int &xbase, int &width, float &wmult, int &ybase, int &height, float &hmult)
void GetScreenBounds (int &xbase, int &ybase, int &width, int &height)
bool IsGeometryOverridden (void)
QPixmap * LoadScalePixmap (QString filename, bool fromcache=true)
QImage * LoadScaleImage (QString filename, bool fromcache=true)
MythImageLoadCacheImage (QString srcfile, QString label, MythPainter *painter, ImageCacheMode cacheMode=kCacheNormal)
void ThemeWidget (QWidget *widget)
QString FindThemeDir (const QString &themename)
 Returns the full path to the theme denoted by themename.
QString FindMenuThemeDir (const QString &menuname)
 Returns the full path to the menu theme denoted by menuname.
QString GetThemeDir (void)
QString GetThemeName (void)
QStringList GetThemeSearchPath (void)
QString GetMenuThemeDir (void)
QList< ThemeInfoGetThemes (ThemeType type)
bool FindThemeFile (QString &filename)
QFont GetBigFont (void)
QFont GetMediumFont (void)
QFont GetSmallFont (void)
void DisableScreensaver (void)
void RestoreScreensaver (void)
void ResetScreensaver (void)
void DoDisableScreensaver (void)
void DoRestoreScreensaver (void)
void DoResetScreensaver (void)
bool GetScreensaverEnabled (void)
bool GetScreenIsAsleep (void)
void AddCurrentLocation (QString location)
QString RemoveCurrentLocation (void)
QString GetCurrentLocation (bool fullPath=false, bool mainStackOnly=true)
MThreadPoolGetImageThreadPool (void)
double GetPixelAspectRatio (void) const
QSize GetBaseSize (void) const
void SetFontStretch (int stretch)
int GetFontStretch (void) const

Static Public Member Functions

static void ParseGeometryOverride (const QString &geometry)
 Parse an X11 style command line geometry string.
static void SetX11Display (const QString &display)
 This needs to be set before MythUIHelper is initialized so that the MythUIHelper::Init() can detect Xinerama setups.
static QString GetX11Display (void)
static MythUIHelpergetMythUI (void)
static void destroyMythUI (void)

Static Public Attributes

static QString x11_display

Protected Member Functions

 MythUIHelper ()
 ~MythUIHelper ()

Private Member Functions

void SetPalette (QWidget *widget)
void InitializeScreenSettings (void)
void ClearOldImageCache (void)
void RemoveCacheDir (const QString &dirname)

Private Attributes

MythUIHelperPrivated
QMutex m_locationLock
QStringList m_currentLocation

Detailed Description

Definition at line 42 of file mythuihelper.h.


Constructor & Destructor Documentation

MythUIHelper::MythUIHelper (  )  [protected]

Definition at line 386 of file mythuihelper.cpp.

Referenced by getMythUI().

MythUIHelper::~MythUIHelper (  )  [protected]

Definition at line 391 of file mythuihelper.cpp.


Member Function Documentation

void MythUIHelper::Init ( MythUIMenuCallbacks cbs  ) 

Definition at line 396 of file mythuihelper.cpp.

Referenced by MythContextPrivate::Init().

MythUIMenuCallbacks * MythUIHelper::GetMenuCBs ( void   ) 

Definition at line 411 of file mythuihelper.cpp.

Referenced by MythThemedMenu::handleAction().

void MythUIHelper::LoadQtConfig ( void   ) 
void MythUIHelper::UpdateImageCache ( void   ) 

Definition at line 493 of file mythuihelper.cpp.

Referenced by MythMainWindow::Init().

MythImage * MythUIHelper::GetImageFromCache ( const QString &  url  ) 

Definition at line 516 of file mythuihelper.cpp.

Referenced by LoadCacheImage().

MythImage * MythUIHelper::CacheImage ( const QString &  url,
MythImage im,
bool  nodisk = false 
)

Definition at line 558 of file mythuihelper.cpp.

Referenced by LoadCacheImage(), and ImageLoader::LoadImage().

void MythUIHelper::RemoveFromCacheByURL ( const QString &  url  ) 

Definition at line 652 of file mythuihelper.cpp.

Referenced by LoadCacheImage(), and RemoveFromCacheByFile().

void MythUIHelper::RemoveFromCacheByFile ( const QString &  fname  ) 
bool MythUIHelper::IsImageInCache ( const QString &  url  ) 

Definition at line 713 of file mythuihelper.cpp.

QString MythUIHelper::GetThemeCacheDir ( void   ) 
void MythUIHelper::IncludeInCacheSize ( MythImage im  ) 
void MythUIHelper::ExcludeFromCacheSize ( MythImage im  ) 
Settings * MythUIHelper::qtconfig ( void   ) 

Definition at line 488 of file mythuihelper.cpp.

Referenced by MythThemeBase::Init(), and MythThemeBase::Reload().

bool MythUIHelper::IsScreenSetup ( void   ) 
bool MythUIHelper::IsTopScreenInitialized ( void   ) 

Definition at line 421 of file mythuihelper.cpp.

Referenced by Frontend::PlayRecording(), and NetworkControl::processPlay().

void MythUIHelper::GetScreenSettings ( float &  wmult,
float &  hmult 
)
void MythUIHelper::GetScreenSettings ( int &  width,
float &  wmult,
int &  height,
float &  hmult 
)

Definition at line 860 of file mythuihelper.cpp.

void MythUIHelper::GetScreenSettings ( int &  xbase,
int &  width,
float &  wmult,
int &  ybase,
int &  height,
float &  hmult 
)

Definition at line 870 of file mythuihelper.cpp.

void MythUIHelper::GetScreenBounds ( int &  xbase,
int &  ybase,
int &  width,
int &  height 
)

Definition at line 844 of file mythuihelper.cpp.

Referenced by TV::Init().

void MythUIHelper::ParseGeometryOverride ( const QString &  geometry  )  [static]

Parse an X11 style command line geometry string.

Accepts strings like -geometry 800x600 or -geometry 800x600+112+22 to override the fullscreen and user default screen dimensions

Definition at line 892 of file mythuihelper.cpp.

Referenced by main().

bool MythUIHelper::IsGeometryOverridden ( void   ) 

Definition at line 990 of file mythuihelper.cpp.

QPixmap * MythUIHelper::LoadScalePixmap ( QString  filename,
bool  fromcache = true 
)
QImage * MythUIHelper::LoadScaleImage ( QString  filename,
bool  fromcache = true 
)
MythImage * MythUIHelper::LoadCacheImage ( QString  srcfile,
QString  label,
MythPainter painter,
ImageCacheMode  cacheMode = kCacheNormal 
)

Definition at line 1490 of file mythuihelper.cpp.

Referenced by MythUIImage::Load(), and ImageLoader::LoadImage().

void MythUIHelper::ThemeWidget ( QWidget *  widget  ) 
QString MythUIHelper::FindThemeDir ( const QString &  themename  ) 

Returns the full path to the theme denoted by themename.

If the theme cannot be found falls back to the DEFAULT_UI_THEME. If the DEFAULT_UI_THEME doesn't exist then returns an empty string.

Parameters:
themename The theme name.
Returns:
Path to theme or empty string.

Definition at line 1006 of file mythuihelper.cpp.

Referenced by LoadQtConfig(), main(), reloadTheme(), and resetTheme().

QString MythUIHelper::FindMenuThemeDir ( const QString &  menuname  ) 

Returns the full path to the menu theme denoted by menuname.

If the theme cannot be found falls back to the default menu. If the default menu theme doesn't exist then returns an empty string.

Parameters:
menuname The menutheme name.
Returns:
Path to theme or empty string.

Definition at line 1071 of file mythuihelper.cpp.

Referenced by LoadQtConfig().

QString MythUIHelper::GetThemeDir ( void   ) 
QString MythUIHelper::GetThemeName ( void   ) 

Definition at line 1119 of file mythuihelper.cpp.

QStringList MythUIHelper::GetThemeSearchPath ( void   ) 
QString MythUIHelper::GetMenuThemeDir ( void   ) 

Definition at line 1109 of file mythuihelper.cpp.

Referenced by MythThemedMenu::findMenuFile().

QList< ThemeInfo > MythUIHelper::GetThemes ( ThemeType  type  ) 

Definition at line 1138 of file mythuihelper.cpp.

Referenced by MenuTheme().

bool MythUIHelper::FindThemeFile ( QString &  filename  ) 
QFont MythUIHelper::GetBigFont ( void   ) 

Definition at line 1585 of file mythuihelper.cpp.

Referenced by MythDialog::MythDialog().

QFont MythUIHelper::GetMediumFont ( void   ) 

Definition at line 1594 of file mythuihelper.cpp.

Referenced by VisualBase::drawWarning(), and MythDialog::MythDialog().

QFont MythUIHelper::GetSmallFont ( void   ) 

Definition at line 1603 of file mythuihelper.cpp.

Referenced by MythDialog::MythDialog().

void MythUIHelper::DisableScreensaver ( void   ) 
void MythUIHelper::RestoreScreensaver ( void   ) 
void MythUIHelper::ResetScreensaver ( void   ) 
void MythUIHelper::DoDisableScreensaver ( void   ) 
void MythUIHelper::DoRestoreScreensaver ( void   ) 
void MythUIHelper::DoResetScreensaver ( void   ) 

Definition at line 1660 of file mythuihelper.cpp.

Referenced by MythMainWindow::customEvent().

bool MythUIHelper::GetScreensaverEnabled ( void   ) 

Definition at line 1669 of file mythuihelper.cpp.

bool MythUIHelper::GetScreenIsAsleep ( void   ) 

Definition at line 1674 of file mythuihelper.cpp.

void MythUIHelper::SetX11Display ( const QString &  display  )  [static]

This needs to be set before MythUIHelper is initialized so that the MythUIHelper::Init() can detect Xinerama setups.

Definition at line 1684 of file mythuihelper.cpp.

Referenced by main().

QString MythUIHelper::GetX11Display ( void   )  [static]

Definition at line 1690 of file mythuihelper.cpp.

Referenced by MythXDisplay::Open().

MythUIHelper * MythUIHelper::getMythUI ( void   )  [static]

Definition at line 43 of file mythuihelper.cpp.

Referenced by GetMythUI(), and OSD::OverrideUIScale().

void MythUIHelper::destroyMythUI ( void   )  [static]

Definition at line 58 of file mythuihelper.cpp.

Referenced by DestroyMythUI().

void MythUIHelper::AddCurrentLocation ( QString  location  ) 
QString MythUIHelper::RemoveCurrentLocation ( void   ) 
QString MythUIHelper::GetCurrentLocation ( bool  fullPath = false,
bool  mainStackOnly = true 
)
MThreadPool * MythUIHelper::GetImageThreadPool ( void   ) 

Definition at line 1768 of file mythuihelper.cpp.

Referenced by MythUIImage::Load(), and MythUIImage::~MythUIImage().

double MythUIHelper::GetPixelAspectRatio ( void   )  const

Definition at line 1773 of file mythuihelper.cpp.

Referenced by GalleryUtil::ScaleToDest().

QSize MythUIHelper::GetBaseSize ( void   )  const

Definition at line 1778 of file mythuihelper.cpp.

Referenced by OSD::OverrideUIScale(), and MythFontProperties::SetPixelSize().

void MythUIHelper::SetFontStretch ( int  stretch  ) 

Definition at line 1783 of file mythuihelper.cpp.

Referenced by OSD::OverrideUIScale(), and OSD::RevertUIScale().

int MythUIHelper::GetFontStretch ( void   )  const
void MythUIHelper::SetPalette ( QWidget *  widget  )  [private]

Definition at line 1171 of file mythuihelper.cpp.

Referenced by ThemeWidget().

void MythUIHelper::InitializeScreenSettings ( void   )  [private]
void MythUIHelper::ClearOldImageCache ( void   )  [private]

Definition at line 738 of file mythuihelper.cpp.

Referenced by UpdateImageCache().

void MythUIHelper::RemoveCacheDir ( const QString &  dirname  )  [private]

Definition at line 804 of file mythuihelper.cpp.

Referenced by ClearOldImageCache().


Member Data Documentation

QString MythUIHelper::x11_display [static]

Definition at line 123 of file mythuihelper.h.

Referenced by GetX11Display(), and SetX11Display().

QMutex MythUIHelper::m_locationLock [private]

Definition at line 153 of file mythuihelper.h.

Referenced by AddCurrentLocation(), GetCurrentLocation(), and RemoveCurrentLocation().

QStringList MythUIHelper::m_currentLocation [private]

Definition at line 154 of file mythuihelper.h.

Referenced by AddCurrentLocation(), GetCurrentLocation(), and RemoveCurrentLocation().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Mon May 28 06:42:18 2012 for MythTV by  doxygen 1.6.3