VirtualBox

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

Last change on this file since 100064 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.2 KB
Line 
1/* $Id: UIDnDDropSource_win.h 98103 2023-01-17 14:15:46Z 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#include "COMEnums.h"
36
37class UIDnDDataObject;
38
39/**
40 * Implementation of IDropSource for drag and drop on the host.
41 */
42class UIDnDDropSource : public IDropSource
43{
44public:
45
46 UIDnDDropSource(QWidget *pParent, UIDnDDataObject *pDataObject);
47 virtual ~UIDnDDropSource(void);
48
49public:
50
51 uint32_t GetCurrentAction(void) const { return m_uCurAction; }
52
53public: /* IUnknown methods. */
54
55 STDMETHOD(QueryInterface)(REFIID iid, void ** ppvObject);
56 STDMETHOD_(ULONG, AddRef)(void);
57 STDMETHOD_(ULONG, Release)(void);
58
59public: /* IDropSource methods. */
60
61 STDMETHOD(QueryContinueDrag)(BOOL fEscapePressed, DWORD dwKeyState);
62 STDMETHOD(GiveFeedback)(DWORD dwEffect);
63
64protected:
65
66 /** Pointer to parent widget. */
67 QWidget *m_pParent;
68 /** Pointer to current data object. */
69 UIDnDDataObject *m_pDataObject;
70 /** The current reference count. */
71 LONG m_cRefCount;
72 /** Current (last) drop effect issued. */
73 DWORD m_dwCurEffect;
74 /** Current drop action to perform in case of a successful drop. */
75 Qt::DropActions m_uCurAction;
76};
77
78#endif /* !FEQT_INCLUDED_SRC_runtime_UIDnDDropSource_win_h */
79
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use