// cadtoolbarmain.cpp
//
+// Part of the Architektonas Project
// Originally part of QCad Community Edition by Andrew Mustun
// Extensively rewritten and refactored by James L. Hammons
// (C) 2010 Underground Software
#include "cadtoolbar.h"
#include "qg_actionhandler.h"
+#include "createqtactions.h"
+#include "rs_debug.h"
CadToolBarMain::CadToolBarMain(QWidget * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
QWidget(parent, flags)
//#ifndef RS_PROF
// ui.bMenuPolyline->hide();
//#endif
+
+//hm.
+//well, it looks like something else is messing with this...
+// if (parent)
+// ((QToolBar *)parent)->addWidget(this);
}
CadToolBarMain::~CadToolBarMain()
{
QG_ActionHandler * ah = NULL;
- if (tb != NULL)
+ if (tb)
ah = tb->getActionHandler();
else
- RS_DEBUG->print(RS_Debug::D_ERROR, "QG_CadToolBarMain::setCadToolBar(): No valid toolbar set.");
+ RS_DEBUG->print(RS_Debug::D_ERROR, "CadToolBarMain::setCadToolBar(): No valid toolbar set.");
- if (ah != NULL)
+ if (ah)
{
connect(ui.bMenuPoint, SIGNAL(clicked()), ah, SLOT(slotDrawPoint()));
connect(ui.bMenuLine, SIGNAL(clicked()), tb, SLOT(showToolBarLines()));
connect(ui.bMenuSelect, SIGNAL(clicked()), tb, SLOT(showToolBarSelect()));
}
else
- {
- RS_DEBUG->print(RS_Debug::D_ERROR, "QG_CadToolBarMain::setCadToolBar(): No valid action handler set.");
- }
+ RS_DEBUG->print(RS_Debug::D_ERROR, "CadToolBarMain::setCadToolBar(): No valid action handler set.");
}