Added a link to the Android app from the KCM
This commit is contained in:
parent
60d85932db
commit
f237a659ec
2 changed files with 83 additions and 4 deletions
|
@ -63,6 +63,10 @@ KdeConnectKcm::KdeConnectKcm(QWidget *parent, const QVariantList&)
|
||||||
kcmUi->progressBar->setVisible(false);
|
kcmUi->progressBar->setVisible(false);
|
||||||
kcmUi->messages->setVisible(false);
|
kcmUi->messages->setVisible(false);
|
||||||
|
|
||||||
|
//Workaround: If we set this directly (or if we set it in the .ui file), the layout breaks
|
||||||
|
kcmUi->noDeviceLinks->setWordWrap(false);
|
||||||
|
QTimer::singleShot(0, [this] { kcmUi->noDeviceLinks->setWordWrap(true); });
|
||||||
|
|
||||||
kcmUi->rename_label->setText(daemon->announcedName());
|
kcmUi->rename_label->setText(daemon->announcedName());
|
||||||
kcmUi->rename_edit->setText(daemon->announcedName());
|
kcmUi->rename_edit->setText(daemon->announcedName());
|
||||||
setRenameMode(false);
|
setRenameMode(false);
|
||||||
|
@ -133,6 +137,8 @@ void KdeConnectKcm::resetSelection()
|
||||||
void KdeConnectKcm::deviceSelected(const QModelIndex& current)
|
void KdeConnectKcm::deviceSelected(const QModelIndex& current)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
kcmUi->noDevicePlaceholder->setVisible(false);
|
||||||
|
|
||||||
if (currentDevice) {
|
if (currentDevice) {
|
||||||
disconnect(currentDevice,SIGNAL(pairingSuccesful()),
|
disconnect(currentDevice,SIGNAL(pairingSuccesful()),
|
||||||
this, SLOT(pairingSuccesful()));
|
this, SLOT(pairingSuccesful()));
|
||||||
|
@ -181,7 +187,7 @@ void KdeConnectKcm::deviceSelected(const QModelIndex& current)
|
||||||
//KPluginSelector has no way to remove a list of plugins and load another, so we need to destroy and recreate it each time
|
//KPluginSelector has no way to remove a list of plugins and load another, so we need to destroy and recreate it each time
|
||||||
delete kcmUi->pluginSelector;
|
delete kcmUi->pluginSelector;
|
||||||
kcmUi->pluginSelector = new KPluginSelector(this);
|
kcmUi->pluginSelector = new KPluginSelector(this);
|
||||||
kcmUi->verticalLayout_2->addWidget(kcmUi->pluginSelector);
|
kcmUi->deviceInfo_layout->addWidget(kcmUi->pluginSelector);
|
||||||
|
|
||||||
kcmUi->pluginSelector->setConfigurationArguments(QStringList(currentDevice->id()));
|
kcmUi->pluginSelector->setConfigurationArguments(QStringList(currentDevice->id()));
|
||||||
|
|
||||||
|
|
79
kcm/kcm.ui
79
kcm/kcm.ui
|
@ -111,14 +111,14 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="deviceInfoBorder_2">
|
<widget class="QGroupBox" name="deviceInfoBorder">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="deviceInfoBorder">
|
<layout class="QVBoxLayout" name="deviceInfoBorder_layout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="deviceInfo" native="true">
|
<widget class="QWidget" name="deviceInfo" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -127,7 +127,7 @@
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="deviceInfo_layout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="header_2" native="true">
|
<widget class="QWidget" name="header_2" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -260,6 +260,79 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="noDevicePlaceholder" native="true">
|
||||||
|
<layout class="QVBoxLayout" name="noDevicePlaceholder_layout">
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="noDeviceLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>No device selected.</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="noDeviceLinks">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>If you have an Android phone, make sure to install the <a href="https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp"><span style=" text-decoration: underline; color:#0000ff;">KDE Connect Android app</span></a> (also available <a href="https://f-droid.org/repository/browse/?fdid=org.kde.kdeconnect_tp"><span style=" text-decoration: underline; color:#0000ff;">from F-Droid</span></a>).</string>
|
||||||
|
</property>
|
||||||
|
<property name="textFormat">
|
||||||
|
<enum>Qt::RichText</enum>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>40</number>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
Loading…
Reference in a new issue