2011-11-02 23:37:50 +00:00
|
|
|
#ifndef MRUQMENU_HH
|
|
|
|
#define MRUQMENU_HH
|
|
|
|
|
|
|
|
#include <QMenu>
|
|
|
|
#include <QEvent>
|
|
|
|
|
2023-04-12 08:11:36 +00:00
|
|
|
// Detail: http://goldendict.org/forum/viewtopic.php?f=4&t=1176
|
|
|
|
// When ctrl during ctrl+tab released, a request to change current tab will be emitted.
|
2011-11-02 23:37:50 +00:00
|
|
|
class MRUQMenu: public QMenu
|
|
|
|
{
|
2023-04-12 08:11:36 +00:00
|
|
|
Q_OBJECT
|
2011-11-02 23:37:50 +00:00
|
|
|
|
|
|
|
public:
|
2023-04-12 08:11:36 +00:00
|
|
|
explicit MRUQMenu(const QString title, QWidget *parent = 0);
|
2011-11-02 23:37:50 +00:00
|
|
|
|
|
|
|
private:
|
2023-04-12 08:11:36 +00:00
|
|
|
void keyReleaseEvent (QKeyEvent * kev) override;
|
2011-11-02 23:37:50 +00:00
|
|
|
|
2023-04-12 08:11:36 +00:00
|
|
|
signals:
|
|
|
|
void requestTabChange(int index);
|
2011-11-02 23:37:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // MRUQMENU_HH
|