Miam-Player  0.8.0
A nice music player
SettingsPrivate Class Reference

SettingsPrivate class contains all relevant pairs of (keys, values) used by Miam-Player. More...

#include <settingsprivate.h>

Inheritance diagram for SettingsPrivate:

Public Types

enum  DragDropAction { DD_OpenPopup = 0, DD_AddToLibrary = 1, DD_AddToPlaylist = 2 }
 
enum  FontFamily { FF_Playlist = 0, FF_Library = 1, FF_Menu = 2 }
 
enum  InsertPolicy { IP_Artists = 0, IP_Albums = 1, IP_ArtistsAlbums = 2, IP_Years = 3 }
 
enum  PlaylistDefaultAction { PL_AskUserForAction = 0, PL_SaveOnClose = 1, PL_DiscardOnClose = 2 }
 
enum  LibrarySearchMode { LSM_Filter = 0, LSM_HighlightOnly = 1 }
 

Public Slots

void addMusicLocations (const QList< QDir > &dirs)
 SLOTS. More...
 
void setBigCoverOpacity (int v)
 
void setBigCovers (bool b)
 
void setButtonsSize (const int &s)
 
void setColorsAlternateBG (bool b)
 Colors. More...
 
void setCopyTracksFromPlaylist (bool b)
 
void setCovers (bool b)
 
void setCoverSize (int s)
 
void setCustomColors (bool b)
 
void setDelegates (const bool &value)
 
void setDragDropAction (DragDropAction action)
 
void setExtendedSearchVisible (bool b)
 
void setFont (const FontFamily &fontFamily, const QFont &font)
 
void setFontPointSize (const FontFamily &fontFamily, int i)
 
void setIsLibraryFilteredByArticles (bool b)
 
void setLastActivePlaylistGeometry (const QByteArray &)
 
void setLibraryFilteredByArticles (const QStringList &tagList)
 
void setMediaButtonVisible (const QString &buttonName, const bool &value)
 
void setMonitorFileSystem (bool b)
 
void setPlaybackSeekTime (int t)
 PlayBack options. More...
 
void setPlaybackCloseAction (PlaylistDefaultAction action)
 
void setPlaybackKeepPlaylists (bool b)
 
void setPlaybackRestorePlaylistsAtStartup (bool b)
 
void setReorderArtistsArticle (bool b)
 
void setSearchAndExcludeLibrary (bool b)
 
void setShowNeverScored (bool b)
 
void setTabsOverlappingLength (int l)
 
void setTabsRect (bool b)
 
void setButtonThemeCustomized (bool b)
 
void setVolumeBarHideAfter (int seconds)
 
void setVolumeBarTextAlwaysVisible (bool b)
 

Signals

void fontHasChanged (FontFamily, const QFont &font)
 
void librarySearchModeHasChanged ()
 
void musicLocationsHaveChanged (const QStringList &oldLocations, const QStringList &newLocations)
 

Public Member Functions

void addPlugin (const PluginInfo &plugin)
 
void disablePlugin (const QString &absFilePath)
 
qreal bigCoverOpacity () const
 
int buttonsSize () const
 
bool colorsAlternateBG () const
 
bool copyTracksFromPlaylist () const
 
int coverSize () const
 
QColor customColors (QPalette::ColorRole cr) const
 
const QString customIcon (const QString &buttonName) const
 
QString defaultLocationFileExplorer () const
 
DragDropAction dragDropAction () const
 
QFont font (const FontFamily fontFamily)
 
int fontSize (const FontFamily fontFamily)
 
bool hasCustomIcon (const QString &buttonName) const
 
InsertPolicy insertPolicy () const
 
bool isBigCoverEnabled () const
 
bool isCoversEnabled () const
 
bool isCustomColors () const
 
bool isExtendedSearchVisible () const
 
bool isFileSystemMonitored () const
 
bool isLibraryFilteredByArticles () const
 
bool isMediaButtonVisible (const QString &buttonName) const
 
bool isPlaylistResizeColumns () const
 
bool isRectTabs () const
 
bool isReorderArtistsArticle () const
 
bool isShowNeverScored () const
 
bool isStarDelegates () const
 
bool isButtonThemeCustomized () const
 
bool isVolumeBarTextAlwaysVisible () const
 
QString language ()
 
QByteArray lastActivePlaylistGeometry () const
 
QList< uint > lastPlaylistSession () const
 
QStringList libraryFilteredByArticles () const
 
LibrarySearchMode librarySearchMode () const
 
QStringList musicLocations () const
 
int tabsOverlappingLength () const
 
qint64 playbackSeekTime () const
 PlayBack options. More...
 
PlaylistDefaultAction playbackDefaultActionForClose () const
 
bool playbackKeepPlaylists () const
 
bool playbackRestorePlaylistsAtStartup () const
 
QMap< QString, PluginInfoplugins () const
 
void setCustomColorRole (QPalette::ColorRole cr, const QColor &color)
 
void setCustomIcon (const QString &buttonName, const QString &iconPath)
 
bool setLanguage (const QString &lang)
 
void setLastPlaylistSession (const QList< uint > &ids)
 
