KWidgetsAddons

kpopupframe.h
1 /* -*- C++ -*-
2  This file is part of the KDE libraries
3  SPDX-FileCopyrightText: 1997 Tim D. Gilman <[email protected]>
4  SPDX-FileCopyrightText: 1998-2001 Mirko Boehm <[email protected]>
5  SPDX-FileCopyrightText: 2007 John Layt <[email protected]>
6 
7  SPDX-License-Identifier: LGPL-2.0-or-later
8 */
9 
10 #ifndef KPOPUPFRAME_H
11 #define KPOPUPFRAME_H
12 
13 #include <kwidgetsaddons_export.h>
14 
15 #include <QFrame>
16 
23 class KWIDGETSADDONS_EXPORT KPopupFrame : public QFrame
24 {
25  Q_OBJECT
26 protected:
30  void keyPressEvent(QKeyEvent *e) override;
31 
35  void hideEvent(QHideEvent *e) override;
36 
37 public Q_SLOTS:
42  void close(int r);
43 
44 public:
48  KPopupFrame(QWidget *parent = nullptr);
49 
53  ~KPopupFrame();
54 
62  void setMainWidget(QWidget *m);
63 
68  void resizeEvent(QResizeEvent *resize) override;
69 
73  void popup(const QPoint &pos);
74 
78  int exec(const QPoint &p);
79 
83  int exec(int x, int y);
84 
85 Q_SIGNALS:
86  void leaveModality();
87 
88 private:
89  class KPopupFramePrivate;
90  friend class KPopupFramePrivate;
91  KPopupFramePrivate *const d;
92 
94 };
95 
96 #endif // KPOPUPFRAME_H
bool close()
virtual void hideEvent(QHideEvent *event)
Q_DISABLE_COPY(Class)
Frame with popup menu behavior.
Definition: kpopupframe.h:23
virtual void keyPressEvent(QKeyEvent *event)
virtual void resizeEvent(QResizeEvent *event)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Aug 11 2020 22:45:50 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.