1 // cadtoolbarsplines.cpp
3 // Originally part of QCad Community Edition by Andrew Mustun
4 // Extensively rewritten and refactored by James L. Hammons
5 // (C) 2010 Underground Software
7 // JLH = James L. Hammons <jlhamm@acm.org>
10 // --- ---------- -----------------------------------------------------------
11 // JLH 05/10/2010 Created this file. :-)
14 #include "cadtoolbarsplines.h"
16 #include "cadtoolbar.h"
17 #include "qg_actionhandler.h"
19 CadToolBarSplines::CadToolBarSplines(QWidget * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
20 QWidget(parent, flags), actionHandler(NULL), cadToolBar(NULL)
25 CadToolBarSplines::~CadToolBarSplines()
29 void CadToolBarSplines::mousePressEvent(QMouseEvent * e)
31 if (e->button() == Qt::RightButton && cadToolBar != NULL)
38 void CadToolBarSplines::contextMenuEvent(QContextMenuEvent * e)
43 void CadToolBarSplines::setCadToolBar(CadToolBar * tb)
48 actionHandler = tb->getActionHandler();
50 RS_DEBUG->print(RS_Debug::D_ERROR, "CadToolBarSplines::setCadToolBar(): No valid toolbar set.");
53 void CadToolBarSplines::drawSpline()
55 if (cadToolBar != NULL && actionHandler != NULL)
56 actionHandler->slotDrawSpline();
59 void CadToolBarSplines::back()
61 if (cadToolBar != NULL)