Diffstat (limited to 'kaddressbook/details/detailsviewcontainer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/details/detailsviewcontainer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kaddressbook/details/detailsviewcontainer.cpp b/kaddressbook/details/detailsviewcontainer.cpp index 229cce0..cee5886 100644 --- a/kaddressbook/details/detailsviewcontainer.cpp +++ b/kaddressbook/details/detailsviewcontainer.cpp @@ -49,64 +49,68 @@ ViewContainer::ViewContainer( QWidget *parent, const char* name ) //topLayout->setMargin( KDialog::marginHint() ); //topLayout->setSpacing( KDialog::spacingHint() ); topLayout->setMargin( 0 ); topLayout->setSpacing( 0 ); QBoxLayout *styleLayout = new QHBoxLayout( topLayout ); QLabel *label = new QLabel( i18n("Style:"), this ); styleLayout->addWidget( label ); mStyleCombo = new QComboBox( this ); styleLayout->addWidget( mStyleCombo ); QFrame *frameRuler = new QFrame( this ); //US frameRuler->setFrameShape( QFrame::HLine ); //US frameRuler->setFrameShadow( QFrame::Sunken ); //US topLayout->addWidget( frameRuler ); mDetailsStack = new QWidgetStack( this ); topLayout->addWidget( mDetailsStack, 1 ); registerLooks(); #if 1 // Hide detailed view selection combo box, because we currently have // only one. Reenable it when there are more detailed views. label->hide(); mStyleCombo->hide(); frameRuler->hide(); #endif } +void ViewContainer::printView() +{ + mCurrentLook->printView(); +} KABBasicLook *ViewContainer::currentLook() { return mCurrentLook; } void ViewContainer::registerLooks() { mLookFactories.append( new KABHtmlViewFactory( mDetailsStack ) ); // mLookFactories.append( new KABDetailedViewFactory( mDetailsStack ) ); mStyleCombo->clear(); for ( uint i = 0; i < mLookFactories.count(); ++i ) mStyleCombo->insertItem( mLookFactories.at( i )->description() ); if ( !mLookFactories.isEmpty() ) slotStyleSelected( 0 ); } void ViewContainer::slotStyleSelected( int index ) { #ifndef KAB_EMBEDDED KConfig *config = kapp->config(); #else //KAB_EMBEDDED //US I hope I got the same config object as above expected. KConfig *config = KABPrefs::instance()->getConfig(); #endif //KAB_EMBEDDED KABC::Addressee addr; if ( index >= 0 && index < mStyleCombo->count() ) { if ( mCurrentLook != 0 ) { mCurrentLook->saveSettings( config ); addr = mCurrentLook->addressee(); |