2010-07-04 17:01:24 +02:00
|
|
|
/* This file is part of Clementine.
|
2010-11-20 14:27:10 +01:00
|
|
|
Copyright 2010, David Sansome <me@davidsansome.com>
|
2010-07-04 17:01:24 +02:00
|
|
|
|
|
|
|
Clementine is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Clementine is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef DEVICEPROPERTIES_H
|
|
|
|
#define DEVICEPROPERTIES_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
2015-11-27 15:22:59 +01:00
|
|
|
#include <QFuture>
|
2010-07-04 17:01:24 +02:00
|
|
|
#include <QPersistentModelIndex>
|
|
|
|
|
2010-08-29 17:32:36 +02:00
|
|
|
#include "core/song.h"
|
|
|
|
|
2010-07-04 17:01:24 +02:00
|
|
|
class DeviceManager;
|
|
|
|
class Ui_DeviceProperties;
|
|
|
|
|
|
|
|
class DeviceProperties : public QDialog {
|
|
|
|
Q_OBJECT
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
public:
|
2014-02-10 16:03:54 +01:00
|
|
|
DeviceProperties(QWidget* parent = nullptr);
|
2010-07-04 17:01:24 +02:00
|
|
|
~DeviceProperties();
|
|
|
|
|
|
|
|
void SetDeviceManager(DeviceManager* manager);
|
2019-01-21 22:38:46 +01:00
|
|
|
void ShowDevice(QModelIndex idx);
|
2010-07-04 17:01:24 +02:00
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
public slots:
|
2010-07-04 17:18:37 +02:00
|
|
|
void accept();
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
private:
|
2010-07-04 17:01:24 +02:00
|
|
|
void UpdateHardwareInfo();
|
|
|
|
void AddHardwareInfo(int row, const QString& key, const QString& value);
|
2010-08-29 15:49:40 +02:00
|
|
|
void UpdateFormats();
|
2010-07-04 17:01:24 +02:00
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
private slots:
|
2010-07-04 17:01:24 +02:00
|
|
|
void ModelChanged();
|
2010-08-29 15:49:40 +02:00
|
|
|
void OpenDevice();
|
2015-11-27 15:22:59 +01:00
|
|
|
void UpdateFormatsFinished(QFuture<bool> future);
|
2010-07-04 17:01:24 +02:00
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
private:
|
2010-07-04 17:01:24 +02:00
|
|
|
Ui_DeviceProperties* ui_;
|
|
|
|
|
|
|
|
DeviceManager* manager_;
|
|
|
|
QPersistentModelIndex index_;
|
2010-08-29 15:49:40 +02:00
|
|
|
|
|
|
|
bool updating_formats_;
|
2010-08-30 14:22:15 +02:00
|
|
|
QList<Song::FileType> supported_formats_;
|
2010-07-04 17:01:24 +02:00
|
|
|
};
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
#endif // DEVICEPROPERTIES_H
|