better ui, change colors and font
This commit is contained in:
parent
1fccbf64fd
commit
88704cd726
9 changed files with 129 additions and 97 deletions
|
@ -8,9 +8,31 @@ AudioLayerWidget::AudioLayerWidget(QWidget *parent, int layer):
|
|||
{
|
||||
QVBoxLayout *layout = new QVBoxLayout;
|
||||
|
||||
QVBoxLayout *playback = new QVBoxLayout;
|
||||
m_folderValue = new QLabel;
|
||||
//m_folderValue->setMaximumWidth(160);
|
||||
m_folderValue->setAlignment(Qt::AlignHCenter);
|
||||
m_folderValue->setStyleSheet(
|
||||
"color: white;"
|
||||
"background-color: black;"
|
||||
);
|
||||
playback->addWidget(m_folderValue);
|
||||
m_fileValue = new QLabel;
|
||||
//m_fileValue->setMaximumWidth(160);
|
||||
m_fileValue->setAlignment(Qt::AlignHCenter);
|
||||
m_fileValue->setStyleSheet(
|
||||
"color: white;"
|
||||
"background-color: black;"
|
||||
);
|
||||
|
||||
playback->addWidget(m_fileValue);
|
||||
playback->setSpacing(0);
|
||||
playback->setContentsMargins(0, 0, 0, 0);
|
||||
layout->addLayout(playback);
|
||||
|
||||
m_suspendResumeButton = new QPushButton(this);
|
||||
m_suspendResumeButton->setText(StatusStr[Status::Iddle]);
|
||||
m_suspendResumeButton->setMaximumWidth(200);
|
||||
//m_suspendResumeButton->setMaximumWidth(180);
|
||||
//connect(m_suspendResumeButton, SIGNAL(clicked()), SLOT(toggleSuspendResume()));
|
||||
layout->addWidget(m_suspendResumeButton);
|
||||
|
||||
|
@ -19,7 +41,7 @@ AudioLayerWidget::AudioLayerWidget(QWidget *parent, int layer):
|
|||
m_progress->setRange(0, 0);
|
||||
m_progress->setValue(0);
|
||||
m_progress->setFormat("%v / %m");
|
||||
m_progress->setMaximumWidth(200);
|
||||
//m_progress->setMaximumWidth(180);
|
||||
layout->addWidget(m_progress);
|
||||
|
||||
m_progressTime = new QTimeEdit;
|
||||
|
@ -28,7 +50,7 @@ AudioLayerWidget::AudioLayerWidget(QWidget *parent, int layer):
|
|||
m_progressTime->setDisplayFormat("h:mm:ss:zzz");
|
||||
m_progressTime->setReadOnly(true);
|
||||
m_progressTime->setButtonSymbols(QAbstractSpinBox::NoButtons);
|
||||
m_progressTime->setMaximumWidth(88);
|
||||
//m_progressTime->setMaximumWidth(80);
|
||||
m_progressTime->setFocusPolicy(Qt::NoFocus);
|
||||
m_totalTimeValue = new QTimeEdit;
|
||||
m_totalTimeValue->setObjectName("Track Length");
|
||||
|
@ -36,32 +58,28 @@ AudioLayerWidget::AudioLayerWidget(QWidget *parent, int layer):
|
|||
m_totalTimeValue->setDisplayFormat("h:mm:ss:zzz");
|
||||
m_totalTimeValue->setReadOnly(true);
|
||||
m_totalTimeValue->setButtonSymbols(QAbstractSpinBox::NoButtons);
|
||||
m_totalTimeValue->setMaximumWidth(88);
|
||||
//m_totalTimeValue->setMaximumWidth(80);
|
||||
m_totalTimeValue->setFocusPolicy(Qt::NoFocus);
|
||||
QHBoxLayout *status = new QHBoxLayout;
|
||||
status->addWidget(m_progressTime);
|
||||
status->addWidget(m_totalTimeValue);
|
||||
layout->addLayout(status);
|
||||
QVBoxLayout *playback = new QVBoxLayout;
|
||||
m_folderValue = new QLabel;
|
||||
m_folderValue->setMaximumWidth(200);
|
||||
playback->addWidget(m_folderValue);
|
||||
m_fileValue = new QLabel;
|
||||
m_fileValue->setMaximumWidth(200);
|
||||
playback->addWidget(m_fileValue);
|
||||
layout->addLayout(playback);
|
||||
|
||||
QHBoxLayout *volumeBox = new QHBoxLayout;
|
||||
m_volume = new SliderGroup(0 , 100, 2, NULL);
|
||||
m_volume = new SliderGroup("Vol", 0 , 100, 2, NULL);
|
||||
volumeBox->addWidget(m_volume);
|
||||
connect(m_volume, SIGNAL(valueChanged(float)), this, SLOT(volumeChanged(float)));
|
||||
m_pan = new SliderGroup(0 , 255, 0, NULL);
|
||||
m_pan = new SliderGroup("Pan", 0 , 255, 0, NULL);
|
||||
volumeBox->addWidget(m_pan);
|
||||
connect(m_pan, SIGNAL(valueChanged(float)), this, SLOT(panChanged(float)));
|
||||
m_pitch = new SliderGroup(0 , 255, 0, NULL);
|
||||
m_pitch = new SliderGroup("Pitch", 0 , 255, 0, NULL);
|
||||
volumeBox->addWidget(m_pitch);
|
||||
volumeBox->setSpacing(0);
|
||||
volumeBox->setContentsMargins(0, 0, 0, 0);
|
||||
connect(m_pitch, SIGNAL(valueChanged(float)), this, SLOT(pitchChanged(float)));
|
||||
layout->addLayout(volumeBox);
|
||||
layout->setAlignment(Qt::AlignHCenter);
|
||||
layout->setSpacing(0);
|
||||
layout->setContentsMargins(2, 2, 2, 2);
|
||||
this->setLayout(layout);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,8 @@ AudioWidget::AudioWidget() :
|
|||
connect(alw, SIGNAL(uiSliderChanged(int, Slider, int)), this, SLOT(uiSliderAction(int, Slider, int)));
|
||||
connect(alw, SIGNAL(uiPlaybackChanged(int, Status)), this, SLOT(uiChangePlaybackStatus(int, Status)));
|
||||
}
|
||||
m_layout->setSpacing(0);
|
||||
m_layout->setContentsMargins(0, 0, 0, 0);
|
||||
setLayout(m_layout);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@ dmxWidget::dmxWidget(QWidget *parent) :
|
|||
QVBoxLayout *vbox = new QVBoxLayout;
|
||||
m_receiveDMX->setText("DMX Signal");
|
||||
vbox->addWidget(m_receiveDMX);
|
||||
vbox->setSpacing(1);
|
||||
vbox->setContentsMargins(1, 1, 1, 1);
|
||||
this->setLayout(vbox);
|
||||
connect(m_watchDMX, SIGNAL(timeout()),
|
||||
this, SLOT(watchDMXExpired()));
|
||||
|
|
|
@ -32,8 +32,16 @@ libreMediaServerAudioUi::libreMediaServerAudioUi(QWidget *parent)
|
|||
QDockWidget *topWidget = new QDockWidget(tr("Master"), this);
|
||||
topWidget->setAllowedAreas(Qt::TopDockWidgetArea);
|
||||
topWidget->setWidget(m_dmxWidget);
|
||||
topWidget->setContentsMargins(0, 0, 0, 0);
|
||||
addDockWidget(Qt::TopDockWidgetArea, topWidget);
|
||||
connect(ui.actionLaunch_OLA_Setup, SIGNAL(triggered()), this, SLOT(olasetup()));
|
||||
this->setContentsMargins(5, 5, 5, 5);
|
||||
this->setStyleSheet(
|
||||
"color: white;"
|
||||
"background-color: gray;"
|
||||
"selection-color: blue;"
|
||||
"selection-background-color: green"
|
||||
);
|
||||
}
|
||||
|
||||
libreMediaServerAudioUi::~libreMediaServerAudioUi()
|
||||
|
|
|
@ -1,19 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<author>Santi Noreña belfegor@gmail.com</author>
|
||||
<author>Santi Noreña lms@criptomart.net</author>
|
||||
<class>LibreMediaServerAudio</class>
|
||||
<widget class="QMainWindow" name="LibreMediaServerAudio">
|
||||
<widget class="QMainWindow" name="LibreMediaServer Audio">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>114</width>
|
||||
<height>218</height>
|
||||
<width>800</width>
|
||||
<height>800</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Unifont</family>
|
||||
<pointsize>12</pointsize>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>LibreMediaServer</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset>
|
||||
<normaloff>../../../../criptomart/artwork/logo_v2_criptomart.net.png</normaloff>../../../../criptomart/artwork/logo_v2_criptomart.net.png</iconset>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget"/>
|
||||
<widget class="QMenuBar" name="menuBar">
|
||||
<property name="geometry">
|
||||
|
@ -21,7 +33,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>114</width>
|
||||
<height>22</height>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuFile">
|
||||
|
@ -32,47 +44,9 @@
|
|||
</widget>
|
||||
<addaction name="menuFile"/>
|
||||
</widget>
|
||||
<action name="actionExit">
|
||||
<property name="text">
|
||||
<string>Exit</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionOpen_conf">
|
||||
<property name="text">
|
||||
<string>Open Configuration...</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSave_conf">
|
||||
<property name="text">
|
||||
<string>Save Configuration...</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_Settings">
|
||||
<property name="text">
|
||||
<string>Settings...</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionInitMSEX">
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Init</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionIP_Address">
|
||||
<property name="text">
|
||||
<string>IP Address</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionMake_Thumbs">
|
||||
<property name="text">
|
||||
<string>Make Thumbs</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionLaunch_OLA_Setup">
|
||||
<property name="text">
|
||||
<string>OLA Setup...</string>
|
||||
<string>OLA Setup</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "slidergroup.h"
|
||||
|
||||
SliderGroup::SliderGroup(int min,
|
||||
SliderGroup::SliderGroup(QString name,
|
||||
int min,
|
||||
int max,
|
||||
int decimals,
|
||||
QWidget *parent)
|
||||
|
@ -8,23 +9,43 @@ SliderGroup::SliderGroup(int min,
|
|||
{
|
||||
QVBoxLayout *layout = new QVBoxLayout;
|
||||
layout->setAlignment(Qt::AlignHCenter);
|
||||
this->setMaximumWidth(65);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
//this->setMaximumWidth(40);
|
||||
slider = new QSlider(Qt::Orientation::Vertical);
|
||||
slider->setFocusPolicy(Qt::StrongFocus);
|
||||
slider->setTickPosition(QSlider::TicksBothSides);
|
||||
slider->setTickInterval((max - min) / 11);
|
||||
slider->setMinimumHeight(100);
|
||||
slider->setSingleStep(1);
|
||||
slider->setRange(min, max);
|
||||
slider->setMaximumWidth(65);
|
||||
//slider->setMaximumWidth(40);
|
||||
slider->setToolTip(name);
|
||||
slider->setStyleSheet("QSlider {"
|
||||
"border: 1px solid #999999;"
|
||||
"margin: 0px;"
|
||||
"height: 200px;"
|
||||
"width: 40px;}"
|
||||
);
|
||||
slider->setContentsMargins(0, 0, 0, 0);
|
||||
valueBox = new QDoubleSpinBox();
|
||||
valueBox->setFocusPolicy(Qt::NoFocus);
|
||||
valueBox->setButtonSymbols(QAbstractSpinBox::NoButtons);
|
||||
valueBox->setMaximumWidth(65);
|
||||
//valueBox->setMaximumWidth(40);
|
||||
valueBox->setRange(min, max);
|
||||
valueBox->setDecimals(decimals);
|
||||
valueBox->setObjectName(name);
|
||||
valueBox->setToolTip(name);
|
||||
valueBox->setAlignment(Qt::AlignHCenter);
|
||||
valueBox->setContentsMargins(0, 0, 0, 0);
|
||||
connect(slider, SIGNAL(valueChanged(int)), this, SLOT(sliderValueChanged(int)));
|
||||
layout->addWidget(slider);
|
||||
layout->addWidget(valueBox);
|
||||
this->setStyleSheet("border: 1px solid #999999;"
|
||||
"width: 40px;"
|
||||
"margin: 0px;"
|
||||
);
|
||||
layout->setSpacing(0);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
this->setLayout(layout);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,8 @@ class SliderGroup : public QWidget
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SliderGroup(int min,
|
||||
SliderGroup(QString name,
|
||||
int min,
|
||||
int max,
|
||||
int decimals,
|
||||
QWidget *parent = nullptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue