VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDropSource_win.h@ 104158

Last change on this file since 104158 was 103803, checked in by vboxsync, 9 months ago

FE/Qt. bugref:10618. Splitting COMEnums.h file into individual enum header files.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1/* $Id: UIDnDDropSource_win.h 103803 2024-03-12 11:15:18Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIDnDDropSource class declaration.
4 */
5
6/*
7 * Copyright (C) 2014-2023 Oracle and/or its affiliates.
8 *
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
26 */
27
28#ifndef FEQT_INCLUDED_SRC_runtime_UIDnDDropSource_win_h
29#define FEQT_INCLUDED_SRC_runtime_UIDnDDropSource_win_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* COM includes: */
35
36class UIDnDDataObject;
37
38/**
39 * Implementation of IDropSource for drag and drop on the host.
40 */
41class UIDnDDropSource : public IDropSource
42{
43public:
44
45 UIDnDDropSource(QWidget *pParent, UIDnDDataObject *pDataObject);
46 virtual ~UIDnDDropSource(void);
47
48public:
49
50 uint32_t GetCurrentAction(void) const { return m_uCurAction; }
51
52public: /* IUnknown methods. */
53
54 STDMETHOD(QueryInterface)(REFIID iid, void ** ppvObject);
55 STDMETHOD_(ULONG, AddRef)(void);
56 STDMETHOD_(ULONG, Release)(void);
57
58public: /* IDropSource methods. */
59
60 STDMETHOD(QueryContinueDrag)(BOOL fEscapePressed, DWORD dwKeyState);
61 STDMETHOD(GiveFeedback)(DWORD dwEffect);
62
63protected:
64
65 /** Pointer to parent widget. */
66 QWidget *m_pParent;
67 /** Pointer to current data object. */
68 UIDnDDataObject *m_pDataObject;
69 /** The current reference count. */
70 LONG m_cRefCount;
71 /** Current (last) drop effect issued. */
72 DWORD m_dwCurEffect;
73 /** Current drop action to perform in case of a successful drop. */
74 Qt::DropActions m_uCurAction;
75};
76
77#endif /* !FEQT_INCLUDED_SRC_runtime_UIDnDDropSource_win_h */
78
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette