VirtualBox

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

Last change on this file since 74878 was 74878, checked in by vboxsync, 6 years ago

FE/Qt: bugref:9261: Changed COMWrapper to generate QUuid for GUID instead of QString

  • 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: 5.1 KB
Line 
1/* $Id: UIDetailsGroup.h 74878 2018-10-17 13:34:24Z 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 /** Returns minimum width-hint. */
75 virtual int minimumWidthHint() const /* override */;
76 /** Returns minimum height-hint. */
77 virtual int minimumHeightHint() const /* override */;
78 /** @} */
79
80protected slots:
81
82 /** @name Item stuff.
83 * @{ */
84 /** Handles request about starting step build.
85 * @param strStepId Brings the step ID.
86 * @param iStepNumber Brings the step number. */
87 /** @} */
88 virtual void sltBuildStep(const QUuid &aStepId, int iStepNumber) /* override */;
89
90protected:
91
92 /** @name Event-handling stuff.
93 * @{ */
94 /** Performs painting using passed @a pPainter, @a pOptions and optionally specified @a pWidget. */
95 virtual void paint(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions, QWidget *pWidget = 0) /* override */;
96 /** @} */
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 Painting stuff.
135 * @{ */
136 /** Paints background using specified @a pPainter and certain @a pOptions. */
137 void paintBackground(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions) const;
138 /** @} */
139
140 /** @name Item stuff.
141 * @{ */
142 /** Holds the build step instance. */
143 UIPrepareStep *m_pBuildStep;
144 /** Holds the generated group ID. */
145 QUuid m_uGroupId;
146 /** @} */
147
148 /** @name Children stuff.
149 * @{ */
150 /** Holds the cached machine item list. */
151 QList<UIVirtualMachineItem*> m_machineItems;
152
153 /** Holds the child list (a list of sets). */
154 QList<UIDetailsItem*> m_items;
155 /** @} */
156
157 /** @name Layout stuff.
158 * @{ */
159 int m_iPreviousMinimumWidthHint;
160 int m_iPreviousMinimumHeightHint;
161 /** @} */
162};
163
164#endif /* !___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