Qmmp
Loading...
Searching...
No Matches
addurldialog_p.h
1/***************************************************************************
2 * Copyright (C) 2006-2022 by Ilya Kotov *
3 * forkotov02@ya.ru *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19 ***************************************************************************/
20
21#ifndef ADDURLDIALOG_P_H
22#define ADDURLDIALOG_P_H
23
24#include <QDialog>
25#include <QPointer>
26#include <QUrl>
27#include "ui_addurldialog.h"
28
29class QNetworkAccessManager;
30class QNetworkReply;
31class PlayListModel;
33
37class AddUrlDialog : public QDialog , private Ui::AddUrlDialog
38{
39 Q_OBJECT
40public:
41 static void popup(QWidget* parent ,PlayListModel*);
42
43private slots:
44 void onFinished(bool ok, const QString &message);
45
46private:
47 explicit AddUrlDialog(QWidget *parent);
48 ~AddUrlDialog();
49 void accept() override;
50 void setModel(PlayListModel*);
51 void addToHistory(const QString &path);
52 static QPointer<AddUrlDialog> m_instance;
53 PlayListModel *m_model;
54 PlayListDownloader *m_downloader;
55 QStringList m_history;
56};
57#endif //ADDURLDIALOG_P_H
The PlayListDownloader class downloads playlist from remote URL and extracts tracks.
Definition playlistdownloader.h:37
The PlayListModel class provides a data model for the playlist.
Definition playlistmodel.h:97