summaryrefslogtreecommitdiffabout
path: root/kaddressbook/details
Unidiff
Diffstat (limited to 'kaddressbook/details') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/details/detailsviewcontainer.cpp19
-rw-r--r--kaddressbook/details/detailsviewcontainer.h8
-rw-r--r--kaddressbook/details/look_basic.cpp6
-rw-r--r--kaddressbook/details/look_basic.h4
-rw-r--r--kaddressbook/details/look_details.cpp12
-rw-r--r--kaddressbook/details/look_details.h4
-rw-r--r--kaddressbook/details/look_html.cpp6
7 files changed, 31 insertions, 28 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
@@ -19,16 +19,19 @@
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"
@@ -42,32 +45,32 @@
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
@@ -156,9 +159,9 @@ KABC::Addressee ViewContainer::addressee()
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
diff --git a/kaddressbook/details/detailsviewcontainer.h b/kaddressbook/details/detailsviewcontainer.h
index 9684736..f310a30 100644
--- a/kaddressbook/details/detailsviewcontainer.h
+++ b/kaddressbook/details/detailsviewcontainer.h
@@ -21,18 +21,18 @@
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#ifndef DETAILSVIEWCONTAINER_H 24#ifndef DETAILSVIEWCONTAINER_H
25#define DETAILSVIEWCONTAINER_H 25#define DETAILSVIEWCONTAINER_H
26 26
27#include <qptrlist.h> 27#include <q3ptrlist.h>
28 28
29#include "look_basic.h" 29#include "look_basic.h"
30 30
31class QComboBox; 31class QComboBox;
32class QWidgetStack; 32class Q3WidgetStack;
33 33
34class ViewContainer : public QWidget 34class ViewContainer : public QWidget
35{ 35{
36 Q_OBJECT 36 Q_OBJECT
37 37
38 public: 38 public:
@@ -91,13 +91,13 @@ class ViewContainer : public QWidget
91 */ 91 */
92 void registerLooks(); 92 void registerLooks();
93 93
94 private: 94 private:
95 KABC::Addressee mCurrentAddressee; 95 KABC::Addressee mCurrentAddressee;
96 KABBasicLook *mCurrentLook; 96 KABBasicLook *mCurrentLook;
97 QPtrList<KABLookFactory> mLookFactories; 97 Q3PtrList<KABLookFactory> mLookFactories;
98 98
99 QComboBox *mStyleCombo; 99 QComboBox *mStyleCombo;
100 QWidgetStack *mDetailsStack; 100 Q3WidgetStack *mDetailsStack;
101}; 101};
102 102
103#endif 103#endif
diff --git a/kaddressbook/details/look_basic.cpp b/kaddressbook/details/look_basic.cpp
index 0245686..48cc42a 100644
--- a/kaddressbook/details/look_basic.cpp
+++ b/kaddressbook/details/look_basic.cpp
@@ -23,13 +23,13 @@
23 23
24#include <kdebug.h> 24#include <kdebug.h>
25 25
26#include "look_basic.h" 26#include "look_basic.h"
27 27
28KABBasicLook::KABBasicLook( QWidget *parent, const char *name ) 28KABBasicLook::KABBasicLook( QWidget *parent, const char *name )
29 : QVBox( parent, name ), mReadOnly( false ) 29 : Q3VBox( parent, name ), mReadOnly( false )
30{ 30{
31} 31}
32 32
33void KABBasicLook::setReadOnly( bool state ) 33void KABBasicLook::setReadOnly( bool state )
34{ 34{
35 mReadOnly = state; 35 mReadOnly = state;
@@ -67,9 +67,9 @@ KABLookFactory::KABLookFactory( QWidget *parent, const char *name )
67{ 67{
68} 68}
69 69
70KABLookFactory::~KABLookFactory() 70KABLookFactory::~KABLookFactory()
71{ 71{
72} 72}
73#ifndef KAB_EMBEDDED 73#ifndef KAB_EMBEDDED_
74#include "look_basic.moc" 74#include "moc_look_basic.cpp"
75#endif //KAB_EMBEDDED 75#endif //KAB_EMBEDDED
diff --git a/kaddressbook/details/look_basic.h b/kaddressbook/details/look_basic.h
index a65c99c..a70e7f7 100644
--- a/kaddressbook/details/look_basic.h
+++ b/kaddressbook/details/look_basic.h
@@ -22,13 +22,13 @@
22*/ 22*/
23 23
24#ifndef LOOK_KABBASIC_H 24#ifndef LOOK_KABBASIC_H
25#define LOOK_KABBASIC_H 25#define LOOK_KABBASIC_H
26 26
27#include <kabc/addressbook.h> 27#include <kabc/addressbook.h>
28#include <qvbox.h> 28#include <q3vbox.h>
29 29
30class KConfig; 30class KConfig;
31 31
32/** 32/**
33 This is a pure virtual base class that defines the 33 This is a pure virtual base class that defines the
34 interface for how to display and change entries of 34 interface for how to display and change entries of
@@ -38,13 +38,13 @@ class KConfig;
38 Derive it and implement its look and how the user may edit the 38 Derive it and implement its look and how the user may edit the
39 entry. 39 entry.
40 40
41 The paintEvent() has to paint the whole widget, since repaint() 41 The paintEvent() has to paint the whole widget, since repaint()
42 calls will not delete the widgets background. 42 calls will not delete the widgets background.
43 */ 43 */
44class KABBasicLook : public QVBox 44class KABBasicLook : public Q3VBox
45{ 45{
46 Q_OBJECT 46 Q_OBJECT
47 47
48 public: 48 public:
49 /** 49 /**
50 The constructor. 50 The constructor.
diff --git a/kaddressbook/details/look_details.cpp b/kaddressbook/details/look_details.cpp
index 11d06e9..2c3a79d 100644
--- a/kaddressbook/details/look_details.cpp
+++ b/kaddressbook/details/look_details.cpp
@@ -186,16 +186,16 @@ void KABDetailedView::mouseMoveEvent( QMouseEvent *e )
186 setCursor(ArrowCursor); 186 setCursor(ArrowCursor);
187 } 187 }
188} 188}
189 189
190void KABDetailedView::mousePressEvent( QMouseEvent *e ) 190void KABDetailedView::mousePressEvent( QMouseEvent *e )
191{ 191{
192 QPopupMenu menu( this ); 192 Q3PopupMenu menu( this );
193 QPopupMenu *menuBG = new QPopupMenu( &menu ); 193 Q3PopupMenu *menuBG = new Q3PopupMenu( &menu );
194 mMenuBorderedBG = new QPopupMenu( &menu ); 194 mMenuBorderedBG = new Q3PopupMenu( &menu );
195 mMenuTiledBG = new QPopupMenu( &menu ); 195 mMenuTiledBG = new Q3PopupMenu( &menu );
196 196
197 menu.insertItem( i18n( "Select Background" ), menuBG ); 197 menu.insertItem( i18n( "Select Background" ), menuBG );
198 menuBG->insertItem( i18n( "Bordered Backgrounds" ), mMenuBorderedBG ); 198 menuBG->insertItem( i18n( "Bordered Backgrounds" ), mMenuBorderedBG );
199 menuBG->insertItem( i18n( "Tiled Backgrounds" ), mMenuTiledBG ); 199 menuBG->insertItem( i18n( "Tiled Backgrounds" ), mMenuTiledBG );
200 menu.insertSeparator(); 200 menu.insertSeparator();
201 201
@@ -411,9 +411,9 @@ void KABDetailedView::restoreSettings( KConfig *config )
411 mPainter->setHeadLineFont( QFont( gfont, gpointsize + 2, QFont::Bold, true ) ); 411 mPainter->setHeadLineFont( QFont( gfont, gpointsize + 2, QFont::Bold, true ) );
412 mPainter->setBodyFont( QFont( gfont, gpointsize, QFont::Normal, false ) ); 412 mPainter->setBodyFont( QFont( gfont, gpointsize, QFont::Normal, false ) );
413 mPainter->setFixedFont( QFont( ffont, fpointsize, QFont::Normal, false ) ); 413 mPainter->setFixedFont( QFont( ffont, fpointsize, QFont::Normal, false ) );
414 mPainter->setCommentFont( QFont( gfont, gpointsize, QFont::Normal, false ) ); 414 mPainter->setCommentFont( QFont( gfont, gpointsize, QFont::Normal, false ) );
415} 415}
416 416
417#ifndef KAB_EMBEDDED 417#ifndef KAB_EMBEDDED_
418#include "look_details.moc" 418#include "moc_look_details.cpp"
419#endif //KAB_EMBEDDED 419#endif //KAB_EMBEDDED
diff --git a/kaddressbook/details/look_details.h b/kaddressbook/details/look_details.h
index e8d50a9..b59d3a7 100644
--- a/kaddressbook/details/look_details.h
+++ b/kaddressbook/details/look_details.h
@@ -127,14 +127,14 @@ class KABDetailedView : public KABBasicLook
127 KToggleAction *mActionShowURLs; 127 KToggleAction *mActionShowURLs;
128 128
129 const int mGrid; 129 const int mGrid;
130 QStringList mBorders; 130 QStringList mBorders;
131 QStringList mTiles; 131 QStringList mTiles;
132 132
133 QPopupMenu *mMenuBorderedBG; 133 Q3PopupMenu *mMenuBorderedBG;
134 QPopupMenu *mMenuTiledBG; 134 Q3PopupMenu *mMenuTiledBG;
135 135
136 static const QString mBorderedBGDir; 136 static const QString mBorderedBGDir;
137 static const QString mTiledBGDir; 137 static const QString mTiledBGDir;
138}; 138};
139 139
140class KABDetailedViewFactory : public KABLookFactory 140class KABDetailedViewFactory : public KABLookFactory
diff --git a/kaddressbook/details/look_html.cpp b/kaddressbook/details/look_html.cpp
index bb30650..4ec1c7d 100644
--- a/kaddressbook/details/look_html.cpp
+++ b/kaddressbook/details/look_html.cpp
@@ -21,13 +21,13 @@
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 <addresseeview.h> 24#include <addresseeview.h>
25 25
26#include "look_html.h" 26#include "look_html.h"
27#include <qscrollview.h> 27#include <q3scrollview.h>
28#include "kabprefs.h" 28#include "kabprefs.h"
29#include <kabc/addresseeview.h> 29#include <kabc/addresseeview.h>
30KABHtmlView::KABHtmlView( QWidget *parent, const char *name ) 30KABHtmlView::KABHtmlView( QWidget *parent, const char *name )
31 : KABBasicLook( parent, name ) 31 : KABBasicLook( parent, name )
32{ 32{
33 mView = new KABC::AddresseeView( this ); 33 mView = new KABC::AddresseeView( this );
@@ -48,9 +48,9 @@ void KABHtmlView::printMe()
48void KABHtmlView::setAddressee( const KABC::Addressee &addr ) 48void KABHtmlView::setAddressee( const KABC::Addressee &addr )
49{ 49{
50 mView->setFont( KABPrefs::instance()->mDetailsFont ); 50 mView->setFont( KABPrefs::instance()->mDetailsFont );
51 mView->setAddressee( addr ); 51 mView->setAddressee( addr );
52} 52}
53 53
54#ifndef KAB_EMBEDDED 54#ifndef KAB_EMBEDDED_
55#include "look_html.moc" 55#include "moc_look_html.cpp"
56#endif //KAB_EMBEDDED 56#endif //KAB_EMBEDDED