VirtualBox

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

Last change on this file was 101567, checked in by vboxsync, 8 months ago

FE/Qt: bugref:10450: Get rid of Qt5 stuff; This one is about type changes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
RevLine 
[55401]1/* $Id: UICloudEntityKey.h 101567 2023-10-24 00:25:14Z vboxsync $ */
[42529]2/** @file
[86783]3 * VBox Qt GUI - UICloudEntityKey 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
[86783]28#ifndef FEQT_INCLUDED_SRC_manager_UICloudEntityKey_h
29#define FEQT_INCLUDED_SRC_manager_UICloudEntityKey_h
[76532]30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
[42529]33
[86608]34/* Qt includes: */
[86783]35#include <QHash>
36#include <QString>
[86608]37#include <QUuid>
38
[86784]39/** Cloud entity key definition.
40 * This is a key for various indexed containers,
41 * allowing to distinguish one cloud entity from another. */
[86731]42struct UICloudEntityKey
43{
44 /** Constructs cloud entity key on the basis of passed parameters.
45 * @param strProviderShortName Brings provider short name.
46 * @param strProfileName Brings profile name.
[86739]47 * @param uMachineId Brings machine id. */
[86731]48 UICloudEntityKey(const QString &strProviderShortName = QString(),
49 const QString &strProfileName = QString(),
[86739]50 const QUuid &uMachineId = QUuid());
[86731]51 /** Constructs cloud entity key on the basis of @a another one. */
52 UICloudEntityKey(const UICloudEntityKey &another);
53
54 /** Returns whether this one key equals to @a another one. */
55 bool operator==(const UICloudEntityKey &another) const;
[86784]56 /** Returns whether this one key is less than @a another one. */
57 bool operator<(const UICloudEntityKey &another) const;
[86731]58
59 /** Returns string key representation. */
60 QString toString() const;
61
62 /** Holds provider short name. */
63 QString m_strProviderShortName;
64 /** Holds profile name. */
65 QString m_strProfileName;
[86739]66 /** Holds machine id. */
67 QUuid m_uMachineId;
[86731]68};
69
[94046]70inline size_t qHash(const UICloudEntityKey &key, size_t uSeed)
[86731]71{
72 return qHash(key.toString(), uSeed);
73}
74
[86783]75#endif /* !FEQT_INCLUDED_SRC_manager_UICloudEntityKey_h */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use