historywindow moved to mainwindow. Started to get rid of Q3PtrList finally
1 #include "editxlinkdialog.h"
3 #include <QColorDialog>
5 EditXLinkDialog::EditXLinkDialog (QWidget *parent):QDialog (parent)
13 connect ( ui.widthBox, SIGNAL (valueChanged( int)), this, SLOT (widthChanged (int)));
14 connect ( ui.colorButton, SIGNAL (clicked( )), this, SLOT (colorButtonPressed()));
15 connect ( ui.setColorHeadingButton, SIGNAL (clicked( )), this, SLOT (setColorHeadingButtonPressed()));
16 connect ( ui.deleteButton, SIGNAL (clicked( )), this, SLOT (deleteButtonPressed()));
19 void EditXLinkDialog::deleteButtonPressed()
25 bool EditXLinkDialog::deleteXLink()
31 void EditXLinkDialog::widthChanged( int w)
36 void EditXLinkDialog::setXLink( XLinkObj * xo)
39 ui.colorButton->setPaletteBackgroundColor (xlo->getColor() );
40 ui.widthBox->setValue(xlo->getWidth());
43 void EditXLinkDialog::setSelection(LinkableMapObj *s)
48 void EditXLinkDialog::colorButtonPressed()
52 QColor col = QColorDialog::getColor(xlo->getColor(), this );
53 if ( !col.isValid() ) return;
55 ui.colorButton->setPaletteBackgroundColor (col);
59 void EditXLinkDialog::setColorHeadingButtonPressed()
64 (typeid(*selection) == typeid(BranchObj)) ||
65 (typeid(*selection) == typeid(MapCenterObj)) )
67 QColor col=((BranchObj*)(selection))->getColor();
69 ui.colorButton->setPaletteBackgroundColor (col);
74 bool EditXLinkDialog::useSettingsGlobal ()
76 return ui.useSettings->isChecked();