Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/QtWidgets/qwidgetaction.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Copyright (C) 2016 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 
0004 #ifndef QWIDGETACTION_H
0005 #define QWIDGETACTION_H
0006 
0007 #include <QtWidgets/qtwidgetsglobal.h>
0008 #include <QtGui/qaction.h>
0009 
0010 QT_REQUIRE_CONFIG(action);
0011 
0012 QT_BEGIN_NAMESPACE
0013 
0014 class QWidgetActionPrivate;
0015 
0016 class Q_WIDGETS_EXPORT QWidgetAction : public QAction
0017 {
0018     Q_OBJECT
0019     Q_DECLARE_PRIVATE(QWidgetAction)
0020 
0021 public:
0022     explicit QWidgetAction(QObject *parent);
0023     virtual ~QWidgetAction();
0024 
0025     void setDefaultWidget(QWidget *w);
0026     QWidget *defaultWidget() const;
0027 
0028     QWidget *requestWidget(QWidget *parent);
0029     void releaseWidget(QWidget *widget);
0030 
0031 protected:
0032     virtual bool event(QEvent *) override;
0033     virtual bool eventFilter(QObject *, QEvent *) override;
0034     virtual QWidget *createWidget(QWidget *parent);
0035     virtual void deleteWidget(QWidget *widget);
0036     QList<QWidget *> createdWidgets() const;
0037 
0038 private:
0039     Q_DISABLE_COPY(QWidgetAction)
0040     friend class QToolBar;
0041 };
0042 
0043 QT_END_NAMESPACE
0044 
0045 #endif // QWIDGETACTION_H