VirtualBox

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

Last change on this file since 82781 was 79815, checked in by vboxsync, 5 years ago

FE/Qt: bugref:9495: Form Editor widget: Functionality which allows to acquire horizontal/vertical header information; Using it New Cloud VM wizard to adjust Form Editor size.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1/* $Id: UIFormEditorWidget.h 79815 2019-07-16 17:31:08Z 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 QHeaderView;
30class UIFormEditorModel;
31class UIFormEditorView;
32class CVirtualSystemDescriptionForm;
33
34/** QWidget subclass representing model/view Form Editor widget. */
35class UIFormEditorWidget : public QWidget
36{
37 Q_OBJECT;
38
39public:
40
41 /** Constructs Form Editor widget passing @a pParent to the base-class. */
42 UIFormEditorWidget(QWidget *pParent = 0);
43
44 /** Returns horizontal header reference. */
45 QHeaderView *horizontalHeader() const;
46 /** Returns vertical header reference. */
47 QHeaderView *verticalHeader() const;
48
49 /** Defines virtual system description @a comForm to be edited. */
50 void setVirtualSystemDescriptionForm(const CVirtualSystemDescriptionForm &comForm);
51
52 /** Makes sure current editor data committed. */
53 void makeSureEditorDataCommitted();
54
55protected:
56
57 /** Preprocesses any Qt @a pEvent for passed @a pObject. */
58 virtual bool eventFilter(QObject *pObject, QEvent *pEvent) /* override */;
59
60private:
61
62 /** Prepares all. */
63 void prepare();
64
65 /** Adjusts table column sizes. */
66 void adjustTable();
67
68 /** Holds the table-view instance. */
69 UIFormEditorView *m_pTableView;
70 /** Holds the table-model instance. */
71 UIFormEditorModel *m_pTableModel;
72};
73
74/** Safe pointer to Form Editor widget. */
75typedef QPointer<UIFormEditorWidget> UIFormEditorWidgetPointer;
76
77#endif /* !FEQT_INCLUDED_SRC_widgets_UIFormEditorWidget_h */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use