Eneboo - Documentación para desarrolladores
src/qt/tools/designer/editor/viewmanager.h
Ir a la documentación de este archivo.
00001  /**********************************************************************
00002 ** Copyright (C) 2005-2007 Trolltech ASA.  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 VIEWMANAGER_H
00028 #define VIEWMANAGER_H
00029 
00030 #include <qwidget.h>
00031 #include <qvaluelist.h>
00032 
00033 class QChildEvent;
00034 class MarkerWidget;
00035 class QVBoxLayout;
00036 class QDockArea;
00037 class QTextParagraph;
00038 class QLabel;
00039 class QTimer;
00040 
00041 class ViewManager : public QWidget
00042 {
00043     Q_OBJECT
00044 
00045 public:
00046     ViewManager( QWidget *parent, const char *name );
00047 
00048     void addView( QWidget *view );
00049     QWidget *currentView() const;
00050     void showMarkerWidget( bool );
00051 
00052     void setError( int line );
00053     void setStep( int line );
00054     void setStackFrame( int line );
00055     void clearStep();
00056     void clearStackFrame();
00057     void setBreakPoints( const QValueList<uint> &l );
00058     QValueList<uint> breakPoints() const;
00059 
00060     void emitMarkersChanged();
00061     MarkerWidget *marker_widget() const { return markerWidget; }
00062 
00063 signals:
00064     void markersChanged();
00065     void expandFunction( QTextParagraph *p );
00066     void collapseFunction( QTextParagraph *p );
00067     void collapse( bool all /*else only functions*/ );
00068     void expand( bool all /*else only functions*/ );
00069     void editBreakPoints();
00070     void isBreakpointPossible( bool &possible, const QString &code, int line );
00071 
00072 protected slots:
00073     void clearErrorMarker();
00074     void cursorPositionChanged( int row, int col );
00075     void showMessage( const QString &msg );
00076     void clearStatusBar();
00077 
00078 protected:
00079     void childEvent( QChildEvent *e );
00080     void resizeEvent( QResizeEvent *e );
00081 
00082 private:
00083     QWidget *curView;
00084     MarkerWidget *markerWidget;
00085     QVBoxLayout *layout;
00086     QDockArea *dockArea;
00087     QLabel *posLabel;
00088     QString extraText;
00089     QTimer *messageTimer;
00090 
00091 };
00092 
00093 #endif
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'