File failed to load: https://isis.astrogeology.usgs.gov/9.0.0/Object/assets/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
MosaicPanTool.cpp
1#include "MosaicPanTool.h"
2
3#include <iostream>
4
5#include <QAction>
6#include <QMenu>
7
8#include "IString.h"
9#include "MosaicGraphicsView.h"
10#include "MosaicSceneWidget.h"
11
12namespace Isis {
19 MosaicPanTool::MosaicPanTool(MosaicSceneWidget *scene) : MosaicTool(scene) {
20 }
21
22
32 QAction *action = new QAction(this);
33 action->setIcon(getIcon("move.png"));
34 //action->setIcon(QPixmap("/work1/salley/icons/mActionMoveVertex.png"));
35 action->setToolTip("Pan (p)");
36 action->setShortcut(Qt::Key_P);
37 QString text =
38 "<b>Function:</b> Pan around the current mosaic.<br><br>"
39 "This tool gives you a <b>click and drag</b> to pan around the mosaic "
40 "scene."
41 "<p><b>Shortcut:</b> p</p> ";
42 action->setWhatsThis(text);
43 return action;
44 }
45
46
56 QWidget *widget = new QWidget();
57 return widget;
58 }
59
60
65 void MosaicPanTool::updateTool() {
66 if(isActive()) {
67 getWidget()->setCubesSelectable(false);
68 getWidget()->getView()->setDragMode(QGraphicsView::ScrollHandDrag);
69 }
70 else {
71 getWidget()->setCubesSelectable(true);
72 getWidget()->getView()->setDragMode(QGraphicsView::RubberBandDrag);
73 }
74 }
75
76}
77
MosaicPanTool(MosaicSceneWidget *)
MosaicPanTool constructor.
QWidget * createToolBarWidget()
Creates the widget to add to the tool bar.
QAction * getPrimaryAction()
Adds the action to the toolpad.
This widget encompasses the entire mosaic scene.
QPixmap getIcon(QString iconName) const
returns the path to the icon directory.
bool isActive() const
Returns the activeness of this toool.
Definition MosaicTool.h:50
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16