konq_propsview.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __konq_viewprops_h__
00021 #define __konq_viewprops_h__
00022
00023 #include <qpixmap.h>
00024 #include <qstringlist.h>
00025
00026 #include <kurl.h>
00027
00028 class KInstance;
00029 class KConfigBase;
00030 class KConfig;
00031
00043 class KonqPropsView
00044 {
00045 public:
00046
00053 KonqPropsView( KInstance * instance, KonqPropsView * defaultProps );
00054
00056 virtual ~KonqPropsView();
00057
00061 bool isDefaultProperties() const {
00062
00063 return m_defaultProps == 0L;
00064 }
00065
00073 bool enterDir( const KURL & dir );
00074
00079 void setSaveViewPropertiesLocally( bool value );
00080
00082
00083 void setIconSize( int size );
00084 int iconSize() const { return m_iIconSize; }
00085
00086 void setItemTextPos( int pos );
00087 int itemTextPos() const { return m_iItemTextPos; }
00088
00089 void setShowingDotFiles( bool show );
00090 bool isShowingDotFiles() const { return m_bShowDot; }
00091
00092 void setCaseInsensitiveSort( bool show );
00093 bool isCaseInsensitiveSort() const;
00094
00095 void setShowingDirectoryOverlays( bool show );
00096 bool isShowingDirectoryOverlays() const { return m_bShowDirectoryOverlays; }
00097
00098 void setShowingPreview( const QString &preview, bool show );
00099 void setShowingPreview( bool show );
00100 bool isShowingPreview( const QString &preview ) const { return ! m_dontPreview.contains(preview); }
00101 bool isShowingPreview();
00102 const QStringList &previewSettings();
00103
00104 void setBgColor( const QColor & color );
00105 const QColor& bgColor(QWidget * widget) const;
00106 void setTextColor( const QColor & color );
00107 const QColor& textColor(QWidget * widget) const;
00108 void setBgPixmapFile( const QString & file );
00109 const QString& bgPixmapFile() const { return m_bgPixmapFile; }
00110
00111
00112 void applyColors( QWidget * widget ) const;
00113
00114 protected:
00115
00116 QPixmap loadPixmap() const;
00117
00118
00119 KConfigBase * currentConfig();
00120
00121
00122 KConfigBase * currentColorConfig();
00123
00124 QString currentGroup() const {
00125 return isDefaultProperties() ? "Settings" : "URL properties";
00126 }
00127
00128 private:
00129
00130
00131 int m_iIconSize;
00132 int m_iItemTextPos;
00133 bool m_bShowDot;
00134 bool m_bShowDirectoryOverlays;
00135 QStringList m_dontPreview;
00136 QColor m_textColor;
00137 QColor m_bgColor;
00138 QString m_bgPixmapFile;
00139
00140
00141 QString dotDirectory;
00142
00143 bool m_bSaveViewPropertiesLocally;
00144
00145
00146 bool m_dotDirExists;
00147
00148
00149
00150
00151
00152
00153 KConfigBase * m_currentConfig;
00154
00155
00156
00157
00158 KonqPropsView * m_defaultProps;
00159
00164 struct Private;
00165
00166 Private *d;
00167
00168 private:
00169 KonqPropsView( const KonqPropsView & );
00170 KonqPropsView();
00171 };
00172
00173
00174 #endif
This file is part of the documentation for kdelibs Version 3.1.5.