70 lines
1.7 KiB
C++
70 lines
1.7 KiB
C++
/***************************************************************************
|
|
|
|
source::worx raDIYo
|
|
Copyright © 2020-2022 c.holzheuer
|
|
chris@sourceworx.org
|
|
|
|
This program 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 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
#ifndef SWBLUETOOTHCONTROL_H
|
|
#define SWBLUETOOTHCONTROL_H
|
|
|
|
|
|
#include <swlistcontrol.h>
|
|
#include <ui_swbluetoothcontrol.h>
|
|
|
|
|
|
#include <QBluetoothDeviceDiscoveryAgent>
|
|
#include <QBluetoothLocalDevice>
|
|
|
|
//#include <QDialog>
|
|
|
|
|
|
/**
|
|
* @brief Das Bluetooth Control. Bindet Bluetooth Soundquellen ein.
|
|
*/
|
|
|
|
class SWBlueToothControl : public SWListControl, private Ui_SWBlueToothControl
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit SWBlueToothControl( QWidget* parent, QSettings* settings );
|
|
virtual ~SWBlueToothControl() = default;
|
|
|
|
public slots:
|
|
|
|
void onShow() override;
|
|
void onHide() override;
|
|
|
|
void addDevice( const QBluetoothDeviceInfo& );
|
|
//void on_power_clicked(bool clicked);
|
|
//void on_discoverable_clicked(bool clicked );
|
|
//void displayPairingMenu(const QPoint& pos );
|
|
void pairingDone( const QBluetoothAddress&, QBluetoothLocalDevice::Pairing );
|
|
|
|
void onItemActivated( QListWidgetItem* item ) override;
|
|
|
|
private slots:
|
|
|
|
|
|
//void onDialPushed() override;
|
|
//void onDialDeltaChanged( int value ) override;
|
|
|
|
private:
|
|
|
|
QBluetoothDeviceDiscoveryAgent _discoveryAgent;
|
|
QBluetoothLocalDevice _localDevice;
|
|
|
|
};
|
|
|
|
#endif // SWBLUETOOTHCONTROL_H
|