VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerHostTable.h@ 102515

Last change on this file since 102515 was 102515, checked in by vboxsync, 10 months ago

FE/Qt: ​bugref:9080, bugref:10141. Fixing host browser's menu entries.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1/* $Id: UIFileManagerHostTable.h 102515 2023-12-07 09:08:14Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIFileManagerHostTable class declaration.
4 */
5
6/*
7 * Copyright (C) 2016-2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef FEQT_INCLUDED_SRC_guestctrl_UIFileManagerHostTable_h
29#define FEQT_INCLUDED_SRC_guestctrl_UIFileManagerHostTable_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* Qt includes: */
35#include <QFileDevice>
36
37/* GUI includes: */
38#include "UIFileManagerTable.h"
39
40/* Forward declarations: */
41class UIActionPool;
42class UIFileSystemItem;
43
44/** This class scans the host file system by using the Qt API
45 and connects to the UIFileSystemModel*/
46class UIFileManagerHostTable : public UIFileManagerTable
47{
48 Q_OBJECT;
49
50public:
51
52 UIFileManagerHostTable(UIActionPool *pActionPool, QWidget *pParent = 0);
53
54 static KFsObjType fileType(const QFileInfo &fsInfo);
55 static KFsObjType fileType(const QString &strPath);
56 virtual bool isWindowsFileSystem() const override final;
57
58protected:
59
60 /** Scans the directory with the path @strPath and inserts items to the
61 * tree under the @p parent. */
62 static bool scanDirectory(const QString& strPath, UIFileSystemItem *parent,
63 QMap<QString, UIFileSystemItem*> &fileObjects);
64 void retranslateUi() override;
65 virtual bool readDirectory(const QString& strPath, UIFileSystemItem *parent, bool isStartDir = false) override final;
66 virtual void deleteByItem(UIFileSystemItem *item) override final;
67 virtual void goToHomeDirectory() override final;
68 virtual bool renameItem(UIFileSystemItem *item, const QString &strOldPath) override final;
69 virtual bool createDirectory(const QString &path, const QString &directoryName) override final;
70 virtual QString fsObjectPropertyString() override final;
71 virtual void showProperties() override final;
72 virtual void determineDriveLetters() override final;
73 virtual void determinePathSeparator() override final;
74 virtual void prepareToolbar() override final;
75 virtual void createFileViewContextMenu(const QWidget *pWidget, const QPoint &point) override;
76 virtual void toggleForwardBackwardActions() override final;
77
78 /** @name Copy/Cut host-to-host stuff. Currently not implemented.
79 * @{ */
80 /** Disable/enable paste action depending on the m_eFileOperationType. */
81 virtual void setPasteActionEnabled(bool) override final {}
82 virtual void pasteCutCopiedObjects() override final {}
83 /** @} */
84
85private:
86
87 static QString permissionString(QFileDevice::Permissions permissions);
88 void prepareActionConnections();
89
90 QAction *m_pModifierActionSeparator;
91};
92
93#endif /* !FEQT_INCLUDED_SRC_guestctrl_UIFileManagerHostTable_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