mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-08-03 17:39:27 +02:00
2021-03-25 Fred Gleason <fredg@paravelsystems.com>
* Cleaned up 'RDMarkerDialog', 'RDMarkerPlayer' and 'RDMarkerView'. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
1a00c868f2
commit
18446ebff1
@ -21347,3 +21347,5 @@
|
|||||||
2021-03-25 Fred Gleason <fredg@paravelsystems.com>
|
2021-03-25 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Modified the 'Time' buttons in 'RDMarkerDialog' to show currently
|
* Modified the 'Time' buttons in 'RDMarkerDialog' to show currently
|
||||||
available 'In' and 'Out' possibilities.
|
available 'In' and 'Out' possibilities.
|
||||||
|
2021-03-25 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Cleaned up 'RDMarkerDialog', 'RDMarkerPlayer' and 'RDMarkerView'.
|
||||||
|
@ -33,13 +33,13 @@ RDMarkerDialog::RDMarkerDialog(const QString &caption,int card,int port,
|
|||||||
setMinimumSize(sizeHint());
|
setMinimumSize(sizeHint());
|
||||||
setMaximumSize(sizeHint());
|
setMaximumSize(sizeHint());
|
||||||
|
|
||||||
|
//
|
||||||
|
// Waveform Display
|
||||||
|
//
|
||||||
d_marker_view=new RDMarkerView(sizeHint().width()-104,374,this);
|
d_marker_view=new RDMarkerView(sizeHint().width()-104,374,this);
|
||||||
|
|
||||||
/**************************************************************************
|
|
||||||
* Waveform Section
|
|
||||||
**************************************************************************/
|
|
||||||
//
|
//
|
||||||
// Amplitude
|
// Amplitude Scaling Buttons
|
||||||
//
|
//
|
||||||
d_amplitude_box=new QGroupBox(tr("Amplitude"),this);
|
d_amplitude_box=new QGroupBox(tr("Amplitude"),this);
|
||||||
d_amplitude_box->setFont(labelFont());
|
d_amplitude_box->setFont(labelFont());
|
||||||
@ -81,9 +81,9 @@ RDMarkerDialog::RDMarkerDialog(const QString &caption,int card,int port,
|
|||||||
connect(d_marker_view,SIGNAL(canGrowTimeChanged(bool)),
|
connect(d_marker_view,SIGNAL(canGrowTimeChanged(bool)),
|
||||||
d_time_fullout_button,SLOT(setEnabled(bool)));
|
d_time_fullout_button,SLOT(setEnabled(bool)));
|
||||||
|
|
||||||
/**************************************************************************
|
//
|
||||||
* Transport Section
|
// Operator Controls
|
||||||
**************************************************************************/
|
//
|
||||||
d_player=new RDMarkerPlayer(card,port,this);
|
d_player=new RDMarkerPlayer(card,port,this);
|
||||||
connect(d_player,SIGNAL(cursorPositionChanged(unsigned)),
|
connect(d_player,SIGNAL(cursorPositionChanged(unsigned)),
|
||||||
d_marker_view,SLOT(setCursorPosition(unsigned)));
|
d_marker_view,SLOT(setCursorPosition(unsigned)));
|
||||||
@ -114,9 +114,6 @@ RDMarkerDialog::RDMarkerDialog(const QString &caption,int card,int port,
|
|||||||
connect(d_player,SIGNAL(endTrimClicked(int)),
|
connect(d_player,SIGNAL(endTrimClicked(int)),
|
||||||
d_marker_view,SLOT(trimEnd(int)));
|
d_marker_view,SLOT(trimEnd(int)));
|
||||||
|
|
||||||
/**************************************************************************
|
|
||||||
* Navigation Section
|
|
||||||
**************************************************************************/
|
|
||||||
//
|
//
|
||||||
// OK Button
|
// OK Button
|
||||||
//
|
//
|
||||||
|
@ -37,27 +37,6 @@
|
|||||||
#include <rdstereometer.h>
|
#include <rdstereometer.h>
|
||||||
#include <rdtransportbutton.h>
|
#include <rdtransportbutton.h>
|
||||||
|
|
||||||
//
|
|
||||||
// Widget Settings
|
|
||||||
//
|
|
||||||
//#define RDMARKERDIALOG_WIDGET_WIDTH 834
|
|
||||||
//#define RDMARKERDIALOG_WIDGET_HEIGHT 680
|
|
||||||
#define RDMARKERDIALOG_WAVEFORM_WIDTH 717
|
|
||||||
#define RDMARKERDIALOG_WAVEFORM_HEIGHT 352
|
|
||||||
//#define RDMARKERDIALOG_PAN_SIZE 300
|
|
||||||
//#define RDMARKERDIALOG_TAIL_PREROLL 1500
|
|
||||||
//#define RDMARKERDIALOG_DEFAULT_GAIN -12
|
|
||||||
//#define RDMARKERDIALOG_BUTTON_FLASH_PERIOD 200
|
|
||||||
//#define RDMARKERDIALOG_START_GAP 10
|
|
||||||
|
|
||||||
//
|
|
||||||
// Widget Colors
|
|
||||||
//
|
|
||||||
//#define RDMARKERDIALOG_PLAY_COLOR Qt::white
|
|
||||||
//#define RDMARKERDIALOG_REMOVE_FLASH_COLOR Qt::blue
|
|
||||||
//#define RDMARKERDIALOG_WAVEFORM_COLOR Qt::black
|
|
||||||
#define RDMARKERDIALOG_HIGHLIGHT_COLOR palette().mid().color()
|
|
||||||
|
|
||||||
class RDMarkerDialog : public RDDialog
|
class RDMarkerDialog : public RDDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -83,19 +62,15 @@ class RDMarkerDialog : public RDDialog
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
RDMarkerView *d_marker_view;
|
RDMarkerView *d_marker_view;
|
||||||
|
|
||||||
QGroupBox *d_amplitude_box;
|
QGroupBox *d_amplitude_box;
|
||||||
RDTransportButton *d_amplitude_up_button;
|
RDTransportButton *d_amplitude_up_button;
|
||||||
RDTransportButton *d_amplitude_down_button;
|
RDTransportButton *d_amplitude_down_button;
|
||||||
|
|
||||||
QGroupBox *d_time_box;
|
QGroupBox *d_time_box;
|
||||||
QPushButton *d_time_fullin_button;
|
QPushButton *d_time_fullin_button;
|
||||||
RDTransportButton *d_time_in_button;
|
RDTransportButton *d_time_in_button;
|
||||||
RDTransportButton *d_time_out_button;
|
RDTransportButton *d_time_out_button;
|
||||||
QPushButton *d_time_fullout_button;
|
QPushButton *d_time_fullout_button;
|
||||||
|
|
||||||
RDMarkerPlayer *d_player;
|
RDMarkerPlayer *d_player;
|
||||||
|
|
||||||
QPushButton *d_ok_button;
|
QPushButton *d_ok_button;
|
||||||
QPushButton *d_cancel_button;
|
QPushButton *d_cancel_button;
|
||||||
unsigned d_cart_number;
|
unsigned d_cart_number;
|
||||||
|
@ -45,7 +45,7 @@ RDMarkerPlayer::RDMarkerPlayer(int card,int port,QWidget *parent)
|
|||||||
//
|
//
|
||||||
// Marker Readouts
|
// Marker Readouts
|
||||||
//
|
//
|
||||||
for(int i=0;i<7;i++) {
|
for(int i=0;i<RDMARKERPLAYER_READOUT_QUAN;i++) {
|
||||||
d_readout_labels[i]=new QLabel(this);
|
d_readout_labels[i]=new QLabel(this);
|
||||||
d_readout_labels[i]->setFont(labelFont());
|
d_readout_labels[i]->setFont(labelFont());
|
||||||
d_readout_labels[i]->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
d_readout_labels[i]->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||||
@ -84,7 +84,8 @@ RDMarkerPlayer::RDMarkerPlayer(int card,int port,QWidget *parent)
|
|||||||
|
|
||||||
d_fadedown_readout=new RDMarkerReadout(RDMarkerHandle::FadeDown,this);
|
d_fadedown_readout=new RDMarkerReadout(RDMarkerHandle::FadeDown,this);
|
||||||
connect(d_fadedown_readout,SIGNAL(clicked()),d_readout_mapper,SLOT(map()));
|
connect(d_fadedown_readout,SIGNAL(clicked()),d_readout_mapper,SLOT(map()));
|
||||||
d_readout_mapper->setMapping(d_fadedown_readout,(int)RDMarkerHandle::FadeDown);
|
d_readout_mapper->
|
||||||
|
setMapping(d_fadedown_readout,(int)RDMarkerHandle::FadeDown);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Time Counters
|
// Time Counters
|
||||||
@ -94,7 +95,7 @@ RDMarkerPlayer::RDMarkerPlayer(int card,int port,QWidget *parent)
|
|||||||
d_position_label->setAlignment(Qt::AlignCenter);
|
d_position_label->setAlignment(Qt::AlignCenter);
|
||||||
d_position_label->
|
d_position_label->
|
||||||
setPalette(QPalette(palette().color(QPalette::Background),
|
setPalette(QPalette(palette().color(QPalette::Background),
|
||||||
QColor(RDMARKERPLAYER_HIGHLIGHT_COLOR)));
|
palette().mid().color()));
|
||||||
d_position_edit=new QLabel(this);
|
d_position_edit=new QLabel(this);
|
||||||
d_position_edit->setAcceptDrops(false);
|
d_position_edit->setAcceptDrops(false);
|
||||||
d_position_edit->setAlignment(Qt::AlignCenter);
|
d_position_edit->setAlignment(Qt::AlignCenter);
|
||||||
@ -589,7 +590,7 @@ void RDMarkerPlayer::trimThresholdChanged(int dbfs)
|
|||||||
|
|
||||||
void RDMarkerPlayer::resizeEvent(QResizeEvent *)
|
void RDMarkerPlayer::resizeEvent(QResizeEvent *)
|
||||||
{
|
{
|
||||||
for(int i=0;i<7;i++) {
|
for(int i=0;i<RDMARKERPLAYER_READOUT_QUAN;i++) {
|
||||||
d_readout_labels[i]->setGeometry(2,
|
d_readout_labels[i]->setGeometry(2,
|
||||||
i*(d_cut_readout->sizeHint().height()/4-1),
|
i*(d_cut_readout->sizeHint().height()/4-1),
|
||||||
15+50,
|
15+50,
|
||||||
@ -642,42 +643,19 @@ void RDMarkerPlayer::resizeEvent(QResizeEvent *)
|
|||||||
d_meter->setGeometry(695,15,d_meter->sizeHint().width(),
|
d_meter->setGeometry(695,15,d_meter->sizeHint().width(),
|
||||||
d_meter->sizeHint().height());
|
d_meter->sizeHint().height());
|
||||||
|
|
||||||
d_no_segue_fade_check->setGeometry(695,
|
d_no_segue_fade_check->setGeometry(695,25+d_meter->sizeHint().height(),15,15);
|
||||||
25+d_meter->sizeHint().height(),
|
d_no_segue_fade_label->
|
||||||
15,
|
setGeometry(715,23+d_meter->sizeHint().height(),200,20);
|
||||||
15);
|
|
||||||
d_no_segue_fade_label->setGeometry(715,
|
|
||||||
23+d_meter->sizeHint().height(),
|
|
||||||
200,
|
|
||||||
20);
|
|
||||||
|
|
||||||
d_play_gain_label->setGeometry(655,
|
d_play_gain_label->setGeometry(655,47+d_meter->sizeHint().height(),100,20);
|
||||||
47+d_meter->sizeHint().height(),
|
d_play_gain_spin->setGeometry(760,47+d_meter->sizeHint().height(),40,20);
|
||||||
100,
|
d_play_gain_unit_label->
|
||||||
20);
|
setGeometry(805,47+d_meter->sizeHint().height(),60,20);
|
||||||
d_play_gain_spin->setGeometry(760,
|
|
||||||
47+d_meter->sizeHint().height(),
|
|
||||||
40,
|
|
||||||
20);
|
|
||||||
d_play_gain_unit_label->setGeometry(805,
|
|
||||||
47+d_meter->sizeHint().height(),
|
|
||||||
60,
|
|
||||||
20);
|
|
||||||
|
|
||||||
d_trim_start_button->setGeometry(870,
|
d_trim_start_button->setGeometry(870,25+d_meter->sizeHint().height(),80,25);
|
||||||
25+d_meter->sizeHint().height(),
|
d_trim_end_button->setGeometry(870,55+d_meter->sizeHint().height(),80,25);
|
||||||
80,25);
|
d_trim_label->setGeometry(960,30+d_meter->sizeHint().height(),80,20);
|
||||||
d_trim_end_button->setGeometry(870,
|
d_trim_spin->setGeometry(960,47+d_meter->sizeHint().height(),80,20);
|
||||||
55+d_meter->sizeHint().height(),
|
|
||||||
80,25);
|
|
||||||
d_trim_label->setGeometry(960,
|
|
||||||
30+d_meter->sizeHint().height(),
|
|
||||||
80,
|
|
||||||
20);
|
|
||||||
d_trim_spin->setGeometry(960,
|
|
||||||
47+d_meter->sizeHint().height(),
|
|
||||||
80,
|
|
||||||
20);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -689,8 +667,7 @@ void RDMarkerPlayer::paintEvent(QPaintEvent *e)
|
|||||||
// Transport Control Area
|
// Transport Control Area
|
||||||
//
|
//
|
||||||
p->setPen(QColor(palette().shadow().color()));
|
p->setPen(QColor(palette().shadow().color()));
|
||||||
p->fillRect(1,1,size().width()-2,size().height()-2,
|
p->fillRect(1,1,size().width()-2,size().height()-2,palette().mid().color());
|
||||||
QColor(RDMARKERPLAYER_HIGHLIGHT_COLOR));
|
|
||||||
p->drawRect(0,0,size().width(),size().height());
|
p->drawRect(0,0,size().width(),size().height());
|
||||||
|
|
||||||
delete p;
|
delete p;
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#include <rdtransportbutton.h>
|
#include <rdtransportbutton.h>
|
||||||
#include <rdwidget.h>
|
#include <rdwidget.h>
|
||||||
|
|
||||||
#define RDMARKERPLAYER_HIGHLIGHT_COLOR palette().mid().color()
|
#define RDMARKERPLAYER_READOUT_QUAN 7
|
||||||
|
|
||||||
class RDMarkerPlayer : public RDWidget
|
class RDMarkerPlayer : public RDWidget
|
||||||
{
|
{
|
||||||
@ -90,7 +90,7 @@ class RDMarkerPlayer : public RDWidget
|
|||||||
void paintEvent(QPaintEvent *e);
|
void paintEvent(QPaintEvent *e);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QLabel *d_readout_labels[7];
|
QLabel *d_readout_labels[RDMARKERPLAYER_READOUT_QUAN];
|
||||||
QSignalMapper *d_readout_mapper;
|
QSignalMapper *d_readout_mapper;
|
||||||
RDMarkerReadout *d_cut_readout;
|
RDMarkerReadout *d_cut_readout;
|
||||||
RDMarkerReadout *d_fadeup_readout;
|
RDMarkerReadout *d_fadeup_readout;
|
||||||
@ -98,14 +98,11 @@ class RDMarkerPlayer : public RDWidget
|
|||||||
RDMarkerReadout *d_talk_readout;
|
RDMarkerReadout *d_talk_readout;
|
||||||
RDMarkerReadout *d_segue_readout;
|
RDMarkerReadout *d_segue_readout;
|
||||||
RDMarkerReadout *d_hook_readout;
|
RDMarkerReadout *d_hook_readout;
|
||||||
|
|
||||||
QLabel *d_position_label;
|
QLabel *d_position_label;
|
||||||
QLabel *d_position_edit;
|
QLabel *d_position_edit;
|
||||||
|
|
||||||
QPushButton *d_goto_start_button;
|
QPushButton *d_goto_start_button;
|
||||||
QPushButton *d_goto_cursor_button;
|
QPushButton *d_goto_cursor_button;
|
||||||
QPushButton *d_goto_end_button;
|
QPushButton *d_goto_end_button;
|
||||||
|
|
||||||
RDTransportButton *d_play_button;
|
RDTransportButton *d_play_button;
|
||||||
RDTransportButton *d_play_from_button;
|
RDTransportButton *d_play_from_button;
|
||||||
RDTransportButton *d_play_to_button;
|
RDTransportButton *d_play_to_button;
|
||||||
@ -114,19 +111,15 @@ class RDMarkerPlayer : public RDWidget
|
|||||||
RDTransportButton *d_loop_button;
|
RDTransportButton *d_loop_button;
|
||||||
RDStereoMeter *d_meter;
|
RDStereoMeter *d_meter;
|
||||||
QTimer *d_meter_timer;
|
QTimer *d_meter_timer;
|
||||||
|
|
||||||
QCheckBox *d_no_segue_fade_check;
|
QCheckBox *d_no_segue_fade_check;
|
||||||
QLabel *d_no_segue_fade_label;
|
QLabel *d_no_segue_fade_label;
|
||||||
|
|
||||||
QLabel *d_play_gain_label;
|
QLabel *d_play_gain_label;
|
||||||
QSpinBox *d_play_gain_spin;
|
QSpinBox *d_play_gain_spin;
|
||||||
QLabel *d_play_gain_unit_label;
|
QLabel *d_play_gain_unit_label;
|
||||||
|
|
||||||
QPushButton *d_trim_start_button;
|
QPushButton *d_trim_start_button;
|
||||||
QPushButton *d_trim_end_button;
|
QPushButton *d_trim_end_button;
|
||||||
QLabel *d_trim_label;
|
QLabel *d_trim_label;
|
||||||
QSpinBox *d_trim_spin;
|
QSpinBox *d_trim_spin;
|
||||||
|
|
||||||
QList<int> d_cards;
|
QList<int> d_cards;
|
||||||
int d_port;
|
int d_port;
|
||||||
int d_cae_stream;
|
int d_cae_stream;
|
||||||
|
@ -186,28 +186,16 @@ void RDMarkerHandle::mouseMoveEvent(QGraphicsSceneMouseEvent *e)
|
|||||||
view->updatePosition(d_role,(int)((int64_t)1000*pframes/
|
view->updatePosition(d_role,(int)((int64_t)1000*pframes/
|
||||||
(int64_t)view->sampleRate()));
|
(int64_t)view->sampleRate()));
|
||||||
}
|
}
|
||||||
else { // We're against a limit stop, so use the pointer value of the stop
|
//
|
||||||
|
// We're against a limit stop, so use the pointer value of the stop
|
||||||
|
// rather than generating a new one as not to risk losing precision.
|
||||||
|
//
|
||||||
|
else {
|
||||||
view->updatePosition(d_role,limit_ptr);
|
view->updatePosition(d_role,limit_ptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RDMarkerHandle::wheelEvent(QGraphicsSceneWheelEvent *e)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
if((e->buttons()&Qt::MiddleButton)!=0) {
|
|
||||||
printf("wheelEvent(%d)\n",e->delta());
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void RDMarkerHandle::mouseReleaseEvent(QGraphicsSceneMouseEvent *e)
|
|
||||||
{
|
|
||||||
// RDMarkerView *view=static_cast<RDMarkerView *>(d_marker_view);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QString RDMarkerHandle::pointerRoleText(PointerRole role)
|
QString RDMarkerHandle::pointerRoleText(PointerRole role)
|
||||||
{
|
{
|
||||||
QString ret=QObject::tr("Unknown");
|
QString ret=QObject::tr("Unknown");
|
||||||
|
@ -61,8 +61,6 @@ class RDMarkerHandle : public QGraphicsPolygonItem
|
|||||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *e);
|
void hoverLeaveEvent(QGraphicsSceneHoverEvent *e);
|
||||||
void mousePressEvent(QGraphicsSceneMouseEvent *e);
|
void mousePressEvent(QGraphicsSceneMouseEvent *e);
|
||||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *e);
|
void mouseMoveEvent(QGraphicsSceneMouseEvent *e);
|
||||||
void wheelEvent(QGraphicsSceneWheelEvent *e);
|
|
||||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *e);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString d_name;
|
QString d_name;
|
||||||
@ -99,7 +97,6 @@ class RDMarkerView : public RDWidget
|
|||||||
bool noSegueFade() const;
|
bool noSegueFade() const;
|
||||||
int playGain() const;
|
int playGain() const;
|
||||||
bool hasUnsavedChanges() const;
|
bool hasUnsavedChanges() const;
|
||||||
|
|
||||||
void processRightClick(RDMarkerHandle::PointerRole role,
|
void processRightClick(RDMarkerHandle::PointerRole role,
|
||||||
const QPointF &pos);
|
const QPointF &pos);
|
||||||
void updatePosition(RDMarkerHandle::PointerRole role,int ptr);
|
void updatePosition(RDMarkerHandle::PointerRole role,int ptr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user