Eneboo - Documentación para desarrolladores
src/qt/tools/designer/plugins/cppeditor/editorinterfaceimpl.h
Ir a la documentación de este archivo.
00001 /**********************************************************************
00002 **
00003 ** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
00004 **
00005 ** This file is part of Qt Designer.
00006 **
00007 ** This file may be distributed and/or modified under the terms of the
00008 ** GNU General Public License version 2 as published by the Free Software
00009 ** Foundation and appearing in the file LICENSE.GPL included in the
00010 ** packaging of this file.
00011 **
00012 ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
00013 ** licenses may use this file in accordance with the Qt Commercial License
00014 ** Agreement provided with the Software.
00015 **
00016 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00017 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00018 **
00019 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00020 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
00021 **   information about Qt Commercial License Agreements.
00022 **
00023 ** Contact info@trolltech.com if any conditions of this licensing are
00024 ** not clear to you.
00025 **
00026 **********************************************************************/
00027 
00028 #ifndef EDITORINTERFACEIMPL_H
00029 #define EDITORINTERFACEIMPL_H
00030 
00031 #include <editorinterface.h>
00032 #include <qobject.h>
00033 #include <qguardedptr.h>
00034 
00035 class QTimer;
00036 class ViewManager;
00037 struct DesignerInterface;
00038 
00039 class EditorInterfaceImpl : public QObject, public EditorInterface
00040 {
00041     Q_OBJECT
00042 
00043 public:
00044     EditorInterfaceImpl();
00045     virtual ~EditorInterfaceImpl();
00046 
00047     QRESULT queryInterface( const QUuid&, QUnknownInterface** );
00048     Q_REFCOUNT;
00049 
00050     QWidget *editor( bool readonly, QWidget *parent, QUnknownInterface *designerIface );
00051 
00052     void setText( const QString &txt );
00053     QString text() const;
00054     bool isUndoAvailable() const;
00055     bool isRedoAvailable() const;
00056     void undo();
00057     void redo();
00058     void cut();
00059     void copy();
00060     void paste();
00061     void selectAll();
00062     bool find( const QString &expr, bool cs, bool wo, bool forward, bool startAtCursor );
00063     bool replace( const QString &find, const QString &replace, bool cs, bool wo, bool forward, bool startAtCursor, bool replaceAll );
00064     void gotoLine( int line );
00065     void indent();
00066     void scrollTo( const QString &txt, const QString &first );
00067     void splitView();
00068     void setContext( QObject *this_ );
00069     void readSettings();
00070 
00071     void setError( int line );
00072     void setStep( int ) {}
00073     void clearStep() {}
00074     void setModified( bool m );
00075     bool isModified() const;
00076     void setMode( Mode ) {}
00077 
00078     int numLines() const;
00079     void breakPoints( QValueList<uint> & ) const {}
00080     void setBreakPoints( const QValueList<uint> & ) {}
00081     void onBreakPointChange( QObject *receiver, const char *slot );
00082     void clearStackFrame() {}
00083     void setStackFrame( int ) {}
00084 
00085 protected:
00086     bool eventFilter( QObject*, QEvent* );
00087 
00088 private slots:
00089     void modificationChanged( bool m );
00090     void intervalChanged();
00091     void update();
00092 
00093 private:
00094     QGuardedPtr<ViewManager> viewManager;
00095     DesignerInterface *dIface;
00096     QTimer *updateTimer;
00097 
00098 };
00099 
00100 #endif
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'