QSFML
Classes | Typedefs | Functions
qsf Namespace Reference

Namespace containing all qsf classes and methods. More...

Classes

class  Image
 sf::Image ↔ QImage compatibility layer More...
 
class  QResourceStream
 sf::InputStream reading QResource files More...
 
class  QSFMLWidget
 Qt widget used as SFML window. More...
 
class  QVector2
 Compatibility layer sf::Vector2<N> ↔ QPoint; QSize. More...
 
class  String
 (almost) QString castable to sf::String More...
 

Typedefs

typedef QVector2< int > QVector2i
 Alias to QVector with template int. More...
 
typedef QVector2< unsigned int > QVector2u
 Alias to QVector with template unsigned int. More...
 
typedef QVector2< float > QVector2f
 Alias to QVector with template float. More...
 

Functions

sf::Keyboard::Key QtKeyToSFML (int QtKey)
 Function converting Qt key code to SFML's one. More...
 
std::ostream & operator<< (std::ostream &out, QResourceStream &resource)
 
QDebug operator<< (QDebug out, const QResourceStream &resource)
 

Detailed Description

Namespace containing all qsf classes and methods.

Typedef Documentation

typedef QVector2<float> qsf::QVector2f

Alias to QVector with template float.

QVector2 <float>
typedef QVector2<int> qsf::QVector2i

Alias to QVector with template int.

QVector2 <int>
typedef QVector2<unsigned int> qsf::QVector2u

Alias to QVector with template unsigned int.

QVector2 <unsigned int>

Function Documentation

std::ostream& qsf::operator<< ( std::ostream &  out,
QResourceStream resource 
)

Allows printing file to std::ostream.
Sample usage:

QResourceStream resource;
if(!resource.open("://BuiltInFile.txt")) {
std::cerr << "Could not read resource!" << std::endl;
} else {
std::cout << "Content:" << std::endl << resource << std::endl;
}
QDebug qsf::operator<< ( QDebug  out,
const QResourceStream resource 
)

Allows printing file to QDebug.
Sample usage:

QResourceStream resource;
if(!resource.open("://BuiltInFile.txt")) {
qDebug() << "Could not read resource!";
} else {
qDebug() << "Content:" << resource;
}
sf::Keyboard::Key qsf::QtKeyToSFML ( int  QtKey)

Function converting Qt key code to SFML's one.

Parameters
[in]QtKeyQt Key code
Returns
SFML key code