void setMusicLocations (const QStringList &locations)
 
void setShortcut (const QString &objectName, const QKeySequence &keySequence)
 
QKeySequence shortcut (const QString &objectName) const
 
int volumeBarHideAfter () const
 
void setDefaultLocationFileExplorer (const QString &location)
 
void setInsertPolicy (InsertPolicy ip)
 

Static Public Member Functions

static SettingsPrivateinstance ()
 

Public Attributes

QTranslator playerTranslator
 
QTranslator libraryTranslator
 
QTranslator defaultQtTranslator
 

Detailed Description

SettingsPrivate class contains all relevant pairs of (keys, values) used by Miam-Player.

This class implements the Singleton pattern. Instead of using standard "this->value(QString)", lots of methods are built on-top of it. It keeps the code easy to read and some important enums are shared between plugins too.

Author
Matthieu Bachelier

Member Enumeration Documentation

Enumerator
DD_OpenPopup 
DD_AddToLibrary 
DD_AddToPlaylist 
Enumerator
FF_Playlist 
FF_Library 
FF_Menu 
Enumerator
IP_Artists 
IP_Albums 
IP_ArtistsAlbums 
IP_Years 
Enumerator
LSM_Filter 
LSM_HighlightOnly 
Enumerator
PL_AskUserForAction 
PL_SaveOnClose 
PL_DiscardOnClose 

Member Function Documentation

void SettingsPrivate::addMusicLocations ( const QList< QDir > &  dirs)
slot

SLOTS.

void SettingsPrivate::addPlugin ( const PluginInfo plugin)

Add an activated plugin to the application.

qreal SettingsPrivate::bigCoverOpacity ( ) const
int SettingsPrivate::buttonsSize ( ) const

Returns the actual size of media buttons.

Return the actual size of media buttons.

bool SettingsPrivate::colorsAlternateBG ( ) const

Returns true if the background color in playlist is using alternatative colors.

bool SettingsPrivate::copyTracksFromPlaylist ( ) const
int SettingsPrivate::coverSize ( ) const

Returns the size of a cover.

QColor SettingsPrivate::customColors ( QPalette::ColorRole  cr) const
const QString SettingsPrivate::customIcon ( const QString &  buttonName) const

Custom icons in Customize(Theme)

QString SettingsPrivate::defaultLocationFileExplorer ( ) const
void SettingsPrivate::disablePlugin ( const QString &  absFilePath)

Disable a previously registered plugin (so it still can be listed in options).

SettingsPrivate::DragDropAction SettingsPrivate::dragDropAction ( ) const
QFont SettingsPrivate::font ( const FontFamily  fontFamily)

Returns the font of the application.

void SettingsPrivate::fontHasChanged ( FontFamily  ,
const QFont &  font 
)
signal
int SettingsPrivate::fontSize ( const FontFamily  fontFamily)

Sets the font of the application.

bool SettingsPrivate::hasCustomIcon ( const QString &  buttonName) const

Custom icons in CustomizeTheme

SettingsPrivate::InsertPolicy SettingsPrivate::insertPolicy ( ) const
SettingsPrivate * SettingsPrivate::instance ( )
static

Singleton Pattern to easily use Settings everywhere in the app.

Singleton pattern to be able to easily use SettingsPrivate everywhere in the app.

bool SettingsPrivate::isBigCoverEnabled ( ) const

Returns true if big and faded covers are displayed in the library when an album is expanded.

bool SettingsPrivate::isButtonThemeCustomized ( ) const

Returns true if a user has modified one of defaults theme.

bool SettingsPrivate::isCoversEnabled ( ) const

Returns true if covers are displayed in the library.

bool SettingsPrivate::isCustomColors ( ) const
bool SettingsPrivate::isExtendedSearchVisible ( ) const
bool SettingsPrivate::isFileSystemMonitored ( ) const

Returns true if background process is active to keep library up-to-date.

bool SettingsPrivate::isLibraryFilteredByArticles ( ) const

Returns the hierarchical order of the library tree view.

bool SettingsPrivate::isMediaButtonVisible ( const QString &  buttonName) const

Returns true if the button in parameter is visible or not.

bool SettingsPrivate::isPlaylistResizeColumns ( ) const
bool SettingsPrivate::isRectTabs ( ) const

Returns true if tabs should be displayed like rectangles.

bool SettingsPrivate::isReorderArtistsArticle ( ) const

Returns true if the article should be displayed after artist's name.

bool SettingsPrivate::isShowNeverScored ( ) const

Returns true if star outline must be displayed in the library.

bool SettingsPrivate::isStarDelegates ( ) const

Returns true if stars are visible and active.

bool SettingsPrivate::isVolumeBarTextAlwaysVisible ( ) const

Returns true if the volume value in percent is always visible in the upper left corner of the widget.

QString SettingsPrivate::language ( )

Returns the language of the application.

QByteArray SettingsPrivate::lastActivePlaylistGeometry ( ) const

Returns the last active playlist header state.

QList< uint > SettingsPrivate::lastPlaylistSession ( ) const

Returns the last playlists that were opened when player was closed.

