VirtualBox

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

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

Frontends: scm --fix-header-guards. bugref:9344

  • 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 76532 2018-12-30 06:08:06Z 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#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24/* GUI includes: */
25#include "UIDetailsItem.h"
26
27/* Forward declarations: */
28class QGraphicsScene;
29class UIVirtualMachineItem;
30
31/** UIDetailsItem extension implementing group item. */
32class UIDetailsGroup : public UIDetailsItem
33{
34 Q_OBJECT;
35
36signals:
37
38 /** @name Layout stuff.
39 * @{ */
40 /** Notifies listeners about @a iMinimumWidthHint changed. */
41 void sigMinimumWidthHintChanged(int iMinimumWidthHint);
42 /** Notifies listeners about @a iMinimumHeightHint changed. */
43 void sigMinimumHeightHintChanged(int iMinimumHeightHint);
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
66 /** @name Children stuff.
67 * @{ */
68 /** Returns children items of certain @a enmType. */
69 virtual QList<UIDetailsItem*> items(UIDetailsItemType enmType = UIDetailsItemType_Set) const /* override */;
70 /** @} */
71
72 /** @name Layout stuff.
73 * @{ */
74 /** Updates layout. */
75 virtual void updateLayout() /* override */;
76
77 /** Returns minimum width-hint. */
78 virtual int minimumWidthHint() const /* override */;
79 /** Returns minimum height-hint. */
80 virtual int minimumHeightHint() const /* override */;
81 /** @} */
82
83protected slots:
84
85 /** @name Item stuff.
86 * @{ */
87 /** Handles request about starting step build.
88 * @param uStepId Brings the step ID.
89 * @param iStepNumber Brings the step number. */
90 /** @} */
91 virtual void sltBuildStep(const QUuid &uStepId, int iStepNumber) /* override */;
92
93protected:
94
95 /** @name Event-handling stuff.
96 * @{ */
97 /** Performs painting using passed @a pPainter, @a pOptions and optionally specified @a pWidget. */
98 virtual void paint(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions, QWidget *pWidget = 0) /* override */;
99 /** @} */
100
101 /** @name Item stuff.
102 * @{ */
103 /** Returns RTTI item type. */
104 virtual int type() const /* override */ { return Type; }
105
106 /** Returns the description of the item. */
107 virtual QString description() const /* override */ { return QString(); }
108 /** @} */
109
110 /** @name Children stuff.
111 * @{ */
112 /** Adds child @a pItem. */
113 virtual void addItem(UIDetailsItem *pItem) /* override */;
114 /** Removes child @a pItem. */
115 virtual void removeItem(UIDetailsItem *pItem) /* override */;
116
117 /** Returns whether there are children items of certain @a enmType. */
118 virtual bool hasItems(UIDetailsItemType enmType = UIDetailsItemType_Set) const /* override */;
119 /** Clears children items of certain @a enmType. */
120 virtual void clearItems(UIDetailsItemType enmType = UIDetailsItemType_Set) /* override */;
121 /** @} */
122
123 /** @name Layout stuff.
124 * @{ */
125 /** Updates geometry. */
126 virtual void updateGeometry() /* override */;
127 /** @} */
128
129private:
130
131 /** @name Prepare/cleanup cascade.
132 * @{ */
133 /** Prepares connections. */
134 void prepareConnections();
135 /** @} */
136
137 /** @name Painting stuff.
138 * @{ */
139 /** Paints background using specified @a pPainter and certain @a pOptions. */
140 void paintBackground(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions) const;
141 /** @} */
142
143 /** @name Item stuff.
144 * @{ */
145 /** Holds the build step instance. */
146 UIPrepareStep *m_pBuildStep;
147 /** Holds the generated group ID. */
148 QUuid m_uGroupId;
149 /** @} */
150
151 /** @name Children stuff.
152 * @{ */
153 /** Holds the cached machine item list. */
154 QList<UIVirtualMachineItem*> m_machineItems;
155
156 /** Holds the child list (a list of sets). */
157 QList<UIDetailsItem*> m_items;
158 /** @} */
159
160 /** @name Layout stuff.
161 * @{ */
162 int m_iPreviousMinimumWidthHint;
163 int m_iPreviousMinimumHeightHint;
164 /** @} */
165};
166
167#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