VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserHandlerMouse.h

Last change on this file was 98103, checked in by vboxsync, 17 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
RevLine 
[55401]1/* $Id: UIChooserHandlerMouse.h 98103 2023-01-17 14:15:46Z vboxsync $ */
[42529]2/** @file
[73424]3 * VBox Qt GUI - UIChooserHandlerMouse class declaration.
[42529]4 */
5
6/*
[98103]7 * Copyright (C) 2012-2023 Oracle and/or its affiliates.
[42529]8 *
[96407]9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
[42529]26 */
27
[76581]28#ifndef FEQT_INCLUDED_SRC_manager_chooser_UIChooserHandlerMouse_h
29#define FEQT_INCLUDED_SRC_manager_chooser_UIChooserHandlerMouse_h
[76532]30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
[42529]33
34/* Qt includes: */
35#include <QObject>
36
37/* Forward declarations: */
[73424]38class UIChooserModel;
[42529]39class QGraphicsSceneMouseEvent;
[73424]40class UIChooserItem;
[42529]41
42/* Mouse event type: */
43enum UIMouseEventType
44{
45 UIMouseEventType_Press,
46 UIMouseEventType_Release,
47 UIMouseEventType_DoubleClick
48};
49
50/* Mouse handler for graphics selector: */
[73424]51class UIChooserHandlerMouse : public QObject
[42529]52{
53 Q_OBJECT;
54
55public:
56
57 /* Constructor: */
[73424]58 UIChooserHandlerMouse(UIChooserModel *pParent);
[42529]59
60 /* API: Model mouse-event handler delegate: */
61 bool handle(QGraphicsSceneMouseEvent *pEvent, UIMouseEventType type) const;
62
63private:
64
65 /* API: Model wrapper: */
[73424]66 UIChooserModel* model() const;
[42529]67
68 /* Helpers: Model mouse-event handler delegates: */
69 bool handleMousePress(QGraphicsSceneMouseEvent *pEvent) const;
70 bool handleMouseRelease(QGraphicsSceneMouseEvent *pEvent) const;
71 bool handleMouseDoubleClick(QGraphicsSceneMouseEvent *pEvent) const;
72
73 /* Variables: */
[73424]74 UIChooserModel *m_pModel;
[42529]75};
76
[76581]77#endif /* !FEQT_INCLUDED_SRC_manager_chooser_UIChooserHandlerMouse_h */
[42529]78
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use