VirtualBox

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

Last change on this file since 74044 was 74044, checked in by vboxsync, 7 years ago

FE/Qt: VirtualBox Manager UI: Large cleanup for UIDetailsSet, doxygen + style fixes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
  • Property svn:mergeinfo set to (toggle deleted branches)
    /trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.hmergedeligible
    /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
File size: 4.9 KB
Line 
1/* $Id: UIDetailsGroup.h 74044 2018-09-03 13:32:53Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIDetailsGroup class declaration.
4 */
5
6/*
7 * Copyright (C) 2012-2018 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 ___UIDetailsGroup_h___
19#define ___UIDetailsGroup_h___
20
21/* GUI includes: */
22#include "UIDetailsItem.h"
23
24/* Forward declarations: */
25class QGraphicsScene;
26class UIVirtualMachineItem;
27
28/** UIDetailsItem extension implementing group item. */
29class UIDetailsGroup : public UIDetailsItem
30{
31 Q_OBJECT;
32
33signals:
34
35 /** @name Layout stuff.
36 * @{ */
37 /** Notifies listeners about @a iMinimumWidthHint changed. */
38 void sigMinimumWidthHintChanged(int iMinimumWidthHint);
39 /** Notifies listeners about @a iMinimumHeightHint changed. */
40 void sigMinimumHeightHintChanged(int iMinimumHeightHint);
41 /** @} */
42
43public:
44
45 /** RTTI item type. */
46 enum { Type = UIDetailsItemType_Group };
47
48 /** Constructs group item, passing pScene to the base-class. */
49 UIDetailsGroup(QGraphicsScene *pScene);
50 /** Destructs group item. */
51 virtual ~UIDetailsGroup() /* override */;
52
53 /** @name Item stuff.
54 * @{ */
55 /** Builds group based on passed @a machineItems. */
56 void buildGroup(const QList<UIVirtualMachineItem*> &machineItems);
57 /** Builds group based on cached machine items. */
58 void rebuildGroup();
59 /** Stops currently building group. */
60 void stopBuildingGroup();
61 /** @} */
62
63 /** @name Children stuff.
64 * @{ */
65 /** Returns children items of certain @a enmType. */
66 virtual QList<UIDetailsItem*> items(UIDetailsItemType enmType = UIDetailsItemType_Set) const /* override */;
67 /** @} */
68
69 /** @name Layout stuff.
70 * @{ */
71 /** Updates layout. */
72 virtual void updateLayout() /* override */;
73 /** @} */
74
75protected slots:
76
77 /** @name Item stuff.
78 * @{ */
79 /** Handles request about starting step build.
80 * @param strStepId Brings the step ID.
81 * @param iStepNumber Brings the step number. */
82 /** @} */
83 virtual void sltBuildStep(QString strStepId, int iStepNumber) /* override */;
84
85protected:
86
87 /** @name Item stuff.
88 * @{ */
89 /** Returns RTTI item type. */
90 virtual int type() const /* override */ { return Type; }
91
92 /** Returns the description of the item. */
93 virtual QString description() const /* override */ { return QString(); }
94 /** @} */
95
96 /** @name Children stuff.
97 * @{ */
98 /** Adds child @a pItem. */
99 virtual void addItem(UIDetailsItem *pItem) /* override */;
100 /** Removes child @a pItem. */
101 virtual void removeItem(UIDetailsItem *pItem) /* override */;
102
103 /** Returns whether there are children items of certain @a enmType. */
104 virtual bool hasItems(UIDetailsItemType enmType = UIDetailsItemType_Set) const /* override */;
105 /** Clears children items of certain @a enmType. */
106 virtual void clearItems(UIDetailsItemType enmType = UIDetailsItemType_Set) /* override */;
107 /** @} */
108
109 /** @name Layout stuff.
110 * @{ */
111 /** Updates geometry. */
112 virtual void updateGeometry() /* override */;
113
114 /** Returns minimum width-hint. */
115 virtual int minimumWidthHint() const /* override */;
116 /** Returns minimum height-hint. */
117 virtual int minimumHeightHint() const /* override */;
118 /** @} */
119
120private:
121
122 /** Data field types. */
123 enum GroupItemData
124 {
125 /* Layout hints: */
126 GroupData_Margin,
127 GroupData_Spacing
128 };
129
130 /** @name Prepare/cleanup cascade.
131 * @{ */
132 /** Prepares connections. */
133 void prepareConnections();
134 /** @} */
135
136 /** @name Item stuff.
137 * @{ */
138 /** Returns abstractly stored data value for certain @a iKey. */
139 QVariant data(int iKey) const;
140 /** @} */
141
142 /** @name Item stuff.
143 * @{ */
144 /** Holds the build step instance. */
145 UIPrepareStep *m_pBuildStep;
146 /** Holds the generated group ID. */
147 QString m_strGroupId;
148 /** @} */
149
150 /** @name Children stuff.
151 * @{ */
152 /** Holds the cached machine item list. */
153 QList<UIVirtualMachineItem*> m_machineItems;
154
155 /** Holds the child list (a list of sets). */
156 QList<UIDetailsItem*> m_items;
157 /** @} */
158
159 /** @name Layout stuff.
160 * @{ */
161 int m_iPreviousMinimumWidthHint;
162 int m_iPreviousMinimumHeightHint;
163 /** @} */
164};
165
166#endif /* !___UIDetailsGroup_h___ */
Note: See TracBrowser for help on using the repository browser.

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