VirtualBox

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

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

FE/Qt: bugref:6699, bugref:9080. A bit better API for forward/backward action toggle.

  • 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 100324 2023-06-28 12:35:20Z 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 "UIFileManager.h"
37#include "UIFileTableNavigationWidget.h"
38#include "UICustomFileSystemModel.h"
39#include "UIFileManagerHostTable.h"
40#include "UIPathOperations.h"
41#include "QIToolBar.h"
42
43
44/*********************************************************************************************************************************
45* UIHostDirectoryDiskUsageComputer definition. *
46*********************************************************************************************************************************/
47
48/** Open directories recursively and sum the disk usage. Don't block the GUI thread while doing this */
49class UIHostDirectoryDiskUsageComputer : public UIDirectoryDiskUsageComputer
50{
51 Q_OBJECT;
52
53public:
54
55 UIHostDirectoryDiskUsageComputer(QObject *parent, QStringList strStartPath);
56
57protected:
58
59 virtual void directoryStatisticsRecursive(const QString &path, UIDirectoryStatistics &statistics) RT_OVERRIDE;
60};
61
62
63/*********************************************************************************************************************************
64* UIHostDirectoryDiskUsageComputer implementation. *
65*********************************************************************************************************************************/
66
67UIHostDirectoryDiskUsageComputer::UIHostDirectoryDiskUsageComputer(QObject *parent, QStringList pathList)
68 :UIDirectoryDiskUsageComputer(parent, pathList)
69{
70}
71
72void UIHostDirectoryDiskUsageComputer::directoryStatisticsRecursive(const QString &path, UIDirectoryStatistics &statistics)
73{
74 /* Prevent modification of the continue flag while reading: */
75 m_mutex.lock();
76 /* Check if m_fOkToContinue is set to false. if so just end recursion: */
77 if (!isOkToContinue())
78 {
79 m_mutex.unlock();
80 return;
81 }
82 m_mutex.unlock();
83
84 QFileInfo fileInfo(path);
85 if (!fileInfo.exists())
86 return;
87 /* if the object is a file or a symlink then read the size and return: */
88 if (fileInfo.isFile())
89 {
90 statistics.m_totalSize += fileInfo.size();
91 ++statistics.m_uFileCount;
92 sigResultUpdated(statistics);
93 return;
94 }
95 else if (fileInfo.isSymLink())
96 {
97 statistics.m_totalSize += fileInfo.size();
98 ++statistics.m_uSymlinkCount;
99 sigResultUpdated(statistics);
100 return;
101 }
102
103 /* if it is a directory then read the content: */
104 QDir dir(path);
105 if (!dir.exists())
106 return;
107
108 QFileInfoList entryList = dir.entryInfoList();
109 for (int i = 0; i < entryList.size(); ++i)
110 {
111 const QFileInfo &entryInfo = entryList.at(i);
112 if (entryInfo.baseName().isEmpty() || entryInfo.baseName() == "." ||
113 entryInfo.baseName() == UICustomFileSystemModel::strUpDirectoryString)
114 continue;
115 statistics.m_totalSize += entryInfo.size();
116 if (entryInfo.isSymLink())
117 statistics.m_uSymlinkCount++;
118 else if(entryInfo.isFile())
119 statistics.m_uFileCount++;
120 else if (entryInfo.isDir())
121 {
122 statistics.m_uDirectoryCount++;
123 directoryStatisticsRecursive(entryInfo.absoluteFilePath(), statistics);
124 }
125 }
126 sigResultUpdated(statistics);
127}
128
129
130/*********************************************************************************************************************************
131* UIFileManagerHostTable implementation. *
132*********************************************************************************************************************************/
133
134UIFileManagerHostTable::UIFileManagerHostTable(UIActionPool *pActionPool, QWidget *pParent /* = 0 */)
135 :UIFileManagerTable(pActionPool, pParent)
136{
137 initializeFileTree();
138 prepareToolbar();
139 prepareActionConnections();
140 determinePathSeparator();
141 retranslateUi();
142}
143
144/* static */ void UIFileManagerHostTable::scanDirectory(const QString& strPath, UICustomFileSystemItem *parent,
145 QMap<QString, UICustomFileSystemItem*> &fileObjects)
146{
147
148 QDir directory(strPath);
149 /* For some reason when this filter is applied, folder content QDir::entryInfoList()
150 returns an empty list: */
151 /*directory.setFilter(QDir::NoDotAndDotDot);*/
152 parent->setIsOpened(true);
153 if (!directory.exists())
154 return;
155 QFileInfoList entries = directory.entryInfoList(QDir::Hidden|QDir::AllEntries|QDir::NoDotAndDotDot);
156 for (int i = 0; i < entries.size(); ++i)
157 {
158 const QFileInfo &fileInfo = entries.at(i);
159
160 UICustomFileSystemItem *item = new UICustomFileSystemItem(fileInfo.fileName(), parent, fileType(fileInfo));
161 if (!item)
162 continue;
163
164 item->setData(fileInfo.size(), UICustomFileSystemModelData_Size);
165 item->setData(fileInfo.lastModified(), UICustomFileSystemModelData_ChangeTime);
166 item->setData(fileInfo.owner(), UICustomFileSystemModelData_Owner);
167 item->setData(permissionString(fileInfo.permissions()), UICustomFileSystemModelData_Permissions);
168 item->setPath(fileInfo.absoluteFilePath());
169 /* if the item is a symlink set the target path and
170 check the target if it is a directory: */
171 if (fileInfo.isSymLink()) /** @todo No symlinks here on windows, while fsObjectPropertyString() does see them. RTDirReadEx works wrt symlinks, btw. */
172 {
173 item->setTargetPath(fileInfo.symLinkTarget());
174 item->setIsSymLinkToADirectory(QFileInfo(fileInfo.symLinkTarget()).isDir());
175 }
176 item->setIsHidden(fileInfo.isHidden());
177 fileObjects.insert(fileInfo.fileName(), item);
178 item->setIsOpened(false);
179 }
180}
181
182void UIFileManagerHostTable::retranslateUi()
183{
184 if (m_pLocationLabel)
185 m_pLocationLabel->setText(UIFileManager::tr("Host File System:"));
186 m_strTableName = UIFileManager::tr("Host");
187 UIFileManagerTable::retranslateUi();
188}
189
190void UIFileManagerHostTable::prepareToolbar()
191{
192 if (m_pToolBar && m_pActionPool)
193 {
194 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoBackward));
195 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoForward));
196 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoUp));
197 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoHome));
198 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Refresh));
199 m_pToolBar->addSeparator();
200 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Delete));
201 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Rename));
202 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_CreateNewDirectory));
203 // m_pToolBar->addSeparator();
204 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Copy));
205 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Cut));
206 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Paste));
207 m_pToolBar->addSeparator();
208 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_SelectAll));
209 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_InvertSelection));
210 m_pToolBar->addSeparator();
211 m_pToolBar->addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_ShowProperties));
212
213 m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Delete));
214 m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Rename));
215 m_selectionDependentActions.insert(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_ShowProperties));
216
217 /* Hide cut, copy, and paste for now. We will implement those
218 when we have an API for host file operations: */
219 m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Copy)->setVisible(false);
220 m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Cut)->setVisible(false);
221 m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Paste)->setVisible(false);
222 }
223 setSelectionDependentActionsEnabled(false);
224}
225
226void UIFileManagerHostTable::createFileViewContextMenu(const QWidget *pWidget, const QPoint &point)
227{
228 if (!pWidget)
229 return;
230
231 QMenu menu;
232 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoUp));
233
234 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoHome));
235 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Refresh));
236 menu.addSeparator();
237 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Delete));
238 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Rename));
239 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_CreateNewDirectory));
240 // menu.addSeparator();
241 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Copy));
242 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Cut));
243 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_Paste));
244 menu.addSeparator();
245 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_SelectAll));
246 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_InvertSelection));
247 menu.addSeparator();
248 menu.addAction(m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_ShowProperties));
249 menu.exec(pWidget->mapToGlobal(point));
250}
251
252void UIFileManagerHostTable::toggleForwardBackwardActions()
253{
254 if (!m_pNavigationWidget)
255 return;
256 if (m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoForward))
257 m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoForward)->setEnabled(m_pNavigationWidget->canGoForward());
258 if (m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoBackward))
259 m_pActionPool->action(UIActionIndex_M_FileManager_S_Host_GoBackward)->setEnabled(m_pNavigationWidget->canGoBackward());
260}
261
262void UIFileManagerHostTable::readDirectory(const QString& strPath, UICustomFileSystemItem *parent, bool isStartDir /*= false*/)
263{
264 if (!parent)
265 return;
266
267 QMap<QString, UICustomFileSystemItem*> fileObjects;
268 scanDirectory(strPath, parent, fileObjects);
269 checkDotDot(fileObjects, parent, isStartDir);
270}
271
272void UIFileManagerHostTable::deleteByItem(UICustomFileSystemItem *item)
273{
274 if (item->isUpDirectory())
275 return;
276 if (!item->isDirectory())
277 {
278 QDir itemToDelete;
279 itemToDelete.remove(item->path());
280 }
281 QDir itemToDelete(item->path());
282 itemToDelete.setFilter(QDir::NoDotAndDotDot);
283 /* Try to delete item recursively (in case of directories).
284 note that this is no good way of deleting big directory
285 trees. We need a better error reporting and a kind of progress
286 indicator: */
287 /** @todo replace this recursive delete by a better implementation: */
288 bool deleteSuccess = itemToDelete.removeRecursively();
289
290 if (!deleteSuccess)
291 emit sigLogOutput(QString(item->path()).append(" could not be deleted"), m_strTableName, FileManagerLogType_Error);
292}
293
294void UIFileManagerHostTable::deleteByPath(const QStringList &pathList)
295{
296 foreach (const QString &strPath, pathList)
297 {
298 bool deleteSuccess = true;
299 KFsObjType eType = fileType(QFileInfo(strPath));
300 if (eType == KFsObjType_File || eType == KFsObjType_Symlink)
301 {
302 deleteSuccess = QDir().remove(strPath);
303 }
304 else if (eType == KFsObjType_Directory)
305 {
306 QDir itemToDelete(strPath);
307 itemToDelete.setFilter(QDir::NoDotAndDotDot);
308 deleteSuccess = itemToDelete.removeRecursively();
309 }
310 if (!deleteSuccess)
311 emit sigLogOutput(QString(strPath).append(" could not be deleted"), m_strTableName, FileManagerLogType_Error);
312 }
313}
314
315void UIFileManagerHostTable::goToHomeDirectory()
316{
317 if (!rootItem() || rootItem()->childCount() <= 0)
318 return;
319 UICustomFileSystemItem *startDirItem = rootItem()->child(0);
320 if (!startDirItem)
321 return;
322
323 QString userHome = UIPathOperations::sanitize(QDir::homePath());
324 goIntoDirectory(UIPathOperations::pathTrail(userHome));
325}
326
327bool UIFileManagerHostTable::renameItem(UICustomFileSystemItem *item, QString newBaseName)
328{
329 if (!item || item->isUpDirectory() || newBaseName.isEmpty())
330 return false;
331 QString newPath = UIPathOperations::constructNewItemPath(item->path(), newBaseName);
332 QDir tempDir;
333 if (tempDir.rename(item->path(), newPath))
334 {
335 item->setPath(newPath);
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