QStringList SettingsPrivate::libraryFilteredByArticles ( ) const
SettingsPrivate::LibrarySearchMode SettingsPrivate::librarySearchMode ( ) const
void SettingsPrivate::librarySearchModeHasChanged ( )
signal
QStringList SettingsPrivate::musicLocations ( ) const

Returns all music locations.

void SettingsPrivate::musicLocationsHaveChanged ( const QStringList &  oldLocations,
const QStringList &  newLocations 
)
signal

Signal sent whether the music locations have changed or not.

SettingsPrivate::PlaylistDefaultAction SettingsPrivate::playbackDefaultActionForClose ( ) const

Default action to execute when one is closing a playlist.

bool SettingsPrivate::playbackKeepPlaylists ( ) const

Automatically save all playlists before exit.

bool SettingsPrivate::playbackRestorePlaylistsAtStartup ( ) const

Automatically restore all saved playlists at startup.

qint64 SettingsPrivate::playbackSeekTime ( ) const

PlayBack options.

QMap< QString, PluginInfo > SettingsPrivate::plugins ( ) const
void SettingsPrivate::setBigCoverOpacity ( int  v)
slot
void SettingsPrivate::setBigCovers ( bool  b)
slot
void SettingsPrivate::setButtonsSize ( const int &  s)
slot

Sets a new button size.

void SettingsPrivate::setButtonThemeCustomized ( bool  b)
slot
void SettingsPrivate::setColorsAlternateBG ( bool  b)
slot

Colors.

void SettingsPrivate::setCopyTracksFromPlaylist ( bool  b)
slot
void SettingsPrivate::setCovers ( bool  b)
slot
void SettingsPrivate::setCoverSize ( int  s)
slot
void SettingsPrivate::setCustomColorRole ( QPalette::ColorRole  cr,
const QColor &  color 
)
void SettingsPrivate::setCustomColors ( bool  b)
slot
void SettingsPrivate::setCustomIcon ( const QString &  buttonName,
const QString &  iconPath 
)

Custom icons in CustomizeTheme

void SettingsPrivate::setDefaultLocationFileExplorer ( const QString &  location)
void SettingsPrivate::setDelegates ( const bool &  value)
slot

Sets if stars are visible and active.

void SettingsPrivate::setDragDropAction ( DragDropAction  action)
slot
void SettingsPrivate::setExtendedSearchVisible ( bool  b)
slot
void SettingsPrivate::setFont ( const FontFamily fontFamily,
const QFont &  font 
)
slot

Sets the font of a part of the application.

void SettingsPrivate::setFontPointSize ( const FontFamily fontFamily,
int  i 
)
slot

Sets the font size of a part of the application.

void SettingsPrivate::setInsertPolicy ( SettingsPrivate::InsertPolicy  ip)

Define the hierarchical order of the library tree view.

void SettingsPrivate::setIsLibraryFilteredByArticles ( bool  b)
slot
bool SettingsPrivate::setLanguage ( const QString &  lang)

Sets the language of the application.

void SettingsPrivate::setLastActivePlaylistGeometry ( const QByteArray &  ba)
slot

Save the last active playlist header state.

void SettingsPrivate::setLastPlaylistSession ( const QList< uint > &  ids)

Sets the last playlists that were opened when player is about to close.

void SettingsPrivate::setLibraryFilteredByArticles ( const QStringList &  tagList)
slot
void SettingsPrivate::setMediaButtonVisible ( const QString &  buttonName,
const bool &  value 
)
slot

Sets if the button in parameter is visible or not.

void SettingsPrivate::setMonitorFileSystem ( bool  b)
slot

Sets if MiamPlayer should launch background process to keep library up-to-date.

void SettingsPrivate::setMusicLocations ( const QStringList &  locations)
void SettingsPrivate::setPlaybackCloseAction ( PlaylistDefaultAction  action)
slot
void SettingsPrivate::setPlaybackKeepPlaylists ( bool  b)
slot
void SettingsPrivate::setPlaybackRestorePlaylistsAtStartup ( bool  b)
slot
void SettingsPrivate::setPlaybackSeekTime ( int  t)
slot

PlayBack options.

void SettingsPrivate::setReorderArtistsArticle ( bool  b)
slot
void SettingsPrivate::setSearchAndExcludeLibrary ( bool  b)
slot
void SettingsPrivate::setShortcut ( const QString &  objectName,
const QKeySequence &  keySequence 
)
void SettingsPrivate::setShowNeverScored ( bool  b)
slot
void SettingsPrivate::setTabsOverlappingLength ( int  l)
slot
void SettingsPrivate::setTabsRect ( bool  b)
slot
void SettingsPrivate::setVolumeBarHideAfter ( int  seconds)
slot
void SettingsPrivate::setVolumeBarTextAlwaysVisible ( bool  b)
slot
QKeySequence SettingsPrivate::shortcut ( const QString &  objectName) const
int SettingsPrivate::tabsOverlappingLength ( ) const
int SettingsPrivate::volumeBarHideAfter ( ) const

Member Data Documentation

QTranslator SettingsPrivate::defaultQtTranslator
QTranslator SettingsPrivate::libraryTranslator
QTranslator SettingsPrivate::playerTranslator

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