Isis 3 Programmer Reference
MosaicSelectTool.cpp
1 #include "MosaicSelectTool.h"
2 
3 #include <iostream>
4 
5 #include <QMenu>
6 
7 #include "IString.h"
8 #include "MosaicGraphicsView.h"
9 #include "MosaicSceneWidget.h"
10 
11 namespace Isis {
19  MosaicTool(scene) {
20  }
21 
22 
32  QAction *action = new QAction(this);
33  action->setIcon(getIcon("mActionSelect.png"));
34  action->setToolTip("Select (s)");
35  action->setShortcut(Qt::Key_S);
36  QString text =
37  "<b>Function:</b> Select cubes in a mosaic.<br><br>"
38  "This tool gives you a <b>drag-select</b> to select multiple files (this "
39  "selects files underneath the top one), a <b>control-click</b> select to "
40  "add files to the current selection, and a <b>click</b> selection to "
41  "replace the current selection with the file you clicked on."
42  "<br><p><b>Shortcut:</b> s</p>";
43  action->setWhatsThis(text);
44  return action;
45  }
46 
47 
54  if(isActive()) {
55  getWidget()->getView()->setDragMode(QGraphicsView::RubberBandDrag);
56  }
57  else {
58  getWidget()->getView()->setDragMode(QGraphicsView::NoDrag);
59  }
60  }
61 
62 }
63 
MosaicSelectTool(MosaicSceneWidget *)
MosaicSelectTool constructor.
This widget encompasses the entire mosaic scene.
virtual QAction * getPrimaryAction()
Adds the action to the toolpad.
Base class for the MosaicTools.
Definition: MosaicTool.h:37
void updateTool()
This method sets the QGraphicsView to allow the user to select mosaic items by dragging a rubber band...
bool isActive() const
Returns the activeness of this toool.
Definition: MosaicTool.h:50
QPixmap getIcon(QString iconName) const
returns the path to the icon directory.
Definition: MosaicTool.cpp:115
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31