libkdegames
CardDeckInfo Namespace Reference
Detailed Description
carddeckinfo.h <KCardDeckInfo>Namespace to supply access to card deck information, such as a list of all card decks as well as allowing to access the actual files to render the decks.
Functions | |
| bool | allowFixedSizeDecks (const KConfigGroup &group, bool allowDefault=false) |
| QString | backFilename (const QString &name) |
| KCardThemeInfo | backInfo (const QString &name) |
| QStringList | backNames () |
| QString | backSVGFilePath (const QString &name) |
| QString | backTheme (const KConfigGroup &group, const QString &defaultTheme=defaultBackName(false)) |
| QString | defaultBackName (bool pAllowPNG=true) |
| QString | defaultFrontName (bool pAllowPNG=true) |
| QString | frontDir (const QString &name) |
| KCardThemeInfo | frontInfo (const QString &name) |
| QStringList | frontNames () |
| QString | frontSVGFilePath (const QString &name) |
| QString | frontTheme (const KConfigGroup &group, const QString &defaultTheme=defaultFrontName(false)) |
| QString | getBackFileNameFromIndex (const QString &desktop) |
| bool | isSVGBack (const QString &name) |
| bool | isSVGFront (const QString &name) |
| bool | lockFrontToBackside (const KConfigGroup &group, bool lockDefault=true) |
| QString | randomBackName (bool pAllowPNG=true) |
| QString | randomFrontName (bool pAllowPNG=true) |
| void | writeAllowFixedSizeDecks (KConfigGroup &group, bool allowFixedSize) |
| void | writeBackTheme (KConfigGroup &group, const QString &theme) |
| void | writeFrontTheme (KConfigGroup &group, const QString &theme) |
| void | writeLockFrontToBackside (KConfigGroup &group, bool lock) |
Function Documentation
| KDEGAMES_EXPORT bool CardDeckInfo::allowFixedSizeDecks | ( | const KConfigGroup & | group, | |
| bool | allowDefault = false | |||
| ) |
retrieve the current value for the show fixed size card decks from the group
- Parameters:
-
group the KConfigGroup to read from allowDefault the default value in case the group has no setting
- Returns:
- true when fixed size decks should be shown, else false
Definition at line 405 of file carddeckinfo.cpp.
Retrieve the filename of the card back side.
For SVG decks use deckSVGFilePath.
- Parameters:
-
name The name of the card deck.
- Returns:
- The filename.
Definition at line 337 of file carddeckinfo.cpp.
| KCardThemeInfo CardDeckInfo::backInfo | ( | const QString & | name | ) |
Definition at line 386 of file carddeckinfo.cpp.
| KDEGAMES_EXPORT QStringList CardDeckInfo::backNames | ( | ) |
retrieve a list of all installed backsides
- Returns:
- a list of backside names, which can be used as input to the other functions.
Definition at line 372 of file carddeckinfo.cpp.
Retrieve the SVG file belonging to the given card deck (back side).
- Parameters:
-
name The name of the back deck.
- Returns:
- The file name and path to the SVG file or QString() if not available.
Definition at line 319 of file carddeckinfo.cpp.
| KDEGAMES_EXPORT QString CardDeckInfo::backTheme | ( | const KConfigGroup & | group, | |
| const QString & | defaultTheme = defaultBackName(false) | |||
| ) |
retrieve the configured back side theme name from the group
- Parameters:
-
group the KConfigGroup to read from default the default theme to return if the config group has no setting for this
- Returns:
- the name of the back side theme name
Definition at line 400 of file carddeckinfo.cpp.
| KDEGAMES_EXPORT QString CardDeckInfo::defaultBackName | ( | bool | pAllowPNG = true |
) |
Retrieve the name of the default card deck (back side).
- Parameters:
-
pAllowPNG Allow selection of fixed size cards sets.
- Returns:
- The default card deck name.
Definition at line 247 of file carddeckinfo.cpp.
| KDEGAMES_EXPORT QString CardDeckInfo::defaultFrontName | ( | bool | pAllowPNG = true |
) |
Retrieve the name of the default card set (front side).
- Parameters:
-
pAllowPNG Allow selection of fixed size cards sets.
- Returns:
- The default card set name.
Definition at line 222 of file carddeckinfo.cpp.
Retrieve the directory where the card front sides are stored.
The cards are named 1.png, 2.png, etc. For SVG card decks use cardSVGFilePath.
- Parameters:
-
name The name of the card set.
- Returns:
- The directory.
Definition at line 346 of file carddeckinfo.cpp.
| KCardThemeInfo CardDeckInfo::frontInfo | ( | const QString & | name | ) |
Definition at line 377 of file carddeckinfo.cpp.
| KDEGAMES_EXPORT QStringList CardDeckInfo::frontNames | ( | ) |
retrieve a list of all installed frontsides
- Returns:
- a list of frontside names, which can be used as input to the other functions.
Definition at line 367 of file carddeckinfo.cpp.
Retrieve the SVG file belonging to the given card set (front side).
The SVG IDs used for the card back is '1_club' for Ace of clubs, '10_spade' for 10 of spades, 'queen_heart' for Queen of Hearts, '2_diamond' for 2 of diamonds and so on.
- Parameters:
-
name The name of the card set.
- Returns:
- The file name and path to the SVG file or QString() if not available.
Definition at line 328 of file carddeckinfo.cpp.
| KDEGAMES_EXPORT QString CardDeckInfo::frontTheme | ( | const KConfigGroup & | group, | |
| const QString & | defaultTheme = defaultFrontName(false) | |||
| ) |
retrieve the configured front side theme name from the group
- Parameters:
-
group the KConfigGroup to read from default the default theme to return if the config group has no setting for this
- Returns:
- the name of the front side theme name
Definition at line 395 of file carddeckinfo.cpp.
Definition at line 304 of file carddeckinfo.cpp.
| KDEGAMES_EXPORT bool CardDeckInfo::isSVGBack | ( | const QString & | name | ) |
Check whether the card set is SVG or not.
- Parameters:
-
name The name of the card set.
- Returns:
- True if SVG data is available.
Definition at line 362 of file carddeckinfo.cpp.
| KDEGAMES_EXPORT bool CardDeckInfo::isSVGFront | ( | const QString & | name | ) |
Check whether the card back deck contains also an SVG file.
- Parameters:
-
name The name of the card deck.
- Returns:
- True if SVG data is available.
Definition at line 355 of file carddeckinfo.cpp.
| KDEGAMES_EXPORT bool CardDeckInfo::lockFrontToBackside | ( | const KConfigGroup & | group, | |
| bool | lockDefault = true | |||
| ) |
retrieve the current value for the lock front-to-backside option from the group
- Parameters:
-
group the KConfigGroup to read from lockDefault the default value in case the group has no setting
- Returns:
- true when front and backside theme are locked together, else false
Definition at line 410 of file carddeckinfo.cpp.
| KDEGAMES_EXPORT QString CardDeckInfo::randomBackName | ( | bool | pAllowPNG = true |
) |
Retrieve a random card deck (back side).
- Parameters:
-
pAllowPNG Allow selection of fixed size cards sets.
- Returns:
- A radnom card deck name.
Definition at line 288 of file carddeckinfo.cpp.
| KDEGAMES_EXPORT QString CardDeckInfo::randomFrontName | ( | bool | pAllowPNG = true |
) |
Retrieve a random card set (front side).
- Parameters:
-
pAllowPNG Allow selection of fixed size cards sets.
- Returns:
- A radnom card set name.
Definition at line 272 of file carddeckinfo.cpp.
| KDEGAMES_EXPORT void CardDeckInfo::writeAllowFixedSizeDecks | ( | KConfigGroup & | group, | |
| bool | allowFixedSize | |||
| ) |
store the wether fixed size decks are allowed in the group
- Parameters:
-
group the KConfigGroup to write to from allowFixedSize wether fixed size decks are allowed or not
Definition at line 425 of file carddeckinfo.cpp.
| KDEGAMES_EXPORT void CardDeckInfo::writeBackTheme | ( | KConfigGroup & | group, | |
| const QString & | theme | |||
| ) |
store the given backside theme name in the group
- Parameters:
-
group the KConfigGroup to write to from theme the theme name to store
Definition at line 420 of file carddeckinfo.cpp.
| KDEGAMES_EXPORT void CardDeckInfo::writeFrontTheme | ( | KConfigGroup & | group, | |
| const QString & | theme | |||
| ) |
store the given frontside theme name in the group
- Parameters:
-
group the KConfigGroup to write to from theme the theme name to store
Definition at line 415 of file carddeckinfo.cpp.
| KDEGAMES_EXPORT void CardDeckInfo::writeLockFrontToBackside | ( | KConfigGroup & | group, | |
| bool | lock | |||
| ) |
store the wether front and backside theme selection is locked to the group
- Parameters:
-
group the KConfigGroup to write to from allowFixedSize wether front and backside theme selection is locked
Definition at line 430 of file carddeckinfo.cpp.
KDE 4.2 API Reference