summaryrefslogtreecommitdiffabout
path: root/kaddressbook/viewconfigurewidget.cpp
Unidiff
Diffstat (limited to 'kaddressbook/viewconfigurewidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/viewconfigurewidget.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/kaddressbook/viewconfigurewidget.cpp b/kaddressbook/viewconfigurewidget.cpp
index 666e188..047df8c 100644
--- a/kaddressbook/viewconfigurewidget.cpp
+++ b/kaddressbook/viewconfigurewidget.cpp
@@ -19,50 +19,53 @@
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 24
25#ifndef KAB_EMBEDDED 25#ifndef KAB_EMBEDDED
26 26
27#include <qvbox.h> 27#include <q3vbox.h>
28 28
29#include <kapplication.h> 29#include <kapplication.h>
30#include <kconfig.h> 30#include <kconfig.h>
31#include <kdebug.h> 31#include <kdebug.h>
32#include <kiconloader.h> 32#include <kiconloader.h>
33 33
34#include "viewmanager.h" 34#include "viewmanager.h"
35 35
36#endif //KAB_EMBEDDED 36#endif //KAB_EMBEDDED
37 37
38 38
39#include <qlayout.h> 39#include <qlayout.h>
40//Added by qt3to4:
41#include <Q3VBoxLayout>
42#include <QPixmap>
40 43
41#include <kjanuswidget.h> 44#include <kjanuswidget.h>
42#include <kglobal.h> 45#include <kglobal.h>
43#include <klocale.h> 46#include <klocale.h>
44 47
45#include "viewconfigurewidget.h" 48#include "viewconfigurewidget.h"
46#include "viewconfigurefieldspage.h" 49#include "viewconfigurefieldspage.h"
47#include "viewconfigurefilterpage.h" 50#include "viewconfigurefilterpage.h"
48 51
49ViewConfigureWidget::ViewConfigureWidget( KABC::AddressBook *ab, QWidget *parent, 52ViewConfigureWidget::ViewConfigureWidget( KABC::AddressBook *ab, QWidget *parent,
50 const char *name ) 53 const char *name )
51 : ConfigureWidget( ab, parent, name ) 54 : ConfigureWidget( ab, parent, name )
52{ 55{
53 QVBoxLayout *topLayout = new QVBoxLayout( this ); 56 Q3VBoxLayout *topLayout = new Q3VBoxLayout( this );
54 57
55 mMainWidget = new KJanusWidget( this, "JanusWidget", KJanusWidget::Tabbed ); 58 mMainWidget = new KJanusWidget( this, "JanusWidget", KJanusWidget::Tabbed );
56 59
57 topLayout->addWidget( mMainWidget ); 60 topLayout->addWidget( mMainWidget );
58 61
59 // Add the first page, the attributes 62 // Add the first page, the attributes
60 QVBox *page = addPage( i18n( "Fields" ), QString::null, 63 Q3VBox *page = addPage( i18n( "Fields" ), QString::null,
61 KGlobal::iconLoader()->loadIcon( "view_detailed", 64 KGlobal::iconLoader()->loadIcon( "view_detailed",
62 KIcon::Panel, 16 ) ); 65 KIcon::Panel, 16 ) );
63 66
64 67
65 // Add the select fields page 68 // Add the select fields page
66 mFieldsPage = new ViewConfigureFieldsPage( addressBook(), (QWidget*)page ); 69 mFieldsPage = new ViewConfigureFieldsPage( addressBook(), (QWidget*)page );
67 70
68//US mFieldsPage->setMinimumSize(300,300); 71//US mFieldsPage->setMinimumSize(300,300);
@@ -88,23 +91,23 @@ void ViewConfigureWidget::restoreSettings( KConfig *config )
88} 91}
89 92
90void ViewConfigureWidget::saveSettings( KConfig *config ) 93void ViewConfigureWidget::saveSettings( KConfig *config )
91{ 94{
92 mFieldsPage->saveSettings( config ); 95 mFieldsPage->saveSettings( config );
93 mFilterPage->saveSettings( config ); 96 mFilterPage->saveSettings( config );
94} 97}
95 98
96QVBox *ViewConfigureWidget::addPage( const QString &item, const QString &header, 99Q3VBox *ViewConfigureWidget::addPage( const QString &item, const QString &header,
97 const QPixmap &pixmap ) 100 const QPixmap &pixmap )
98{ 101{
99 return mMainWidget->addVBoxPage( item, header, pixmap ); 102 return mMainWidget->addVBoxPage( item, header, pixmap );
100} 103}
101 104
102#include <qframe.h> 105#include <q3frame.h>
103#include <qlabel.h> 106#include <qlabel.h>
104#include <qlayout.h> 107#include <qlayout.h>
105#include <stdlib.h> 108#include <stdlib.h>
106 109
107ViewConfigureDialog::ViewConfigureDialog( ViewConfigureWidget *wdg, const QString &viewName, 110ViewConfigureDialog::ViewConfigureDialog( ViewConfigureWidget *wdg, const QString &viewName,
108 QWidget *parent, const char *name ) 111 QWidget *parent, const char *name )
109 : KDialogBase( Swallow, i18n( "Modify View: " ) + viewName, Help | Ok | Cancel, 112 : KDialogBase( Swallow, i18n( "Modify View: " ) + viewName, Help | Ok | Cancel,
110 Ok, parent, name, true, true ), mConfigWidget( wdg ) 113 Ok, parent, name, true, true ), mConfigWidget( wdg )
@@ -147,13 +150,11 @@ void ViewConfigureDialog::slotHelp()
147{ 150{
148#ifndef KAB_EMBEDDED 151#ifndef KAB_EMBEDDED
149 kapp->invokeHelp( "using-views" ); 152 kapp->invokeHelp( "using-views" );
150#else //KAB_EMBEDDED 153#else //KAB_EMBEDDED
151 qDebug("ViewConfigureDialog::slotHelp not yet implemented"); 154 qDebug("ViewConfigureDialog::slotHelp not yet implemented");
152#endif //KAB_EMBEDDED 155#endif //KAB_EMBEDDED
153} 156}
154 157
155#ifndef KAB_EMBEDDED 158#ifndef KAB_EMBEDDED_
156#include "viewconfigurewidget.moc" 159#include "moc_viewconfigurewidget.cpp"
157#endif //KAB_EMBEDDED 160#endif //KAB_EMBEDDED
158
159