source: trunk/tools/designer/editor/viewmanager.h

Last change on this file was 197, checked in by rudi, 14 years ago

Added QtDesigner

File size: 2.8 KB
Line 
1 /**********************************************************************
2** Copyright (C) 2005-2007 Trolltech ASA. All rights reserved.
3**
4** This file is part of Qt Designer.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
12** licenses may use this file in accordance with the Qt Commercial License
13** Agreement provided with the Software.
14**
15** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17**
18** See http://www.trolltech.com/gpl/ for GPL licensing information.
19** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
20** information about Qt Commercial License Agreements.
21**
22** Contact info@trolltech.com if any conditions of this licensing are
23** not clear to you.
24**
25**********************************************************************/
26
27#ifndef VIEWMANAGER_H
28#define VIEWMANAGER_H
29
30#include <qwidget.h>
31#include <qvaluelist.h>
32
33class QChildEvent;
34class MarkerWidget;
35class QVBoxLayout;
36class QDockArea;
37class QTextParagraph;
38class QLabel;
39class QTimer;
40
41class ViewManager : public QWidget
42{
43 Q_OBJECT
44
45public:
46 ViewManager( QWidget *parent, const char *name );
47
48 void addView( QWidget *view );
49 QWidget *currentView() const;
50 void showMarkerWidget( bool );
51
52 void setError( int line );
53 void setStep( int line );
54 void setStackFrame( int line );
55 void clearStep();
56 void clearStackFrame();
57 void setBreakPoints( const QValueList<uint> &l );
58 QValueList<uint> breakPoints() const;
59
60 void emitMarkersChanged();
61 MarkerWidget *marker_widget() const { return markerWidget; }
62
63signals:
64 void markersChanged();
65 void expandFunction( QTextParagraph *p );
66 void collapseFunction( QTextParagraph *p );
67 void collapse( bool all /*else only functions*/ );
68 void expand( bool all /*else only functions*/ );
69 void editBreakPoints();
70 void isBreakpointPossible( bool &possible, const QString &code, int line );
71
72protected slots:
73 void clearErrorMarker();
74 void cursorPositionChanged( int row, int col );
75 void showMessage( const QString &msg );
76 void clearStatusBar();
77
78protected:
79 void childEvent( QChildEvent *e );
80 void resizeEvent( QResizeEvent *e );
81
82private:
83 QWidget *curView;
84 MarkerWidget *markerWidget;
85 QVBoxLayout *layout;
86 QDockArea *dockArea;
87 QLabel *posLabel;
88 QString extraText;
89 QTimer *messageTimer;
90
91};
92
93#endif
Note: See TracBrowser for help on using the repository browser.