VirtualBox

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

Last change on this file since 93115 was 93115, checked in by vboxsync, 3 years ago

scm --update-copyright-year

  • 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.1 KB
Line 
1/* $Id: UIDetailsGroup.h 93115 2022-01-01 11:31:46Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIDetailsGroup class declaration.
4 */
5
6/*
7 * Copyright (C) 2012-2022 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef FEQT_INCLUDED_SRC_manager_details_UIDetailsGroup_h
19#define FEQT_INCLUDED_SRC_manager_details_UIDetailsGroup_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24/* GUI includes: */
25#include "UIDetailsItem.h"
26
27/* Forward declarations: */
28class QGraphicsLinearLayout;
29class QGraphicsScene;
30class UIGraphicsScrollArea;
31class UIVirtualMachineItem;
32
33/** UIDetailsItem extension implementing group item. */
34class UIDetailsGroup : public UIDetailsItem
35{
36 Q_OBJECT;
37
38signals:
39
40 /** @name Layout stuff.
41 * @{ */
42 /** Notifies listeners about @a iMinimumWidthHint changed. */
43 void sigMinimumWidthHintChanged(int iMinimumWidthHint);
44 /** @} */
45
46public:
47
48 /** RTTI item type. */
49 enum { Type = UIDetailsItemType_Group };
50
51 /** Constructs group item, passing pScene to the base-class. */
52 UIDetailsGroup(QGraphicsScene *pScene);
53 /** Destructs group item. */
54 virtual ~UIDetailsGroup() /* override */;
55
56 /** @name Item stuff.
57 * @{ */
58 /** Builds group based on passed @a machineItems. */
59 void buildGroup(const QList<UIVirtualMachineItem*> &machineItems);
60 /** Builds group based on cached machine items. */
61 void rebuildGroup();
62 /** Stops currently building group. */
63 void stopBuildingGroup();
64
65 /** Installs event-filter for @a pSource object. */
66 virtual void installEventFilterHelper(QObject *pSource) /* override */;
67 /** @} */
68
69 /** @name Children stuff.
70 * @{ */
71 /** Returns children items of certain @a enmType. */
72 virtual QList<UIDetailsItem*> items(UIDetailsItemType enmType = UIDetailsItemType_Set) const /* override */;
73 /** @} */
74
75 /** @name Layout stuff.
76 * @{ */
77 /** Updates layout. */
78 virtual void updateLayout() /* override */;
79
80 /** Returns minimum width-hint. */
81 virtual int minimumWidthHint() const /* override */;
82 /** Returns minimum height-hint. */
83 virtual int minimumHeightHint() const /* override */;
84 /** @} */
85
86protected slots:
87
88 /** @name Item stuff.
89 * @{ */
90 /** Handles request about starting step build.
91 * @param uStepId Brings the step ID.
92 * @param iStepNumber Brings the step number. */
93 /** @} */
94 virtual void sltBuildStep(const QUuid &uStepId, int iStepNumber) /* override */;
95
96protected:
97
98 /** @name Item stuff.
99 * @{ */
100 /** Returns RTTI item type. */
101 virtual int type() const /* override */ { return Type; }
102
103 /** Returns the description of the item. */
104 virtual QString description() const /* override */ { return QString(); }
105 /** @} */
106
107 /** @name Children stuff.
108 * @{ */
109 /** Adds child @a pItem. */
110 virtual void addItem(UIDetailsItem *pItem) /* override */;
111 /** Removes child @a pItem. */
112 virtual void removeItem(UIDetailsItem *pItem) /* override */;
113
114 /** Returns whether there are children items of certain @a enmType. */
115 virtual bool hasItems(UIDetailsItemType enmType = UIDetailsItemType_Set) const /* override */;
116 /** Clears children items of certain @a enmType. */
117 virtual void clearItems(UIDetailsItemType enmType = UIDetailsItemType_Set) /* override */;
118 /** @} */
119
120 /** @name Layout stuff.
121 * @{ */
122 /** Updates geometry. */
123 virtual void updateGeometry() /* override */;
124 /** @} */
125
126private:
127
128 /** @name Prepare/cleanup cascade.
129 * @{ */
130 /** Prepares connections. */
131 void prepareConnections();
132 /** @} */
133
134 /** @name Item stuff.
135 * @{ */
136 /** Holds the build step instance. */
137 UIPrepareStep *m_pBuildStep;
138 /** Holds the generated group ID. */
139 QUuid m_uGroupId;
140 /** @} */
141
142 /** @name Children stuff.
143 * @{ */
144 /** Holds the children scroll-area instance. */
145 UIGraphicsScrollArea *m_pScrollArea;
146 /** Holds the children container instance. */
147 QIGraphicsWidget *m_pContainer;
148 /** Holds the children layout instance. */
149 QGraphicsLinearLayout *m_pLayout;
150
151 /** Holds the cached machine item list. */
152 QList<UIVirtualMachineItem*> m_machineItems;
153
154 /** Holds the child list (a list of sets). */
155 QList<UIDetailsItem*> m_items;
156 /** @} */
157
158 /** @name Layout stuff.
159 * @{ */
160 /** Holds previous minimum width hint. */
161 int m_iPreviousMinimumWidthHint;
162 /** @} */
163};
164
165#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