VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManagerDialog.h@ 75272

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

FE/Qt: bugref:6699. Handle the escape shourcut stuff during 'finalize' instead of 'prepare'

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
Line 
1/* $Id: UIGuestControlFileManagerDialog.h 75272 2018-11-06 10:56:59Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIGuestControlFileManagerDialog class declaration.
4 */
5
6/*
7 * Copyright (C) 2010-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 ___UIGuestControlFileManagerDialog_h___
19#define ___UIGuestControlFileManagerDialog_h___
20
21/* Qt includes: */
22#include <QString>
23
24/* GUI includes: */
25#include "QIManagerDialog.h"
26#include "QIWithRetranslateUI.h"
27
28/* COM includes: */
29#include "COMEnums.h"
30#include "CGuest.h"
31
32/* Forward declarations: */
33class QDialogButtonBox;
34class QVBoxLayout;
35class UIActionPool;
36class UIGuestControlFileManagerDialog;
37class CGuest;
38
39
40/** QIManagerDialogFactory extension used as a factory for the Guest Control dialog. */
41class UIGuestControlFileManagerDialogFactory : public QIManagerDialogFactory
42{
43public:
44
45 UIGuestControlFileManagerDialogFactory(UIActionPool *pActionPool = 0, const CGuest &comGuest = CGuest(), const QString &strMachineName = QString());
46
47protected:
48
49 /** Creates derived @a pDialog instance.
50 * @param pCenterWidget Passes the widget to center wrt. pCenterWidget. */
51 virtual void create(QIManagerDialog *&pDialog, QWidget *pCenterWidget) /* override */;
52
53 UIActionPool *m_pActionPool;
54 CGuest m_comGuest;
55 QString m_strMachineName;
56};
57
58
59/** QIManagerDialog extension providing GUI with the dialog displaying guest control releated logs. */
60class UIGuestControlFileManagerDialog : public QIWithRetranslateUI<QIManagerDialog>
61{
62 Q_OBJECT;
63
64public:
65
66 /** Constructs Guest Control dialog.
67 * @param pCenterWidget Passes the widget reference to center according to.
68 * @param pActionPool Passes the action-pool reference.
69 * @param comGuest Passes the com-guest reference. */
70 UIGuestControlFileManagerDialog(QWidget *pCenterWidget, UIActionPool *pActionPool, const CGuest &comGuest, const QString &strMachineName = QString());
71
72protected:
73
74 /** @name Event-handling stuff.
75 * @{ */
76 /** Handles translation event. */
77 virtual void retranslateUi() /* override */;
78 /** @} */
79
80 /** @name Prepare/cleanup cascade.
81 * @{ */
82 /** Configures all. */
83 virtual void configure() /* override */;
84 /** Configures central-widget. */
85 virtual void configureCentralWidget() /* override */;
86 /** Perform final preparations. */
87 virtual void finalize() /* override */;
88 /** Loads dialog setting such as geometry from extradata. */
89 virtual void loadSettings() /* override */;
90
91 /** Saves dialog setting into extradata. */
92 virtual void saveSettings() const /* override */;
93 /** @} */
94
95 /** @name Functions related to geometry restoration.
96 * @{ */
97 /** Returns whether the window should be maximized when geometry being restored. */
98 virtual bool shouldBeMaximized() const /* override */;
99 /** @} */
100
101private slots:
102
103 void sltSetCloseButtonShortCut(QKeySequence shortcut);
104
105private:
106
107 void manageEscapeShortCut();
108 UIActionPool *m_pActionPool;
109 CGuest m_comGuest;
110 QString m_strMachineName;
111};
112
113
114#endif /* !___UIGuestControlFileManagerDialog_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