Source Code (Use browser search to find items of interest.)

Class Index

ksnake'Levels (./kdegames/ksnake/levels.h:13)

class Levels
{
public:
    Levels ();
    QImage  getImage(int);
    QPixmap getPixmap(int);
    int max();
private:
    QStringList list;
};



ksnake'Levels::Levels() (./kdegames/ksnake/levels.cpp:15)

Levels::Levels()
{
    leV = this;

    list = KGlobal::dirs()->findAllResources("appdata", "levels/*");    

    list.prepend( "dummy" );
}


ksnake'Levels::max() (./kdegames/ksnake/levels.cpp:24)

int Levels::max()
{
    return ( list.count() -1 );
}


ksnake'Levels::getImage() (./kdegames/ksnake/levels.cpp:29)

QImage Levels::getImage(int at)
{
    QBitmap bitmap(*list.at(at));
    QImage image = bitmap.convertToImage();
    return image;
}


ksnake'Levels::getPixmap() (./kdegames/ksnake/levels.cpp:36)

QPixmap Levels::getPixmap(int at)
{
    QPixmap pixmap(*list.at(at));
    return pixmap;
}