128
128
CalPrinter::ePrintOrientation dlgorientation, bool preview )
130
130
if ( !selectedStyle ) {
131
KMessageBox::error( mParent,
132
i18n( "Unable to print, no valid print style was returned." ),
133
i18n( "Printing error" ) );
133
i18nc( "@info", "Unable to print, an invalid print style was specified." ),
134
i18nc( "@title:window", "Printing error" ) );
172
173
QWidget *parent, bool uniqItem )
173
174
: KDialog( parent )
175
setCaption( i18n( "Print" ) );
176
setCaption( i18nc( "@title:window", "Print" ) );
176
177
setButtons( Ok | Cancel );
177
178
setModal( true );
178
179
KVBox *page = new KVBox( this );
181
182
QSplitter *splitter = new QSplitter( page );
182
183
splitter->setOrientation( Qt::Horizontal );
183
184
splitter->setChildrenCollapsible( false );
184
QGroupBox *typeBox = new QGroupBox( i18n( "Print Style" ), splitter );
185
QGroupBox *typeBox = new QGroupBox( i18nc( "@title:group", "Print Style" ), splitter );
185
186
QBoxLayout *typeLayout = new QVBoxLayout( typeBox );
186
187
mTypeGroup = new QButtonGroup( typeBox );
193
194
mConfigArea = new QStackedWidget( splitterRight );
194
195
splitterRightLayout->addWidget( mConfigArea, 0, 0, 1, 2 );
195
QLabel *orientationLabel = new QLabel( i18n( "Page &orientation:" ), splitterRight );
196
QLabel *orientationLabel = new QLabel( i18nc( "@label", "Page &orientation:" ), splitterRight );
196
197
orientationLabel->setAlignment( Qt::AlignRight );
197
198
splitterRightLayout->addWidget( orientationLabel, 1, 0 );
199
200
mOrientationSelection = new KComboBox( splitterRight );
200
mOrientationSelection->addItem( i18n( "Use Default Orientation of Selected Style" ) );
201
mOrientationSelection->addItem( i18n( "Use Printer Default" ) );
202
mOrientationSelection->addItem( i18n( "Portrait" ) );
203
mOrientationSelection->addItem( i18n( "Landscape" ) );
201
mOrientationSelection->setToolTip(
202
i18nc( "@info:tooltip", "Set the print orientation" ) );
203
mOrientationSelection->setWhatsThis(
204
i18nc( "@info:whatsthis",
205
"Choose if you want your output to be printed in \"portrait\" or "
206
"\"landscape\". You can also default to the orientation best suited to "
207
"the selected style or to your printer's default setting." ) );
208
mOrientationSelection->addItem( i18nc( "@item:inlistbox",
209
"Use Default Orientation of Selected Style" ) );
210
mOrientationSelection->addItem( i18nc( "@item:inlistbox",
211
"Use Printer Default" ) );
212
mOrientationSelection->addItem( i18nc( "@item:inlistbox",
214
mOrientationSelection->addItem( i18nc( "@item:inlistbox",
204
216
splitterRightLayout->addWidget( mOrientationSelection, 1, 1 );
206
218
// signals and slots connections
223
235
KOrg::PrintPlugin *p = mapit.value();
224
236
QRadioButton *radioButton = new QRadioButton( p->description() );
225
237
radioButton->setEnabled( p->enabled() );
238
radioButton->setToolTip(
239
i18nc( "@info:tooltip", "Select the type of print" ) );
240
radioButton->setWhatsThis(
241
i18nc( "@info:whatsthis",
242
"Select one of the following types of prints you want to make. "
243
"You may want to print an individual item, or all the items for a "
244
"specific time range (like a day, week or month), or you may want "
245
"to print your to-do list." ) );
226
246
// Check the first available button (to ensure one is selected initially) and then
227
247
// the button matching the desired print type -- if such is available!
228
248
if ( ( firstButton || p->sortID() == initialPrintType ) && p->enabled() ) {
250
270
void CalPrintDialog::setPreview( bool preview )
253
setButtonText( Ok, i18n( "&Preview" ) );
273
setButtonText( Ok, i18nc( "@action:button", "&Preview" ) );
255
275
setButtonText( Ok, KStandardGuiItem::print().text() );