X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fforms%2Fcadtoolbarpolylines.cpp;h=07c6331e1bf7dd8bd67d2b02fd7fb32d638e291d;hb=48105dec9198cf5a81dd9286010d0d45e28f70c3;hp=6ff2ea185172f9baea9784d6b084f227e60eb945;hpb=f7188d32d0beaef31fc3475be05daea2f018ebec;p=architektonas diff --git a/src/forms/cadtoolbarpolylines.cpp b/src/forms/cadtoolbarpolylines.cpp index 6ff2ea1..07c6331 100644 --- a/src/forms/cadtoolbarpolylines.cpp +++ b/src/forms/cadtoolbarpolylines.cpp @@ -3,7 +3,9 @@ // 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 +// Portions copyright (C) 2001-2003 RibbonSoft +// Copyright (C) 2010 Underground Software +// See the README and GPLv2 files for licensing and warranty information // // JLH = James L. Hammons // @@ -18,43 +20,23 @@ #include "createqtactions.h" CadToolBarPolylines::CadToolBarPolylines(CadToolBar * parent, Qt::WindowFlags flags/*= 0*/): - QWidget((QWidget *)parent, flags), cadToolBar(parent) + QWidget((QWidget *)parent, flags) { QGridLayout * gridLayout = new QGridLayout(this); gridLayout->setSpacing(0); gridLayout->setContentsMargins(0, 0, 0, 0); - QAction * actionBack = new QAction(QIcon(":/res/qg_back"), tr("Back"), this); - QToolButton * button = new QToolButton(this); - button->setDefaultAction(actionBack); - QSizePolicy policy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred); - button->setSizePolicy(policy); - gridLayout->addWidget(button, 0, 0, 1, 2); - connect(button, SIGNAL(triggered(QAction *)), this, SLOT(back())); + gridLayout->addWidget(parent->CreateBackButton(this), 0, 0, 1, 2); - gridLayout->addWidget(CreateToolButton(actionDrawPolyline), 1, 0, 1, 1); - gridLayout->addWidget(CreateToolButton(actionPolylineAdd), 1, 1, 1, 1); + gridLayout->addWidget(parent->CreateToolButton(actionDrawPolyline), 1, 0, 1, 1); + gridLayout->addWidget(parent->CreateToolButton(actionPolylineAdd), 1, 1, 1, 1); #warning "!!! Missing actionPolylineAppend !!!" -// gridLayout->addWidget(CreateToolButton(actionPolylineAppend), 2, 0, 1, 1); - gridLayout->addWidget(CreateToolButton(actionPolylineDel), 2, 1, 1, 1); - gridLayout->addWidget(CreateToolButton(actionPolylineDelBetween), 3, 0, 1, 1); - gridLayout->addWidget(CreateToolButton(actionPolylineTrim), 3, 1, 1, 1); +// gridLayout->addWidget(parent->CreateToolButton(actionPolylineAppend), 2, 0, 1, 1); + gridLayout->addWidget(parent->CreateToolButton(actionPolylineDel), 2, 1, 1, 1); + gridLayout->addWidget(parent->CreateToolButton(actionPolylineDelBetween), 3, 0, 1, 1); + gridLayout->addWidget(parent->CreateToolButton(actionPolylineTrim), 3, 1, 1, 1); } CadToolBarPolylines::~CadToolBarPolylines() { } - -void CadToolBarPolylines::back() -{ - cadToolBar->back(); -} - -QToolButton * CadToolBarPolylines::CreateToolButton(QAction * action) -{ - QToolButton * button = new QToolButton(this); - button->setDefaultAction(action); - button->setIconSize(QSize(18, 18)); - - return button; -}