Exemplo n.º 1
0
void QG_CadToolBarMain::setCadToolBar(QG_CadToolBar* tb) {
    if (tb!=NULL) {
        actionHandler= tb->getActionHandler();
    } else {
        RS_DEBUG->print(RS_Debug::D_ERROR,
                        "QG_CadToolBarMain::setCadToolBar(): No valid toolbar set.");
    }
    if (actionHandler!=NULL) {
        connect(bMenuLine, SIGNAL(clicked()),
                tb, SLOT(showToolBarLines()));
        connect(bMenuArc, SIGNAL(clicked()),
                tb, SLOT(showToolBarArcs()));
        connect(bMenuCircle, SIGNAL(clicked()),
                tb, SLOT(showToolBarCircles()));
        connect(bMenuEllipse, SIGNAL(clicked()),
                tb, SLOT(showToolBarEllipses()));
        connect(bMenuSpline, SIGNAL(clicked()),
                actionHandler, SLOT(slotDrawSpline()));
        connect(bMenuPolyline, SIGNAL(clicked()),
                tb, SLOT(showToolBarPolylines()));
        connect(bMenuPoint, SIGNAL(clicked()),
                actionHandler, SLOT(slotDrawPoint()));

        connect(bMenuText, SIGNAL(clicked()),
                //actionHandler, SLOT(slotDrawText()));
                this, SLOT(slotDrawText()));
        connect(bMenuDim, SIGNAL(clicked()),
                tb, SLOT(showToolBarDim()));
        connect(bMenuHatch, SIGNAL(clicked()),
                actionHandler, SLOT(slotDrawHatch()));
        connect(bMenuImage, SIGNAL(clicked()),
                this, SLOT(slotDrawImage()));
                //actionHandler, SLOT(slotDrawImage()));

        connect(bMenuModify, SIGNAL(clicked()),
                tb, SLOT(showToolBarModify()));
        connect(bMenuInfo, SIGNAL(clicked()),
                tb, SLOT(showToolBarInfo()));

        connect(bMenuBlock, SIGNAL(clicked()),
                actionHandler, SLOT(slotBlocksCreate()));
        connect(bMenuSelect, SIGNAL(clicked()),
                tb, SLOT(showToolBarSelect()));
    } else {
        RS_DEBUG->print(RS_Debug::D_ERROR,
                        "QG_CadToolBarMain::setCadToolBar(): No valid action handler set.");
    }
}
Exemplo n.º 2
0
void QG_CadToolBar::showToolBarSelect() {
    showToolBarSelect(NULL, -1);
}
Exemplo n.º 3
0
void QG_CadToolBar::showToolBarSelect() {
	showToolBarSelect(nullptr, -1);
}