summaryrefslogtreecommitdiffabout
path: root/korganizer/calprinter.cpp
authorzautrix <zautrix>2005-03-08 09:24:53 (UTC)
committer zautrix <zautrix>2005-03-08 09:24:53 (UTC)
commit91e7aeec0b15d28eb263c0699fdce4a00a3669c6 (patch) (side-by-side diff)
tree10bf2d72c94ab030c7a08b22d0880997c99dcfff /korganizer/calprinter.cpp
parenta50b432c475d2a0b97b3f8707666f7d2990cd8db (diff)
downloadkdepimpi-91e7aeec0b15d28eb263c0699fdce4a00a3669c6.zip
kdepimpi-91e7aeec0b15d28eb263c0699fdce4a00a3669c6.tar.gz
kdepimpi-91e7aeec0b15d28eb263c0699fdce4a00a3669c6.tar.bz2
todo printing fixes
Diffstat (limited to 'korganizer/calprinter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calprinter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/calprinter.cpp b/korganizer/calprinter.cpp
index 6b5b0fe..0cdf28e 100644
--- a/korganizer/calprinter.cpp
+++ b/korganizer/calprinter.cpp
@@ -86,97 +86,97 @@ void CalPrinter::init( KPrinter *printer, Calendar *calendar )
mPrintDialog = new CalPrintDialog( mPrintPlugins, mPrinter, mParent );
CalPrintBase *plug = mPrintPlugins.first();
while ( plug ) {
connect( mPrintDialog, SIGNAL( okClicked() ),
plug, SLOT( readSettingsWidget() ) );
plug->doLoadConfig();
plug = mPrintPlugins.next();
}
}
void CalPrinter::setupPrinter()
{
KMessageBox::sorry( mParent, i18n("Not implemented.") );
#if 0
KOPrefsDialog *optionsDlg = new KOPrefsDialog(mParent);
optionsDlg->readConfig();
optionsDlg->showPrinterTab();
connect(optionsDlg, SIGNAL(configChanged()),
mParent, SLOT(updateConfig()));
optionsDlg->show();
#endif
}
void CalPrinter::setDateRange( const QDate &fd, const QDate &td )
{
CalPrintBase *plug = mPrintPlugins.first();
while ( plug ) {
plug->setDateRange( fd, td );
plug = mPrintPlugins.next();
}
}
void CalPrinter::preview( PrintType type, const QDate &fd, const QDate &td )
{
mPrintDialog->setPreview( true );
mPrintDialog->setPrintType( int( type ) );
setDateRange( fd, td );
if ( mPrintDialog->exec() == QDialog::Accepted ) {
doPrint( mPrintDialog->selectedPlugin(), true );
}
}
void CalPrinter::print( PrintType type, const QDate &fd, const QDate &td )
{
- mPrintDialog->resize( 640, 380 );
+ mPrintDialog->resize( 640, 440 );
mPrintDialog->setPreview( false );
mPrintDialog->setPrintType( int( type ) );
setDateRange( fd, td );
if ( mPrintDialog->exec() == QDialog::Accepted ) {
doPrint( mPrintDialog->selectedPlugin(), false );
}
}
void CalPrinter::doPrint( CalPrintBase *selectedStyle, bool preview )
{
// FIXME: add a better caption to the Printingdialog
//mPrinter->setPreviewOnly( preview );
if ( preview || mPrinter->setup( mParent ) ) {
switch ( mPrintDialog->orientation() ) {
case eOrientPlugin:
mPrinter->setOrientation( selectedStyle->orientation());
break;
case eOrientPortrait:
mPrinter->setOrientation( KPrinter::Portrait );
break;
case eOrientLandscape:
mPrinter->setOrientation( KPrinter::Landscape );
break;
case eOrientPrinter:
default:
break;
}
selectedStyle->doPrint();
}
//mPrinter->setPreviewOnly( false );
}
///////////////////////////////////////////////////////////////////////////////
void CalPrinter::updateConfig()
{
}
/****************************************************************************/
CalPrintDialog::CalPrintDialog( QPtrList<CalPrintBase> plugins, KPrinter *p,
QWidget *parent, const char *name )
: KDialogBase( parent, name, /*modal*/true, i18n("Print"), Ok | Cancel ),
mPrinter( p ), mPrintPlugins( plugins )
{
QVBox *page = new QVBox(this);//makeVBoxMainWidget();