History

Merge remote-tracking branch 'upstream/master'

Mark Peng committed 13 years ago

Commit da31cd42 parents 26d6e82 dbc11523 files · +129 −134Browse files

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

Unified · Split

interface/src/Application.cpp+25−30
@@ -571,9 +571,8 @@ void Application::keyPressEvent(QKeyEvent* event) { · 570 unmodified lines
571571 _myAvatar.getHand().setRaveGloveEffectsMode((QKeyEvent*)event);
572572 }
573573
574− bool alt = event->modifiers().testFlag(Qt::AltModifier);
575− bool meta = event->modifiers().testFlag(Qt::MetaModifier);
576− bool shifted = event->modifiers().testFlag(Qt::ShiftModifier);
574+ bool isMeta = event->modifiers().testFlag(Qt::MetaModifier);
575+ bool isShifted = event->modifiers().testFlag(Qt::ShiftModifier);
577576 switch (event->key()) {
578577 case Qt::Key_BracketLeft:
579578 _viewFrustumOffsetYaw -= 0.5;
@@ -646,9 +645,9 @@ void Application::keyPressEvent(QKeyEvent* event) { · 66 unmodified lines
646645 break;
647646
648647 case Qt::Key_C:
649− if (shifted) {
648+ if (isShifted) {
650649 _occlusionCulling->trigger();
651− } else if (meta) {
650+ } else if (isMeta) {
652651 chooseVoxelPaintColor();
653652 } else {
654653 _myAvatar.setDriveKeys(DOWN, 1);
@@ -660,7 +659,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 5 unmodified lines
660659 break;
661660
662661 case Qt::Key_S:
663− if (shifted) {
662+ if (isShifted) {
664663 doTreeStats();
665664 } else {
666665 _myAvatar.setDriveKeys(BACK, 1);
@@ -673,7 +672,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 6 unmodified lines
673672 break;
674673
675674 case Qt::Key_G:
676− if (shifted) {
675+ if (isShifted) {
677676 _gravityUse->trigger();
678677 } else {
679678 _eyedropperMode->trigger();
@@ -681,7 +680,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 1 unmodified line
681680 break;
682681
683682 case Qt::Key_A:
684− if (shifted) {
683+ if (isShifted) {
685684 _renderAtmosphereOn->trigger();
686685 } else {
687686 _myAvatar.setDriveKeys(ROT_LEFT, 1);
@@ -701,23 +700,23 @@ void Application::keyPressEvent(QKeyEvent* event) { · 13 unmodified lines
701700 break;
702701
703702 case Qt::Key_Up:
704− _myAvatar.setDriveKeys(shifted ? UP : FWD, 1);
703+ _myAvatar.setDriveKeys(isShifted ? UP : FWD, 1);
705704 break;
706705
707706 case Qt::Key_Down:
708− _myAvatar.setDriveKeys(shifted ? DOWN : BACK, 1);
707+ _myAvatar.setDriveKeys(isShifted ? DOWN : BACK, 1);
709708 break;
710709
711710 case Qt::Key_Left:
712− _myAvatar.setDriveKeys(shifted ? LEFT : ROT_LEFT, 1);
711+ _myAvatar.setDriveKeys(isShifted ? LEFT : ROT_LEFT, 1);
713712 break;
714713
715714 case Qt::Key_Right:
716− _myAvatar.setDriveKeys(shifted ? RIGHT : ROT_RIGHT, 1);
715+ _myAvatar.setDriveKeys(isShifted ? RIGHT : ROT_RIGHT, 1);
717716 break;
718717
719718 case Qt::Key_I:
720− if (shifted) {
719+ if (isShifted) {
721720 _myCamera.setEyeOffsetOrientation(glm::normalize(
722721 glm::quat(glm::vec3(0.002f, 0, 0)) * _myCamera.getEyeOffsetOrientation()));
723722 } else {
@@ -727,7 +726,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 3 unmodified lines
727726 break;
728727
729728 case Qt::Key_K:
730− if (shifted) {
729+ if (isShifted) {
731730 _myCamera.setEyeOffsetOrientation(glm::normalize(
732731 glm::quat(glm::vec3(-0.002f, 0, 0)) * _myCamera.getEyeOffsetOrientation()));
733732 } else {
@@ -737,7 +736,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 3 unmodified lines
737736 break;
738737
739738 case Qt::Key_J:
740− if (shifted) {
739+ if (isShifted) {
741740 _myCamera.setEyeOffsetOrientation(glm::normalize(
742741 glm::quat(glm::vec3(0, 0.002f, 0)) * _myCamera.getEyeOffsetOrientation()));
743742 } else {
@@ -747,7 +746,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 3 unmodified lines
747746 break;
748747
749748 case Qt::Key_M:
750− if (shifted) {
749+ if (isShifted) {
751750 _myCamera.setEyeOffsetOrientation(glm::normalize(
752751 glm::quat(glm::vec3(0, -0.002f, 0)) * _myCamera.getEyeOffsetOrientation()));
753752 } else {
@@ -757,7 +756,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 3 unmodified lines
757756 break;
758757
759758 case Qt::Key_U:
760− if (shifted) {
759+ if (isShifted) {
761760 _myCamera.setEyeOffsetOrientation(glm::normalize(
762761 glm::quat(glm::vec3(0, 0, -0.002f)) * _myCamera.getEyeOffsetOrientation()));
763762 } else {
@@ -767,7 +766,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 3 unmodified lines
767766 break;
768767
769768 case Qt::Key_Y:
770− if (shifted) {
769+ if (isShifted) {
771770 _myCamera.setEyeOffsetOrientation(glm::normalize(
772771 glm::quat(glm::vec3(0, 0, 0.002f)) * _myCamera.getEyeOffsetOrientation()));
773772 } else {
@@ -782,14 +781,14 @@ void Application::keyPressEvent(QKeyEvent* event) { · 8 unmodified lines
782781 _lookingInMirror->trigger();
783782 break;
784783 case Qt::Key_F:
785− if (shifted) {
784+ if (isShifted) {
786785 _frustumOn->trigger();
787786 } else {
788787 _fullScreenMode->trigger();
789788 }
790789 break;
791790 case Qt::Key_V:
792− if (shifted) {
791+ if (isShifted) {
793792 _renderVoxels->trigger();
794793 } else {
795794 _addVoxelMode->trigger();
@@ -799,7 +798,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 3 unmodified lines
799798 _manualFirstPerson->trigger();
800799 break;
801800 case Qt::Key_R:
802− if (shifted) {
801+ if (isShifted) {
803802 _frustumRenderModeAction->trigger();
804803 } else {
805804 _deleteVoxelMode->trigger();
@@ -809,7 +808,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 3 unmodified lines
809808 _colorVoxelMode->trigger();
810809 break;
811810 case Qt::Key_O:
812− if (shifted) {
811+ if (isShifted) {
813812 _viewFrustumFromOffset->trigger();
814813 } else {
815814 _selectVoxelMode->trigger();
@@ -825,14 +824,10 @@ void Application::keyPressEvent(QKeyEvent* event) { · 9 unmodified lines
825824 }
826825 break;
827826 case Qt::Key_Plus:
828− if (alt) {
829− increaseAvatarSize();
830− }
827+ increaseAvatarSize();
831828 break;
832829 case Qt::Key_Minus:
833− if (alt) {
834− decreaseAvatarSize();
835− }
830+ decreaseAvatarSize();
836831 break;
837832
838833 case Qt::Key_1:
@@ -1930,8 +1925,8 @@ void Application::initMenu() { · 1091 unmodified lines
19301925 "First Person", this, SLOT(setRenderFirstPerson(bool)), Qt::Key_P))->setCheckable(true);
19311926 (_manualThirdPerson = renderMenu->addAction(
19321927 "Third Person", this, SLOT(setRenderThirdPerson(bool))))->setCheckable(true);
1933− renderMenu->addAction("Increase Avatar Size", this, SLOT(increaseAvatarSize()), Qt::ALT | Qt::Key_Plus);
1934− renderMenu->addAction("Decrease Avatar Size", this, SLOT(decreaseAvatarSize()), Qt::ALT | Qt::Key_Minus);
1928+ renderMenu->addAction("Increase Avatar Size", this, SLOT(increaseAvatarSize()), Qt::Key_Plus);
1929+ renderMenu->addAction("Decrease Avatar Size", this, SLOT(decreaseAvatarSize()), Qt::Key_Minus);
19351930
19361931
19371932 QMenu* toolsMenu = menuBar->addMenu("Tools");

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