digiKam
Loading...
Searching...
No Matches
dpopupframe.h
Go to the documentation of this file.
1/* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 1997-04-21
7 * Description : Frame with popup menu behavior.
8 *
9 * SPDX-FileCopyrightText: 2011-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 * SPDX-FileCopyrightText: 1997 by Tim D. Gilman <tdgilman at best dot org>
11 * SPDX-FileCopyrightText: 1998-2001 by Mirko Boehm <mirko at kde dot org>
12 * SPDX-FileCopyrightText: 2007 by John Layt <john at layt dot net>
13 *
14 * SPDX-License-Identifier: GPL-2.0-or-later
15 *
16 * ============================================================ */
17
18#pragma once
19
20// Qt includes
21
22#include <QFrame>
23
24namespace Digikam
25{
26
27class DPopupFrame : public QFrame
28{
29 Q_OBJECT
30
31public:
32
36 explicit DPopupFrame(QWidget* const parent = nullptr);
37
41 ~DPopupFrame() override;
42
50 void setMainWidget(QWidget* const m);
51
56 void resizeEvent(QResizeEvent* e) override;
57
61 void popup(const QPoint& p);
62
66 int exec(const QPoint& p);
67
71 int exec(int x, int y);
72
73Q_SIGNALS:
74
76
77protected:
78
82 void keyPressEvent(QKeyEvent* e) override;
83
87 void hideEvent(QHideEvent* e) override;
88
89public Q_SLOTS:
90
95 void close(int r);
96
97private:
98
99 class Private;
100 Private* const d = nullptr;
101
102 friend class Private;
103
104 Q_DISABLE_COPY(DPopupFrame)
105};
106
107} // namespace Digikam
Definition dpopupframe.h:28
int exec(const QPoint &p)
Definition dpopupframe.cpp:215
void popup(const QPoint &p)
Definition dpopupframe.cpp:167
void hideEvent(QHideEvent *e) override
Definition dpopupframe.cpp:134
~DPopupFrame() override
Definition dpopupframe.cpp:119
void close(int r)
Definition dpopupframe.cpp:139
void resizeEvent(QResizeEvent *e) override
Definition dpopupframe.cpp:156
friend class Private
Definition dpopupframe.h:102
void keyPressEvent(QKeyEvent *e) override
Definition dpopupframe.cpp:124
void setMainWidget(QWidget *const m)
Definition dpopupframe.cpp:146
Definition datefolderview.cpp:34