Eneboo - Documentación para desarrolladores
|
00001 /********************************************************************** 00002 ** Copyright (C) 2000 Trolltech AS. All rights reserved. 00003 ** 00004 ** This file is part of Qt Designer. 00005 ** 00006 ** This file may be distributed and/or modified under the terms of the 00007 ** GNU General Public License version 2 as published by the Free Software 00008 ** Foundation and appearing in the file LICENSE.GPL included in the 00009 ** packaging of this file. 00010 ** 00011 ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition 00012 ** licenses may use this file in accordance with the Qt Commercial License 00013 ** Agreement provided with the Software. 00014 ** 00015 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00016 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00017 ** 00018 ** See http://www.trolltech.com/gpl/ for GPL licensing information. 00019 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for 00020 ** information about Qt Commercial License Agreements. 00021 ** 00022 ** Contact info@trolltech.com if any conditions of this licensing are 00023 ** not clear to you. 00024 ** 00025 **********************************************************************/ 00026 00027 #ifndef CONF_H 00028 #define CONF_H 00029 00030 #include <qfont.h> 00031 #include <qcolor.h> 00032 #include <qmap.h> 00033 00034 struct ConfigStyle 00035 { 00036 QFont font; 00037 QColor color; 00038 00039 Q_DUMMY_COMPARISON_OPERATOR( ConfigStyle ) 00040 }; 00041 00042 struct Config 00043 { 00044 QMap<QString, ConfigStyle> styles; 00045 bool hasCompletion, hasParenMatching, hasWordWrap; 00046 00047 static QMap<QString, ConfigStyle> defaultStyles(); 00048 static QMap<QString, ConfigStyle> readStyles( const QString &path ); 00049 static void saveStyles( const QMap<QString, ConfigStyle> &styles, const QString &path ); 00050 static bool completion( const QString &path ); 00051 static bool wordWrap( const QString &path ); 00052 static bool parenMatching( const QString &path ); 00053 static int indentTabSize( const QString &path ); 00054 static int indentIndentSize( const QString &path ); 00055 static bool indentKeepTabs( const QString &path ); 00056 static bool indentAutoIndent( const QString &path ); 00057 00058 static void setCompletion( bool b, const QString &path ); 00059 static void setWordWrap( bool b, const QString &path ); 00060 static void setParenMatching( bool b,const QString &path ); 00061 static void setIndentTabSize( int s, const QString &path ); 00062 static void setIndentIndentSize( int s, const QString &path ); 00063 static void setIndentKeepTabs( bool b, const QString &path ); 00064 static void setIndentAutoIndent( bool b, const QString &path ); 00065 00066 }; 00067 00068 #endif