Welcome to mirror list, hosted at ThFree Co, Russian Federation.

helpers.hpp « qt_common « qt - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 71c1c37e8328754ffe7ce0ead8a2087ee366e820 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once

#include <QtGui/QMouseEvent>

namespace qt
{
namespace common
{
bool IsLeftButton(Qt::MouseButtons buttons);
bool IsLeftButton(QMouseEvent const * const e);

bool IsRightButton(Qt::MouseButtons buttons);
bool IsRightButton(QMouseEvent const * const e);

bool IsCommandModifier(QMouseEvent const * const e);
bool IsShiftModifier(QMouseEvent const * const e);
bool IsAltModifier(QMouseEvent const * const e);

struct Hotkey
{
  Hotkey() = default;
  Hotkey(int key, char const * slot) : m_key(key), m_slot(slot) {}

  int m_key = 0;
  char const * m_slot = nullptr;
};
}  // namespace common
}  // namespace qt