mirror of
https://github.com/clementine-player/Clementine
synced 2025-02-01 20:06:53 +01:00
Adding links to new remote in network remote settings
This commit is contained in:
parent
7d038c7354
commit
114802a0ca
BIN
data/clem_remote_android_qr.png
Normal file
BIN
data/clem_remote_android_qr.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 63 KiB |
BIN
data/clem_remote_iOS_qr.png
Normal file
BIN
data/clem_remote_iOS_qr.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 85 KiB |
@ -491,5 +491,8 @@
|
||||
<file>volumeslider-gradient.png</file>
|
||||
<file>volumeslider-handle_glow.png</file>
|
||||
<file>volumeslider-handle.png</file>
|
||||
<file>en_available_apple_store_45.png</file>
|
||||
<file>clem_remote_iOS_qr.png</file>
|
||||
<file>clem_remote_android_qr.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
BIN
data/en_available_apple_store_45.png
Normal file
BIN
data/en_available_apple_store_45.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.1 KiB |
@ -36,6 +36,12 @@
|
||||
|
||||
const char* NetworkRemoteSettingsPage::kPlayStoreUrl =
|
||||
"https://play.google.com/store/apps/details?id=de.qspool.clementineremote";
|
||||
const char* NetworkRemoteSettingsPage::kPlayStoreUrl2 =
|
||||
"https://play.google.com/store/apps/details?id=fr.mbruel.ClementineRemote";
|
||||
const char* NetworkRemoteSettingsPage::kAppleStoreUrl =
|
||||
"https://apps.apple.com/fr/app/clemremote/id1541922045";
|
||||
const char* NetworkRemoteSettingsPage::kLatestReleasesUrl =
|
||||
"https://github.com/mbruel/ClementineRemote/releases/latest";
|
||||
|
||||
static bool ComparePresetsByName(const TranscoderPreset& left,
|
||||
const TranscoderPreset& right) {
|
||||
@ -50,6 +56,9 @@ NetworkRemoteSettingsPage::NetworkRemoteSettingsPage(SettingsDialog* dialog)
|
||||
connect(ui_->options, SIGNAL(clicked()), SLOT(Options()));
|
||||
|
||||
ui_->play_store->installEventFilter(this);
|
||||
ui_->play_store_2->installEventFilter(this);
|
||||
ui_->apple_store->installEventFilter(this);
|
||||
ui_->desktop_remote->installEventFilter(this);
|
||||
|
||||
// Get presets
|
||||
QList<TranscoderPreset> presets = Transcoder::GetAllPresets();
|
||||
@ -64,10 +73,21 @@ NetworkRemoteSettingsPage::NetworkRemoteSettingsPage(SettingsDialog* dialog)
|
||||
NetworkRemoteSettingsPage::~NetworkRemoteSettingsPage() { delete ui_; }
|
||||
|
||||
bool NetworkRemoteSettingsPage::eventFilter(QObject* object, QEvent* event) {
|
||||
if (object == ui_->play_store &&
|
||||
event->type() == QEvent::MouseButtonRelease) {
|
||||
QDesktopServices::openUrl(QUrl(kPlayStoreUrl));
|
||||
return true;
|
||||
if (event->type() == QEvent::MouseButtonRelease) {
|
||||
QUrl url;
|
||||
if (object == ui_->play_store)
|
||||
url = QUrl(kPlayStoreUrl);
|
||||
else if (object == ui_->play_store_2)
|
||||
url = QUrl(kPlayStoreUrl2);
|
||||
else if (object == ui_->apple_store)
|
||||
url = QUrl(kAppleStoreUrl);
|
||||
else if (object == ui_->desktop_remote)
|
||||
url = QUrl(kLatestReleasesUrl);
|
||||
|
||||
if (!url.isEmpty()) {
|
||||
QDesktopServices::openUrl(url);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return SettingsPage::eventFilter(object, event);
|
||||
@ -136,6 +156,14 @@ void NetworkRemoteSettingsPage::Load() {
|
||||
}
|
||||
|
||||
ui_->play_store->setPixmap(QPixmap(badge_filename));
|
||||
ui_->play_store_2->setPixmap(QPixmap(badge_filename));
|
||||
|
||||
ui_->desktop_remote->setText(
|
||||
tr("You can find <a href=\"%1\">here on GitHub</a> the new cross "
|
||||
"platform remote.<br/>It is available on <b>Linux</b>, <b>MacOS</b> "
|
||||
"and <b>Windows</b><br/>")
|
||||
.arg(kLatestReleasesUrl));
|
||||
ui_->desktop_remote->setWordWrap(true);
|
||||
}
|
||||
|
||||
void NetworkRemoteSettingsPage::Save() {
|
||||
|
@ -40,6 +40,9 @@ class NetworkRemoteSettingsPage : public SettingsPage {
|
||||
|
||||
private:
|
||||
static const char* kPlayStoreUrl;
|
||||
static const char* kPlayStoreUrl2;
|
||||
static const char* kAppleStoreUrl;
|
||||
static const char* kLatestReleasesUrl;
|
||||
|
||||
Ui_NetworkRemoteSettingsPage* ui_;
|
||||
};
|
||||
|
@ -209,18 +209,28 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Download the Android app</string>
|
||||
<string>Download the remote for Desktops, Android and iOS</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<widget class="QLabel" name="desktop_remote">
|
||||
<property name="text">
|
||||
<string>desktop_remote</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
@ -230,7 +240,7 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="play_store">
|
||||
<widget class="QLabel" name="play_store_2">
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
@ -240,7 +250,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@ -252,12 +262,164 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>or scan the QR code: </string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="android_app_qr_2">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>150</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../../data/data.qrc">:/clem_remote_android_qr.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="apple_store">
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../../data/data.qrc">:/en_available_apple_store_45.png</pixmap>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>or scan the QR code: </string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="iOS_app_qr">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>150</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../../data/data.qrc">:/clem_remote_iOS_qr.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Download the original Android app</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="play_store">
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>63</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>or scan the QR code!</string>
|
||||
<string>or scan the QR code: </string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
@ -266,9 +428,18 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="android_app_qr">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>150</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../../data/data.qrc">:/clementine_remote_qr.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
|
Loading…
x
Reference in New Issue
Block a user