mirror of
https://github.com/overte-org/overte.git
synced 2025-04-26 01:16:35 +02:00
add a Profile class to hold user data from data-server
This commit is contained in:
parent
56b71eb61a
commit
85edb93710
9 changed files with 150 additions and 56 deletions
|
@ -1587,7 +1587,7 @@ void Application::init() {
|
||||||
}
|
}
|
||||||
qDebug("Loaded settings.\n");
|
qDebug("Loaded settings.\n");
|
||||||
|
|
||||||
if (!_myAvatar.getUsername().isEmpty()) {
|
if (!_profile.getUsername().isEmpty()) {
|
||||||
// we have a username for this avatar, ask the data-server for the mesh URL for this avatar
|
// we have a username for this avatar, ask the data-server for the mesh URL for this avatar
|
||||||
DataServerClient::getClientValueForKey(DataServerKey::FaceMeshURL);
|
DataServerClient::getClientValueForKey(DataServerKey::FaceMeshURL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
#include "VoxelImporter.h"
|
#include "VoxelImporter.h"
|
||||||
#include "avatar/Avatar.h"
|
#include "avatar/Avatar.h"
|
||||||
#include "avatar/MyAvatar.h"
|
#include "avatar/MyAvatar.h"
|
||||||
|
#include "avatar/Profile.h"
|
||||||
#include "avatar/HandControl.h"
|
#include "avatar/HandControl.h"
|
||||||
#include "devices/Faceshift.h"
|
#include "devices/Faceshift.h"
|
||||||
#include "devices/SerialInterface.h"
|
#include "devices/SerialInterface.h"
|
||||||
|
@ -110,6 +111,7 @@ public:
|
||||||
|
|
||||||
QGLWidget* getGLWidget() { return _glWidget; }
|
QGLWidget* getGLWidget() { return _glWidget; }
|
||||||
MyAvatar* getAvatar() { return &_myAvatar; }
|
MyAvatar* getAvatar() { return &_myAvatar; }
|
||||||
|
Profile* getProfile() { return &_profile; }
|
||||||
Audio* getAudio() { return &_audio; }
|
Audio* getAudio() { return &_audio; }
|
||||||
Camera* getCamera() { return &_myCamera; }
|
Camera* getCamera() { return &_myCamera; }
|
||||||
ViewFrustum* getViewFrustum() { return &_viewFrustum; }
|
ViewFrustum* getViewFrustum() { return &_viewFrustum; }
|
||||||
|
@ -275,6 +277,7 @@ private:
|
||||||
Oscilloscope _audioScope;
|
Oscilloscope _audioScope;
|
||||||
|
|
||||||
MyAvatar _myAvatar; // The rendered avatar of oneself
|
MyAvatar _myAvatar; // The rendered avatar of oneself
|
||||||
|
Profile _profile; // The data-server linked profile for this user
|
||||||
|
|
||||||
Transmitter _myTransmitter; // Gets UDP data from transmitter app used to animate the avatar
|
Transmitter _myTransmitter; // Gets UDP data from transmitter app used to animate the avatar
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,11 @@
|
||||||
#include <UUID.h>
|
#include <UUID.h>
|
||||||
|
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
|
#include "Profile.h"
|
||||||
|
|
||||||
#include "DataServerClient.h"
|
#include "DataServerClient.h"
|
||||||
|
|
||||||
QString DataServerClient::_clientUsername;
|
|
||||||
std::map<unsigned char*, int> DataServerClient::_unmatchedPackets;
|
std::map<unsigned char*, int> DataServerClient::_unmatchedPackets;
|
||||||
|
|
||||||
const char DATA_SERVER_HOSTNAME[] = "127.0.0.1";
|
const char DATA_SERVER_HOSTNAME[] = "127.0.0.1";
|
||||||
|
@ -24,33 +26,36 @@ const unsigned short DATA_SERVER_PORT = 3282;
|
||||||
const sockaddr_in DATA_SERVER_SOCKET = socketForHostnameAndHostOrderPort(DATA_SERVER_HOSTNAME, DATA_SERVER_PORT);
|
const sockaddr_in DATA_SERVER_SOCKET = socketForHostnameAndHostOrderPort(DATA_SERVER_HOSTNAME, DATA_SERVER_PORT);
|
||||||
|
|
||||||
void DataServerClient::putValueForKey(const char* key, const char* value) {
|
void DataServerClient::putValueForKey(const char* key, const char* value) {
|
||||||
if (!_clientUsername.isEmpty()) {
|
Profile* userProfile = Application::getInstance()->getProfile();
|
||||||
unsigned char* putPacket = new unsigned char[MAX_PACKET_SIZE];
|
QString clientString = userProfile->getUUID().isNull() ? userProfile->getUsername() : userProfile->getUUID().toString();
|
||||||
|
|
||||||
// setup the header for this packet
|
Application::getInstance();
|
||||||
int numPacketBytes = populateTypeAndVersion(putPacket, PACKET_TYPE_DATA_SERVER_PUT);
|
|
||||||
|
|
||||||
// pack the client UUID, null terminated
|
unsigned char* putPacket = new unsigned char[MAX_PACKET_SIZE];
|
||||||
memcpy(putPacket + numPacketBytes, _clientUsername.toLocal8Bit().constData(), _clientUsername.toLocal8Bit().size());
|
|
||||||
numPacketBytes += _clientUsername.toLocal8Bit().size();
|
|
||||||
putPacket[numPacketBytes++] = '\0';
|
|
||||||
|
|
||||||
// pack the key, null terminated
|
// setup the header for this packet
|
||||||
strcpy((char*) putPacket + numPacketBytes, key);
|
int numPacketBytes = populateTypeAndVersion(putPacket, PACKET_TYPE_DATA_SERVER_PUT);
|
||||||
numPacketBytes += strlen(key);
|
|
||||||
putPacket[numPacketBytes++] = '\0';
|
|
||||||
|
|
||||||
// pack the value, null terminated
|
// pack the client UUID, null terminated
|
||||||
strcpy((char*) putPacket + numPacketBytes, value);
|
memcpy(putPacket + numPacketBytes, clientString.toLocal8Bit().constData(), clientString.toLocal8Bit().size());
|
||||||
numPacketBytes += strlen(value);
|
numPacketBytes += clientString.toLocal8Bit().size();
|
||||||
putPacket[numPacketBytes++] = '\0';
|
putPacket[numPacketBytes++] = '\0';
|
||||||
|
|
||||||
// add the putPacket to our vector of unconfirmed packets, will be deleted once put is confirmed
|
// pack the key, null terminated
|
||||||
_unmatchedPackets.insert(std::pair<unsigned char*, int>(putPacket, numPacketBytes));
|
strcpy((char*) putPacket + numPacketBytes, key);
|
||||||
|
numPacketBytes += strlen(key);
|
||||||
|
putPacket[numPacketBytes++] = '\0';
|
||||||
|
|
||||||
// send this put request to the data server
|
// pack the value, null terminated
|
||||||
NodeList::getInstance()->getNodeSocket()->send((sockaddr*) &DATA_SERVER_SOCKET, putPacket, numPacketBytes);
|
strcpy((char*) putPacket + numPacketBytes, value);
|
||||||
}
|
numPacketBytes += strlen(value);
|
||||||
|
putPacket[numPacketBytes++] = '\0';
|
||||||
|
|
||||||
|
// add the putPacket to our vector of unconfirmed packets, will be deleted once put is confirmed
|
||||||
|
_unmatchedPackets.insert(std::pair<unsigned char*, int>(putPacket, numPacketBytes));
|
||||||
|
|
||||||
|
// send this put request to the data server
|
||||||
|
NodeList::getInstance()->getNodeSocket()->send((sockaddr*) &DATA_SERVER_SOCKET, putPacket, numPacketBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DataServerClient::getValueForKeyAndUUID(const char* key, QUuid &uuid) {
|
void DataServerClient::getValueForKeyAndUUID(const char* key, QUuid &uuid) {
|
||||||
|
@ -83,7 +88,9 @@ void DataServerClient::getValueForKeyAndUserString(const char* key, QString& use
|
||||||
NodeList::getInstance()->getNodeSocket()->send((sockaddr*) &DATA_SERVER_SOCKET, getPacket, numPacketBytes);
|
NodeList::getInstance()->getNodeSocket()->send((sockaddr*) &DATA_SERVER_SOCKET, getPacket, numPacketBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DataServerClient::getClientValueForKey(const char* key) {
|
||||||
|
getValueForKeyAndUserString(key, Application::getInstance()->getProfile()->getUsername());
|
||||||
|
}
|
||||||
|
|
||||||
void DataServerClient::processConfirmFromDataServer(unsigned char* packetData, int numPacketBytes) {
|
void DataServerClient::processConfirmFromDataServer(unsigned char* packetData, int numPacketBytes) {
|
||||||
removeMatchedPacketFromMap(packetData, numPacketBytes);
|
removeMatchedPacketFromMap(packetData, numPacketBytes);
|
||||||
|
@ -102,18 +109,22 @@ void DataServerClient::processSendFromDataServer(unsigned char* packetData, int
|
||||||
// for now assume this means that it is for our avatar
|
// for now assume this means that it is for our avatar
|
||||||
|
|
||||||
char* dataKeyPosition = (char*) packetData + numHeaderBytes + sizeof(userString);
|
char* dataKeyPosition = (char*) packetData + numHeaderBytes + sizeof(userString);
|
||||||
|
char* dataValuePosition = dataKeyPosition + strlen(dataKeyPosition) + sizeof(char);
|
||||||
|
|
||||||
|
QString dataValueString(QByteArray(dataValuePosition,
|
||||||
|
numPacketBytes - ((unsigned char*) dataValuePosition - packetData)));
|
||||||
|
|
||||||
if (strcmp(dataKeyPosition, DataServerKey::FaceMeshURL) == 0) {
|
if (strcmp(dataKeyPosition, DataServerKey::FaceMeshURL) == 0) {
|
||||||
// pull the user's face mesh and set it on the Avatar instance
|
// pull the user's face mesh and set it on the Avatar instance
|
||||||
char* faceMeshPosition = dataKeyPosition + strlen(dataKeyPosition) + sizeof(char);
|
|
||||||
|
|
||||||
QUrl faceMeshURL(QByteArray(faceMeshPosition,
|
|
||||||
numPacketBytes - ((unsigned char*) faceMeshPosition - packetData)));
|
|
||||||
|
|
||||||
qDebug("Changing user's face model URL to %s\n", faceMeshURL.toString().toLocal8Bit().constData());
|
qDebug("Changing user's face model URL to %s\n", dataValueString.toLocal8Bit().constData());
|
||||||
QMetaObject::invokeMethod(&Application::getInstance()->getAvatar()->getHead().getBlendFace(),
|
QMetaObject::invokeMethod(&Application::getInstance()->getAvatar()->getHead().getBlendFace(),
|
||||||
"setModelURL",
|
"setModelURL",
|
||||||
Q_ARG(QUrl, faceMeshURL));
|
Q_ARG(QUrl, QUrl(dataValueString)));
|
||||||
|
} else if (strcmp(dataKeyPosition, DataServerKey::UUID) == 0) {
|
||||||
|
// this is the user's UUID - set it on the profile
|
||||||
|
Application::getInstance()->getProfile()->setUUID(dataValueString);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// user string was UUID, find matching avatar and associate data
|
// user string was UUID, find matching avatar and associate data
|
||||||
|
|
|
@ -13,27 +13,26 @@
|
||||||
|
|
||||||
#include <QtCore/QUuid>
|
#include <QtCore/QUuid>
|
||||||
|
|
||||||
|
#include "Application.h"
|
||||||
|
|
||||||
class DataServerClient {
|
class DataServerClient {
|
||||||
public:
|
public:
|
||||||
static void putValueForKey(const char* key, const char* value);
|
static void putValueForKey(const char* key, const char* value);
|
||||||
static void getValueForKeyAndUUID(const char* key, QUuid& uuid);
|
static void getValueForKeyAndUUID(const char* key, QUuid& uuid);
|
||||||
static void getValueForKeyAndUserString(const char* key, QString& userString);
|
static void getValueForKeyAndUserString(const char* key, QString& userString);
|
||||||
static void getClientValueForKey(const char* key) { getValueForKeyAndUserString(key, _clientUsername); }
|
static void getClientValueForKey(const char* key);
|
||||||
static void processConfirmFromDataServer(unsigned char* packetData, int numPacketBytes);
|
static void processConfirmFromDataServer(unsigned char* packetData, int numPacketBytes);
|
||||||
static void processSendFromDataServer(unsigned char* packetData, int numPacketBytes);
|
static void processSendFromDataServer(unsigned char* packetData, int numPacketBytes);
|
||||||
static void processMessageFromDataServer(unsigned char* packetData, int numPacketBytes);
|
static void processMessageFromDataServer(unsigned char* packetData, int numPacketBytes);
|
||||||
static void removeMatchedPacketFromMap(unsigned char* packetData, int numPacketBytes);
|
static void removeMatchedPacketFromMap(unsigned char* packetData, int numPacketBytes);
|
||||||
static void resendUnmatchedPackets();
|
static void resendUnmatchedPackets();
|
||||||
|
|
||||||
static void setClientUsername(const QString& clientUsername) { _clientUsername = clientUsername; }
|
|
||||||
static QString& setClientUsername() { return _clientUsername; }
|
|
||||||
private:
|
private:
|
||||||
static QString _clientUsername;
|
|
||||||
static std::map<unsigned char*, int> _unmatchedPackets;
|
static std::map<unsigned char*, int> _unmatchedPackets;
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace DataServerKey {
|
namespace DataServerKey {
|
||||||
const char FaceMeshURL[] = "mesh";
|
const char FaceMeshURL[] = "mesh";
|
||||||
|
const char UUID[] = "uuid";
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* defined(__hifi__DataServerClient__) */
|
#endif /* defined(__hifi__DataServerClient__) */
|
||||||
|
|
|
@ -504,6 +504,7 @@ void Menu::loadSettings(QSettings* settings) {
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
|
|
||||||
scanMenuBar(&loadAction, settings);
|
scanMenuBar(&loadAction, settings);
|
||||||
|
Application::getInstance()->getProfile()->loadData(settings);
|
||||||
Application::getInstance()->getAvatar()->loadData(settings);
|
Application::getInstance()->getAvatar()->loadData(settings);
|
||||||
Application::getInstance()->getSwatch()->loadData(settings);
|
Application::getInstance()->getSwatch()->loadData(settings);
|
||||||
}
|
}
|
||||||
|
@ -755,7 +756,7 @@ void Menu::editPreferences() {
|
||||||
QFormLayout* form = new QFormLayout();
|
QFormLayout* form = new QFormLayout();
|
||||||
layout->addLayout(form, 1);
|
layout->addLayout(form, 1);
|
||||||
|
|
||||||
QString avatarUsername = applicationInstance->getAvatar()->getUsername();
|
QString avatarUsername = applicationInstance->getProfile()->getUsername();
|
||||||
QLineEdit* avatarUsernameEdit = new QLineEdit(avatarUsername);
|
QLineEdit* avatarUsernameEdit = new QLineEdit(avatarUsername);
|
||||||
avatarUsernameEdit->setMinimumWidth(QLINE_MINIMUM_WIDTH);
|
avatarUsernameEdit->setMinimumWidth(QLINE_MINIMUM_WIDTH);
|
||||||
form->addRow("Username:", avatarUsernameEdit);
|
form->addRow("Username:", avatarUsernameEdit);
|
||||||
|
@ -815,7 +816,7 @@ void Menu::editPreferences() {
|
||||||
|
|
||||||
if (avatarUsernameEdit->text() != avatarUsername) {
|
if (avatarUsernameEdit->text() != avatarUsername) {
|
||||||
// there has been a username change - set the new UUID on the avatar instance
|
// there has been a username change - set the new UUID on the avatar instance
|
||||||
applicationInstance->getAvatar()->setUsername(avatarUsernameEdit->text());
|
applicationInstance->getProfile()->setUsername(avatarUsernameEdit->text());
|
||||||
|
|
||||||
if (faceModelURL.toString() == faceURLString) {
|
if (faceModelURL.toString() == faceURLString) {
|
||||||
// if there was no change to the face model URL then clear it and ask the data-server for what it is
|
// if there was no change to the face model URL then clear it and ask the data-server for what it is
|
||||||
|
|
|
@ -72,12 +72,6 @@ void MyAvatar::setMoveTarget(const glm::vec3 moveTarget) {
|
||||||
_moveTargetStepCounter = 0;
|
_moveTargetStepCounter = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyAvatar::setUsername(const QString& username) {
|
|
||||||
_username = username;
|
|
||||||
|
|
||||||
DataServerClient::setClientUsername(username);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyAvatar::simulate(float deltaTime, Transmitter* transmitter) {
|
void MyAvatar::simulate(float deltaTime, Transmitter* transmitter) {
|
||||||
|
|
||||||
glm::quat orientation = getOrientation();
|
glm::quat orientation = getOrientation();
|
||||||
|
@ -534,8 +528,6 @@ void MyAvatar::renderScreenTint(ScreenTintLayer layer, Camera& whichCamera) {
|
||||||
void MyAvatar::saveData(QSettings* settings) {
|
void MyAvatar::saveData(QSettings* settings) {
|
||||||
settings->beginGroup("Avatar");
|
settings->beginGroup("Avatar");
|
||||||
|
|
||||||
settings->setValue("Username", _username);
|
|
||||||
|
|
||||||
settings->setValue("bodyYaw", _bodyYaw);
|
settings->setValue("bodyYaw", _bodyYaw);
|
||||||
settings->setValue("bodyPitch", _bodyPitch);
|
settings->setValue("bodyPitch", _bodyPitch);
|
||||||
settings->setValue("bodyRoll", _bodyRoll);
|
settings->setValue("bodyRoll", _bodyRoll);
|
||||||
|
@ -557,8 +549,6 @@ void MyAvatar::saveData(QSettings* settings) {
|
||||||
void MyAvatar::loadData(QSettings* settings) {
|
void MyAvatar::loadData(QSettings* settings) {
|
||||||
settings->beginGroup("Avatar");
|
settings->beginGroup("Avatar");
|
||||||
|
|
||||||
setUsername(settings->value("Username").toString());
|
|
||||||
|
|
||||||
// in case settings is corrupt or missing loadSetting() will check for NaN
|
// in case settings is corrupt or missing loadSetting() will check for NaN
|
||||||
_bodyYaw = loadSetting(settings, "bodyYaw", 0.0f);
|
_bodyYaw = loadSetting(settings, "bodyYaw", 0.0f);
|
||||||
_bodyPitch = loadSetting(settings, "bodyPitch", 0.0f);
|
_bodyPitch = loadSetting(settings, "bodyPitch", 0.0f);
|
||||||
|
|
|
@ -34,7 +34,6 @@ public:
|
||||||
void setNewScale(const float scale);
|
void setNewScale(const float scale);
|
||||||
void setWantCollisionsOn(bool wantCollisionsOn) { _isCollisionsOn = wantCollisionsOn; }
|
void setWantCollisionsOn(bool wantCollisionsOn) { _isCollisionsOn = wantCollisionsOn; }
|
||||||
void setMoveTarget(const glm::vec3 moveTarget);
|
void setMoveTarget(const glm::vec3 moveTarget);
|
||||||
void setUsername(const QString& username);
|
|
||||||
|
|
||||||
// getters
|
// getters
|
||||||
float getNewScale() const { return _newScale; }
|
float getNewScale() const { return _newScale; }
|
||||||
|
@ -50,7 +49,6 @@ public:
|
||||||
glm::vec3 getGravity() const { return _gravity; }
|
glm::vec3 getGravity() const { return _gravity; }
|
||||||
glm::vec3 getUprightHeadPosition() const;
|
glm::vec3 getUprightHeadPosition() const;
|
||||||
glm::vec3 getUprightEyeLevelPosition() const;
|
glm::vec3 getUprightEyeLevelPosition() const;
|
||||||
const QString& getUsername() const { return _username; }
|
|
||||||
|
|
||||||
// get/set avatar data
|
// get/set avatar data
|
||||||
void saveData(QSettings* settings);
|
void saveData(QSettings* settings);
|
||||||
|
@ -84,7 +82,6 @@ private:
|
||||||
float _collisionRadius;
|
float _collisionRadius;
|
||||||
glm::vec3 _moveTarget;
|
glm::vec3 _moveTarget;
|
||||||
int _moveTargetStepCounter;
|
int _moveTargetStepCounter;
|
||||||
QString _username;
|
|
||||||
|
|
||||||
// private methods
|
// private methods
|
||||||
float getBallRenderAlpha(int ball, bool lookingInMirror) const;
|
float getBallRenderAlpha(int ball, bool lookingInMirror) const;
|
||||||
|
|
54
interface/src/avatar/Profile.cpp
Normal file
54
interface/src/avatar/Profile.cpp
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
//
|
||||||
|
// Profile.cpp
|
||||||
|
// hifi
|
||||||
|
//
|
||||||
|
// Created by Stephen Birarda on 10/8/13.
|
||||||
|
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include <QtCore/QSettings>
|
||||||
|
|
||||||
|
#include "Profile.h"
|
||||||
|
#include "DataServerClient.h"
|
||||||
|
|
||||||
|
Profile::Profile() :
|
||||||
|
_username(),
|
||||||
|
_uuid(),
|
||||||
|
_faceModelURL()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Profile::clear() {
|
||||||
|
_username.clear();
|
||||||
|
_uuid = QUuid();
|
||||||
|
_faceModelURL.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Profile::setUsername(const QString &username) {
|
||||||
|
this->clear();
|
||||||
|
_username = username;
|
||||||
|
|
||||||
|
// we've been given a new username, ask the data-server for our UUID
|
||||||
|
DataServerClient::getClientValueForKey(DataServerKey::UUID);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Profile::saveData(QSettings* settings) {
|
||||||
|
settings->beginGroup("Profile");
|
||||||
|
|
||||||
|
settings->setValue("username", _username);
|
||||||
|
settings->setValue("UUID", _uuid);
|
||||||
|
settings->setValue("faceModelURL", _faceModelURL);
|
||||||
|
|
||||||
|
settings->endGroup();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Profile::loadData(QSettings* settings) {
|
||||||
|
settings->beginGroup("Profile");
|
||||||
|
|
||||||
|
_username = settings->value("username").toString();
|
||||||
|
_uuid = settings->value("UUID").toUuid();
|
||||||
|
_faceModelURL = settings->value("faceModelURL").toUrl();
|
||||||
|
|
||||||
|
settings->endGroup();
|
||||||
|
}
|
39
interface/src/avatar/Profile.h
Normal file
39
interface/src/avatar/Profile.h
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
//
|
||||||
|
// Profile.h
|
||||||
|
// hifi
|
||||||
|
//
|
||||||
|
// Created by Stephen Birarda on 10/8/13.
|
||||||
|
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef __hifi__Profile__
|
||||||
|
#define __hifi__Profile__
|
||||||
|
|
||||||
|
#include <QtCore/QString>
|
||||||
|
#include <QtCore/QUrl>
|
||||||
|
#include <QtCore/QUuid>
|
||||||
|
|
||||||
|
class Profile {
|
||||||
|
public:
|
||||||
|
Profile();
|
||||||
|
|
||||||
|
void setUsername(const QString& username);
|
||||||
|
QString& getUsername() { return _username; }
|
||||||
|
|
||||||
|
void setUUID(const QUuid& uuid) { _uuid = uuid; }
|
||||||
|
QUuid& getUUID() { return _uuid; }
|
||||||
|
|
||||||
|
void setFaceModelURL(const QUrl& faceModelURL) { _faceModelURL = faceModelURL; }
|
||||||
|
QUrl& getFaceModelURL() { return _faceModelURL; }
|
||||||
|
|
||||||
|
void clear();
|
||||||
|
|
||||||
|
void saveData(QSettings* settings);
|
||||||
|
void loadData(QSettings* settings);
|
||||||
|
private:
|
||||||
|
QString _username;
|
||||||
|
QUuid _uuid;
|
||||||
|
QUrl _faceModelURL;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* defined(__hifi__Profile__) */
|
Loading…
Reference in a new issue