VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsGroup.h@ 103977

Last change on this file since 103977 was 98103, checked in by vboxsync, 2 years ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
  • Property svn:mergeinfo set to (toggle deleted branches)
    /branches/VBox-3.0/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.h58652,​70973
    /branches/VBox-3.2/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.h66309,​66318
    /branches/VBox-4.0/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.h70873
    /branches/VBox-4.1/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.h74233
    /branches/VBox-4.2/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsGroup.h91503-91504,​91506-91508,​91510,​91514-91515,​91521
    /branches/VBox-4.3/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsGroup.h91223
    /branches/VBox-4.3/trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsGroup.h91223
    /branches/dsen/gui/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.h79076-79078,​79089,​79109-79110,​79112-79113,​79127-79130,​79134,​79141,​79151,​79155,​79157-79159,​79193,​79197
    /branches/dsen/gui2/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsGroup.h79562-79569,​79572-79573,​79578,​79581-79582,​79590-79591,​79598-79599,​79602-79603,​79605-79606,​79632,​79635,​79637,​79644
    /branches/dsen/gui3/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsGroup.h79645-79692
    /trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.h79225,​79271
File size: 5.3 KB
Line 
1/* $Id: UIDetailsGroup.h 98103 2023-01-17 14:15:46Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIDetailsGroup class declaration.
4 */
5
6/*
7 * Copyright (C) 2012-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_manager_details_UIDetailsGroup_h
29#define FEQT_INCLUDED_SRC_manager_details_UIDetailsGroup_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* GUI includes: */
35#include "UIDetailsItem.h"
36
37/* Forward declarations: */
38class QGraphicsLinearLayout;
39class QGraphicsScene;
40class UIGraphicsScrollArea;
41class UIVirtualMachineItem;
42
43/** UIDetailsItem extension implementing group item. */
44class UIDetailsGroup : public UIDetailsItem
45{
46 Q_OBJECT;
47
48signals:
49
50 /** @name Layout stuff.
51 * @{ */
52 /** Notifies listeners about @a iMinimumWidthHint changed. */
53 void sigMinimumWidthHintChanged(int iMinimumWidthHint);
54 /** @} */
55
56public:
57
58 /** RTTI item type. */
59 enum { Type = UIDetailsItemType_Group };
60
61 /** Constructs group item, passing pScene to the base-class. */
62 UIDetailsGroup(QGraphicsScene *pScene);
63 /** Destructs group item. */
64 virtual ~UIDetailsGroup() RT_OVERRIDE;
65
66 /** @name Item stuff.
67 * @{ */
68 /** Builds group based on passed @a machineItems. */
69 void buildGroup(const QList<UIVirtualMachineItem*> &machineItems);
70 /** Builds group based on cached machine items. */
71 void rebuildGroup();
72 /** Stops currently building group. */
73 void stopBuildingGroup();
74
75 /** Installs event-filter for @a pSource object. */
76 virtual void installEventFilterHelper(QObject *pSource) RT_OVERRIDE;
77 /** @} */
78
79 /** @name Children stuff.
80 * @{ */
81 /** Returns children items of certain @a enmType. */
82 virtual QList<UIDetailsItem*> items(UIDetailsItemType enmType = UIDetailsItemType_Set) const RT_OVERRIDE;
83 /** @} */
84
85 /** @name Layout stuff.
86 * @{ */
87 /** Updates layout. */
88 virtual void updateLayout() RT_OVERRIDE;
89
90 /** Returns minimum width-hint. */
91 virtual int minimumWidthHint() const RT_OVERRIDE;
92 /** Returns minimum height-hint. */
93 virtual int minimumHeightHint() const RT_OVERRIDE;
94 /** @} */
95
96protected slots:
97
98 /** @name Item stuff.
99 * @{ */
100 /** Handles request about starting step build.
101 * @param uStepId Brings the step ID.
102 * @param iStepNumber Brings the step number. */
103 /** @} */
104 virtual void sltBuildStep(const QUuid &uStepId, int iStepNumber) RT_OVERRIDE;
105
106protected:
107
108 /** @name Item stuff.
109 * @{ */
110 /** Returns RTTI item type. */
111 virtual int type() const RT_OVERRIDE { return Type; }
112
113 /** Returns the description of the item. */
114 virtual QString description() const RT_OVERRIDE { return QString(); }
115 /** @} */
116
117 /** @name Children stuff.
118 * @{ */
119 /** Adds child @a pItem. */
120 virtual void addItem(UIDetailsItem *pItem) RT_OVERRIDE;
121 /** Removes child @a pItem. */
122 virtual void removeItem(UIDetailsItem *pItem) RT_OVERRIDE;
123
124 /** Returns whether there are children items of certain @a enmType. */
125 virtual bool hasItems(UIDetailsItemType enmType = UIDetailsItemType_Set) const RT_OVERRIDE;
126 /** Clears children items of certain @a enmType. */
127 virtual void clearItems(UIDetailsItemType enmType = UIDetailsItemType_Set) RT_OVERRIDE;
128 /** @} */
129
130 /** @name Layout stuff.
131 * @{ */
132 /** Updates geometry. */
133 virtual void updateGeometry() RT_OVERRIDE;
134 /** @} */
135
136private:
137
138 /** @name Prepare/cleanup cascade.
139 * @{ */
140 /** Prepares connections. */
141 void prepareConnections();
142 /** @} */
143
144 /** @name Item stuff.
145 * @{ */
146 /** Holds the build step instance. */
147 UIPrepareStep *m_pBuildStep;
148 /** Holds the generated group ID. */
149 QUuid m_uGroupId;
150 /** @} */
151
152 /** @name Children stuff.
153 * @{ */
154 /** Holds the children scroll-area instance. */
155 UIGraphicsScrollArea *m_pScrollArea;
156 /** Holds the children container instance. */
157 QIGraphicsWidget *m_pContainer;
158 /** Holds the children layout instance. */
159 QGraphicsLinearLayout *m_pLayout;
160
161 /** Holds the cached machine item list. */
162 QList<UIVirtualMachineItem*> m_machineItems;
163
164 /** Holds the child list (a list of sets). */
165 QList<UIDetailsItem*> m_items;
166 /** @} */
167
168 /** @name Layout stuff.
169 * @{ */
170 /** Holds previous minimum width hint. */
171 int m_iPreviousMinimumWidthHint;
172 /** @} */
173};
174
175#endif /* !FEQT_INCLUDED_SRC_manager_details_UIDetailsGroup_h */
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