VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerHostTable.cpp@ 102493

Last change on this file since 102493 was 102485, checked in by vboxsync, 9 months ago

FE/Qt: bugref:10561. Some refactoring.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 22.6 KB
Line 
1/* $Id: UIFileManagerHostTable.cpp 102485 2023-12-05 17:37:02Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIFileManagerHostTable class implementation.
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/* Qt includes: */
29#include <QAction>
30#include <QDateTime>
31#include <QDir>
32
33/* GUI includes: */
34#include "QILabel.h"
35#include "UIActionPool.h"
36#include "UICommon.h"
37#include "UIFileManager.h"
38#include "UIFileTableNavigationWidget.h"
39#include "UIFileSystemModel.h"
40#include "UIFileManagerHostTable.h"
41#include "UIPathOperations.h"
42#include "QIToolBar.h"
43
44
45/*********************************************************************************************************************************
46* UIHostDirectoryDiskUsageComputer definition. *
47*********************************************************************************************************************************/
48
49/** Open directories recursively and sum the disk usage. Don't block the GUI thread while doing this */
50class UIHostDirectoryDiskUsageComputer : public UIDirectoryDiskUsageComputer
51{
52 Q_OBJECT;
53
54public:
55
56 UIHostDirectoryDiskUsageComputer(QObject *parent, QStringList strStartPath);
57
58protected:
59
60 virtual void directoryStatisticsRecursive(const QString &path, UIDirectoryStatistics &statistics) RT_OVERRIDE;
61};
62
63
64/*********************************************************************************************************************************
65* UIHostDirectoryDiskUsageComputer implementation. *
66*********************************************************************************************************************************/
67
68UIHostDirectoryDiskUsageComputer::UIHostDirectoryDiskUsageComputer(QObject *parent, QStringList pathList)
69 :UIDirectoryDiskUsageComputer(parent, pathList)
70{
71}
72
73void UIHostDirectoryDiskUsageComputer::directoryStatisticsRecursive(const QString &path, UIDirectoryStatistics &statistics)
74{
75 /* Prevent modification of the continue flag while reading: */
76 m_mutex.lock();
77 /* Check if m_fOkToContinue is set to false. if so just end recursion: */
78 if (!isOkToContinue())
79 {
80 m_mutex.unlock();
81 return;
82 }
83 m_mutex.unlock();
84
85 QFileInfo fileInfo(path);
86 if (!fileInfo.exists())
87 return;
88 /* if the object is a file or a symlink then read the size and return: */
89 if (fileInfo.isFile())
90 {
91 statistics.m_totalSize += fileInfo.size();
92 ++statistics.m_uFileCount;
93 sigResultUpdated(statistics);
94 return;
95 }
96 else if (fileInfo.isSymLink())
97 {
98 statistics.m_totalSize += fileInfo.size();
99 ++statistics.m_uSymlinkCount;
100 sigResultUpdated(statistics);
101 return;
102 }
103
104 /* if it is a directory then read the content: */
105 QDir dir(path);
106 if (!dir.exists())
107 return;
108
109 QFileInfoList entryList = dir.entryInfoList();
110 for (int i = 0; i < entryList.size(); ++i)
111 {
112 const QFileInfo &entryInfo = entryList.at(i);
113 if (entryInfo.baseName().isEmpty() || entryInfo.baseName() == "." ||
114 entryInfo.baseName() == UIFileSystemModel::strUpDirectoryString)
115 continue;
116 statistics.m_totalSize += entryInfo.size();
117 if (entryInfo.isSymLink())
118 statistics.m_uSymlinkCount++;
119 else if(entryInfo.isFile())
120 statistics.m_uFileCount++;
121 else if (entryInfo.isDir())
122 {
123 statistics.m_uDirectoryCount++;
124 directoryStatisticsRecursive(entryInfo.absoluteFilePath(), statistics);
125 }
126 }
127 sigResultUpdated(statistics);
128}
129
130
131/*********************************************************************************************************************************
132* UIFileManagerHostTable implementation. *
133*********************************************************************************************************************************/
134
135UIFileManagerHostTable::UIFileManagerHostTable(UIActionPool *pActionPool, QWidget *pParent /* = 0 */)
136 :UIFileManagerTable(pActionPool, pParent)
137 , m_pModifierActionSeparator(0)
138{
139 setModelFileSystem(isWindowsFileSystem());
140 initializeFileTree();
141 prepareToolbar();
142 prepareActionConnections();
143 determinePathSeparator();
144 retranslateUi();
145}
146
147void UIFileManagerHostTable::setModifierActionsVisible(bool fShown)
148{
149 if (m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Delete))
150 m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Delete)->setVisible(fShown);
151 if (m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Rename))
152 m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Rename)->setVisible(fShown);
153 if (m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_CreateNewDirectory))
154 m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_CreateNewDirectory)->setVisible(fShown);
155 if (m_pModifierActionSeparator)
156 m_pModifierActionSeparator->setVisible(fShown);
157}
158
159/* static */ bool UIFileManagerHostTable::scanDirectory(const QString& strPath, UIFileSystemItem *parent,
160 QMap<QString, UIFileSystemItem*> &fileObjects)
161{
162
163 QDir directory(UIPathOperations::addTrailingDelimiters(strPath));
164 /* For some reason when this filter is applied, folder content QDir::entryInfoList()
165 returns an empty list: */
166 /*directory.setFilter(QDir::NoDotAndDotDot);*/
167 if (!directory.exists() || !directory.isReadable())
168 return false;
169 QFileInfoList entries = directory.entryInfoList(QDir::Hidden|QDir::AllEntries|QDir::NoDotAndDotDot);
170
171 parent->setIsOpened(true);
172 for (int i = 0; i < entries.size(); ++i)
173 {
174 const QFileInfo &fileInfo = entries.at(i);
175 UIFileSystemItem *item = new UIFileSystemItem(fileInfo.fileName(), parent, fileType(fileInfo));
176 if (!item)
177 continue;
178
179 item->setData(fileInfo.size(), UIFileSystemModelData_Size);
180 item->setData(fileInfo.lastModified(), UIFileSystemModelData_ChangeTime);
181 item->setData(fileInfo.owner(), UIFileSystemModelData_Owner);
182 item->setData(permissionString(fileInfo.permissions()), UIFileSystemModelData_Permissions);
183
184 /* if the item is a symlink set the target path and
185 check the target if it is a directory: */
186 if (fileInfo.isSymLink()) /** @todo No symlinks here on windows, while fsObjectPropertyString() does see them. RTDirReadEx works wrt symlinks, btw. */
187 {
188 item->setTargetPath(fileInfo.symLinkTarget());
189 item->setIsSymLinkToADirectory(QFileInfo(fileInfo.symLinkTarget()).isDir());
190 }
191 item->setIsHidden(fileInfo.isHidden());
192 fileObjects.insert(fileInfo.fileName(), item);
193 item->setIsOpened(false);
194 }
195 return true;
196}
197
198void UIFileManagerHostTable::retranslateUi()
199{
200 if (m_pLocationLabel)
201 m_pLocationLabel->setText(UIFileManager::tr("Host File System:"));
202 m_strTableName = UIFileManager::tr("Host");
203 UIFileManagerTable::retranslateUi();
204}
205
206void UIFileManagerHostTable::prepareToolbar()
207{
208 if (m_pToolBar && m_pActionPool)
209 {
210 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoBackward));
211 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoForward));
212 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoUp));
213 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoHome));
214 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Refresh));
215
216 m_pModifierActionSeparator = m_pToolBar->addSeparator();
217 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Delete));
218 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Rename));
219 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_CreateNewDirectory));
220
221 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Copy));
222 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Cut));
223 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Paste));
224 m_pToolBar->addSeparator();
225 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_SelectAll));
226 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_InvertSelection));
227 m_pToolBar->addSeparator();
228 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_ShowProperties));
229
230 m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Delete));
231 m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Rename));
232 m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_ShowProperties));
233
234 /* Hide cut, copy, and paste for now. We will implement those
235 when we have an API for host file operations: */
236 m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Copy)->setVisible(false);
237 m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Cut)->setVisible(false);
238 m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Paste)->setVisible(false);
239 }
240 setSelectionDependentActionsEnabled(false);
241}
242
243void UIFileManagerHostTable::createFileViewContextMenu(const QWidget *pWidget, const QPoint &point)
244{
245 if (!pWidget)
246 return;
247
248 QMenu menu;
249 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoUp));
250
251 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoHome));
252 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Refresh));
253 menu.addSeparator();
254 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Delete));
255 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Rename));
256 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_CreateNewDirectory));
257 // menu.addSeparator();
258 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Copy));
259 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Cut));
260 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Paste));
261 menu.addSeparator();
262 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_SelectAll));
263 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_InvertSelection));
264 menu.addSeparator();
265 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_ShowProperties));
266 menu.exec(pWidget->mapToGlobal(point));
267}
268
269void UIFileManagerHostTable::toggleForwardBackwardActions()
270{
271 if (!m_pNavigationWidget)
272 return;
273 if (m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoForward))
274 m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoForward)->setEnabled(m_pNavigationWidget->canGoForward());
275 if (m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoBackward))
276 m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoBackward)->setEnabled(m_pNavigationWidget->canGoBackward());
277}
278
279bool UIFileManagerHostTable::isWindowsFileSystem() const
280{
281 return uiCommon().hostOperatingSystem().contains("windows", Qt::CaseInsensitive);
282}
283
284bool UIFileManagerHostTable::readDirectory(const QString& strPath, UIFileSystemItem *parent, bool isStartDir /*= false*/)
285{
286 if (!parent)
287 return false;
288
289 QMap<QString, UIFileSystemItem*> fileObjects;
290 if (!scanDirectory(strPath, parent, fileObjects))
291 return false;
292 checkDotDot(fileObjects, parent, isStartDir);
293 return true;
294}
295
296void UIFileManagerHostTable::deleteByItem(UIFileSystemItem *item)
297{
298 if (item->isUpDirectory())
299 return;
300 if (!item->isDirectory())
301 {
302 QDir itemToDelete;
303 itemToDelete.remove(UIPathOperations::removeTrailingDelimiters(item->path()));
304 }
305 QDir itemToDelete(item->path());
306 itemToDelete.setFilter(QDir::NoDotAndDotDot);
307 /* Try to delete item recursively (in case of directories).
308 note that this is no good way of deleting big directory
309 trees. We need a better error reporting and a kind of progress
310 indicator: */
311 /** @todo replace this recursive delete by a better implementation: */
312 bool deleteSuccess = itemToDelete.removeRecursively();
313
314 if (!deleteSuccess)
315 emit sigLogOutput(QString(item->path()).append(" could not be deleted"), m_strTableName, FileManagerLogType_Error);
316}
317
318void UIFileManagerHostTable::goToHomeDirectory()
319{
320 if (!rootItem() || rootItem()->childCount() <= 0)
321 return;
322 UIFileSystemItem *startDirItem = rootItem()->child(0);
323 if (!startDirItem)
324 return;
325
326 QString userHome = UIPathOperations::sanitize(QDir::homePath());
327 goIntoDirectory(UIPathOperations::pathTrail(userHome));
328}
329
330bool UIFileManagerHostTable::renameItem(UIFileSystemItem *item, const QString &strOldPath)
331{
332 if (!item || item->isUpDirectory())
333 return false;
334 QDir tempDir;
335 if (tempDir.rename(strOldPath, item->path()))
336 return true;
337
338 return false;
339}
340
341bool UIFileManagerHostTable::createDirectory(const QString &path, const QString &directoryName)
342{
343 QDir parentDir(path);
344 if (!parentDir.mkdir(directoryName))
345 {
346 emit sigLogOutput(UIPathOperations::mergePaths(path, directoryName).append(" could not be created"), m_strTableName, FileManagerLogType_Error);
347 return false;
348 }
349
350 return true;
351}
352
353/* static */
354KFsObjType UIFileManagerHostTable::fileType(const QFileInfo &fsInfo)
355{
356 if (!fsInfo.exists())
357 return KFsObjType_Unknown;
358 /* first check if it is symlink becacuse for Qt
359 being smylin and directory/file is not mutually exclusive: */
360 if (fsInfo.isSymLink())
361 return KFsObjType_Symlink;
362 else if (fsInfo.isFile())
363 return KFsObjType_File;
364 else if (fsInfo.isDir())
365 return KFsObjType_Directory;
366 return KFsObjType_Unknown;
367}
368
369/* static */
370KFsObjType UIFileManagerHostTable::fileType(const QString &strPath)
371{
372 return fileType(QFileInfo(strPath));
373}
374
375QString UIFileManagerHostTable::fsObjectPropertyString()
376{
377 QStringList selectedObjects = selectedItemPathList();
378 if (selectedObjects.isEmpty())
379 return QString();
380 if (selectedObjects.size() == 1)
381 {
382 if (selectedObjects.at(0).isNull())
383 return QString();
384 QFileInfo fileInfo(selectedObjects.at(0));
385 if (!fileInfo.exists())
386 return QString();
387 QStringList propertyStringList;
388 /* Name: */
389 propertyStringList << UIFileManager::tr("<b>Name:</b> %1<br/>").arg(fileInfo.fileName());
390 /* Size: */
391 propertyStringList << UIFileManager::tr("<b>Size:</b> %1 bytes").arg(QString::number(fileInfo.size()));
392 if (fileInfo.size() >= m_iKiloByte)
393 propertyStringList << QString(" (%1)").arg(humanReadableSize(fileInfo.size()));
394 propertyStringList << "<br/>";
395 /* Type: */
396 propertyStringList << UIFileManager::tr("<b>Type:</b> %1<br/>").arg(fileTypeString(fileType(fileInfo)));
397 /* Creation Date: */
398#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
399 propertyStringList << UIFileManager::tr("<b>Created:</b> %1<br/>").arg(fileInfo.birthTime().toString());
400#else
401 propertyStringList << UIFileManager::tr("<b>Created:</b> %1<br/>").arg(fileInfo.created().toString());
402#endif
403 /* Last Modification Date: */
404 propertyStringList << UIFileManager::tr("<b>Modified:</b> %1<br/>").arg(fileInfo.lastModified().toString());
405 /* Owner: */
406 propertyStringList << UIFileManager::tr("<b>Owner:</b> %1").arg(fileInfo.owner());
407
408 return propertyStringList.join(QString());
409 }
410
411 int fileCount = 0;
412 int directoryCount = 0;
413 ULONG64 totalSize = 0;
414
415 for(int i = 0; i < selectedObjects.size(); ++i)
416 {
417 QFileInfo fileInfo(selectedObjects.at(i));
418 if (!fileInfo.exists())
419 continue;
420 if (fileInfo.isFile())
421 ++fileCount;
422 if (fileInfo.isDir())
423 ++directoryCount;
424 totalSize += fileInfo.size();
425 }
426 QStringList propertyStringList;
427 propertyStringList << UIFileManager::tr("<b>Selected:</b> %1 files and %2 directories<br/>").
428 arg(QString::number(fileCount)).arg(QString::number(directoryCount));
429 propertyStringList << UIFileManager::tr("<b>Size:</b> %1 bytes").arg(QString::number(totalSize));
430 if (totalSize >= m_iKiloByte)
431 propertyStringList << QString(" (%1)").arg(humanReadableSize(totalSize));
432
433 return propertyStringList.join(QString());
434}
435
436void UIFileManagerHostTable::showProperties()
437{
438 qRegisterMetaType<UIDirectoryStatistics>();
439 QString fsPropertyString = fsObjectPropertyString();
440 if (fsPropertyString.isEmpty())
441 return;
442 if (!m_pPropertiesDialog)
443 m_pPropertiesDialog = new UIPropertiesDialog(this);
444 if (!m_pPropertiesDialog)
445 return;
446
447 UIHostDirectoryDiskUsageComputer *directoryThread = 0;
448
449 QStringList selectedObjects = selectedItemPathList();
450 if ((selectedObjects.size() == 1 && QFileInfo(selectedObjects.at(0)).isDir())
451 || selectedObjects.size() > 1)
452 {
453 directoryThread = new UIHostDirectoryDiskUsageComputer(this, selectedObjects);
454 if (directoryThread)
455 {
456 connect(directoryThread, &UIHostDirectoryDiskUsageComputer::sigResultUpdated,
457 this, &UIFileManagerHostTable::sltReceiveDirectoryStatistics/*, Qt::DirectConnection*/);
458 directoryThread->start();
459 }
460 }
461 m_pPropertiesDialog->setWindowTitle("Properties");
462 m_pPropertiesDialog->setPropertyText(fsPropertyString);
463 m_pPropertiesDialog->execute();
464 if (directoryThread)
465 {
466 if (directoryThread->isRunning())
467 directoryThread->stopRecursion();
468 disconnect(directoryThread, &UIHostDirectoryDiskUsageComputer::sigResultUpdated,
469 this, &UIFileManagerHostTable::sltReceiveDirectoryStatistics/*, Qt::DirectConnection*/);
470 directoryThread->wait();
471 }
472}
473
474void UIFileManagerHostTable::determineDriveLetters()
475{
476 QFileInfoList drive = QDir::drives();
477 m_driveLetterList.clear();
478 for (int i = 0; i < drive.size(); ++i)
479 {
480 if (UIPathOperations::doesPathStartWithDriveLetter(drive[i].filePath()))
481 m_driveLetterList.push_back(drive[i].filePath());
482 }
483}
484
485void UIFileManagerHostTable::determinePathSeparator()
486{
487 setPathSeparator(QDir::separator());
488}
489
490/* static */QString UIFileManagerHostTable::permissionString(QFileDevice::Permissions permissions)
491{
492 QString strPermissions;
493 if (permissions & QFileDevice::ReadOwner)
494 strPermissions += 'r';
495 else
496 strPermissions += '-';
497
498 if (permissions & QFileDevice::WriteOwner)
499 strPermissions += 'w';
500 else
501 strPermissions += '-';
502
503 if (permissions & QFileDevice::ExeOwner)
504 strPermissions += 'x';
505 else
506 strPermissions += '-';
507
508 if (permissions & QFileDevice::ReadGroup)
509 strPermissions += 'r';
510 else
511 strPermissions += '-';
512
513 if (permissions & QFileDevice::WriteGroup)
514 strPermissions += 'w';
515 else
516 strPermissions += '-';
517
518 if (permissions & QFileDevice::ExeGroup)
519 strPermissions += 'x';
520 else
521 strPermissions += '-';
522
523 if (permissions & QFileDevice::ReadOther)
524 strPermissions += 'r';
525 else
526 strPermissions += '-';
527
528 if (permissions & QFileDevice::WriteOther)
529 strPermissions += 'w';
530 else
531 strPermissions += '-';
532
533 if (permissions & QFileDevice::ExeOther)
534 strPermissions += 'x';
535 else
536 strPermissions += '-';
537 return strPermissions;
538}
539
540void UIFileManagerHostTable::prepareActionConnections()
541{
542 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoUp), &QAction::triggered,
543 this, &UIFileManagerTable::sltGoUp);
544 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoHome), &QAction::triggered,
545 this, &UIFileManagerTable::sltGoHome);
546 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoForward), &QAction::triggered,
547 this, &UIFileManagerTable::sltGoForward);
548 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoBackward), &QAction::triggered,
549 this, &UIFileManagerTable::sltGoBackward);
550 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Refresh), &QAction::triggered,
551 this, &UIFileManagerTable::sltRefresh);
552 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Delete), &QAction::triggered,
553 this, &UIFileManagerTable::sltDelete);
554 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Rename), &QAction::triggered,
555 this, &UIFileManagerTable::sltRename);
556 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Copy), &QAction::triggered,
557 this, &UIFileManagerTable::sltCopy);
558 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Cut), &QAction::triggered,
559 this, &UIFileManagerTable::sltCut);
560 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Paste), &QAction::triggered,
561 this, &UIFileManagerTable::sltPaste);
562 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_SelectAll), &QAction::triggered,
563 this, &UIFileManagerTable::sltSelectAll);
564 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_InvertSelection), &QAction::triggered,
565 this, &UIFileManagerTable::sltInvertSelection);
566 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_ShowProperties), &QAction::triggered,
567 this, &UIFileManagerTable::sltShowProperties);
568 connect(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_CreateNewDirectory), &QAction::triggered,
569 this, &UIFileManagerTable::sltCreateNewDirectory);
570}
571
572#include "UIFileManagerHostTable.moc"
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