CardDeckInfo Namespace Reference

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. More...


Functions

QString defaultFrontName (bool pAllowSVG=true, bool pAllowPNG=true)
 Retrieve the name of the default card set (front side).
QString defaultBackName (bool pAllowSVG=true, bool pAllowPNG=true)
 Retrieve the name of the default card deck (back side).
QString randomFrontName (bool pAllowSVG=true, bool pAllowPNG=true)
 Retrieve a random card set (front side).
QString randomBackName (bool pAllowSVG=true, bool pAllowPNG=true)
 Retrieve a random card deck (back side).
QString getBackFileNameFromIndex (const QString &desktop)
QString backSVGFilePath (const QString &name)
 Retrieve the SVG file belonging to the given card deck (back side).
QString frontSVGFilePath (const QString &name)
 Retrieve the SVG file belonging to the given card set (front side).
QString backFilename (const QString &name)
 Retrieve the filename of the card back side.
QString frontDir (const QString &name)
 Retrieve the directory where the card front sides are stored.
bool isSVGFront (const QString &name)
 Check whether the card back deck contains also an SVG file.
bool isSVGBack (const QString &name)
 Check whether the card set is SVG or not.
QStringList frontNames ()
 retrieve a list of all installed frontsides
QStringList backNames ()
 retrieve a list of all installed backsides
KCardThemeInfo frontInfo (const QString &name)
KCardThemeInfo backInfo (const QString &name)


Detailed Description

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.

Function Documentation

KDEGAMES_EXPORT QString CardDeckInfo::backFilename ( const QString &  name  ) 

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 348 of file carddeckinfo.cpp.

References KCardThemeInfo::path.

Referenced by KCardCache::backside(), KCardCache::defaultBackSize(), and KCardCache::setBackTheme().

KCardThemeInfo CardDeckInfo::backInfo ( const QString &  name  ) 

Definition at line 397 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 383 of file carddeckinfo.cpp.

KDEGAMES_EXPORT QString CardDeckInfo::backSVGFilePath ( const QString &  name  ) 

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 330 of file carddeckinfo.cpp.

References KCardThemeInfo::svgfile.

Referenced by KCardCache::setBackTheme().

KDEGAMES_EXPORT QString CardDeckInfo::defaultBackName ( bool  pAllowSVG = true,
bool  pAllowPNG = true 
)

Retrieve the name of the default card deck (back side).

Parameters:
pAllowSVG Allow selection of scalable cards sets.
pAllowPNG Allow selection of fixed size cards sets.
Returns:
The default card deck name.

Definition at line 245 of file carddeckinfo.cpp.

References KCardThemeInfo::isDefault, and KCardThemeInfo::name.

Referenced by KCardDialog::setupGUI().

KDEGAMES_EXPORT QString CardDeckInfo::defaultFrontName ( bool  pAllowSVG = true,
bool  pAllowPNG = true 
)

Retrieve the name of the default card set (front side).

Parameters:
pAllowSVG Allow selection of scalable cards sets.
pAllowPNG Allow selection of fixed size cards sets.
Returns:
The default card set name.

Definition at line 216 of file carddeckinfo.cpp.

References KCardThemeInfo::isDefault, and KCardThemeInfo::name.

Referenced by KCardDialog::setupGUI().

KDEGAMES_EXPORT QString CardDeckInfo::frontDir ( const QString &  name  ) 

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 357 of file carddeckinfo.cpp.

References KCardThemeInfo::path.

Referenced by KCardCache::defaultFrontSize(), KCardCache::frontside(), and KCardCache::setFrontTheme().

KCardThemeInfo CardDeckInfo::frontInfo ( const QString &  name  ) 

Definition at line 388 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 378 of file carddeckinfo.cpp.

KDEGAMES_EXPORT QString CardDeckInfo::frontSVGFilePath ( const QString &  name  ) 

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 339 of file carddeckinfo.cpp.

References KCardThemeInfo::svgfile.

Referenced by KCardCache::setFrontTheme().

QString CardDeckInfo::getBackFileNameFromIndex ( const QString &  desktop  ) 

Definition at line 315 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 373 of file carddeckinfo.cpp.

Referenced by KCardCache::backside(), KCardCache::defaultBackSize(), and KCardCache::setBackTheme().

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 366 of file carddeckinfo.cpp.

Referenced by KCardCache::defaultFrontSize(), KCardCache::frontside(), and KCardCache::setFrontTheme().

KDEGAMES_EXPORT QString CardDeckInfo::randomBackName ( bool  pAllowSVG = true,
bool  pAllowPNG = true 
)

Retrieve a random card deck (back side).

Parameters:
pAllowSVG Allow selection of scalable cards sets.
pAllowPNG Allow selection of fixed size cards sets.
Returns:
A radnom card deck name.

Definition at line 294 of file carddeckinfo.cpp.

KDEGAMES_EXPORT QString CardDeckInfo::randomFrontName ( bool  pAllowSVG = true,
bool  pAllowPNG = true 
)

Retrieve a random card set (front side).

Parameters:
pAllowSVG Allow selection of scalable cards sets.
pAllowPNG Allow selection of fixed size cards sets.
Returns:
A radnom card set name.

Definition at line 274 of file carddeckinfo.cpp.


Generated on Sun Mar 16 08:03:27 2008 for Libkdegames by  doxygen 1.5.3