Eneboo - Documentación para desarrolladores
src/qt/include/qtextbrowser.h
Ir a la documentación de este archivo.
00001 /****************************************************************************
00002 ** $Id: qt/qtextbrowser.h   3.3.8   edited Jan 11 14:39 $
00003 **
00004 ** Definition of the QTextBrowser class
00005 **
00006 ** Created : 990101
00007 **
00008 ** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
00009 **
00010 ** This file is part of the widgets module of the Qt GUI Toolkit.
00011 **
00012 ** This file may be distributed under the terms of the Q Public License
00013 ** as defined by Trolltech ASA of Norway and appearing in the file
00014 ** LICENSE.QPL included in the packaging of this file.
00015 **
00016 ** This file may be distributed and/or modified under the terms of the
00017 ** GNU General Public License version 2 as published by the Free Software
00018 ** Foundation and appearing in the file LICENSE.GPL included in the
00019 ** packaging of this file.
00020 **
00021 ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
00022 ** licenses may use this file in accordance with the Qt Commercial License
00023 ** Agreement provided with the Software.
00024 **
00025 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00026 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00027 **
00028 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
00029 **   information about Qt Commercial License Agreements.
00030 ** See http://www.trolltech.com/qpl/ for QPL licensing information.
00031 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00032 **
00033 ** Contact info@trolltech.com if any conditions of this licensing are
00034 ** not clear to you.
00035 **
00036 **********************************************************************/
00037 
00038 #ifndef QTEXTBROWSER_H
00039 #define QTEXTBROWSER_H
00040 
00041 #ifndef QT_H
00042 #include "qptrlist.h"
00043 #include "qpixmap.h"
00044 #include "qcolor.h"
00045 #include "qtextedit.h"
00046 #endif // QT_H
00047 
00048 #ifndef QT_NO_TEXTBROWSER
00049 
00050 class QTextBrowserData;
00051 
00052 class Q_EXPORT QTextBrowser : public QTextEdit
00053 {
00054     Q_OBJECT
00055     Q_PROPERTY( QString source READ source WRITE setSource )
00056     Q_OVERRIDE( int undoDepth DESIGNABLE false SCRIPTABLE false )
00057     Q_OVERRIDE( bool overwriteMode DESIGNABLE false SCRIPTABLE false )
00058     Q_OVERRIDE( bool modified SCRIPTABLE false)
00059     Q_OVERRIDE( bool readOnly DESIGNABLE false SCRIPTABLE false )
00060     Q_OVERRIDE( bool undoRedoEnabled DESIGNABLE false SCRIPTABLE false )
00061 
00062 public:
00063     QTextBrowser( QWidget* parent=0, const char* name=0 );
00064     ~QTextBrowser();
00065 
00066     QString source() const;
00067 
00068 public slots:
00069     virtual void setSource(const QString& name);
00070     virtual void backward();
00071     virtual void forward();
00072     virtual void home();
00073     virtual void reload();
00074     void setText( const QString &txt ) { setText( txt, QString::null ); }
00075     virtual void setText( const QString &txt, const QString &context );
00076 
00077 signals:
00078     void backwardAvailable( bool );
00079     void forwardAvailable( bool );
00080     void sourceChanged( const QString& );
00081     void highlighted( const QString& );
00082     void linkClicked( const QString& );
00083     void anchorClicked( const QString&, const QString& );
00084 
00085 protected:
00086     void keyPressEvent( QKeyEvent * e);
00087 
00088 private:
00089     void popupDetail( const QString& contents, const QPoint& pos );
00090     bool linksEnabled() const { return TRUE; }
00091     void emitHighlighted( const QString &s );
00092     void emitLinkClicked( const QString &s );
00093     QTextBrowserData *d;
00094 
00095 private:        // Disabled copy constructor and operator=
00096 #if defined(Q_DISABLE_COPY)
00097     QTextBrowser( const QTextBrowser & );
00098     QTextBrowser& operator=( const QTextBrowser & );
00099 #endif
00100 };
00101 
00102 #endif // QT_NO_TEXTBROWSER
00103 
00104 #endif // QTEXTBROWSER_H
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'