1
// -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*-
2
#include <qradiobutton.h>
5
#include <qbuttongroup.h>
10
#include "rotationdialogimpl.h"
11
#include "textpreview.h"
13
RotationDialogImpl::RotationDialogImpl( QWidget *parent, const char* name )
14
: RotationDialogBase( parent, name )
16
_preview = new TextPreview( previewPanel );
17
QHBoxLayout *lay = new QHBoxLayout( previewPanel, previewPanel->lineWidth(), 0 );
18
lay->addWidget( _preview );
20
customInput->setRange( 0, 360, 0.1, TRUE );
21
connect( customRadio, SIGNAL( toggled( bool ) ),
22
customInput, SLOT( setEnabled( bool ) ) );
23
connect( customInput, SIGNAL( valueChanged( double ) ),
24
this, SLOT( angleChanged( double ) ) );
27
void RotationDialogImpl::applyClicked()
32
void RotationDialogImpl::okClicked()
38
void RotationDialogImpl::setAngle( double angle )
40
customInput->setValue( angle );
45
angleGroup->setButton( (int)angle );
46
else if ( angle == 0 )
47
angleGroup->setButton( 1 );
49
angleGroup->setButton( 0 );
52
double RotationDialogImpl::angle()
54
int id = angleGroup->id( angleGroup->selected() );
66
return customInput->value();
70
void RotationDialogImpl::angleChanged( double a )
72
_preview->setAngle( a );
75
void RotationDialogImpl::angleMode( int id )
80
else if ( id == 90 || id == 180 || id == 270 )
83
a = customInput->value();
84
_preview->setAngle( a );
86
#include "rotationdialogimpl.moc"