KDevelop API Documentation

qeditor_indenter.h

Go to the documentation of this file.
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 COPYING included in the
00009 ** packaging of this file.
00010 **
00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013 **
00014 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00015 **
00016 ** Contact info@trolltech.com if any conditions of this licensing are
00017 ** not clear to you.
00018 **
00019 **********************************************************************/
00020 
00021 
00022 /*
00023  *  Copyright (C) 2001 Roberto Raggi (roberto@kdevelop.org)
00024  *
00025  *  This program is free software; you can redistribute it and/or
00026  *  modify it under the terms of the GNU General Public
00027  *  License as published by the Free Software Foundation; either
00028  *  version 2 of the License, or (at your option) any later version.
00029  *
00030  *  This program is distributed in the hope that it will be useful,
00031  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00032  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00033  *  General Public License for more details.
00034  *
00035  *  You should have received a copy of the GNU General Public License
00036  *  along with this program; see the file COPYING.  If not, write to
00037  *  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00038  *  Boston, MA 02111-1307, USA.
00039  *
00040  */
00041 
00042 #ifndef QEDITOR_INDENTER_H
00043 #define QEDITOR_INDENTER_H
00044 
00045 #include <qstring.h>
00046 #include <qvariant.h>
00047 #include <qmap.h>
00048 #include <private/qrichtext_p.h>
00049 
00050 class QEditorPart;
00051 class KDialogBase;
00052 class QEditor;
00053 
00054 class QEditorIndenter: public QTextIndent{
00055 public:
00056     QEditorIndenter( QEditor* );
00057     virtual ~QEditorIndenter();
00058 
00059     virtual QWidget* createConfigPage( QEditorPart*, KDialogBase* =0, const char* =0 ) { return 0; }
00060 
00061     virtual const QMap<QString, QVariant>& values() const { return m_values; }
00062     virtual void updateValues( const QMap<QString, QVariant>& values ) { m_values = values; }
00063 
00064     QEditor* editor() const { return m_editor; }
00065     
00066     virtual void tabify( QString& text );
00067     virtual void indentLine( QTextParagraph *p, int &oldIndent, int &newIndent );
00068     virtual int indentation( const QString& s );
00069 
00070     virtual int previousNonBlankLine( int line );
00071     virtual int indentForLine( int line ) = 0;
00072     virtual void indent( QTextDocument*, QTextParagraph*, int* =0, int* =0 );
00073 
00074 protected:
00075     QEditor* m_editor;
00076     QMap<QString, QVariant> m_values;
00077 };
00078 
00079 
00080 #endif
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