BibleTime
btversekeymenu.h
Go to the documentation of this file.
1/*********
2*
3* In the name of the Father, and of the Son, and of the Holy Spirit.
4*
5* This file is part of BibleTime's source code, https://bibletime.info/
6*
7* Copyright 1999-2025 by the BibleTime developers.
8* The BibleTime source code is licensed under the GNU General Public License
9* version 2.0.
10*
11**********/
12
13#pragma once
14
15#include <QMenu>
16
17#include <QObject>
18#include <QString>
19
20
21class QMouseEvent;
22class QTimerEvent;
23class QWidget;
24
25/**
26* Menu for book/ch/v dropdown lists.
27*
28* This is implemented mostly because it needs a delay which prevents unwanted actions after
29* the menu has been shown and mouse button is released over some item.
30*/
31class BtVerseKeyMenu : public QMenu {
32 Q_OBJECT
33 public:
34 BtVerseKeyMenu(QWidget* parent);
35 protected:
36 void mouseReleaseEvent(QMouseEvent* event) override;
37 /** Frees the mouse button release after the delay has elapsed.*/
38 void timerEvent(QTimerEvent* event) override;
39
40 private:
43};
void timerEvent(QTimerEvent *event) override
void mouseReleaseEvent(QMouseEvent *event) override