VirtualBox

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

Last change on this file since 100347 was 100301, checked in by vboxsync, 19 months ago

FE/Qt: bugref:9080. Build fix.

  • 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 100301 2023-06-27 15:06: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 UICustomFileSystemItem;
43
44/** This class scans the host file system by using the Qt API
45 and connects to the UICustomFileSystemModel*/
46class UIFileManagerHostTable : public UIFileManagerTable
47{
48 Q_OBJECT;
49
50public:
51
52 UIFileManagerHostTable(UIActionPool *pActionPool, QWidget *pParent = 0);
53 static KFsObjType fileType(const QFileInfo &fsInfo);
54 static KFsObjType fileType(const QString &strPath);
55
56protected:
57
58 /** Scans the directory with the path @strPath and inserts items to the
59 * tree under the @p parent. */
60 static void scanDirectory(const QString& strPath, UICustomFileSystemItem *parent,
61 QMap<QString, UICustomFileSystemItem*> &fileObjects);
62 void retranslateUi() override final;
63 virtual void readDirectory(const QString& strPath, UICustomFileSystemItem *parent, bool isStartDir = false) override final;
64 virtual void deleteByItem(UICustomFileSystemItem *item) override final;
65 virtual void deleteByPath(const QStringList &pathList) override final;
66 virtual void goToHomeDirectory() override final;
67 virtual bool renameItem(UICustomFileSystemItem *item, QString newBaseName) override final;
68 virtual bool createDirectory(const QString &path, const QString &directoryName) override final;
69 virtual QString fsObjectPropertyString() override final;
70 virtual void showProperties() override final;
71 virtual void determineDriveLetters() override final;
72 virtual void determinePathSeparator() override final;
73 virtual void prepareToolbar() override final;
74 virtual void createFileViewContextMenu(const QWidget *pWidget, const QPoint &point) override final;
75 virtual void toggleForwardBackwardActions() override final;
76 /** @name Copy/Cut host-to-host stuff. Currently not implemented.
77 * @{ */
78 /** Disable/enable paste action depending on the m_eFileOperationType. */
79 virtual void setPasteActionEnabled(bool) override final {}
80 virtual void pasteCutCopiedObjects() override final {}
81 /** @} */
82
83private:
84
85 static QString permissionString(QFileDevice::Permissions permissions);
86 void prepareActionConnections();
87};
88
89#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