History

Merge branch 'master' of ssh://github.com/highfidelity/hifi into fix-particle-avatar-collisions

Andrew Meadows committed 12 years ago

Commit c4f429d2 parents 2b5675b f2cfb1611 files · +191 −51Browse files

Showing the changes to interface/src/Application.cpp (1 of 11 files). Show all

Unified · Split

interface/src/Application.cpp+15−0
@@ -47,6 +47,7 @@ · 46 unmodified lines
47#include <QDesktopServices>47#include <QDesktopServices>
48#include <QXmlStreamReader>48#include <QXmlStreamReader>
49#include <QXmlStreamAttributes>49#include <QXmlStreamAttributes>
50#include <QMediaPlayer>
50 51
51#include <AudioInjector.h>52#include <AudioInjector.h>
52#include <NodeTypes.h>53#include <NodeTypes.h>
@@ -70,6 +71,7 @@ · 17 unmodified lines
70#include "renderer/ProgramObject.h"71#include "renderer/ProgramObject.h"
71#include "ui/TextRenderer.h"72#include "ui/TextRenderer.h"
72#include "InfoView.h"73#include "InfoView.h"
74#include "ui/Snapshot.h"
73 75
74using namespace std;76using namespace std;
75 77
@@ -773,6 +775,8 @@ void Application::keyPressEvent(QKeyEvent* event) { · 697 unmodified lines
773 _voxels.collectStatsForTreesAndVBOs();775 _voxels.collectStatsForTreesAndVBOs();
774 } else if (isShifted && isMeta) {776 } else if (isShifted && isMeta) {
775 Menu::getInstance()->triggerOption(MenuOption::SuppressShortTimings);777 Menu::getInstance()->triggerOption(MenuOption::SuppressShortTimings);
778 } else if (!isShifted && isMeta) {
779 takeSnapshot();
776 } else if (_nudgeStarted) {780 } else if (_nudgeStarted) {
777 if (_lookingAlongX) {781 if (_lookingAlongX) {
778 if (_lookingAwayFromOrigin) {782 if (_lookingAwayFromOrigin) {
@@ -4346,3 +4350,14 @@ void Application::skipVersion(QString latestVersion) { · 3567 unmodified lines
4346 skipFile.seek(0);4350 skipFile.seek(0);
4347 skipFile.write(latestVersion.toStdString().c_str());4351 skipFile.write(latestVersion.toStdString().c_str());
4348}4352}
4353
4354void Application::takeSnapshot() {
4355 switchToResourcesParentIfRequired();
4356 QMediaPlayer* player = new QMediaPlayer();
4357 QFileInfo inf = QFileInfo("resources/sounds/snap.wav");
4358 player->setMedia(QUrl::fromLocalFile(inf.absoluteFilePath()));
4359 player->play();
4360
4361 Snapshot::saveSnapshot(_glWidget, _profile.getUsername(), _myAvatar.getPosition());
4362}
4363

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t