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 #include <libkonq_export.h>
00029 
00043 class LIBKONQ_EXPORT KonqFMSettings
00044 {
00045 protected:
00050   KonqFMSettings( KConfig * config );
00051 
00053   virtual ~KonqFMSettings();
00054 
00055 public:
00056 
00060   static KonqFMSettings * settings();
00061 
00069   static void reparseConfiguration();
00070 
00071   // Use settings (and mimetype definition files)
00072   // to find whether to embed a certain service type or not
00073   // Only makes sense in konqueror.
00074   bool shouldEmbed( const QString & serviceType ) const;
00075 
00076   // Behaviour settings
00077   bool wordWrapText() const { return m_bWordWrapText; }
00078   int iconTextHeight() const { return m_iconTextHeight; }
00079   bool underlineLink() const { return m_underlineLink; }
00080   bool fileSizeInBytes() const { return m_fileSizeInBytes; }
00081   bool alwaysNewWin() const { return m_alwaysNewWin; }
00082   const QString & homeURL() const { return m_homeURL; }
00083 
00084   bool showFileTips() const {return m_showFileTips; }
00085   bool showPreviewsInFileTips() const;
00086   int numFileTips() const {return m_numFileTips; }
00087     bool renameIconDirectly() const;
00088 
00089   // Font settings
00090   const QFont& standardFont() const { return m_standardFont; }
00091 
00092   // Color settings
00093   const QColor& normalTextColor() const { return m_normalTextColor; }
00094   const QColor& highlightedTextColor() const { return m_highlightedTextColor; }
00095   const QColor& itemTextBackground() const { return m_itemTextBackground; }
00096 
00097   int textPreviewIconTransparency() const { return m_iconTransparency; }
00098 
00099   int caseSensitiveCompare( const QString& a, const QString& b ) const;
00100 
00101 private:
00102 
00103   static KonqFMSettings * s_pSettings;
00104 
00105   bool m_underlineLink;
00106   bool m_fileSizeInBytes;
00107   bool m_alwaysNewWin;
00108   bool m_bTreeFollow;
00109 
00110   QMap<QString, QString> m_embedMap;
00111 
00112   QFont m_standardFont;
00113 
00114   QColor m_normalTextColor;
00115   QColor m_highlightedTextColor;
00116   QColor m_itemTextBackground;
00117 
00118   bool m_bWordWrapText;
00119   int m_iconTextHeight;
00120 
00121   QString m_homeURL;
00122   bool m_showFileTips;
00123   int  m_numFileTips;
00124 
00125   // used for the textpreview
00126   int m_iconTransparency;
00127 
00129   void init( KConfig * config );
00130 
00131   struct KonqFMSettingsPrivate * d;
00132 
00133   // There is no default constructor. Use the provided ones.
00134   KonqFMSettings();
00135   // No copy constructor either. What for ?
00136   KonqFMSettings( const KonqFMSettings &);
00137 };
00138 
00139 #endif
KDE Logo
This file is part of the documentation for libkonq Library Version 3.3.90.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Apr 5 03:59:20 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003