4#include <tqbuttongroup.h>
6#include <kcolorbutton.h>
9#include "KPrShadowDialogImpl.h"
10#include "KPrTextPreview.h"
12KPrShadowDialogImpl::KPrShadowDialogImpl( TQWidget *parent,
const char* name )
13 : ShadowDialogBase( parent, name )
15 _preview =
new KPrTextPreview( previewPanel );
16 TQHBoxLayout *lay =
new TQHBoxLayout( previewPanel, previewPanel->lineWidth(), 0 );
17 lay->addWidget( _preview );
18 distanceSpinBox->setSuffix(i18n(
"pt"));
19 ltButton->setPixmap( BarIcon(
"shadowLU" ) );
20 tButton->setPixmap( BarIcon(
"shadowU" ) );
21 rtButton->setPixmap( BarIcon(
"shadowRU" ) );
22 rButton->setPixmap( BarIcon(
"shadowR" ) );
23 rbButton->setPixmap( BarIcon(
"shadowRB" ) );
24 bButton->setPixmap( BarIcon(
"shadowB" ) );
25 lbButton->setPixmap( BarIcon(
"shadowLB" ) );
26 lButton->setPixmap( BarIcon(
"shadowL" ) );
28 connect( colorButton, TQ_SIGNAL( changed(
const TQColor& ) ),
29 TQ_SLOT( colorChanged(
const TQColor& ) ) );
32void KPrShadowDialogImpl::setShadowDirection( ShadowDirection d )
34 _preview->setShadowDirection( d );
35 directionGroup->setButton( d );
38void KPrShadowDialogImpl::setShadowDistance(
int d )
40 _preview->setShadowDistance( d );
41 distanceSpinBox->setValue( d );
44void KPrShadowDialogImpl::setShadowColor(
const TQColor &c )
46 _preview->setShadowColor( c );
47 colorButton->setColor( c );
50void KPrShadowDialogImpl::colorChanged(
const TQColor& c )
52 _preview->setShadowColor( c );
55void KPrShadowDialogImpl::directionChanged(
int d )
57 _preview->setShadowDirection( (ShadowDirection)d );
60void KPrShadowDialogImpl::distanceChanged(
int d )
62 _preview->setShadowDistance( d );
65void KPrShadowDialogImpl::applyClicked()
70void KPrShadowDialogImpl::okClicked()
76ShadowDirection KPrShadowDialogImpl::shadowDirection()
78 return (ShadowDirection) ( directionGroup->id( directionGroup->selected() ) );
81int KPrShadowDialogImpl::shadowDistance()
83 return distanceSpinBox->value();
86TQColor KPrShadowDialogImpl::shadowColor()
88 return colorButton->color();
90#include "KPrShadowDialogImpl.moc"