VirtualBox

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

Last change on this file was 106061, checked in by vboxsync, 3 weeks ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
RevLine 
[71025]1/* $Id: UIFileManagerHostTable.h 106061 2024-09-16 14:03:52Z vboxsync $ */
2/** @file
[76177]3 * VBox Qt GUI - UIFileManagerHostTable class declaration.
[71025]4 */
5
6/*
[106061]7 * Copyright (C) 2016-2024 Oracle and/or its affiliates.
[71025]8 *
[96407]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
[71025]26 */
27
[76581]28#ifndef FEQT_INCLUDED_SRC_guestctrl_UIFileManagerHostTable_h
29#define FEQT_INCLUDED_SRC_guestctrl_UIFileManagerHostTable_h
[76532]30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
[71025]33
[94020]34/* Qt includes: */
35#include <QFileDevice>
36
[71133]37/* GUI includes: */
[76177]38#include "UIFileManagerTable.h"
[71133]39
[75136]40/* Forward declarations: */
41class UIActionPool;
[102485]42class UIFileSystemItem;
[75136]43
[72151]44/** This class scans the host file system by using the Qt API
[102485]45 and connects to the UIFileSystemModel*/
[76177]46class UIFileManagerHostTable : public UIFileManagerTable
[71185]47{
48 Q_OBJECT;
49
50public:
51
[76177]52 UIFileManagerHostTable(UIActionPool *pActionPool, QWidget *pParent = 0);
[102418]53
[76499]54 static KFsObjType fileType(const QFileInfo &fsInfo);
[92913]55 static KFsObjType fileType(const QString &strPath);
[102507]56 virtual bool isWindowsFileSystem() const override final;
[76499]57
58protected:
59
[76429]60 /** Scans the directory with the path @strPath and inserts items to the
61 * tree under the @p parent. */
[102485]62 static bool scanDirectory(const QString& strPath, UIFileSystemItem *parent,
63 QMap<QString, UIFileSystemItem*> &fileObjects);
64 virtual bool readDirectory(const QString& strPath, UIFileSystemItem *parent, bool isStartDir = false) override final;
65 virtual void deleteByItem(UIFileSystemItem *item) override final;
[92765]66 virtual void goToHomeDirectory() override final;
[102485]67 virtual bool renameItem(UIFileSystemItem *item, const QString &strOldPath) override final;
[92766]68 virtual bool createDirectory(const QString &path, const QString &directoryName) override final;
[92765]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;
[102515]74 virtual void createFileViewContextMenu(const QWidget *pWidget, const QPoint &point) override;
[100301]75 virtual void toggleForwardBackwardActions() override final;
[102507]76
[75760]77 /** @name Copy/Cut host-to-host stuff. Currently not implemented.
78 * @{ */
79 /** Disable/enable paste action depending on the m_eFileOperationType. */
[92766]80 virtual void setPasteActionEnabled(bool) override final {}
81 virtual void pasteCutCopiedObjects() override final {}
[75760]82 /** @} */
[71380]83
[104228]84protected slots:
85
86 virtual void sltRetranslateUI() RT_OVERRIDE;
87
[71412]88private:
89
[76429]90 static QString permissionString(QFileDevice::Permissions permissions);
[75184]91 void prepareActionConnections();
[102418]92
93 QAction *m_pModifierActionSeparator;
[71185]94};
95
[76581]96#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