3f6cf0e871
Most of the top streaming services now have a link in the stream key label. Upgrading this button to a button clarifies the assistance for the important step of setting up a stream. Creates a new type of button for URL opening simply which also automatically updates the tootip to the current URL. Includes addition of Twitter/Periscope URL to make this feature more complete.
21 lines
397 B
C++
21 lines
397 B
C++
#pragma once
|
|
|
|
#include <QPushButton>
|
|
#include <QUrl>
|
|
|
|
class UrlPushButton : public QPushButton {
|
|
Q_OBJECT
|
|
Q_PROPERTY(QUrl targetUrl READ targetUrl WRITE setTargetUrl)
|
|
|
|
public:
|
|
inline UrlPushButton(QWidget *parent = nullptr) : QPushButton(parent) {}
|
|
void setTargetUrl(QUrl url);
|
|
QUrl targetUrl();
|
|
|
|
protected:
|
|
void mousePressEvent(QMouseEvent *event) override;
|
|
|
|
private:
|
|
QUrl m_targetUrl;
|
|
};
|