VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerDialog.h@ 82781

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

FE/Qt: Some more code cleanup.

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

© 2023 Oracle
ContactPrivacy policyTerms of Use