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/20/2010 Created this file. :-)
17 #include "dlgattributes.h"
19 //#include "layerbox.h"
20 #include "modification.h"
21 #include "layerlist.h"
23 DlgAttributes::DlgAttributes(QWidget * parent/*= NULL*/, Qt::WindowFlags flags/*= 0*/):
24 QDialog(parent, flags)
29 DlgAttributes::~DlgAttributes()
33 void DlgAttributes::setData(AttributesData * data, LayerList & layerList)
37 //pen = line->getPen();
38 ui.wPen->setPen(data->pen, true, true, "Pen");
40 //Drawing* graphic = line->getGraphic();
41 //if (graphic!=NULL) {
42 ui.cbLayer->init(layerList, false, true);
44 //cbLayer->setLayer(data->layer);
45 //Layer* lay = line->getLayer(false);
47 // cbLayer->setLayer(*lay);
51 void DlgAttributes::updateData()
53 data->pen = ui.wPen->getPen();
54 data->layer = ui.cbLayer->currentText();
56 data->changeColor = !ui.wPen->isColorUnchanged();
57 data->changeLineType = !ui.wPen->isLineTypeUnchanged();
58 data->changeWidth = !ui.wPen->isWidthUnchanged();
60 data->changeLayer = !ui.cbLayer->isUnchanged();