summaryrefslogtreecommitdiffabout
path: root/kaddressbook/details/detailsviewcontainer.cpp
Unidiff
Diffstat (limited to 'kaddressbook/details/detailsviewcontainer.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/details/detailsviewcontainer.cpp4
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
@@ -57,48 +57,52 @@ ViewContainer::ViewContainer( QWidget *parent, const char* name )
57 styleLayout->addWidget( label ); 57 styleLayout->addWidget( label );
58 58
59 mStyleCombo = new QComboBox( this ); 59 mStyleCombo = new QComboBox( this );
60 styleLayout->addWidget( mStyleCombo ); 60 styleLayout->addWidget( mStyleCombo );
61 61
62 QFrame *frameRuler = new QFrame( this ); 62 QFrame *frameRuler = new QFrame( this );
63//US frameRuler->setFrameShape( QFrame::HLine ); 63//US frameRuler->setFrameShape( QFrame::HLine );
64//US frameRuler->setFrameShadow( QFrame::Sunken ); 64//US frameRuler->setFrameShadow( QFrame::Sunken );
65//US topLayout->addWidget( frameRuler ); 65//US topLayout->addWidget( frameRuler );
66 66
67 mDetailsStack = new QWidgetStack( this ); 67 mDetailsStack = new QWidgetStack( this );
68 topLayout->addWidget( mDetailsStack, 1 ); 68 topLayout->addWidget( mDetailsStack, 1 );
69 69
70 registerLooks(); 70 registerLooks();
71 71
72#if 1 72#if 1
73 // Hide detailed view selection combo box, because we currently have 73 // Hide detailed view selection combo box, because we currently have
74 // only one. Reenable it when there are more detailed views. 74 // only one. Reenable it when there are more detailed views.
75 label->hide(); 75 label->hide();
76 mStyleCombo->hide(); 76 mStyleCombo->hide();
77 frameRuler->hide(); 77 frameRuler->hide();
78#endif 78#endif
79} 79}
80 80
81void ViewContainer::printView()
82{
83 mCurrentLook->printView();
84}
81KABBasicLook *ViewContainer::currentLook() 85KABBasicLook *ViewContainer::currentLook()
82{ 86{
83 return mCurrentLook; 87 return mCurrentLook;
84} 88}
85 89
86void ViewContainer::registerLooks() 90void ViewContainer::registerLooks()
87{ 91{
88 mLookFactories.append( new KABHtmlViewFactory( mDetailsStack ) ); 92 mLookFactories.append( new KABHtmlViewFactory( mDetailsStack ) );
89// mLookFactories.append( new KABDetailedViewFactory( mDetailsStack ) ); 93// mLookFactories.append( new KABDetailedViewFactory( mDetailsStack ) );
90 mStyleCombo->clear(); 94 mStyleCombo->clear();
91 95
92 for ( uint i = 0; i < mLookFactories.count(); ++i ) 96 for ( uint i = 0; i < mLookFactories.count(); ++i )
93 mStyleCombo->insertItem( mLookFactories.at( i )->description() ); 97 mStyleCombo->insertItem( mLookFactories.at( i )->description() );
94 98
95 if ( !mLookFactories.isEmpty() ) 99 if ( !mLookFactories.isEmpty() )
96 slotStyleSelected( 0 ); 100 slotStyleSelected( 0 );
97} 101}
98 102
99void ViewContainer::slotStyleSelected( int index ) 103void ViewContainer::slotStyleSelected( int index )
100{ 104{
101#ifndef KAB_EMBEDDED 105#ifndef KAB_EMBEDDED
102 KConfig *config = kapp->config(); 106 KConfig *config = kapp->config();
103#else //KAB_EMBEDDED 107#else //KAB_EMBEDDED
104 //US I hope I got the same config object as above expected. 108 //US I hope I got the same config object as above expected.