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 { class Manager; }
30
31class QItemSelection;
32
34 public Gui::Widget
35{
36 Q_OBJECT
38 UI_CLASS(GUI_DirectoryView)
39
40 public:
41 explicit GUI_DirectoryView(QWidget* parent=nullptr);
42 ~GUI_DirectoryView() override;
43
44 void init(Library::Manager* libraryManager, LibraryId libraryId);
45 void setFilterTerm(const QString& filter);
46
47 private:
48 void initUi();
49
50 private slots:
51 void load();
52
53 void importRequested(LibraryId id, const QStringList& paths, const QString& targetDirectory);
54 void importDialogRequested(const QString& targetDirectory);
55
56 void newDirectoryClicked();
57 void viewInFileManagerClicked();
58
59 void dirEnterPressed();
60 void dirOpened(QModelIndex idx);
61 void dirPressed(QModelIndex idx);
62 void dirClicked(QModelIndex idx);
63 void dirAppendClicked();
64 void dirPlayClicked();
65 void dirPlayNextClicked();
66 void dirPlayInNewTabClicked();
67 void dirDeleteClicked();
68 void dirCopyRequested(const QStringList& files, const QString& target);
69 void dirMoveRequested(const QStringList& files, const QString& target);
70 void dirRenameRequested(const QString& oldName, const QString& newName);
71 void dirCopyToLibRequested(LibraryId libraryId);
72 void dirMoveToLibRequested(LibraryId libraryId);
73 void dirSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
74
75 void fileDoubleClicked(QModelIndex idx);
76 void fileEnterPressed();
77 void filePressed(QModelIndex idx);
78 void fileAppendClicked();
79 void filePlayClicked();
80 void filePlayNextClicked();
81 void filePlayNewTabClicked();
82 void fileDeleteClicked();
83 void fileRenameRequested(const QString& oldName, const QString& newName);
84 void fileRenameByExpressionRequested(const QString& oldName, const QString& expression);
85 void fileCopyToLibraryRequested(LibraryId libraryId);
86 void fileMoveToLibraryRequested(LibraryId libraryId);
87 void fileSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
88
89 void fileOperationStarted();
90 void fileOperationFinished();
91
92 void splitterMoved(int pos, int index);
93 void createDirectoryClicked();
94
95 protected:
96 void languageChanged() override;
97 void skinChanged() override;
98 void showEvent(QShowEvent* event) override;
99};
100
101#endif // GUI_DIRECTORYVIEW_H
Definition: GUI_DirectoryView.h:35
Widget with Settings connection. Also contains triggers for language_changed() and skin_changed() \nT...
Definition: Widget.h:39
Definition: LibraryManager.h:50