Clementine-audio-player-Mac.../src/devices/deviceproperties.h

64 lines
1.6 KiB
C
Raw Normal View History

2010-07-04 17:01:24 +02:00
/* This file is part of Clementine.
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>
#include "core/song.h"
2010-07-04 17:01:24 +02:00
class DeviceManager;
class Ui_DeviceProperties;
class DeviceProperties : public QDialog {
Q_OBJECT
public:
DeviceProperties(QWidget* parent = nullptr);
2010-07-04 17:01:24 +02:00
~DeviceProperties();
void SetDeviceManager(DeviceManager* manager);
void ShowDevice(QModelIndex idx);
2010-07-04 17:01:24 +02:00
public slots:
void accept();
private:
2010-07-04 17:01:24 +02:00
void UpdateHardwareInfo();
void AddHardwareInfo(int row, const QString& key, const QString& value);
void UpdateFormats();
2010-07-04 17:01:24 +02:00
private slots:
2010-07-04 17:01:24 +02:00
void ModelChanged();
void OpenDevice();
2015-11-27 15:22:59 +01:00
void UpdateFormatsFinished(QFuture<bool> future);
2010-07-04 17:01:24 +02:00
private:
2010-07-04 17:01:24 +02:00
Ui_DeviceProperties* ui_;
DeviceManager* manager_;
QPersistentModelIndex index_;
bool updating_formats_;
QList<Song::FileType> supported_formats_;
2010-07-04 17:01:24 +02:00
};
#endif // DEVICEPROPERTIES_H