lmms
Cross-platform music production software
Toggle main menu visibility
Loading...
Searching...
No Matches
include
FileRevealer.h
Go to the documentation of this file.
1
/*
2
* FileRevealer.h - include file for FileRevealer
3
*
4
* Copyright (c) 2025 Andrew Wiltshire <aw1lt / at/ proton/ dot/me >
5
*
6
* This file is part of LMMS - https://lmms.io
7
*
8
* This program is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU General Public
10
* License as published by the Free Software Foundation; either
11
* version 2 of the License, or (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public
19
* License along with this program (see COPYING); if not, write to the
20
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
* Boston, MA 02110-1301 USA.
22
*
23
*/
24
25
#ifndef LMMS_GUI_FILE_REVEALER_H
26
#define LMMS_GUI_FILE_REVEALER_H
27
28
#include <QFileInfo>
29
30
namespace
lmms::gui
{
31
36
class
FileRevealer
37
{
38
public
:
43
static
const
QString&
getDefaultFileManager
();
44
49
static
void
openDir
(
const
QFileInfo item);
50
51
static
void
openDir
(
const
QString& itemPath)
52
{
53
openDir
(QFileInfo(itemPath));
54
}
55
60
static
const
QStringList&
getSelectCommand
();
61
66
static
void
reveal
(
const
QFileInfo item);
67
68
static
void
reveal
(
const
QString& itemPath)
69
{
70
reveal
(QFileInfo(itemPath));
71
}
72
73
private
:
74
static
bool
s_canSelect
;
75
76
protected
:
83
static
bool
supportsArg
(
const
QString& command,
const
QString& arg);
84
};
85
86
}
// namespace lmms::gui
87
88
#endif
// LMMS_GUI_FILE_REVEALER_H
lmms::gui::FileRevealer
A utility class for revealing files and directories in the system's file manager.
Definition
FileRevealer.h:37
lmms::gui::FileRevealer::getDefaultFileManager
static const QString & getDefaultFileManager()
Retrieves the default file manager for the current platform.
Definition
FileRevealer.cpp:41
lmms::gui::FileRevealer::openDir
static void openDir(const QString &itemPath)
Definition
FileRevealer.h:51
lmms::gui::FileRevealer::s_canSelect
static bool s_canSelect
Definition
FileRevealer.h:74
lmms::gui::FileRevealer::openDir
static void openDir(const QFileInfo item)
Opens the directory containing the specified file or folder in the file manager.
Definition
FileRevealer.cpp:109
lmms::gui::FileRevealer::getSelectCommand
static const QStringList & getSelectCommand()
Checks whether the file manager supports selecting a specific file.
Definition
FileRevealer.cpp:116
lmms::gui::FileRevealer::reveal
static void reveal(const QString &itemPath)
Definition
FileRevealer.h:68
lmms::gui::FileRevealer::supportsArg
static bool supportsArg(const QString &command, const QString &arg)
Determines if the given command supports the argument.
Definition
FileRevealer.cpp:173
lmms::gui::FileRevealer::reveal
static void reveal(const QFileInfo item)
Opens the file manager and selects the specified file if supported.
Definition
FileRevealer.cpp:154
lmms::gui
Definition
AudioPortAudio.cpp:209
Generated on
for lmms by
1.18.0