korganizer
Go to the documentation of this file.
26 #include <KLocalizedString>
28 #include <QButtonGroup>
30 #include <QRadioButton>
31 #include <QVBoxLayout>
36 setCaption( i18n(
"Configure Picture of the Day" ) );
37 setButtons( Ok|Cancel );
38 setDefaultButton( Ok );
41 setMainWidget( topFrame );
46 QGroupBox *aspectRatioBox =
new QGroupBox( i18n(
"Thumbnail Aspect Ratio Mode" ), topFrame );
52 btn =
new QRadioButton( i18n(
"Ignore aspect ratio" ), aspectRatioBox );
53 btn->
setWhatsThis( i18n(
"The thumbnail will be scaled freely. "
54 "The aspect ratio will not be preserved." ) );
55 mAspectRatioGroup->
addButton( btn,
int( Qt::IgnoreAspectRatio ) );
57 btn =
new QRadioButton( i18n(
"Keep aspect ratio" ), aspectRatioBox );
58 btn->
setWhatsThis( i18n(
"The thumbnail will be scaled to a rectangle "
59 "as large as possible inside a given rectangle, "
60 "preserving the aspect ratio." ) );
61 mAspectRatioGroup->
addButton( btn,
int( Qt::KeepAspectRatio ) );
63 btn =
new QRadioButton( i18n(
"Keep aspect ratio by expanding" ),
65 btn->
setWhatsThis( i18n(
"The thumbnail will be scaled to a rectangle "
66 "as small as possible outside a given rectangle, "
67 "preserving the aspect ratio." ) );
68 mAspectRatioGroup->
addButton( btn,
int( Qt::KeepAspectRatioByExpanding ) );
71 connect(
this, SIGNAL(okClicked()),
this, SLOT(
slotOk()) );
82 KConfig _config(
QLatin1String(
"korganizerrc"), KConfig::NoGlobals );
83 KConfigGroup config( &_config,
"Calendar/Picoftheday Plugin" );
84 int datenum = config.readEntry(
"AspectRatioMode", 0 );
87 btn = mAspectRatioGroup->
button( 0 );
94 KConfig _config(
QLatin1String(
"korganizerrc"), KConfig::NoGlobals );
95 KConfigGroup config( &_config,
"Calendar/Picoftheday Plugin" );
96 config.writeEntry(
"AspectRatioMode", mAspectRatioGroup->
checkedId() );
void setMargin(int margin)
ConfigDialog(QWidget *parent=0)
void setSpacing(int spacing)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:59 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.