1 #include "editxlinkdialog.h"
4 #include <QColorDialog>
6 EditXLinkDialog::EditXLinkDialog (QWidget *parent):QDialog (parent)
14 connect ( ui.widthBox, SIGNAL (valueChanged( int)), this, SLOT (widthChanged (int)));
15 connect ( ui.colorButton, SIGNAL (clicked( )), this, SLOT (colorButtonPressed()));
16 connect ( ui.setColorHeadingButton, SIGNAL (clicked( )), this, SLOT (setColorHeadingButtonPressed()));
17 connect ( ui.deleteButton, SIGNAL (clicked( )), this, SLOT (deleteButtonPressed()));
20 void EditXLinkDialog::deleteButtonPressed()
26 bool EditXLinkDialog::deleteXLink()
32 void EditXLinkDialog::widthChanged( int w)
37 void EditXLinkDialog::setXLink( XLinkObj * xo)
40 ui.colorButton->setPaletteBackgroundColor (xlo->getColor() );
41 ui.widthBox->setValue(xlo->getWidth());
44 void EditXLinkDialog::setSelection(LinkableMapObj *s)
49 void EditXLinkDialog::colorButtonPressed()
53 QColor col = QColorDialog::getColor(xlo->getColor(), this );
54 if ( !col.isValid() ) return;
56 ui.colorButton->setPaletteBackgroundColor (col);
60 void EditXLinkDialog::setColorHeadingButtonPressed()
65 ((typeid(*selection) == typeid(BranchObj)) ||
66 (typeid(*selection) == typeid(MapCenterObj))) )
68 QColor col=((BranchObj*)(selection))->getColor();
70 ui.colorButton->setPaletteBackgroundColor (col);
75 bool EditXLinkDialog::useSettingsGlobal ()
77 return ui.useSettings->isChecked();