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() //FIXME-2
66 (typid(*selection) == typid(BranchObj) ||
67 typid(*selection) == typid(MapCenterObj)) )
69 QColor col=((BranchObj*)(selection))->getColor();
71 ui.colorButton->setPaletteBackgroundColor (col);
77 bool EditXLinkDialog::useSettingsGlobal ()
79 return ui.useSettings->isChecked();