X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fforms%2Fcadtoolbarpoints.cpp;h=b1a6880289c0be784e6c82c344a399baf5d06e86;hb=e1d1cacbb43055988d0d9db632fdf05c0bea9543;hp=6c06233737937734d9d0a429ae456cdc03dcdbb6;hpb=f7188d32d0beaef31fc3475be05daea2f018ebec;p=architektonas diff --git a/src/forms/cadtoolbarpoints.cpp b/src/forms/cadtoolbarpoints.cpp index 6c06233..b1a6880 100644 --- a/src/forms/cadtoolbarpoints.cpp +++ b/src/forms/cadtoolbarpoints.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,37 +20,17 @@ #include "createqtactions.h" CadToolBarPoints::CadToolBarPoints(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(actionDrawPoint), 1, 0, 1, 1); + gridLayout->addWidget(parent->CreateToolButton(actionDrawPoint), 1, 0, 1, 1); } CadToolBarPoints::~CadToolBarPoints() { } - -void CadToolBarPoints::back() -{ - cadToolBar->back(); -} - -QToolButton * CadToolBarPoints::CreateToolButton(QAction * action) -{ - QToolButton * button = new QToolButton(this); - button->setDefaultAction(action); - button->setIconSize(QSize(18, 18)); - - return button; -}