Isis 3.0 Programmer Reference
Back | Home
ControlPointEditView.cpp
Go to the documentation of this file.
1 
23 #include "IsisDebug.h"
24 
25 #include "ControlPointEditView.h"
26 
27 #include <QAction>
28 #include <QList>
29 #include <QSize>
30 #include <QSizePolicy>
31 #include <QToolBar>
32 #include <QVBoxLayout>
33 #include <QWidgetAction>
34 
35 #include "ControlNet.h"
36 #include "ControlPoint.h"
37 #include "ControlPointEditWidget.h"
38 #include "Directory.h"
39 #include "ToolPad.h"
40 
41 
42 namespace Isis {
47  AbstractProjectItemView(parent) {
48 
49  m_controlPointEditWidget = new ControlPointEditWidget(directory, parent);
50 
51  // TODO How are control nets and serial number lists going to be handled? I assume there can
52  // be several active control nets depending on the view, ie. jigsaw might operate on one
53  // net, while the editors might be using a different net. Will Directory keep track?
54  //
55 
56 
57  QVBoxLayout *layout = new QVBoxLayout;
58  setLayout(layout);
59 
60  layout->addWidget(m_controlPointEditWidget);
61 
62  m_permToolBar = new QToolBar("Standard Tools", 0);
63  m_permToolBar->setObjectName("permToolBar");
64  m_permToolBar->setIconSize(QSize(22, 22));
65  //toolBarLayout->addWidget(m_permToolBar);
66 
67  m_activeToolBar = new QToolBar("Active Tool", 0);
68  m_activeToolBar->setObjectName("activeToolBar");
69  m_activeToolBar->setIconSize(QSize(22, 22));
70  //toolBarLayout->addWidget(m_activeToolBar);
71 
72  m_toolPad = new ToolPad("Tool Pad", 0);
73  m_toolPad->setObjectName("toolPad");
74  //toolBarLayout->addWidget(m_toolPad);
75 
76 
77 // m_controlPointEditWidget->addToPermanent(m_permToolBar);
78 // m_controlPointEditWidget->addTo(m_activeToolBar);
79 // m_controlPointEditWidget->addTo(m_toolPad);
80 
81  m_activeToolBarAction = new QWidgetAction(this);
82  m_activeToolBarAction->setDefaultWidget(m_activeToolBar);
83 
84  setAcceptDrops(true);
85 
86  QSizePolicy policy = sizePolicy();
87  policy.setHorizontalPolicy(QSizePolicy::Expanding);
88  policy.setVerticalPolicy(QSizePolicy::Expanding);
89  setSizePolicy(policy);
90 
91  }
92 
93 
98  delete m_permToolBar;
99  delete m_activeToolBar;
100  delete m_toolPad;
101 
102  m_permToolBar = 0;
103  m_activeToolBar = 0;
104  m_toolPad = 0;
105  }
106 
107 
115  return m_controlPointEditWidget;
116  }
117 
118 
125  return QSize(800, 600);
126  }
127 
128 
135  return m_permToolBar->actions();
136  }
137 
138 
145  QList<QAction *> actions;
146  actions.append(m_activeToolBarAction);
147  return actions;
148  }
149 
150 
157  return m_toolPad->actions();
158  }
159 
160 
161 }
162 
virtual QList< QAction * > toolPadActions()
Returns a list of actions for the tool pad.
ControlPointEditView(Directory *directory, QWidget *parent=0)
Constructor.
ToolPad * m_toolPad
The tool pad.
Gui for editing ControlPoint.
QToolBar * m_permToolBar
The permanent tool bar.
virtual QList< QAction * > activeToolBarActions()
Returns a list of actions for the active tool bar.
AbstractProjectItemView is a base class for views of a ProjectItemModel in Qt&#39;s model-view framework...
ControlPointEditWidget * controlPointEditWidget() const
Returns the ControlPointEditWidget.
QToolBar * m_activeToolBar
The active tool bar.
QSize sizeHint() const
Returns the suggested size for the widget.
QWidgetAction * m_activeToolBarAction
Stores the active tool bar.
virtual QList< QAction * > permToolBarActions()
Returns a list of actions for the permanent tool bar.
$Date$ $Revision$

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:16:42