CR for #20422 - Add the ability to manage friends via Interface
Showing the changes to interface/src/Application.cpp (1 of 11 files). Show all
Unified · Split
| @@ -309,7 +309,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 308 unmodified lines | |||
| 309 | _isVSyncOn(true), | 309 | _isVSyncOn(true), |
| 310 | _aboutToQuit(false), | 310 | _aboutToQuit(false), |
| 311 | _notifiedPacketVersionMismatchThisDomain(false), | 311 | _notifiedPacketVersionMismatchThisDomain(false), |
| 312 | _domainConnectionRefusals(QList<QString>()) | 312 | _domainConnectionRefusals(QList<QString>()), |
| 313 | _friendsWindow(NULL) | ||
| 313 | { | 314 | { |
| 314 | #ifdef Q_OS_WIN | 315 | #ifdef Q_OS_WIN |
| 315 | installNativeEventFilter(&MyNativeEventFilter::getInstance()); | 316 | installNativeEventFilter(&MyNativeEventFilter::getInstance()); |
| @@ -4287,3 +4288,21 @@ void Application::checkSkeleton() { · 3971 unmodified lines | |||
| 4287 | _physicsEngine.setCharacterController(_myAvatar->getCharacterController()); | 4288 | _physicsEngine.setCharacterController(_myAvatar->getCharacterController()); |
| 4288 | } | 4289 | } |
| 4289 | } | 4290 | } |
| 4291 | |||
| 4292 | void Application::showFriendsWindow() { | ||
| 4293 | const QString FRIENDS_WINDOW_TITLE = "Add/Remove Friends"; | ||
| 4294 | const QString FRIENDS_WINDOW_URL = "https://metaverse.highfidelity.com/user/friends"; | ||
| 4295 | const int FRIENDS_WINDOW_WIDTH = 290; | ||
| 4296 | const int FRIENDS_WINDOW_HEIGHT = 500; | ||
| 4297 | if (!_friendsWindow) { | ||
| 4298 | _friendsWindow = new WebWindowClass(FRIENDS_WINDOW_TITLE, FRIENDS_WINDOW_URL, FRIENDS_WINDOW_WIDTH, | ||
| 4299 | FRIENDS_WINDOW_HEIGHT, false); | ||
| 4300 | connect(_friendsWindow, &WebWindowClass::closed, this, &Application::friendsWindowClosed); | ||
| 4301 | } | ||
| 4302 | _friendsWindow->setVisible(true); | ||
| 4303 | } | ||
| 4304 | |||
| 4305 | void Application::friendsWindowClosed() { | ||
| 4306 | delete _friendsWindow; | ||
| 4307 | _friendsWindow = NULL; | ||
| 4308 | } | ||