1 #include "editxlinkdialog.h"
4 #include <QColorDialog>
6 #include "branchitem.h"
8 EditXLinkDialog::EditXLinkDialog (QWidget *parent):QDialog (parent)
16 connect ( ui.widthBox, SIGNAL (valueChanged( int)), this, SLOT (widthChanged (int)));
17 connect ( ui.colorButton, SIGNAL (clicked( )), this, SLOT (colorButtonPressed()));
18 connect ( ui.setColorHeadingButton, SIGNAL (clicked( )), this, SLOT (setColorHeadingButtonPressed()));
19 connect ( ui.deleteButton, SIGNAL (clicked( )), this, SLOT (deleteButtonPressed()));
22 void EditXLinkDialog::deleteButtonPressed()
28 bool EditXLinkDialog::deleteXLink()
34 void EditXLinkDialog::widthChanged( int w)
39 void EditXLinkDialog::setXLink( XLinkItem * xi)
42 ui.colorButton->setPaletteBackgroundColor (xli->getColor() );
43 ui.widthBox->setValue(xli->getWidth());
46 void EditXLinkDialog::setSelection(BranchItem *bi)
51 void EditXLinkDialog::colorButtonPressed()
55 QColor col = QColorDialog::getColor(xli->getColor(), this );
56 if ( !col.isValid() ) return;
58 ui.colorButton->setPaletteBackgroundColor (col);
62 void EditXLinkDialog::setColorHeadingButtonPressed()
68 QColor col=selbi->getHeadingColor();
70 ui.colorButton->setPaletteBackgroundColor (col);
75 bool EditXLinkDialog::useSettingsGlobal ()
77 return ui.useSettings->isChecked();