VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeGlobal.h

Last change on this file was 106061, checked in by vboxsync, 3 weeks ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.3 KB
Line 
1/* $Id: UIChooserNodeGlobal.h 106061 2024-09-16 14:03:52Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIChooserNodeGlobal class declaration.
4 */
5
6/*
7 * Copyright (C) 2012-2024 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_chooser_UIChooserNodeGlobal_h
29#define FEQT_INCLUDED_SRC_manager_chooser_UIChooserNodeGlobal_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* GUI includes: */
35#include "UIChooserNode.h"
36
37
38/** UIChooserNode subclass used as interface for invisible tree-view global nodes. */
39class UIChooserNodeGlobal : public UIChooserNode
40{
41 Q_OBJECT;
42
43public:
44
45 /** Constructs chooser node passing @a pParent to the base-class.
46 * @param iPosition Brings the initial node position.
47 * @param fFavorite Brings whether the node is favorite.
48 * @param strTip Brings the dummy tip. */
49 UIChooserNodeGlobal(UIChooserNode *pParent,
50 int iPosition,
51 bool fFavorite,
52 const QString &strTip);
53 /** Constructs chooser node passing @a pParent to the base-class.
54 * @param iPosition Brings the initial node position.
55 * @param pCopyFrom Brings the node to copy data from. */
56 UIChooserNodeGlobal(UIChooserNode *pParent,
57 int iPosition,
58 UIChooserNodeGlobal *pCopyFrom);
59 /** Destructs chooser node. */
60 virtual ~UIChooserNodeGlobal() RT_OVERRIDE;
61
62 /** Returns RTTI node type. */
63 virtual UIChooserNodeType type() const RT_OVERRIDE { return UIChooserNodeType_Global; }
64
65 /** Returns node name. */
66 virtual QString name() const RT_OVERRIDE;
67 /** Returns full node name. */
68 virtual QString fullName() const RT_OVERRIDE;
69 /** Returns item description. */
70 virtual QString description() const RT_OVERRIDE;
71 /** Returns item definition.
72 * @param fFull Brings whether full definition is required
73 * which is used while saving group definitions,
74 * otherwise short definition will be returned,
75 * which is used while saving last chosen node. */
76 virtual QString definition(bool fFull = false) const RT_OVERRIDE;
77
78 /** Returns whether there are children of certain @a enmType. */
79 virtual bool hasNodes(UIChooserNodeType enmType = UIChooserNodeType_Any) const RT_OVERRIDE;
80 /** Returns a list of nodes of certain @a enmType. */
81 virtual QList<UIChooserNode*> nodes(UIChooserNodeType enmType = UIChooserNodeType_Any) const RT_OVERRIDE;
82
83 /** Adds passed @a pNode to specified @a iPosition. */
84 virtual void addNode(UIChooserNode *pNode, int iPosition) RT_OVERRIDE;
85 /** Removes passed @a pNode. */
86 virtual void removeNode(UIChooserNode *pNode) RT_OVERRIDE;
87
88 /** Removes all children with specified @a uId recursively. */
89 virtual void removeAllNodes(const QUuid &uId) RT_OVERRIDE;
90 /** Updates all children with specified @a uId recursively. */
91 virtual void updateAllNodes(const QUuid &uId) RT_OVERRIDE;
92
93 /** Returns position of specified node inside this one. */
94 virtual int positionOf(UIChooserNode *pNode) RT_OVERRIDE;
95
96 /** Updates the @a matchedItems wrt. @strSearchTerm and @a iSearchFlags. */
97 virtual void searchForNodes(const QString &strSearchTerm, int iSearchFlags, QList<UIChooserNode*> &matchedItems) RT_OVERRIDE;
98
99 /** Performs sorting of children nodes. */
100 virtual void sortNodes() RT_OVERRIDE;
101
102private slots:
103
104 /** Handles translation event. */
105 void sltRetranslateUI();
106
107private:
108
109 /** Holds the node name. */
110 QString m_strName;
111};
112
113
114#endif /* !FEQT_INCLUDED_SRC_manager_chooser_UIChooserNodeGlobal_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