Sayonara Player
Loading...
Searching...
No Matches
GUI_DirectoryView.h
1/* GUI_DirectoryView.h
2 *
3 * Copyright (C) 2011-2024 Michael Lugmair
4 *
5 * This file is part of sayonara player
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef GUI_DIRECTORYVIEW_H
22#define GUI_DIRECTORYVIEW_H
23
24#include "Gui/Utils/Widgets/Widget.h"
25#include "Utils/Pimpl.h"
26
28
29namespace Library
30{
31 class Manager;
32}
33
34class QItemSelection;
35
37 public Gui::Widget
38{
39 Q_OBJECT
41 UI_CLASS(GUI_DirectoryView)
42
43 public:
44 explicit GUI_DirectoryView(QWidget* parent = nullptr);
45 ~GUI_DirectoryView() override;
46
47 void init(Library::Manager* libraryManager, LibraryId libraryId);
48 void setFilterTerm(const QString& filter);
49
50 private:
51 void initUi();
52
53 private slots: // NOLINT(*-redundant-access-specifiers)
54 void load();
55
56 void importRequested(LibraryId id, const QStringList& paths, const QString& targetDirectory);
57
58 void newDirectoryClicked();
59 void viewInFileManagerClicked();
60
61 void dirEnterPressed();
62 void dirOpened(const QModelIndex& idx);
63 void dirPressed(const QModelIndex& idx);
64 void dirClicked(const QModelIndex& idx);
65 void dirAppendClicked();
66 void dirPlayClicked();
67 void dirPlayNextClicked();
68 void dirPlayInNewTabClicked();
69 void dirDeleteClicked();
70 void dirCopyRequested(const QStringList& files, const QString& target);
71 void dirMoveRequested(const QStringList& files, const QString& target);
72 void dirRenameRequested(const QString& oldName, const QString& newName);
73 void dirCopyToLibRequested(LibraryId libraryId);
74 void dirMoveToLibRequested(LibraryId libraryId);
75 void dirSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
76
77 void fileDoubleClicked(const QModelIndex& idx);
78 void fileEnterPressed();
79 void filePressed(const QModelIndex& idx);
80 void fileAppendClicked();
81 void filePlayClicked();
82 void filePlayNextClicked();
83 void filePlayNewTabClicked();
84 void fileDeleteClicked();
85 void fileRenameRequested(const QString& oldName, const QString& newName);
86 void fileRenameByExpressionRequested(const QString& oldName, const QString& expression);
87 void fileCopyToLibraryRequested(LibraryId libraryId);
88 void fileMoveToLibraryRequested(LibraryId libraryId);
89 void fileSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
90
91 void fileOperationStarted();
92 void fileOperationFinished();
93
94 void splitterMoved(int pos, int index);
95 void createDirectoryClicked();
96
97 protected:
98 void languageChanged() override;
99 void skinChanged() override;
100 void showEvent(QShowEvent* event) override;
101};
102
103#endif // GUI_DIRECTORYVIEW_H
Definition GUI_DirectoryView.h:38
Widget with Settings connection. Also contains triggers for language_changed() and skin_changed() \nT...
Definition Widget.h:39
Definition LibraryManager.h:50