Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fde8b05754 | |||
| 112090ab82 | |||
| eafff377fd | |||
| 4c473f5d07 | |||
|
|
25da7e6b14 | ||
|
|
d187ca69db | ||
| a347c3d965 | |||
| 333dc87b75 |
@@ -1,2 +1,8 @@
|
|||||||
# yremote
|
# yremote
|
||||||
|
|
||||||
|
Simple PC remote for yamaha recievers.
|
||||||
|
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Only tested with RX-V475.
|
||||||
3
main.cpp
3
main.cpp
@@ -6,6 +6,9 @@ using namespace yremote;
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
|
QCoreApplication::setOrganizationName("RogoSoftware");
|
||||||
|
QCoreApplication::setOrganizationDomain("git.rogocloud.eu");
|
||||||
|
QCoreApplication::setApplicationName("yremote");
|
||||||
MainWindow w;
|
MainWindow w;
|
||||||
w.show();
|
w.show();
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_mainwindow.h"
|
||||||
|
|
||||||
|
#include <QFile>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QtNetwork/QNetworkReply>
|
#include <QtNetwork/QNetworkReply>
|
||||||
|
|
||||||
@@ -9,20 +10,35 @@ namespace yremote {
|
|||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)
|
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)
|
||||||
{
|
{
|
||||||
QString DEFAULT_ADDRESS = "10.0.0.227";
|
|
||||||
|
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
setFixedSize(size());
|
setFixedSize(size());
|
||||||
ui->txt_address->setText(DEFAULT_ADDRESS);
|
#if defined(Q_OS_WIN)
|
||||||
|
setWindowFlags(windowFlags() | Qt::MSWindowsFixedSizeDialogHint);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
mSettings = new QSettings(QSettings::IniFormat, QSettings::UserScope, "RogoSoftware", "yremote");
|
||||||
|
|
||||||
|
restoreGeometry(mSettings->value("geometry", saveGeometry()).toByteArray());
|
||||||
|
move(mSettings->value("pos", pos()).toPoint());
|
||||||
|
|
||||||
|
ui->txt_address->setText(mSettings->value("av_address", "").toString());
|
||||||
mAddress = ui->txt_address->text();
|
mAddress = ui->txt_address->text();
|
||||||
|
|
||||||
connect(&mTimer, &QTimer::timeout, this, &MainWindow::sendVolume);
|
// setup volume value collection
|
||||||
mTimer.setSingleShot(true);
|
connect(&mTimerValCollect, &QTimer::timeout, this, &MainWindow::sendVolume);
|
||||||
|
mTimerValCollect.setSingleShot(true);
|
||||||
|
|
||||||
// load initial data
|
connect(&mTimerUpdateAddress, &QTimer::timeout, this, &MainWindow::updateAVState);
|
||||||
sendCommand("<YAMAHA_AV cmd=\"GET\"><System><Power_Control><Power>GetParam</Power></Power_Control></System></YAMAHA_AV>");
|
mTimerUpdateAddress.setSingleShot(true);
|
||||||
sendCommand("<YAMAHA_AV cmd=\"GET\"><Main_Zone><Volume><Lvl>GetParam</Lvl></Volume></Main_Zone></YAMAHA_AV>");
|
|
||||||
sendCommand("<YAMAHA_AV cmd=\"GET\"><Main_Zone><Input><Input_Sel>GetParam</Input_Sel></Input></Main_Zone></YAMAHA_AV>");
|
// load initial data and set update rate
|
||||||
|
updateAVState();
|
||||||
|
connect(&mTimerUpdateState, &QTimer::timeout, this, &MainWindow::updateAVState);
|
||||||
|
mTimerUpdateState.start(TIME_UPDATE_STATE);
|
||||||
|
|
||||||
|
QFile css(":style.css");
|
||||||
|
if (css.open(QFile::ReadOnly | QFile::Text))
|
||||||
|
this->setStyleSheet(css.readAll());
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
@@ -52,7 +68,8 @@ void MainWindow::replyFinished(QNetworkReply* reply)
|
|||||||
} else {
|
} else {
|
||||||
qDebug() << reply->url();
|
qDebug() << reply->url();
|
||||||
qDebug() << reply->errorString();
|
qDebug() << reply->errorString();
|
||||||
return;
|
|
||||||
|
mPowered = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check power state
|
// check power state
|
||||||
@@ -92,15 +109,7 @@ void MainWindow::updateUi() {
|
|||||||
ui->btn_audioin->setEnabled(mPowered);
|
ui->btn_audioin->setEnabled(mPowered);
|
||||||
|
|
||||||
setActiveButton(mInput);
|
setActiveButton(mInput);
|
||||||
|
setPowerState();
|
||||||
if (mPowered) {
|
|
||||||
ui->btn_onoff->setText("On");
|
|
||||||
ui->btn_onoff->setStyleSheet("background-color: SpringGreen");
|
|
||||||
} else {
|
|
||||||
ui->btn_onoff->setText("Off");
|
|
||||||
ui->btn_onoff->setStyleSheet("background-color: DarkRed");
|
|
||||||
setActiveButton("");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::setActiveButton(QString prop)
|
void MainWindow::setActiveButton(QString prop)
|
||||||
@@ -109,16 +118,34 @@ void MainWindow::setActiveButton(QString prop)
|
|||||||
QPushButton *b = dynamic_cast<QPushButton*>(q);
|
QPushButton *b = dynamic_cast<QPushButton*>(q);
|
||||||
if (b){
|
if (b){
|
||||||
if (b->property("input") == prop)
|
if (b->property("input") == prop)
|
||||||
b->setStyleSheet("background-color: SpringGreen");
|
b->setStyleSheet("background-color: #24e895; color: #404040;");
|
||||||
else
|
else
|
||||||
b->setStyleSheet("");
|
b->setStyleSheet("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::setPowerState()
|
||||||
|
{
|
||||||
|
if (mPowered) {
|
||||||
|
ui->btn_onoff->setText("On");
|
||||||
|
ui->btn_onoff->setStyleSheet("background-color: #24e895; color: #404040;");
|
||||||
|
ui->lbl_volume->setStyleSheet("color: #24e895");
|
||||||
|
ui->dial->setStyleSheet("background-color: #24e895");
|
||||||
|
} else {
|
||||||
|
ui->btn_onoff->setText("Off");
|
||||||
|
ui->btn_onoff->setStyleSheet("");
|
||||||
|
ui->lbl_volume->setStyleSheet("");
|
||||||
|
ui->dial->setStyleSheet("");
|
||||||
|
setActiveButton("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::on_txt_address_textEdited(const QString &arg1)
|
void MainWindow::on_txt_address_textEdited(const QString &arg1)
|
||||||
{
|
{
|
||||||
mAddress = arg1;
|
mAddress = arg1;
|
||||||
|
mSettings->setValue("av_address", mAddress);
|
||||||
|
mTimerUpdateAddress.start(TIME_UPDATE_ADDRESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_btn_onoff_clicked()
|
void MainWindow::on_btn_onoff_clicked()
|
||||||
@@ -146,7 +173,7 @@ void MainWindow::on_dial_valueChanged(int value)
|
|||||||
|
|
||||||
ui->lbl_volume->setText(QString::number(value));
|
ui->lbl_volume->setText(QString::number(value));
|
||||||
mVolume = value;
|
mVolume = value;
|
||||||
mTimer.start(WAITTIME);
|
mTimerValCollect.start(TIME_VOL_COLLECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::sendVolume()
|
void MainWindow::sendVolume()
|
||||||
@@ -156,6 +183,19 @@ void MainWindow::sendVolume()
|
|||||||
+ "</Val><Exp>1</Exp><Unit>dB</Unit></Lvl></Volume></Main_Zone></YAMAHA_AV>");
|
+ "</Val><Exp>1</Exp><Unit>dB</Unit></Lvl></Volume></Main_Zone></YAMAHA_AV>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::moveEvent(QMoveEvent *)
|
||||||
|
{
|
||||||
|
mSettings->setValue("geometry", geometry());
|
||||||
|
mSettings->setValue("pos", pos());
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::updateAVState()
|
||||||
|
{
|
||||||
|
sendCommand("<YAMAHA_AV cmd=\"GET\"><System><Power_Control><Power>GetParam</Power></Power_Control></System></YAMAHA_AV>");
|
||||||
|
sendCommand("<YAMAHA_AV cmd=\"GET\"><Main_Zone><Volume><Lvl>GetParam</Lvl></Volume></Main_Zone></YAMAHA_AV>");
|
||||||
|
sendCommand("<YAMAHA_AV cmd=\"GET\"><Main_Zone><Input><Input_Sel>GetParam</Input_Sel></Input></Main_Zone></YAMAHA_AV>");
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::on_btn_hdmi1_clicked()
|
void MainWindow::on_btn_hdmi1_clicked()
|
||||||
{
|
{
|
||||||
sendCommand("<YAMAHA_AV cmd=\"PUT\"><Main_Zone><Input><Input_Sel>HDMI1</Input_Sel></Input></Main_Zone></YAMAHA_AV>");
|
sendCommand("<YAMAHA_AV cmd=\"PUT\"><Main_Zone><Input><Input_Sel>HDMI1</Input_Sel></Input></Main_Zone></YAMAHA_AV>");
|
||||||
|
|||||||
24
mainwindow.h
24
mainwindow.h
@@ -2,6 +2,7 @@
|
|||||||
#define MAINWINDOW_H
|
#define MAINWINDOW_H
|
||||||
|
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
|
#include <QSettings>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include "QtNetwork/QNetworkAccessManager"
|
#include "QtNetwork/QNetworkAccessManager"
|
||||||
|
|
||||||
@@ -16,8 +17,11 @@ class MainWindow : public QMainWindow
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit MainWindow(QWidget *parent = 0);
|
explicit MainWindow(QWidget *parent = nullptr);
|
||||||
~MainWindow();
|
~MainWindow() override;
|
||||||
|
|
||||||
|
void setPowerState();
|
||||||
|
void updateAVState();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_btn_onoff_clicked();
|
void on_btn_onoff_clicked();
|
||||||
@@ -36,17 +40,27 @@ private:
|
|||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
|
|
||||||
QString mAddress;
|
QString mAddress;
|
||||||
QTimer mTimer;
|
QSettings* mSettings;
|
||||||
|
QTimer mTimerValCollect;
|
||||||
|
QTimer mTimerUpdateState;
|
||||||
|
QTimer mTimerUpdateAddress;
|
||||||
|
|
||||||
bool mPowered = false;
|
bool mPowered = false;
|
||||||
int mVolume = 0;
|
int mVolume = 0;
|
||||||
QString mInput;
|
QString mInput;
|
||||||
const int WAITTIME = 400;
|
const int TIME_VOL_COLLECT = 400;
|
||||||
|
const int TIME_UPDATE_STATE = 5000;
|
||||||
|
const int TIME_UPDATE_ADDRESS = 1000;
|
||||||
|
|
||||||
|
|
||||||
void sendCommand(QString cmd);
|
void sendCommand(QString cmd);
|
||||||
void updateUi();
|
void updateUi();
|
||||||
|
void setActiveButton(QString prop);
|
||||||
void sendVolume();
|
void sendVolume();
|
||||||
|
|
||||||
void setActiveButton(QString prop);
|
// QWidget interface
|
||||||
|
protected:
|
||||||
|
void moveEvent(QMoveEvent *) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
366
mainwindow.ui
366
mainwindow.ui
@@ -6,78 +6,71 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>359</width>
|
<width>373</width>
|
||||||
<height>161</height>
|
<height>166</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="contextMenuPolicy">
|
<property name="contextMenuPolicy">
|
||||||
<enum>Qt::NoContextMenu</enum>
|
<enum>Qt::NoContextMenu</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>yremote</string>
|
<string>yremote</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="autoFillBackground">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="unifiedTitleAndToolBarOnMac">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<widget class="QWidget" name="centralWidget">
|
<widget class="QWidget" name="centralWidget">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QPushButton" name="btn_onoff">
|
<widget class="QPushButton" name="btn_onoff">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="autoFillBackground">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>On</string>
|
<string>On</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="flat">
|
||||||
</item>
|
<bool>false</bool>
|
||||||
<item row="1" column="4">
|
|
||||||
<widget class="QLineEdit" name="txt_address">
|
|
||||||
<property name="text">
|
|
||||||
<string>10.0.0.227</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="4">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="lbl_volume">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Source Code Pro Medium</family>
|
|
||||||
<pointsize>16</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::StyledPanel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Sunken</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>-400</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Address:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<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 row="2" column="4">
|
|
||||||
<widget class="QDial" name="dial">
|
<widget class="QDial" name="dial">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>-805</number>
|
<number>-805</number>
|
||||||
@@ -108,110 +101,187 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" rowspan="2" colspan="3">
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="lbl_volume">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Source Code Pro Medium</family>
|
||||||
|
<pointsize>16</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Sunken</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>-400</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1" rowspan="2" colspan="5">
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Input</string>
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="flat">
|
<property name="flat">
|
||||||
<bool>true</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QPushButton" name="btn_hdmi1">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<property name="geometry">
|
<property name="leftMargin">
|
||||||
<rect>
|
<number>5</number>
|
||||||
<x>10</x>
|
|
||||||
<y>30</y>
|
|
||||||
<width>80</width>
|
|
||||||
<height>21</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="topMargin">
|
||||||
<string>HDMI 1</string>
|
<number>5</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="input" stdset="0">
|
<property name="rightMargin">
|
||||||
<string>HDMI1</string>
|
<number>5</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="bottomMargin">
|
||||||
<widget class="QPushButton" name="btn_hdmi2">
|
<number>5</number>
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>60</y>
|
|
||||||
<width>80</width>
|
|
||||||
<height>21</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="spacing">
|
||||||
<string>HDMI 2</string>
|
<number>5</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="input" stdset="0">
|
<item row="0" column="0">
|
||||||
<string>HDMI2</string>
|
<widget class="QPushButton" name="btn_hdmi1">
|
||||||
</property>
|
<property name="sizePolicy">
|
||||||
</widget>
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<widget class="QPushButton" name="btn_hdmi3">
|
<horstretch>0</horstretch>
|
||||||
<property name="geometry">
|
<verstretch>0</verstretch>
|
||||||
<rect>
|
</sizepolicy>
|
||||||
<x>10</x>
|
</property>
|
||||||
<y>90</y>
|
<property name="styleSheet">
|
||||||
<width>80</width>
|
<string notr="true"/>
|
||||||
<height>21</height>
|
</property>
|
||||||
</rect>
|
<property name="text">
|
||||||
</property>
|
<string>HDMI 1</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>HDMI 3</string>
|
<property name="flat">
|
||||||
</property>
|
<bool>false</bool>
|
||||||
<property name="input" stdset="0">
|
</property>
|
||||||
<string>HDMI3</string>
|
<property name="input" stdset="0">
|
||||||
</property>
|
<string>HDMI1</string>
|
||||||
</widget>
|
</property>
|
||||||
<widget class="QPushButton" name="btn_spotify">
|
</widget>
|
||||||
<property name="geometry">
|
</item>
|
||||||
<rect>
|
<item row="0" column="1">
|
||||||
<x>110</x>
|
<widget class="QPushButton" name="btn_spotify">
|
||||||
<y>30</y>
|
<property name="sizePolicy">
|
||||||
<width>80</width>
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<height>21</height>
|
<horstretch>0</horstretch>
|
||||||
</rect>
|
<verstretch>0</verstretch>
|
||||||
</property>
|
</sizepolicy>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Spotify</string>
|
<property name="text">
|
||||||
</property>
|
<string>Spotify</string>
|
||||||
<property name="input" stdset="0">
|
</property>
|
||||||
<string>Spotify</string>
|
<property name="input" stdset="0">
|
||||||
</property>
|
<string>Spotify</string>
|
||||||
</widget>
|
</property>
|
||||||
<widget class="QPushButton" name="btn_airplay">
|
</widget>
|
||||||
<property name="geometry">
|
</item>
|
||||||
<rect>
|
<item row="1" column="0">
|
||||||
<x>110</x>
|
<widget class="QPushButton" name="btn_hdmi2">
|
||||||
<y>60</y>
|
<property name="sizePolicy">
|
||||||
<width>80</width>
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<height>21</height>
|
<horstretch>0</horstretch>
|
||||||
</rect>
|
<verstretch>0</verstretch>
|
||||||
</property>
|
</sizepolicy>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Airplay</string>
|
<property name="text">
|
||||||
</property>
|
<string>HDMI 2</string>
|
||||||
<property name="input" stdset="0">
|
</property>
|
||||||
<string>IPOD</string>
|
<property name="input" stdset="0">
|
||||||
</property>
|
<string>HDMI2</string>
|
||||||
</widget>
|
</property>
|
||||||
<widget class="QPushButton" name="btn_audioin">
|
</widget>
|
||||||
<property name="geometry">
|
</item>
|
||||||
<rect>
|
<item row="1" column="1">
|
||||||
<x>110</x>
|
<widget class="QPushButton" name="btn_airplay">
|
||||||
<y>90</y>
|
<property name="sizePolicy">
|
||||||
<width>80</width>
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<height>21</height>
|
<horstretch>0</horstretch>
|
||||||
</rect>
|
<verstretch>0</verstretch>
|
||||||
</property>
|
</sizepolicy>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Audio In</string>
|
<property name="text">
|
||||||
</property>
|
<string>Airplay</string>
|
||||||
<property name="input" stdset="0">
|
</property>
|
||||||
<string>AUDIO</string>
|
<property name="input" stdset="0">
|
||||||
</property>
|
<string>IPOD</string>
|
||||||
</widget>
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QPushButton" name="btn_hdmi3">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>HDMI 3</string>
|
||||||
|
</property>
|
||||||
|
<property name="input" stdset="0">
|
||||||
|
<string>HDMI3</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QPushButton" name="btn_audioin">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Audio In</string>
|
||||||
|
</property>
|
||||||
|
<property name="input" stdset="0">
|
||||||
|
<string>AUDIO</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1" colspan="2">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Address:</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="3">
|
||||||
|
<widget class="QLineEdit" name="txt_address">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>10.0.0.227</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>AV IP</string>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
5
resources.qrc
Normal file
5
resources.qrc
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<!DOCTYPE RCC><RCC version="1.0">
|
||||||
|
<qresource>
|
||||||
|
<file>style.css</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
||||||
43
style.css
Normal file
43
style.css
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
QMainWindow {
|
||||||
|
background-color: #404040;
|
||||||
|
border-color: #edf2f4;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPushButton {
|
||||||
|
background-color: #404040;
|
||||||
|
color: #edf2f4;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPushButton:hover {
|
||||||
|
border: 1px solid #0077fd;
|
||||||
|
}
|
||||||
|
|
||||||
|
QLineEdit {
|
||||||
|
background-color: #404040;
|
||||||
|
color: #edf2f4;
|
||||||
|
border: 1px solid #0077fd;
|
||||||
|
}
|
||||||
|
|
||||||
|
QLineEdit:hover {
|
||||||
|
border: 1px solid #edf2f4;
|
||||||
|
}
|
||||||
|
|
||||||
|
QLabel {
|
||||||
|
color: #edf2f4;
|
||||||
|
}
|
||||||
|
|
||||||
|
QGroupBox {
|
||||||
|
color: #edf2f4;
|
||||||
|
border: 1px solid #0077fd;
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QGroupBox::title {
|
||||||
|
subcontrol-origin: margin;
|
||||||
|
left: 5px;
|
||||||
|
padding: 0px 5px 0px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QLabel#lbl_volume:hover {
|
||||||
|
border: 1px solid #0077fd;
|
||||||
|
}
|
||||||
@@ -33,3 +33,7 @@ HEADERS += \
|
|||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
mainwindow.ui
|
mainwindow.ui
|
||||||
|
|
||||||
|
RESOURCES = resources.qrc \
|
||||||
|
resources.qrc
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user