VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIFormEditorWidget.h@ 79242

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

FE/Qt: bugref:9434: Update UIFormEditorWidget with QPointer include to break collateral dependency since it uses it anyway.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
1/* $Id: UIFormEditorWidget.h 79242 2019-06-19 12:01:39Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIFormEditorWidget class declaration.
4 */
5
6/*
7 * Copyright (C) 2019 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_widgets_UIFormEditorWidget_h
19#define FEQT_INCLUDED_SRC_widgets_UIFormEditorWidget_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24/* Qt includes: */
25#include <QPointer>
26#include <QWidget>
27
28/* Forward declarations: */
29class UIFormEditorModel;
30class UIFormEditorView;
31class CVirtualSystemDescriptionForm;
32
33/** QWidget subclass representing model/view Form Editor widget. */
34class UIFormEditorWidget : public QWidget
35{
36 Q_OBJECT;
37
38public:
39
40 /** Constructs Form Editor widget passing @a pParent to the base-class. */
41 UIFormEditorWidget(QWidget *pParent = 0);
42
43 /** Defines virtual system description @a comForm to be edited. */
44 void setVirtualSystemDescriptionForm(const CVirtualSystemDescriptionForm &comForm);
45
46protected:
47
48 /** Preprocesses any Qt @a pEvent for passed @a pObject. */
49 virtual bool eventFilter(QObject *pObject, QEvent *pEvent) /* override */;
50
51private:
52
53 /** Prepares all. */
54 void prepare();
55
56 /** Adjusts table column sizes. */
57 void adjustTable();
58
59 /** Holds the table-view instance. */
60 UIFormEditorView *m_pTableView;
61 /** Holds the table-model instance. */
62 UIFormEditorModel *m_pTableModel;
63};
64
65/** Safe pointer to Form Editor widget. */
66typedef QPointer<UIFormEditorWidget> UIFormEditorWidgetPointer;
67
68#endif /* !FEQT_INCLUDED_SRC_widgets_UIFormEditorWidget_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