#ifndef CLIENT_H #define CLIENT_H #include #include #include #include "room.h" class Room; // the reason to do this instead of including room.h is to try and prevent recompilering of as many files as possible // since if I include room.h, anything that includes this file would need to update when room.h does // like a domino effect kinda... class Client : public QObject { Q_OBJECT public: enum Type { PlayerType, AdminType }; Client(QObject *parent = 0, QTcpSocket* sock = 0); // idk why it wants that >.> virtual ~Client(); static void methodname();//////// MY problem is, I want to access it from outside its own class // too access what where? // like in nexusserver.cpp could I now type Client::methodname();? APPAREntly I canty // you ca't if you don't include client.h because thats where Client is declared, but you can if you do include "client.h" /// ... oh... :c that was my problem void setRoom(Room*); inline Room* getRoom(){return r;} inline Type getType(){return t;}////// what I was coding was pre-room entering btw inline quint32 getID(){return habboid;} void saveToDB(); static bool isLogged(quint32); static Client* byID(quint32); quint32 habboid; QString name; QString figure; QString gender; QString email; QString bdate; QString swimfig; QString motto; quint32 croomid; QString croommodel; QList pqueue; qint8 xlocation; qint8 ylocation; qint8 headface; qint8 bodyface; float height; qint8 xtarg, ytarg; qint32 croomoid; signals: public slots: void takeStep(); void gotPacket(); void sendPacket(QString); void processCmd(QString); void processPacket(QString, int, int); void addItem(QString, bool); private: //QList handOfGod; QString moveextra; static QHash logged; QTcpSocket* socket; Type t; Room* r; bool loggedin; QTimer stepper; QString getRank(QString); }; #endif // CLIENT_H