comparison main/MainWindow.cpp @ 715:d1c5444be23d tony_integration

Merge from default branch
author Chris Cannam
date Fri, 09 May 2014 17:15:50 +0100
parents 44fcce228d02 049a9418cc27
children b959148258a4
comparison
equal deleted inserted replaced
714:2f829a62fe55 715:d1c5444be23d
913 action = new QAction(tr("Show &Centre Line"), this); 913 action = new QAction(tr("Show &Centre Line"), this);
914 action->setShortcut(tr("'")); 914 action->setShortcut(tr("'"));
915 action->setStatusTip(tr("Show or hide the centre line")); 915 action->setStatusTip(tr("Show or hide the centre line"));
916 connect(action, SIGNAL(triggered()), this, SLOT(toggleCentreLine())); 916 connect(action, SIGNAL(triggered()), this, SLOT(toggleCentreLine()));
917 action->setCheckable(true); 917 action->setCheckable(true);
918 action->setChecked(true); 918 action->setChecked(m_viewManager->shouldShowCentreLine());
919 m_keyReference->registerShortcut(action); 919 m_keyReference->registerShortcut(action);
920 menu->addAction(action); 920 menu->addAction(action);
921 921
922 action = new QAction(tr("Toggle All Time Rulers"), this); 922 action = new QAction(tr("Toggle All Time Rulers"), this);
923 action->setShortcut(tr("#")); 923 action->setShortcut(tr("#"));
928 928
929 menu->addSeparator(); 929 menu->addSeparator();
930 930
931 QActionGroup *overlayGroup = new QActionGroup(this); 931 QActionGroup *overlayGroup = new QActionGroup(this);
932 932
933 ViewManager::OverlayMode mode = m_viewManager->getOverlayMode();
934
933 action = new QAction(tr("Show &No Overlays"), this); 935 action = new QAction(tr("Show &No Overlays"), this);
934 action->setShortcut(tr("0")); 936 action->setShortcut(tr("0"));
935 action->setStatusTip(tr("Hide times, layer names, and scale")); 937 action->setStatusTip(tr("Hide times, layer names, and scale"));
936 connect(action, SIGNAL(triggered()), this, SLOT(showNoOverlays())); 938 connect(action, SIGNAL(triggered()), this, SLOT(showNoOverlays()));
937 action->setCheckable(true); 939 action->setCheckable(true);
938 action->setChecked(false); 940 action->setChecked(mode == ViewManager::NoOverlays);
939 overlayGroup->addAction(action); 941 overlayGroup->addAction(action);
940 m_keyReference->registerShortcut(action); 942 m_keyReference->registerShortcut(action);
941 menu->addAction(action); 943 menu->addAction(action);
942 944
943 action = new QAction(tr("Show &Minimal Overlays"), this); 945 action = new QAction(tr("Show &Minimal Overlays"), this);
944 action->setShortcut(tr("9")); 946 action->setShortcut(tr("9"));
945 action->setStatusTip(tr("Show times and basic scale")); 947 action->setStatusTip(tr("Show times and basic scale"));
946 connect(action, SIGNAL(triggered()), this, SLOT(showMinimalOverlays())); 948 connect(action, SIGNAL(triggered()), this, SLOT(showMinimalOverlays()));
947 action->setCheckable(true); 949 action->setCheckable(true);
948 action->setChecked(true); 950 action->setChecked(mode == ViewManager::StandardOverlays);
949 overlayGroup->addAction(action); 951 overlayGroup->addAction(action);
950 m_keyReference->registerShortcut(action); 952 m_keyReference->registerShortcut(action);
951 menu->addAction(action); 953 menu->addAction(action);
952 954
953 action = new QAction(tr("Show &All Overlays"), this); 955 action = new QAction(tr("Show &All Overlays"), this);
954 action->setShortcut(tr("8")); 956 action->setShortcut(tr("8"));
955 action->setStatusTip(tr("Show times, layer names, and scale")); 957 action->setStatusTip(tr("Show times, layer names, and scale"));
956 connect(action, SIGNAL(triggered()), this, SLOT(showAllOverlays())); 958 connect(action, SIGNAL(triggered()), this, SLOT(showAllOverlays()));
957 action->setCheckable(true); 959 action->setCheckable(true);
958 action->setChecked(false); 960 action->setChecked(mode == ViewManager::AllOverlays);
959 overlayGroup->addAction(action); 961 overlayGroup->addAction(action);
960 m_keyReference->registerShortcut(action); 962 m_keyReference->registerShortcut(action);
961 menu->addAction(action); 963 menu->addAction(action);
962 964
963 menu->addSeparator(); 965 menu->addSeparator();