File indexing completed on 2024-04-14 15:49:40

0001 // SPDX-FileCopyrightText: 2020 Simon Persson <simon.persson@mykolab.com>
0002 //
0003 // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0004 
0005 #ifndef DIRSELECTOR_H
0006 #define DIRSELECTOR_H
0007 
0008 #include <QTreeView>
0009 
0010 class KDirModel;
0011 
0012 class DirSelector : public QTreeView
0013 {
0014     Q_OBJECT
0015 public:
0016     explicit DirSelector(QWidget *pParent = nullptr);
0017     QUrl url() const;
0018 
0019 signals:
0020 
0021 public slots:
0022     void createNewFolder();
0023     void selectEntry(QModelIndex pIndex);
0024     void expandToUrl(const QUrl &pUrl);
0025     void setRootUrl(const QUrl &pUrl);
0026 private:
0027     KDirModel *mDirModel;
0028 };
0029 
0030 #endif // DIRSELECTOR_H