summaryrefslogtreecommitdiffabout
path: root/kaddressbook/details/detailsviewcontainer.cpp
Unidiff
Diffstat (limited to 'kaddressbook/details/detailsviewcontainer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/details/detailsviewcontainer.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/kaddressbook/details/detailsviewcontainer.cpp b/kaddressbook/details/detailsviewcontainer.cpp
index cee5886..4a86aca 100644
--- a/kaddressbook/details/detailsviewcontainer.cpp
+++ b/kaddressbook/details/detailsviewcontainer.cpp
@@ -13,67 +13,70 @@
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qcombobox.h> 24#include <qcombobox.h>
25#include <qframe.h> 25#include <q3frame.h>
26#include <qlabel.h> 26#include <qlabel.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qwidgetstack.h> 28#include <q3widgetstack.h>
29//Added by qt3to4:
30#include <Q3HBoxLayout>
31#include <Q3VBoxLayout>
29 32
30#include <kapplication.h> 33#include <kapplication.h>
31#include <kdebug.h> 34#include <kdebug.h>
32#include <kdialog.h> 35#include <kdialog.h>
33 36
34#include "look_basic.h" 37#include "look_basic.h"
35//#include "look_details.h" 38//#include "look_details.h"
36#include "look_html.h" 39#include "look_html.h"
37 40
38#ifdef KAB_EMBEDDED 41#ifdef KAB_EMBEDDED
39#include "kabprefs.h" 42#include "kabprefs.h"
40#endif //KAB_EMBEDDED 43#endif //KAB_EMBEDDED
41 44
42 45
43#include "detailsviewcontainer.h" 46#include "detailsviewcontainer.h"
44 47
45ViewContainer::ViewContainer( QWidget *parent, const char* name ) 48ViewContainer::ViewContainer( QWidget *parent, const char* name )
46 : QWidget( parent, name ), mCurrentLook( 0 ) 49 : QWidget( parent, name ), mCurrentLook( 0 )
47{ 50{
48 QBoxLayout *topLayout = new QVBoxLayout( this ); 51 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
49 //topLayout->setMargin( KDialog::marginHint() ); 52 //topLayout->setMargin( KDialog::marginHint() );
50 //topLayout->setSpacing( KDialog::spacingHint() ); 53 //topLayout->setSpacing( KDialog::spacingHint() );
51 topLayout->setMargin( 0 ); 54 topLayout->setMargin( 0 );
52 topLayout->setSpacing( 0 ); 55 topLayout->setSpacing( 0 );
53 56
54 QBoxLayout *styleLayout = new QHBoxLayout( topLayout ); 57 Q3BoxLayout *styleLayout = new Q3HBoxLayout( topLayout );
55 58
56 QLabel *label = new QLabel( i18n("Style:"), this ); 59 QLabel *label = new QLabel( i18n("Style:"), this );
57 styleLayout->addWidget( label ); 60 styleLayout->addWidget( label );
58 61
59 mStyleCombo = new QComboBox( this ); 62 mStyleCombo = new QComboBox( this );
60 styleLayout->addWidget( mStyleCombo ); 63 styleLayout->addWidget( mStyleCombo );
61 64
62 QFrame *frameRuler = new QFrame( this ); 65 Q3Frame *frameRuler = new Q3Frame( this );
63//US frameRuler->setFrameShape( QFrame::HLine ); 66//US frameRuler->setFrameShape( QFrame::HLine );
64//US frameRuler->setFrameShadow( QFrame::Sunken ); 67//US frameRuler->setFrameShadow( QFrame::Sunken );
65//US topLayout->addWidget( frameRuler ); 68//US topLayout->addWidget( frameRuler );
66 69
67 mDetailsStack = new QWidgetStack( this ); 70 mDetailsStack = new Q3WidgetStack( this );
68 topLayout->addWidget( mDetailsStack, 1 ); 71 topLayout->addWidget( mDetailsStack, 1 );
69 72
70 registerLooks(); 73 registerLooks();
71 74
72#if 1 75#if 1
73 // Hide detailed view selection combo box, because we currently have 76 // Hide detailed view selection combo box, because we currently have
74 // only one. Reenable it when there are more detailed views. 77 // only one. Reenable it when there are more detailed views.
75 label->hide(); 78 label->hide();
76 mStyleCombo->hide(); 79 mStyleCombo->hide();
77 frameRuler->hide(); 80 frameRuler->hide();
78#endif 81#endif
79} 82}
@@ -150,15 +153,15 @@ KABC::Addressee ViewContainer::addressee()
150 if ( !mCurrentLook ) 153 if ( !mCurrentLook )
151 return empty; 154 return empty;
152 else 155 else
153 return mCurrentLook->addressee(); 156 return mCurrentLook->addressee();
154} 157}
155 158
156void ViewContainer::setReadOnly( bool state ) 159void ViewContainer::setReadOnly( bool state )
157{ 160{
158 if ( mCurrentLook ) 161 if ( mCurrentLook )
159 mCurrentLook->setReadOnly( state ); 162 mCurrentLook->setReadOnly( state );
160} 163}
161 164
162#ifndef KAB_EMBEDDED 165#ifndef KAB_EMBEDDED_
163#include "detailsviewcontainer.moc" 166#include "moc_detailsviewcontainer.cpp"
164#endif //KAB_EMBEDDED 167#endif //KAB_EMBEDDED