1
/****************************************************************************
3
** Copyright (C) 1992-2005 Trolltech AS. All rights reserved.
5
** This file is part of the designer application of the Qt Toolkit.
7
** This file may be distributed under the terms of the Q Public License
8
** as defined by Trolltech AS of Norway and appearing in the file
9
** LICENSE.QPL included in the packaging of this file.
11
** This file may be distributed and/or modified under the terms of the
12
** GNU General Public License version 2 as published by the Free Software
13
** Foundation and appearing in the file LICENSE.GPL included in the
14
** packaging of this file.
16
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
17
** information about Qt Commercial License Agreements.
18
** See http://www.trolltech.com/qpl/ for QPL licensing information.
19
** See http://www.trolltech.com/gpl/ for GPL licensing information.
21
** Contact info@trolltech.com if any conditions of this licensing are
24
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
25
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27
****************************************************************************/
33
// This file is not part of the Qt API. It exists for the convenience
34
// of Qt Designer. This header
35
// file may change from version to version without notice, or even be removed.
40
#ifndef QDESIGNER_WIDGET_H
41
#define QDESIGNER_WIDGET_H
43
#include "shared_global_p.h"
44
#include "layoutdecoration.h"
46
#include <QtDesigner/QDesignerMetaDataBaseInterface>
48
#include <QtCore/QPointer>
49
#include <QtCore/QPair>
51
#include <QtGui/QGridLayout>
52
#include <QtGui/QWidget>
53
#include <QtGui/QDialog>
54
#include <QtGui/QLabel>
55
#include <QtGui/QPixmap>
57
class QDesignerFormWindowInterface;
64
class QT_SHARED_EXPORT QDesignerWidget : public QWidget
68
QDesignerWidget(QDesignerFormWindowInterface* formWindow, QWidget *parent = 0);
69
virtual ~QDesignerWidget();
71
inline QDesignerFormWindowInterface* formWindow() const
72
{ return m_formWindow; }
77
virtual void paintEvent(QPaintEvent *e);
78
virtual void dragEnterEvent(QDragEnterEvent *e);
81
QDesignerFormWindowInterface* m_formWindow;
86
class QT_SHARED_EXPORT QDesignerDialog : public QDialog
90
QDesignerDialog(QDesignerFormWindowInterface *fw, QWidget *parent)
91
: QDialog(parent), m_formWindow(fw) {}
94
void paintEvent(QPaintEvent *e);
97
QDesignerFormWindowInterface *m_formWindow;
100
class QT_SHARED_EXPORT QDesignerLabel : public QLabel
103
Q_PROPERTY(QByteArray buddy READ buddy WRITE setBuddy)
105
QDesignerLabel(QWidget *parent = 0);
107
inline void setBuddy(const QByteArray &b)
113
inline QByteArray buddy() const
116
void setBuddy(QWidget *widget);
119
void showEvent(QShowEvent *e)
121
QLabel::showEvent(e);
131
class QT_SHARED_EXPORT Line : public QFrame
134
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation)
136
Line(QWidget *parent) : QFrame(parent)
137
{ setAttribute(Qt::WA_MouseNoMask); setFrameStyle(HLine | Sunken); }
139
inline void setOrientation(Qt::Orientation orient)
140
{ setFrameShape(orient == Qt::Horizontal ? HLine : VLine); }
142
inline Qt::Orientation orientation() const
143
{ return frameShape() == HLine ? Qt::Horizontal : Qt::Vertical; }
146
#endif // QDESIGNER_WIDGET_H