3 #include <QStackedWidget> 6 #include "RubberBandTool.h" 10 ToolList::ToolList() {
11 m_activeToolBarStack = NULL;
12 m_rubberBandTool = NULL;
16 ToolList::~ToolList() {
17 delete m_activeToolBarStack;
21 void ToolList::append(Tool *tool) {
27 RubberBandTool *rubberBandTool =
dynamic_cast<RubberBandTool *
>(tool);
30 m_rubberBandTool = rubberBandTool;
36 int ToolList::count()
const {
37 return m_tools.count();
41 RubberBandTool *ToolList::rubberBandTool() {
42 return m_rubberBandTool;
46 QStackedWidget *ToolList::toolBarStack() {
47 return m_activeToolBarStack;
51 QStackedWidget *ToolList::toolBarStack(
QToolBar *toolBar) {
52 if(!m_activeToolBarStack) {
53 m_activeToolBarStack =
new QStackedWidget;
54 toolBar->addWidget(m_activeToolBarStack);
57 return m_activeToolBarStack;
61 Tool *ToolList::operator[](
int index) {
62 return m_tools[index];
Namespace for ISIS/Bullet specific routines.