Changeset 715 for trunk/geant4/visualization/OpenGL
- Timestamp:
- Feb 6, 2008, 6:52:42 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc
r714 r715 422 422 423 423 #if QT_VERSION < 0x030200 424 QAction *polyhedron = new QAction("&Polyhedron","&Polyhedron",CTRL+Key_P,mRepresentation );425 QAction *nurbs = new QAction("&NURBS","&NURBS",CTRL+Key_N,mRepresentation );426 427 QAction *ortho = new QAction("&Orthographic","&Orthographic",CTRL+Key_O,mProjection );428 QAction *perspective = new QAction("&Perspective","&Perspective",CTRL+Key_P,mProjection );424 QAction *polyhedron = new QAction("&Polyhedron","&Polyhedron",CTRL+Key_P,mRepresentation,0,true); 425 QAction *nurbs = new QAction("&NURBS","&NURBS",CTRL+Key_N,mRepresentation,0,true); 426 427 QAction *ortho = new QAction("&Orthographic","&Orthographic",CTRL+Key_O,mProjection,0,true); 428 QAction *perspective = new QAction("&Perspective","&Perspective",CTRL+Key_P,mProjection,0,true); 429 429 #else 430 430 QAction *polyhedron = new QAction("&Polyhedron",CTRL+Key_P,mRepresentation); … … 433 433 QAction *ortho = new QAction("&Orthographic",CTRL+Key_O,mProjection); 434 434 QAction *perspective = new QAction("&Perspective",CTRL+Key_P,mProjection); 435 polyhedron->setToggleAction(true); 436 nurbs->setToggleAction(true); 437 ortho->setToggleAction(true); 438 perspective->setToggleAction(true); 435 439 #endif 436 440 polyhedron->addTo(mRepresentation); … … 590 594 591 595 #if QT_VERSION < 0x030200 592 QAction *white = new QAction("&White","&White",CTRL+Key_W,mBackground );593 QAction *black = new QAction("&Black","&Black",CTRL+Key_B,mBackground );596 QAction *white = new QAction("&White","&White",CTRL+Key_W,mBackground,0,true); 597 QAction *black = new QAction("&Black","&Black",CTRL+Key_B,mBackground,0,true); 594 598 #else 595 599 QAction *white = new QAction("&White",CTRL+Key_W,mBackground); 596 600 QAction *black = new QAction("&Black",CTRL+Key_B,mBackground); 601 white->setToggleAction(true); 602 black->setToggleAction(true); 597 603 #endif 598 604 white->addTo(mBackground); … … 620 626 621 627 #if QT_VERSION < 0x030200 622 QAction *createEPS = new QAction("&Save as ...","&Save as ...",CTRL+Key_S,mActions );628 QAction *createEPS = new QAction("&Save as ...","&Save as ...",CTRL+Key_S,mActions,0,true); 623 629 #else 624 630 QAction *createEPS = new QAction("&Save as ...",CTRL+Key_S,mActions); 631 createEPS->setToggleAction(true); 625 632 #endif 626 633 createEPS->addTo(mActions); … … 651 658 652 659 #if QT_VERSION < 0x030200 653 QAction *transparencyOn = new QAction("&On","&On",CTRL+Key_O,mTransparency );654 QAction *transparencyOff = new QAction("&Off","&Off",CTRL+Key_F,mTransparency );660 QAction *transparencyOn = new QAction("&On","&On",CTRL+Key_O,mTransparency,0,true); 661 QAction *transparencyOff = new QAction("&Off","&Off",CTRL+Key_F,mTransparency,0,true); 655 662 #else 656 663 QAction *transparencyOn = new QAction("&On",CTRL+Key_O,mTransparency); 657 664 QAction *transparencyOff = new QAction("&Off",CTRL+Key_F,mTransparency); 665 transparencyOn->setToggleAction(true); 666 transparencyOff->setToggleAction(true); 658 667 #endif 659 668 transparencyOn->addTo(mTransparency); … … 682 691 683 692 #if QT_VERSION < 0x030200 684 QAction *antialiasingOn = new QAction("&On","&On",CTRL+Key_O,mAntialiasing );685 QAction *antialiasingOff = new QAction("&Off","&Off",CTRL+Key_F,mAntialiasing );693 QAction *antialiasingOn = new QAction("&On","&On",CTRL+Key_O,mAntialiasing,0,true); 694 QAction *antialiasingOff = new QAction("&Off","&Off",CTRL+Key_F,mAntialiasing,0,true); 686 695 #else 687 696 QAction *antialiasingOn = new QAction("&On",CTRL+Key_O,mAntialiasing); 688 697 QAction *antialiasingOff = new QAction("&Off",CTRL+Key_F,mAntialiasing); 698 antialiasingOn->setToggleAction(true); 699 antialiasingOff->setToggleAction(true); 689 700 #endif 690 701 antialiasingOn->addTo(mAntialiasing); … … 710 721 711 722 #if QT_VERSION < 0x030200 712 QAction *haloingOn = new QAction("&On","&On",CTRL+Key_O,mHaloing );713 QAction *haloingOff = new QAction("&Off","&Off",CTRL+Key_F,mHaloing );723 QAction *haloingOn = new QAction("&On","&On",CTRL+Key_O,mHaloing,0,true); 724 QAction *haloingOff = new QAction("&Off","&Off",CTRL+Key_F,mHaloing,0,true); 714 725 #else 715 726 QAction *haloingOn = new QAction("&On",CTRL+Key_O,mHaloing); 716 727 QAction *haloingOff = new QAction("&Off",CTRL+Key_F,mHaloing); 728 haloingOn->setToggleAction(true); 729 haloingOff->setToggleAction(true); 717 730 #endif 718 731 haloingOn->addTo(mHaloing); … … 736 749 737 750 #if QT_VERSION < 0x030200 738 QAction *auxOn = new QAction("&On","&On",CTRL+Key_O,mAux );739 QAction *auxOff = new QAction("&Off","&Off",CTRL+Key_F,mAux );751 QAction *auxOn = new QAction("&On","&On",CTRL+Key_O,mAux,0,true); 752 QAction *auxOff = new QAction("&Off","&Off",CTRL+Key_F,mAux,0,true); 740 753 #else 741 754 QAction *auxOn = new QAction("&On",CTRL+Key_O,mAux); 742 755 QAction *auxOff = new QAction("&Off",CTRL+Key_F,mAux); 756 auxOn->setToggleAction(true); 757 auxOff->setToggleAction(true); 743 758 #endif 744 759 auxOn->addTo(mAux); … … 757 772 758 773 759 #if QT_VERSION >= 0x030200 774 760 775 #if QT_VERSION < 0x040000 761 776 QPopupMenu *mFullScreen = new QPopupMenu(mSpecial); 762 777 mSpecial->insertItem("Full screen",mFullScreen); 763 778 779 #if QT_VERSION < 0x030200 780 QAction *fullOn = new QAction("&On","&On",CTRL+Key_O,mFullScreen,0,true); 781 QAction *fullOff = new QAction("&Off","&Off",CTRL+Key_F,mFullScreen,0,true); 782 #else 764 783 QAction *fullOn = new QAction("&On",CTRL+Key_O,mFullScreen); 765 784 QAction *fullOff = new QAction("&Off",CTRL+Key_F,mFullScreen); 785 fullOn->setToggleAction(true); 786 fullOff->setToggleAction(true); 787 #endif 766 788 fullOn->addTo(mFullScreen); 767 789 fullOff->addTo(mFullScreen); 768 790 #else 769 QMenu *mFullScreen = mSpecial->addMenu(" Full screen");791 QMenu *mFullScreen = mSpecial->addMenu("&Full screen"); 770 792 QAction *fullOn = mFullScreen->addAction("On"); 771 793 QAction *fullOff = mFullScreen->addAction("Off"); 772 794 #endif 773 795 createRadioAction(fullOn,fullOff,SLOT(toggleFullScreen()),2); 774 #endif775 796 776 797 } … … 808 829 if (action1->parent()->inherits("QPopupMenu")){ 809 830 ((QPopupMenu*)action1->parent())->setCheckable(true); 810 } 811 ((QPopupMenu*)action1->parent())->setItemChecked(0,true); 812 ((QPopupMenu*)action1->parent())->setItemChecked(1,true); 831 ((QPopupMenu*)action2->parent())->setCheckable(true); 832 } 833 action1->setOn(false); 834 action2->setOn(false); 813 835 814 836 if (nCheck ==1) 815 ((QPopupMenu*)action1->parent())->setItemChecked(0,true);837 action1->setOn(true); 816 838 else 817 ((QPopupMenu*)action1->parent())->setItemChecked(1,true);839 action2->setOn(true); 818 840 819 841 //FIXME : Should not work on Qt3 … … 1857 1879 if (event->key() == Qt::Key_Escape) { // escaped from full screen 1858 1880 toggleFullScreen(); 1881 emit toggleMouseAction(); 1859 1882 } 1860 1883 if (event->key() == Qt::Key_Plus) { // zoom in
Note: See TracChangeset
for help on using the changeset viewer.