kaddressbook

viewconfigurewidget.h
00001 /*
00002     This file is part of KAddressBook.
00003     Copyright (c) 2002 Mike Pilone <mpilone@slac.com>
00004 
00005     This program is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation; either version 2 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with this program; if not, write to the Free Software
00017     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00018 
00019     As a special exception, permission is given to link this program
00020     with any edition of TQt, and distribute the resulting executable,
00021     without including the source code for TQt in the source distribution.
00022 */
00023 
00024 #ifndef VIEWCONFIGUREWIDGET_H
00025 #define VIEWCONFIGUREWIDGET_H
00026 
00027 #include <kdialogbase.h>
00028 #include <kdepimmacros.h>
00029 #include <tqpixmap.h>
00030 
00031 #include "configurewidget.h"
00032 
00033 class KJanusWidget;
00034 
00035 class TQString;
00036 class TQVBox;
00037 
00038 class ViewConfigureFieldsPage;
00039 class ViewConfigureFilterPage;
00040 
00048 class KDE_EXPORT ViewConfigureWidget : public KAB::ConfigureWidget
00049 {
00050   Q_OBJECT
00051   TQ_OBJECT
00052 
00053   public:
00054     ViewConfigureWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 );
00055     virtual ~ViewConfigureWidget();
00056 
00064     virtual void restoreSettings( KConfig *config );
00065 
00072     virtual void saveSettings( KConfig *config );
00073 
00074 
00078     TQVBox *addPage( const TQString &item, const TQString &header = TQString(),
00079                     const TQPixmap &pixmap = TQPixmap() );
00080 
00081   private:
00082     KJanusWidget *mMainWidget;
00083 
00084     ViewConfigureFieldsPage *mFieldsPage;
00085     ViewConfigureFilterPage *mFilterPage;
00086 };
00087 
00088 class ViewConfigureDialog : public KDialogBase
00089 {
00090   Q_OBJECT
00091   TQ_OBJECT
00092 
00093   public:
00094     ViewConfigureDialog( ViewConfigureWidget *wdg, const TQString &viewName,
00095                          TQWidget *parent, const char *name = 0 );
00096     ~ViewConfigureDialog();
00097 
00098     void restoreSettings( KConfig* );
00099     void saveSettings( KConfig* );
00100 
00101   protected slots:
00102     void slotHelp();
00103 
00104   private:
00105     ViewConfigureWidget *mConfigWidget;
00106 };
00107 
00108 #endif