From 8362bf63dea22bbf6736609b0f49c152f975eb63 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 20 Jan 2010 01:29:50 +0000 Subject: Added old abandoned KDE3 version of koffice git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1077364 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kpresenter/KPrShadowDialogImpl.cpp | 91 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 kpresenter/KPrShadowDialogImpl.cpp (limited to 'kpresenter/KPrShadowDialogImpl.cpp') diff --git a/kpresenter/KPrShadowDialogImpl.cpp b/kpresenter/KPrShadowDialogImpl.cpp new file mode 100644 index 000000000..c97a5068b --- /dev/null +++ b/kpresenter/KPrShadowDialogImpl.cpp @@ -0,0 +1,91 @@ +// -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- +#include +#include +#include +#include + +#include +#include + +#include "KPrShadowDialogImpl.h" +#include "KPrTextPreview.h" + +KPrShadowDialogImpl::KPrShadowDialogImpl( QWidget *parent, const char* name ) + : ShadowDialogBase( parent, name ) +{ + _preview = new KPrTextPreview( previewPanel ); + QHBoxLayout *lay = new QHBoxLayout( previewPanel, previewPanel->lineWidth(), 0 ); + lay->addWidget( _preview ); + distanceSpinBox->setSuffix(i18n("pt")); + ltButton->setPixmap( BarIcon( "shadowLU" ) ); + tButton->setPixmap( BarIcon( "shadowU" ) ); + rtButton->setPixmap( BarIcon( "shadowRU" ) ); + rButton->setPixmap( BarIcon( "shadowR" ) ); + rbButton->setPixmap( BarIcon( "shadowRB" ) ); + bButton->setPixmap( BarIcon( "shadowB" ) ); + lbButton->setPixmap( BarIcon( "shadowLB" ) ); + lButton->setPixmap( BarIcon( "shadowL" ) ); + + connect( colorButton, SIGNAL( changed( const QColor& ) ), + SLOT( colorChanged( const QColor& ) ) ); +} + +void KPrShadowDialogImpl::setShadowDirection( ShadowDirection d ) +{ + _preview->setShadowDirection( d ); + directionGroup->setButton( d ); +} + +void KPrShadowDialogImpl::setShadowDistance( int d ) +{ + _preview->setShadowDistance( d ); + distanceSpinBox->setValue( d ); +} + +void KPrShadowDialogImpl::setShadowColor( const QColor &c ) +{ + _preview->setShadowColor( c ); + colorButton->setColor( c ); +} + +void KPrShadowDialogImpl::colorChanged( const QColor& c ) +{ + _preview->setShadowColor( c ); +} + +void KPrShadowDialogImpl::directionChanged( int d ) +{ + _preview->setShadowDirection( (ShadowDirection)d ); +} + +void KPrShadowDialogImpl::distanceChanged( int d ) +{ + _preview->setShadowDistance( d ); +} + +void KPrShadowDialogImpl::applyClicked() +{ + emit apply(); +} + +void KPrShadowDialogImpl::okClicked() +{ + applyClicked(); + accept(); +} + +ShadowDirection KPrShadowDialogImpl::shadowDirection() +{ + return (ShadowDirection) ( directionGroup->id( directionGroup->selected() ) ); +} + +int KPrShadowDialogImpl::shadowDistance() +{ + return distanceSpinBox->value(); +} + +QColor KPrShadowDialogImpl::shadowColor() +{ + return colorButton->color(); +} +#include "KPrShadowDialogImpl.moc" -- cgit v1.2.3