kaddressbook

configurecardviewdialog.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 CONFIGURECARDVIEWDIALOG_H
00025 #define CONFIGURECARDVIEWDIALOG_H
00026 
00027 #include "viewconfigurewidget.h"
00028 
00029 #include <tqvbox.h>
00030 #include <tqwidget.h>
00031 #include <tqfont.h>
00032 
00033 class TQString;
00034 class TQWidget;
00035 class TQCheckBox;
00036 class TQLabel;
00037 class KConfig;
00038 
00039 namespace KABC { class AddressBook; }
00040 
00041 class CardViewLookAndFeelPage;
00042 
00048 class ConfigureCardViewWidget : public ViewConfigureWidget
00049 {
00050   public:
00051     ConfigureCardViewWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name );
00052     virtual ~ConfigureCardViewWidget();
00053 
00054     virtual void restoreSettings( KConfig* );
00055     virtual void saveSettings( KConfig* );
00056 
00057   private:
00058     class CardViewLookNFeelPage *mAdvancedPage;
00059 };
00060 
00080 class CardViewLookNFeelPage : public TQVBox {
00081 
00082   Q_OBJECT
00083   TQ_OBJECT
00084 
00085   public:
00086     CardViewLookNFeelPage( TQWidget *parent=0, const char *name=0 );
00087     ~CardViewLookNFeelPage();
00088 
00089     void restoreSettings( KConfig* );
00090     void saveSettings( KConfig* );
00091 
00092   private slots:
00093     void setTextFont();
00094     void setHeaderFont();
00095     void enableFonts();
00096     void enableColors();
00097 
00098   private:
00099     void initGUI();
00100     void updateFontLabel( TQFont, TQLabel * );
00101 
00102     TQCheckBox *cbEnableCustomFonts,
00103               *cbEnableCustomColors,
00104               *cbDrawSeps, *cbDrawBorders,
00105               *cbShowFieldLabels, *cbShowEmptyFields;
00106     class ColorListBox *lbColors;
00107     TQLabel *lTextFont, *lHeaderFont;
00108     class KPushButton *btnFont, *btnHeaderFont;
00109     class TQSpinBox *sbMargin, *sbSpacing, *sbSepWidth;
00110 
00111     class TQWidget *vbFonts;
00112 };
00113 
00114 #endif