libkonq Library API Documentation

konq_settings.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 1999 David Faure <faure@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00017    Boston, MA 02111-1307, USA.
00018 */
00019 
00020 #ifndef __konq_settings_h__
00021 #define __konq_settings_h__
00022 
00023 class KConfig;
00024 #include <qcolor.h>
00025 #include <qstring.h>
00026 #include <qfont.h>
00027 #include <qmap.h>
00028 
00042 class KonqFMSettings
00043 {
00044 protected:
00049   KonqFMSettings( KConfig * config );
00050 
00052   virtual ~KonqFMSettings();
00053 
00054 public:
00055 
00059   static KonqFMSettings * settings();
00060 
00068   static void reparseConfiguration();
00069 
00070   // Use settings (and mimetype definition files)
00071   // to find whether to embed a certain service type or not
00072   // Only makes sense in konqueror.
00073   bool shouldEmbed( const QString & serviceType ) const;
00074 
00075   // Behaviour settings
00076   bool wordWrapText() const { return m_bWordWrapText; }
00077   bool underlineLink() const { return m_underlineLink; }
00078   bool fileSizeInBytes() const { return m_fileSizeInBytes; }
00079   bool alwaysNewWin() const { return m_alwaysNewWin; }
00080   const QString & homeURL() const { return m_homeURL; }
00081   
00082   bool showFileTips() const {return m_showFileTips; }
00083   bool showPreviewsInFileTips() const;
00084   int numFileTips() const {return m_numFileTips; }
00085 
00086   // Font settings
00087   const QFont& standardFont() const { return m_standardFont; }
00088 
00089   // Color settings
00090   const QColor& normalTextColor() const { return m_normalTextColor; }
00091   const QColor& highlightedTextColor() const { return m_highlightedTextColor; }
00092   const QColor& itemTextBackground() const { return m_itemTextBackground; }
00093 
00094   int textPreviewIconTransparency() const { return m_iconTransparency; }
00095     
00096 private:
00097 
00098   static KonqFMSettings * s_pSettings;
00099 
00100   bool m_underlineLink;
00101   bool m_fileSizeInBytes;
00102   bool m_alwaysNewWin;
00103   bool m_bTreeFollow;
00104 
00105   QMap<QString, QString> m_embedMap;
00106 
00107   QFont m_standardFont;
00108 
00109   QColor m_normalTextColor;
00110   QColor m_highlightedTextColor;
00111   QColor m_itemTextBackground;
00112 
00113   bool m_bWordWrapText;
00114 
00115   QString m_homeURL;
00116   bool m_showFileTips;
00117   int  m_numFileTips;
00118 
00119   // used for the textpreview
00120   int m_iconTransparency;
00121     
00123   void init( KConfig * config );
00124 
00125   struct KonqFMSettingsPrivate * d;
00126 
00127   // There is no default constructor. Use the provided ones.
00128   KonqFMSettings();
00129   // No copy constructor either. What for ?
00130   KonqFMSettings( const KonqFMSettings &);
00131 };
00132 
00133 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Thu Jan 29 23:03:28 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001