VirtualBox

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

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

FE/Qt: bugref:9495: Form Editor widget: Functionality which makes sure current editor data is committed; Using it in every wizard, each time wizard is going to commit form-editor data to VSD.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1/* $Id: UIFormEditorWidget.h 79814 2019-07-16 15:59:06Z 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
46 /** Makes sure current editor data committed. */
47 void makeSureEditorDataCommitted();
48
49protected:
50
51 /** Preprocesses any Qt @a pEvent for passed @a pObject. */
52 virtual bool eventFilter(QObject *pObject, QEvent *pEvent) /* override */;
53
54private:
55
56 /** Prepares all. */
57 void prepare();
58
59 /** Adjusts table column sizes. */
60 void adjustTable();
61
62 /** Holds the table-view instance. */
63 UIFormEditorView *m_pTableView;
64 /** Holds the table-model instance. */
65 UIFormEditorModel *m_pTableModel;
66};
67
68/** Safe pointer to Form Editor widget. */
69typedef QPointer<UIFormEditorWidget> UIFormEditorWidgetPointer;
70
71#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