KDevelop API Documentation

qeditor_settings.h

Go to the documentation of this file.
00001 /*
00002  *  Copyright (C) 2003 Roberto Raggi (roberto@kdevelop.org)
00003  *
00004  *  This program is free software; you can redistribute it and/or
00005  *  modify it under the terms of the GNU 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 program 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 General Public License
00015  *  along with this program; 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 
00021 #ifndef __qeditor_settings_h
00022 #define __qeditor_settings_h
00023 
00024 #include <qstring.h>
00025 
00026 class KConfig;
00027 
00028 class QEditorSettings
00029 {
00030 protected:
00031     QEditorSettings( KConfig* config );
00032     void init();
00033     
00034 public:
00035     ~QEditorSettings();
00036     
00037     static QEditorSettings* self();
00038 
00039     KConfig* config() { return m_config; }
00040     const KConfig* config() const { return m_config; }
00041 
00042     void readConfig() { init(); }
00043 
00044     // groups
00045     QString generalGroup() const { return QString::fromLatin1("General"); }
00046 
00047     // settings
00048     bool wordWrap() const { return m_wordWrap; }
00049     void setWordWrap( bool enable );
00050 
00051     int tabStop() const { return m_tabStop; }
00052     void setTabStop( int tabStop );
00053 
00054     bool completeWordWithSpace() const { return m_completeWordWithSpace; }
00055     void setCompleteWordWithSpace( bool enable );
00056 
00057     bool parenthesesMatching() const { return m_parenthesesMatching; }
00058     void setParenthesesMatching( bool enable );
00059 
00060     bool showMarkers() const { return m_showMarkers; }
00061     void setShowMarkers( bool enable );
00062 
00063     bool showLineNumber() const { return m_showLineNumber; }
00064     void setShowLineNumber( bool enable );
00065 
00066     bool showCodeFoldingMarkers() const { return m_showCodeFoldingMarkers; }
00067     void setShowCodeFoldingMarkers( bool enable );
00068 
00069 private:
00070     static QEditorSettings* m_self;
00071     KConfig* m_config;
00072     bool m_wordWrap;
00073     int m_tabStop;
00074     bool m_completeWordWithSpace;
00075     bool m_parenthesesMatching;
00076     bool m_showMarkers;
00077     bool m_showLineNumber;
00078     bool m_showCodeFoldingMarkers;
00079 
00080 private:
00081     QEditorSettings( const QEditorSettings& );
00082     void operator = ( const QEditorSettings& );
00083 };
00084 
00085 
00086 #endif // __qeditor_settings_h
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:03:42 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003