Eneboo - Documentación para desarrolladores
src/qsa/tools/designer/editor/viewmanager.h
Ir a la documentación de este archivo.
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 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 {
00062     return markerWidget;
00063   }
00064 
00065 signals:
00066   void markersChanged();
00067   void expandFunction(QTextParagraph *p);
00068   void collapseFunction(QTextParagraph *p);
00069   void collapse(bool all /*else only functions*/);
00070   void expand(bool all /*else only functions*/);
00071   void editBreakPoints();
00072   void isBreakpointPossible(bool &possible, const QString &code, int line);
00073 
00074 protected slots:
00075   void clearErrorMarker();
00076   void cursorPositionChanged(int row, int col);
00077   void showMessage(const QString &msg);
00078   void clearStatusBar();
00079 
00080 protected:
00081   void childEvent(QChildEvent *e);
00082   void resizeEvent(QResizeEvent *e);
00083 
00084 private:
00085   QWidget *curView;
00086   MarkerWidget *markerWidget;
00087   QVBoxLayout *layout;
00088   QDockArea *dockArea;
00089   QLabel *posLabel;
00090   QString extraText;
00091   QTimer *messageTimer;
00092 
00093 };
00094 
00095 #endif
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'