19#include <KoPageLayoutHeader.h>
20#include <KoPageLayoutHeader.moc>
21#include <KoUnitWidgets.h>
24#include <tqcheckbox.h>
27 : KoPageLayoutHeaderBase(parent) {
28 m_headerFooters = kwhf;
29 TQHBoxLayout *lay = new TQHBoxLayout(headerSpacingPane);
30 m_headerSpacing = new KoUnitDoubleSpinBox( headerSpacingPane, 0.0, 999.0, 0.5, kwhf.ptHeaderBodySpacing, unit );
31 lay->addWidget(m_headerSpacing);
33 lay = new TQHBoxLayout(footerSpacingPane);
34 m_footerSpacing = new KoUnitDoubleSpinBox( footerSpacingPane, 0.0, 999.0, 0.5, kwhf.ptFooterBodySpacing, unit );
35 lay->addWidget(m_footerSpacing);
37 lay = new TQHBoxLayout(footnotePane);
38 m_footnoteSpacing = new KoUnitDoubleSpinBox( footnotePane, 0.0, 999.0, 0.5, kwhf.ptFootNoteBodySpacing, unit );
39 lay->addWidget(m_footnoteSpacing);
41 if ( kwhf.header == HF_FIRST_DIFF || kwhf.header == HF_FIRST_EO_DIFF )
42 rhFirst->setChecked( true );
43 if ( kwhf.header == HF_EO_DIFF || kwhf.header == HF_FIRST_EO_DIFF )
44 rhEvenOdd->setChecked( true );
45 if ( kwhf.footer == HF_FIRST_DIFF || kwhf.footer == HF_FIRST_EO_DIFF )
46 rfFirst->setChecked( true );
47 if ( kwhf.footer == HF_EO_DIFF || kwhf.footer == HF_FIRST_EO_DIFF )
48 rfEvenOdd->setChecked( true );
52 if ( rhFirst->isChecked() && rhEvenOdd->isChecked() )
53 m_headerFooters.header = HF_FIRST_EO_DIFF;
54 else if ( rhFirst->isChecked() )
55 m_headerFooters.header = HF_FIRST_DIFF;
56 else if ( rhEvenOdd->isChecked() )
57 m_headerFooters.header = HF_EO_DIFF;
59 m_headerFooters.header = HF_SAME;
61 m_headerFooters.ptHeaderBodySpacing = m_headerSpacing-> value();
62 m_headerFooters.ptFooterBodySpacing = m_footerSpacing-> value();
63 m_headerFooters.ptFootNoteBodySpacing = m_footnoteSpacing-> value();
64 if ( rfFirst->isChecked() && rfEvenOdd->isChecked() )
65 m_headerFooters.footer = HF_FIRST_EO_DIFF;
66 else if ( rfFirst->isChecked() )
67 m_headerFooters.footer = HF_FIRST_DIFF;
68 else if ( rfEvenOdd->isChecked() )
69 m_headerFooters.footer = HF_EO_DIFF;
71 m_headerFooters.footer = HF_SAME;
72 return m_headerFooters;
Spin box for double precision numbers with unit display.
Unit Length units supported by KOffice.
|