Loading...
Searching...
No Matches
LibraryWidget.hpp
1#pragma once
2#include <QTreeView>
3
4#include <vector>
5class QFileSystemModel;
6
7namespace Library
8{
9class LibraryInterface;
10class FileSystemModel;
11class FileSystemRecursiveFilterProxy;
12inline void setup_treeview(QTreeView& tv)
13{
14 tv.setHeaderHidden(true);
15 tv.setDragEnabled(true);
16 tv.setDropIndicatorShown(true);
17 tv.setAlternatingRowColors(true);
18 tv.setSelectionMode(QAbstractItemView::SingleSelection);
19 for(int i = 1; i < tv.model()->columnCount(); ++i)
20 tv.hideColumn(i);
21}
22
23std::vector<LibraryInterface*> libraryInterface(const QString& path);
24
25void setupFilesystemContextMenu(
26 QTreeView& m_tv, FileSystemModel& model, FileSystemRecursiveFilterProxy& proxy);
27}