summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Merry <dev@randomguy3.me.uk>2011-11-09 01:40:23 +0000
committerAlex Merry <dev@randomguy3.me.uk>2011-11-09 01:40:23 +0000
commitdbdd1b40ba27bd58fdbbc6a02fc7b74bf124dba5 (patch)
tree53a50502c24808984f2147ff45ab9b506c638bcd
parente850fd2feeee95491e4d58aa2499db9d7173ac5c (diff)
parent832d6c90147ca3d176a1c8afc1f4380594898b5e (diff)
Merge branch '2.0' of git://github.com/randomguy3/mpristester into 2.0
-rw-r--r--mpris2/interfacetest.cpp117
-rw-r--r--mpris2/interfacetest.h10
-rw-r--r--mpris2/playerinterfacetest.cpp41
-rw-r--r--mpris2/playerinterfacetest.h4
-rw-r--r--mpris2/playertestwidget.cpp62
-rw-r--r--mpris2/playertestwidget.h7
-rw-r--r--ui/playertest.ui344
-rw-r--r--ui/window.ui4
8 files changed, 439 insertions, 150 deletions
diff --git a/mpris2/interfacetest.cpp b/mpris2/interfacetest.cpp
index 11fdd84..c6af22e 100644
--- a/mpris2/interfacetest.cpp
+++ b/mpris2/interfacetest.cpp
@@ -77,7 +77,7 @@ bool InterfaceTest::getAllProps()
return true;
}
-bool InterfaceTest::getProp(const QString& propName)
+bool InterfaceTest::getProp(const QString& propName, InterfaceTest::PropErrorAllowance allowError)
{
if (!propsIface->isValid() || !iface->isValid()) {
emit interfaceError(Other, "",
@@ -103,15 +103,31 @@ bool InterfaceTest::getProp(const QString& propName)
" interface was not implemented correctly at "
MPRIS2_PATH "(replied \"unknown method\" for method \"Get\")");
} else if (propsReply.error().type() == QDBusError::InvalidArgs) {
- emit interfaceError(Property, propName,
- DBUS_PROPS_IFACE ".Get failed; reported \"invalid args\" (ie: unknown property)");
+ if (allowError & PropAllowMissing) {
+ emit interfaceInfo(Property, propName,
+ DBUS_PROPS_IFACE ".Get failed; reported \"invalid args\" (ie: unknown property)");
+ } else {
+ emit interfaceError(Property, propName,
+ DBUS_PROPS_IFACE ".Get failed; reported \"invalid args\" (ie: unknown property)");
+ }
} else if (propsReply.error().name() == "org.freedesktop.DBus.UnknownProperty") {
- emit interfaceError(Property, propName,
- DBUS_PROPS_IFACE ".Get failed; reported \"unknown property\"");
+ if (allowError & PropAllowMissing) {
+ emit interfaceInfo(Property, propName,
+ DBUS_PROPS_IFACE ".Get failed; reported \"unknown property\"");
+ } else {
+ emit interfaceError(Property, propName,
+ DBUS_PROPS_IFACE ".Get failed; reported \"unknown property\"");
+ }
} else {
- emit interfaceError(Other, "",
- "Calling " DBUS_PROPS_IFACE
- ".Get resulted in the error " + propsReply.error().name());
+ if (allowError) {
+ emit interfaceWarning(Other, "",
+ "Calling " DBUS_PROPS_IFACE
+ ".Get resulted in the unexpected error " + propsReply.error().name());
+ } else {
+ emit interfaceError(Other, "",
+ "Calling " DBUS_PROPS_IFACE
+ ".Get resulted in the error " + propsReply.error().name());
+ }
}
return false;
}
@@ -120,13 +136,81 @@ bool InterfaceTest::getProp(const QString& propName)
return true;
}
+bool InterfaceTest::setProp(const QString& propName, const QDBusVariant& propValue, InterfaceTest::PropErrorAllowance allowError)
+{
+ if (!propsIface->isValid() || !iface->isValid()) {
+ emit interfaceError(Other, "",
+ "No object with the "
+ + iface->interface() +
+ " and "
+ DBUS_PROPS_IFACE
+ " interfaces was not found at "
+ MPRIS2_PATH);
+ return false;
+ }
+
+ QDBusReply<void> propsReply = propsIface->call("Set", iface->interface(), propName, QVariant::fromValue<QDBusVariant>(propValue));
+ if (propsReply.isValid()) {
+ return true;
+ } else {
+ if (propsReply.error().type() == QDBusError::UnknownInterface) {
+ emit interfaceError(Other, "",
+ "The " DBUS_PROPS_IFACE
+ " interface was not implemented correctly at "
+ MPRIS2_PATH "(replied \"unknown interface\")");
+ } else if (propsReply.error().type() == QDBusError::UnknownMethod) {
+ emit interfaceError(Other, "",
+ "The " DBUS_PROPS_IFACE
+ " interface was not implemented correctly at "
+ MPRIS2_PATH "(replied \"unknown method\" for method \"Set\")");
+ } else if (propsReply.error().type() == QDBusError::InvalidArgs) {
+ if (allowError & PropAllowMissing || allowError & PropAllowReadOnly) {
+ emit interfaceInfo(Property, propName,
+ DBUS_PROPS_IFACE ".Set failed; reported \"invalid args\"");
+ } else {
+ emit interfaceError(Property, propName,
+ DBUS_PROPS_IFACE ".Set failed; reported \"invalid args\"");
+ }
+ } else if (propsReply.error().name() == "org.freedesktop.DBus.UnknownProperty") {
+ if (allowError & PropAllowMissing) {
+ emit interfaceInfo(Property, propName,
+ DBUS_PROPS_IFACE ".Set failed; reported \"unknown property\"");
+ } else {
+ emit interfaceError(Property, propName,
+ DBUS_PROPS_IFACE ".Set failed; reported \"unknown property\"");
+ }
+ } else if (propsReply.error().name() == "com.trolltech.QtDBus.Error.InternalError") {
+ // Qt returns InternalError for read-only properties
+ if (allowError & PropAllowReadOnly) {
+ emit interfaceInfo(Property, propName,
+ DBUS_PROPS_IFACE ".Set failed; reported \"internal error\" (Qt's way of saying \"read only\")");
+ } else {
+ emit interfaceError(Property, propName,
+ DBUS_PROPS_IFACE ".Set failed; reported \"internal error\" (Qt's way of saying \"read only\")");
+ }
+ } else {
+ if (allowError) {
+ emit interfaceWarning(Other, "",
+ "Calling " DBUS_PROPS_IFACE
+ ".Set resulted in the unexpected error " + propsReply.error().name());
+ } else {
+ emit interfaceError(Other, "",
+ "Calling " DBUS_PROPS_IFACE
+ ".Set resulted in the error " + propsReply.error().name());
+ }
+ }
+ return false;
+ }
+}
+
+
bool InterfaceTest::checkPropValid(const QString& propName, QVariant::Type expType, const QVariantMap& oldProps) {
if (!props.contains(propName)) {
emit interfaceError(Property, propName, "Property " + propName + " is missing");
return false;
- } else if (props[propName].type() != expType) {
+ } else if (props.value(propName).type() != expType) {
// FIXME: generate D-Bus type description
- const char * gotTypeCh = QDBusMetaType::typeToSignature(props[propName].userType());
+ const char * gotTypeCh = QDBusMetaType::typeToSignature(props.value(propName).userType());
QString gotType = gotTypeCh ? QString::fromAscii(gotTypeCh) : "<unknown>";
const char * expTypeCh = QDBusMetaType::typeToSignature(expType);
QString expType = expTypeCh ? QString::fromAscii(expTypeCh) : "<unknown>";
@@ -135,16 +219,17 @@ bool InterfaceTest::checkPropValid(const QString& propName, QVariant::Type expTy
return false;
} else if (oldProps.contains(propName)) {
// FIXME: QVariant equality only works for builtin types
- if (props[propName].type() < QVariant::UserType) {
- if (props[propName] != oldProps[propName]) {
- outOfDateProperties.insert(propName, props[propName]);
- props[propName] = oldProps[propName];
- // don't check right now
- return false;
+ if (props.value(propName).type() < QVariant::UserType) {
+ if (props.value(propName) != oldProps.value(propName)) {
+ outOfDateProperties.insert(propName, props.value(propName));
+ props[propName] = oldProps.value(propName);
}
} else {
qDebug() << "Could not check equality for" << propName;
}
+ // we have either already checked this, or we will check it
+ // soon
+ return false;
}
return true;
}
diff --git a/mpris2/interfacetest.h b/mpris2/interfacetest.h
index cfc174c..6e4d8e8 100644
--- a/mpris2/interfacetest.h
+++ b/mpris2/interfacetest.h
@@ -22,6 +22,7 @@
#define INTERFACETEST_H
class QDBusInterface;
+class QDBusVariant;
class QDBusMessage;
class QTimer;
#include <QObject>
@@ -117,8 +118,15 @@ namespace Mpris2
void delayedIncrementalCheck();
protected:
+ enum PropErrorAllowance {
+ PropDisallowErrors = 0,
+ PropAllowMissing = 1,
+ PropAllowReadOnly = 2,
+ PropAllowErrors = PropAllowMissing | PropAllowReadOnly
+ };
bool getAllProps();
- bool getProp(const QString& propName);
+ bool getProp(const QString& propName, PropErrorAllowance allowError = PropDisallowErrors);
+ bool setProp(const QString& propName, const QDBusVariant& value, PropErrorAllowance allowError = PropAllowReadOnly);
bool checkPropValid(const QString& propName, QVariant::Type expType, const QVariantMap& oldProps = QVariantMap());
bool checkNonEmptyStringPropValid(const QString& propName, const QVariantMap& oldProps = QVariantMap());
diff --git a/mpris2/playerinterfacetest.cpp b/mpris2/playerinterfacetest.cpp
index 88e55cf..00658fc 100644
--- a/mpris2/playerinterfacetest.cpp
+++ b/mpris2/playerinterfacetest.cpp
@@ -521,9 +521,10 @@ void PlayerInterfaceTest::updateCurrentRate()
void PlayerInterfaceTest::_m_seeked(qint64 position, const QDBusMessage& message)
{
+ emit interfaceInfo(Signal, "Seeked", "Got Seeked(" + QString::number(position) + ") signal");
m_pos = position;
m_posLastUpdated = QTime::currentTime();
- properties()["Position"] = position;
+ props["Position"] = position;
checkPosition();
emit Seeked(position);
}
@@ -737,8 +738,12 @@ void PlayerInterfaceTest::testSetPosition(const QDBusObjectPath& trackId, qint64
emit interfaceInfo(Method, "SetPosition", "SetPosition called, but CanSeek is false, so this should have no effect");
// TODO: check to see that Seeked is not emitted; PlaybackStatus does not change
} else {
- if (trackId.path() != props["mpris:trackid"].toString()) {
- emit interfaceInfo(Method, "SetPosition", "SetPosition called with the wrong trackid; nothing should happen");
+ if (trackId.path() != props["Metadata"].toMap()["mpris:trackid"].value<QDBusObjectPath>().path()) {
+ emit interfaceInfo(Method, "SetPosition", "SetPosition called with the wrong trackid ('" +
+ trackId.path() +
+ "'; expecting '" +
+ props["mpris:trackid"].value<QDBusObjectPath>().path() +
+ "'); nothing should happen");
// TODO: check to see that Seeked is not emitted; PlaybackStatus does not change
} else if (position < 0.0) {
emit interfaceInfo(Method, "SetPosition", "SetPosition called with a negative value; the media player should be at the start of the track");
@@ -776,4 +781,34 @@ void PlayerInterfaceTest::testOpenUri(const QString& uri)
}
}
+void PlayerInterfaceTest::testSetLoopStatus(const QString& loopStatus)
+{
+ // FIXME: look at whether value is valid
+ if (setProp("LoopStatus", QDBusVariant(QVariant(loopStatus)))) {
+ emit interfaceInfo(Property, "LoopStatus", "Setting LoopStatus did not return an error");
+ }
+}
+
+void PlayerInterfaceTest::testSetShuffle(bool shuffle)
+{
+ if (setProp("Shuffle", QDBusVariant(QVariant(shuffle)))) {
+ emit interfaceInfo(Property, "Shuffle", "Setting Shuffle did not return an error");
+ }
+}
+
+void PlayerInterfaceTest::testSetVolume(double volume)
+{
+ // FIXME: look at whether volume is out of bounds
+ if (setProp("Volume", QDBusVariant(QVariant(volume)))) {
+ emit interfaceInfo(Property, "Volume", "Setting Volume did not return an error");
+ }
+}
+
+void PlayerInterfaceTest::testSetRate(double rate)
+{
+ // FIXME: look at whether rate is out of bounds
+ if (setProp("Rate", QDBusVariant(QVariant(rate)))) {
+ emit interfaceInfo(Property, "Rate", "Setting Rate did not return an error");
+ }
+}
diff --git a/mpris2/playerinterfacetest.h b/mpris2/playerinterfacetest.h
index 21f1281..34656f9 100644
--- a/mpris2/playerinterfacetest.h
+++ b/mpris2/playerinterfacetest.h
@@ -45,6 +45,10 @@ namespace Mpris2 {
void testSeek(qint64 offset);
void testSetPosition(const QDBusObjectPath& trackId, qint64 offset);
void testOpenUri(const QString& uri);
+ void testSetLoopStatus(const QString& loopStatus);
+ void testSetShuffle(bool shuffle);
+ void testSetVolume(double volume);
+ void testSetRate(double rate);
signals:
void Seeked(qint64 newPosition);
diff --git a/mpris2/playertestwidget.cpp b/mpris2/playertestwidget.cpp
index c35ee5c..ad7a0ab 100644
--- a/mpris2/playertestwidget.cpp
+++ b/mpris2/playertestwidget.cpp
@@ -30,17 +30,32 @@ PlayerTestWidget::PlayerTestWidget(PlayerInterfaceTest* test, QWidget* parent)
: QWidget(parent)
{
ui.setupUi(this);
+ ui.loopStatusCombo->addItem("None");
+ ui.loopStatusCombo->addItem("Track");
+ ui.loopStatusCombo->addItem("Playlist");
metadataModel = new MetadataModel(this);
ui.metadataTableView->setModel(metadataModel);
this->test = test;
connect(test, SIGNAL(propertiesChanged(QStringList)),
this, SLOT(propertiesChanged(QStringList)));
+ connect(test, SIGNAL(Seeked(qint64)),
+ this, SLOT(Seeked(qint64)));
estPosTimer = new QTimer(this);
estPosTimer->setInterval(500);
estPosTimer->setSingleShot(false);
connect(estPosTimer, SIGNAL(timeout()),
this, SLOT(updateEstPos()));
+ connect(ui.loopStatusSetBtn, SIGNAL(clicked(bool)),
+ this, SLOT(testSetLoopStatus()));
+ connect(ui.shuffleOnBtn, SIGNAL(clicked(bool)),
+ this, SLOT(testShuffleOn()));
+ connect(ui.shuffleOffBtn, SIGNAL(clicked(bool)),
+ this, SLOT(testShuffleOff()));
+ connect(ui.volumeSetBtn, SIGNAL(clicked(bool)),
+ this, SLOT(testSetVolume()));
+ connect(ui.rateSetBtn, SIGNAL(clicked(bool)),
+ this, SLOT(testSetRate()));
connect(ui.nextBtn, SIGNAL(clicked(bool)),
test, SLOT(testNext()));
connect(ui.prevBtn, SIGNAL(clicked(bool)),
@@ -132,11 +147,11 @@ void PlayerTestWidget::propertiesChanged(const QStringList& properties)
ui.volumeLbl->setEnabled(true);
}
if (test->properties().contains("Position")) {
- ui.lastKnownPosLbl->setText(QString::number(test->properties().value("Position").toLongLong()));
+ ui.lastKnownPosLbl->setText(QString::number(test->properties().value("Position").toLongLong()) + "ns");
ui.lastKnownPosLbl->setEnabled(true);
}
if (test->predictedPosition() >= 0) {
- ui.estPosLbl->setText(QString::number(test->predictedPosition()));
+ ui.estPosLbl->setText(QString::number(test->predictedPosition()) + "ns");
ui.estPosLbl->setEnabled(true);
if (!estPosTimer->isActive())
estPosTimer->start();
@@ -145,14 +160,22 @@ void PlayerTestWidget::propertiesChanged(const QStringList& properties)
if (test->properties().value("Metadata").type() != QVariant::Map) {
qDebug() << "Metadata map was wrong type";
}
- metadataModel->setMetadata(test->properties().value("Metadata").toMap());
+ QVariantMap metadata = test->properties().value("Metadata").toMap();
+ metadataModel->setMetadata(metadata);
ui.metadataTableView->setEnabled(true);
+ if (ui.setPosTrackIdEdit->text().isEmpty() ||
+ ui.setPosTrackIdEdit->text() == lastSetTrackId)
+ {
+ QString trackId = metadata.value("mpris:trackid").value<QDBusObjectPath>().path();
+ ui.setPosTrackIdEdit->setText(trackId);
+ lastSetTrackId = trackId;
+ }
}
}
void PlayerTestWidget::updateEstPos()
{
- ui.estPosLbl->setText(QString::number(test->predictedPosition()));
+ ui.estPosLbl->setText(QString::number(test->predictedPosition()) + "ns");
}
void PlayerTestWidget::testSeek()
@@ -171,3 +194,34 @@ void PlayerTestWidget::testOpenUri()
{
test->testOpenUri(ui.openUriEdit->text());
}
+
+void PlayerTestWidget::Seeked(qint64 position)
+{
+ ui.lastKnownPosLbl->setText(QString::number(position) + "ns");
+ ui.lastKnownPosLbl->setEnabled(true);
+}
+
+void PlayerTestWidget::testSetLoopStatus()
+{
+ test->testSetLoopStatus(ui.loopStatusCombo->currentText());
+}
+
+void PlayerTestWidget::testShuffleOn()
+{
+ test->testSetShuffle(true);
+}
+
+void PlayerTestWidget::testShuffleOff()
+{
+ test->testSetShuffle(false);
+}
+
+void PlayerTestWidget::testSetVolume()
+{
+ test->testSetVolume(ui.volumeSpinBox->value());
+}
+
+void PlayerTestWidget::testSetRate()
+{
+ test->testSetRate(ui.rateSpinBox->value());
+}
diff --git a/mpris2/playertestwidget.h b/mpris2/playertestwidget.h
index 9c2f6b4..6a70006 100644
--- a/mpris2/playertestwidget.h
+++ b/mpris2/playertestwidget.h
@@ -44,6 +44,12 @@ namespace Mpris2 {
void testSeek();
void testSetPos();
void testOpenUri();
+ void Seeked(qint64 position);
+ void testSetLoopStatus();
+ void testSetVolume();
+ void testSetRate();
+ void testShuffleOn();
+ void testShuffleOff();
private slots:
void propertiesChanged(const QStringList& properties);
@@ -54,6 +60,7 @@ namespace Mpris2 {
PlayerInterfaceTest *test;
QTimer *estPosTimer;
MetadataModel *metadataModel;
+ QString lastSetTrackId;
};
}
diff --git a/ui/playertest.ui b/ui/playertest.ui
index f9bbd7f..15f7547 100644
--- a/ui/playertest.ui
+++ b/ui/playertest.ui
@@ -56,30 +56,73 @@
</widget>
</item>
<item row="2" column="0">
- <widget class="QLabel" name="label_3">
+ <widget class="QLabel" name="label_17">
<property name="text">
- <string>Shuffle:</string>
+ <string>&gt;&gt;&gt;</string>
</property>
</widget>
</item>
<item row="2" column="1">
- <widget class="QLabel" name="shuffleLbl">
- <property name="enabled">
- <bool>false</bool>
- </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_10">
+ <item>
+ <widget class="QComboBox" name="loopStatusCombo">
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="loopStatusSetBtn">
+ <property name="text">
+ <string>Set</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_3">
<property name="text">
- <string>&lt;unknown&gt;</string>
+ <string>Shuffle:</string>
</property>
</widget>
</item>
- <item row="3" column="0">
+ <item row="3" column="1">
+ <layout class="QHBoxLayout" name="horizontalLayout_11">
+ <item>
+ <widget class="QLabel" name="shuffleLbl">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>&lt;unknown&gt;</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="shuffleOnBtn">
+ <property name="text">
+ <string>On</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="shuffleOffBtn">
+ <property name="text">
+ <string>Off</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="4" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Volume:</string>
</property>
</widget>
</item>
- <item row="3" column="1">
+ <item row="4" column="1">
<widget class="QLabel" name="volumeLbl">
<property name="enabled">
<bool>false</bool>
@@ -89,14 +132,45 @@
</property>
</widget>
</item>
- <item row="4" column="0">
+ <item row="5" column="0">
+ <widget class="QLabel" name="label_19">
+ <property name="text">
+ <string>&gt;&gt;&gt;</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1">
+ <layout class="QHBoxLayout" name="horizontalLayout_12">
+ <item>
+ <widget class="QDoubleSpinBox" name="volumeSpinBox">
+ <property name="minimum">
+ <double>-9999.989999999999782</double>
+ </property>
+ <property name="maximum">
+ <double>9999.989999999999782</double>
+ </property>
+ <property name="singleStep">
+ <double>0.050000000000000</double>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="volumeSetBtn">
+ <property name="text">
+ <string>Set</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="6" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Maximum rate:</string>
</property>
</widget>
</item>
- <item row="4" column="1">
+ <item row="6" column="1">
<widget class="QLabel" name="maxRateLbl">
<property name="enabled">
<bool>false</bool>
@@ -106,14 +180,14 @@
</property>
</widget>
</item>
- <item row="5" column="0">
+ <item row="7" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Minimum rate:</string>
</property>
</widget>
</item>
- <item row="5" column="1">
+ <item row="7" column="1">
<widget class="QLabel" name="minRateLbl">
<property name="enabled">
<bool>false</bool>
@@ -123,14 +197,14 @@
</property>
</widget>
</item>
- <item row="6" column="0">
+ <item row="8" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Rate:</string>
</property>
</widget>
</item>
- <item row="6" column="1">
+ <item row="8" column="1">
<widget class="QLabel" name="rateLbl">
<property name="enabled">
<bool>false</bool>
@@ -140,14 +214,48 @@
</property>
</widget>
</item>
- <item row="7" column="0">
+ <item row="9" column="0">
+ <widget class="QLabel" name="label_20">
+ <property name="text">
+ <string>&gt;&gt;&gt;</string>
+ </property>
+ </widget>
+ </item>
+ <item row="9" column="1">
+ <layout class="QHBoxLayout" name="horizontalLayout_13">
+ <item>
+ <widget class="QDoubleSpinBox" name="rateSpinBox">
+ <property name="minimum">
+ <double>-9999.989999999999782</double>
+ </property>
+ <property name="maximum">
+ <double>9999.989999999999782</double>
+ </property>
+ <property name="singleStep">
+ <double>0.250000000000000</double>
+ </property>
+ <property name="value">
+ <double>1.000000000000000</double>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="rateSetBtn">
+ <property name="text">
+ <string>Set</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="10" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Last received position:</string>
</property>
</widget>
</item>
- <item row="7" column="1">
+ <item row="10" column="1">
<widget class="QLabel" name="lastKnownPosLbl">
<property name="enabled">
<bool>false</bool>
@@ -157,14 +265,14 @@
</property>
</widget>
</item>
- <item row="8" column="0">
+ <item row="11" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Predicted position:</string>
</property>
</widget>
</item>
- <item row="8" column="1">
+ <item row="11" column="1">
<widget class="QLabel" name="estPosLbl">
<property name="enabled">
<bool>false</bool>
@@ -174,14 +282,14 @@
</property>
</widget>
</item>
- <item row="9" column="0">
+ <item row="12" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Can control:</string>
</property>
</widget>
</item>
- <item row="9" column="1">
+ <item row="12" column="1">
<widget class="QLabel" name="canControlLbl">
<property name="enabled">
<bool>false</bool>
@@ -191,63 +299,82 @@
</property>
</widget>
</item>
- <item row="10" column="0">
+ <item row="13" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Can play:</string>
</property>
</widget>
</item>
- <item row="11" column="0">
+ <item row="13" column="1">
+ <widget class="QLabel" name="canPlayLbl">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>&lt;unknown&gt;</string>
+ </property>
+ </widget>
+ </item>
+ <item row="14" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>Can pause:</string>
</property>
</widget>
</item>
- <item row="12" column="0">
+ <item row="14" column="1">
+ <widget class="QLabel" name="canPauseLbl">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>&lt;unknown&gt;</string>
+ </property>
+ </widget>
+ </item>
+ <item row="15" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
<string>Can go previous:</string>
</property>
</widget>
</item>
- <item row="13" column="0">
+ <item row="15" column="1">
+ <widget class="QLabel" name="canGoPrevLbl">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>&lt;unknown&gt;</string>
+ </property>
+ </widget>
+ </item>
+ <item row="16" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string>Can go next:</string>
</property>
</widget>
</item>
- <item row="13" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QLabel" name="canGoNextLbl">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>&lt;unknown&gt;</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="nextBtn">
- <property name="text">
- <string>Next</string>
- </property>
- </widget>
- </item>
- </layout>
+ <item row="16" column="1">
+ <widget class="QLabel" name="canGoNextLbl">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>&lt;unknown&gt;</string>
+ </property>
+ </widget>
</item>
- <item row="14" column="0">
+ <item row="17" column="0">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Can seek:</string>
</property>
</widget>
</item>
- <item row="14" column="1">
+ <item row="17" column="1">
<widget class="QLabel" name="canSeekLbl">
<property name="enabled">
<bool>false</bool>
@@ -257,83 +384,6 @@
</property>
</widget>
</item>
- <item row="12" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <item>
- <widget class="QLabel" name="canGoPrevLbl">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>&lt;unknown&gt;</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="prevBtn">
- <property name="text">
- <string>Previous</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="10" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_4">
- <item>
- <widget class="QLabel" name="canPlayLbl">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>&lt;unknown&gt;</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="playBtn">
- <property name="text">
- <string>Play</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="stopBtn">
- <property name="text">
- <string>Stop</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="11" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_5">
- <item>
- <widget class="QLabel" name="canPauseLbl">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>&lt;unknown&gt;</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="pauseBtn">
- <property name="text">
- <string>Pause</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="playPauseBtn">
- <property name="text">
- <string>Play/Pause</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
</layout>
</item>
<item>
@@ -357,6 +407,52 @@
</layout>
</item>
<item>
+ <layout class="QHBoxLayout" name="horizontalLayout_5">
+ <item>
+ <widget class="QPushButton" name="playBtn">
+ <property name="text">
+ <string>Play</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pauseBtn">
+ <property name="text">
+ <string>Pause</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="playPauseBtn">
+ <property name="text">
+ <string>Play/Pause</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="stopBtn">
+ <property name="text">
+ <string>Stop</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="prevBtn">
+ <property name="text">
+ <string>Previous</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="nextBtn">
+ <property name="text">
+ <string>Next</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLineEdit" name="openUriEdit"/>
diff --git a/ui/window.ui b/ui/window.ui
index 91a2fad..a3b14d9 100644
--- a/ui/window.ui
+++ b/ui/window.ui
@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>495</width>
+ <width>786</width>
<height>628</height>
</rect>
</property>
@@ -21,7 +21,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>495</width>
+ <width>786</width>
<height>20</height>
</rect>
</property>