3 // Part of the Architektonas Project
4 // Originally part of QCad Community Edition by Andrew Mustun
5 // Extensively rewritten and refactored by James L. Hammons
6 // Portions copyright (C) 2001-2003 RibbonSoft
7 // Copyright (C) 2010 Underground Software
8 // See the README and GPLv2 files for licensing and warranty information
10 // JLH = James L. Hammons <jlhamm@acm.org>
13 // --- ---------- -----------------------------------------------------------
14 // JLH 05/10/2010 Created this file. :-)
17 #include "widgetpen.h"
19 WidgetPen::WidgetPen(QWidget * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
20 QWidget(parent, flags)
25 WidgetPen::~WidgetPen()
29 void WidgetPen::setPen(Pen pen, bool showByLayer, bool showUnchanged, const QString & title)
31 ui.cbColor->init(showByLayer, showUnchanged);
32 ui.cbWidth->init(showByLayer, showUnchanged);
33 ui.cbLineType->init(showByLayer, showUnchanged);
37 ui.cbColor->setColor(pen.getColor());
38 ui.cbWidth->setWidth(pen.getWidth());
39 ui.cbLineType->setLineType(pen.getLineType());
43 ui.bgPen->setTitle(title);
46 Pen WidgetPen::getPen()
50 pen.setColor(ui.cbColor->getColor());
51 pen.setWidth(ui.cbWidth->getWidth());
52 pen.setLineType(ui.cbLineType->getLineType());
57 bool WidgetPen::isColorUnchanged()
59 return ui.cbColor->isUnchanged();
62 bool WidgetPen::isLineTypeUnchanged()
64 return ui.cbLineType->isUnchanged();
67 bool WidgetPen::isWidthUnchanged()
69 return ui.cbWidth->isUnchanged();