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 06/11/2010 Created this file. :-)
17 #include "dlgmirror.h"
19 #include "modification.h"
22 DlgMirror::DlgMirror(QWidget * parent/*= NULL*/, Qt::WindowFlags flags/*= 0*/):
23 QDialog(parent, flags)
27 settings.beginGroup("Modify");
28 numberMode = settings.value("MirrorMode", 0).toInt();
29 useCurrentLayer = settings.value("MirrorUseCurrentLayer", false).toBool();
30 useCurrentAttributes = settings.value("MirrorUseCurrentAttributes", false).toBool();
36 ui.rbMove->setChecked(true);
40 ui.rbCopy->setChecked(true);
47 ui.cbCurrentAttributes->setChecked(useCurrentAttributes);
48 ui.cbCurrentLayer->setChecked(useCurrentLayer);
51 DlgMirror::~DlgMirror()
53 settings.beginGroup("Modify");
55 if (ui.rbMove->isChecked())
57 else if (ui.rbCopy->isChecked())
62 settings.setValue("MirrorMode", numberMode);
63 settings.setValue("MirrorUseCurrentLayer", ui.cbCurrentLayer->isChecked());
64 settings.setValue("MirrorUseCurrentAttributes", ui.cbCurrentAttributes->isChecked());
68 void DlgMirror::setData(MirrorData * d)
73 void DlgMirror::updateData()
75 if (ui.rbMove->isChecked())
77 else if (ui.rbCopy->isChecked())
80 data->useCurrentAttributes = ui.cbCurrentAttributes->isChecked();
81 data->useCurrentLayer = ui.cbCurrentLayer->isChecked();