mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-26 15:20:29 +01:00
2021-01-13 Fred Gleason <fredg@paravelsystems.com>
* Renamed the 'RDCartDrag' class to 'RD3CartDrag'. * Renamed the 'RDEmptyCart' widget to 'RD3EmptyCart'. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -79,7 +79,7 @@ dist_librd_la_SOURCES = dbversion.h\
|
||||
rdcart.cpp rdcart.h\
|
||||
rdcart_dialog.cpp rdcart_dialog.h\
|
||||
rdcart_search_text.cpp rdcart_search_text.h\
|
||||
rdcartdrag.cpp rdcartdrag.h\
|
||||
rd3cartdrag.cpp rd3cartdrag.h\
|
||||
rdcartfilter.cpp rdcartfilter.h\
|
||||
rdcartslot.cpp rdcartslot.h\
|
||||
rdcastsearch.cpp rdcastsearch.h\
|
||||
@@ -122,7 +122,7 @@ dist_librd_la_SOURCES = dbversion.h\
|
||||
rddummylookup.cpp rddummylookup.h\
|
||||
rdedit_audio.cpp rdedit_audio.h\
|
||||
rdedit_panel_name.cpp rdedit_panel_name.h\
|
||||
rdemptycart.cpp rdemptycart.h\
|
||||
rd3emptycart.cpp rd3emptycart.h\
|
||||
rdescape_string.cpp rdescape_string.h\
|
||||
rdevent.cpp rdevent.h\
|
||||
rdevent_line.cpp rdevent_line.h\
|
||||
@@ -294,7 +294,7 @@ nodist_librd_la_SOURCES = moc_rdadd_cart.cpp\
|
||||
moc_rddummylookup.cpp\
|
||||
moc_rdedit_audio.cpp\
|
||||
moc_rdedit_panel_name.cpp\
|
||||
moc_rdemptycart.cpp\
|
||||
moc_rd3emptycart.cpp\
|
||||
moc_rdevent_player.cpp\
|
||||
moc_rdexport_settings_dialog.cpp\
|
||||
moc_rdfeed.cpp\
|
||||
|
||||
@@ -54,7 +54,7 @@ SOURCES += rdcardselector.cpp
|
||||
SOURCES += rdcart.cpp
|
||||
SOURCES += rdcart_dialog.cpp
|
||||
SOURCES += rdcart_search_text.cpp
|
||||
SOURCES += rdcartdrag.cpp
|
||||
SOURCES += rd3cartdrag.cpp
|
||||
SOURCES += rdcartfilter.cpp
|
||||
SOURCES += rdcatch_connect.cpp
|
||||
SOURCES += rdcddblookup.cpp
|
||||
@@ -90,7 +90,7 @@ SOURCES += rddropbox.cpp
|
||||
SOURCES += rddummylookup.cpp
|
||||
SOURCES += rdedit_audio.cpp
|
||||
SOURCES += rdedit_panel_name.cpp
|
||||
SOURCES += rdemptycart.cpp
|
||||
SOURCES += rd3emptycart.cpp
|
||||
SOURCES += rdescape_string.cpp
|
||||
SOURCES += rdevent.cpp
|
||||
SOURCES += rdevent_line.cpp
|
||||
@@ -201,7 +201,7 @@ HEADERS += rdcardselector.h
|
||||
HEADERS += rdcart.h
|
||||
HEADERS += rdcart_dialog.h
|
||||
HEADERS += rdcart_search_text.h
|
||||
HEADERS += rdcartdrag.h
|
||||
HEADERS += rd3cartdrag.h
|
||||
HEADERS += rdcartfilter.h
|
||||
HEADERS += rdcatch_connect.h
|
||||
HEADERS += rdcddblookup.h
|
||||
@@ -237,7 +237,7 @@ HEADERS += rddropbox.h
|
||||
HEADERS += rddummylookup.h
|
||||
HEADERS += rdedit_audio.h
|
||||
HEADERS += rdedit_panel_name.h
|
||||
HEADERS += rdemptycart.h
|
||||
HEADERS += rd3emptycart.h
|
||||
HEADERS += rdescape_string.h
|
||||
HEADERS += rdevent.h
|
||||
HEADERS += rdevent_line.h
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// rdcartdrag.cpp
|
||||
// rd3cartdrag.cpp
|
||||
//
|
||||
// Stored value drag object for Rivendell carts.
|
||||
//
|
||||
// (C) Copyright 2013-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2013-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@@ -22,10 +22,10 @@
|
||||
|
||||
#include <qstringlist.h>
|
||||
|
||||
#include <rd.h>
|
||||
#include <rdcart.h>
|
||||
#include <rdcartdrag.h>
|
||||
#include <rdprofile.h>
|
||||
#include "rd.h"
|
||||
#include "rd3cartdrag.h"
|
||||
#include "rdcart.h"
|
||||
#include "rdprofile.h"
|
||||
|
||||
//
|
||||
// Icons
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "../icons/rml5.xpm"
|
||||
#include "../icons/trashcan-16x16.xpm"
|
||||
|
||||
RDCartDrag::RDCartDrag(unsigned cartnum,const QPixmap *icon,const QColor &color,
|
||||
RD3CartDrag::RD3CartDrag(unsigned cartnum,const QPixmap *icon,const QColor &color,
|
||||
QWidget *src)
|
||||
: Q3StoredDrag(RDMIMETYPE_CART,src)
|
||||
{
|
||||
@@ -61,7 +61,7 @@ RDCartDrag::RDCartDrag(unsigned cartnum,const QPixmap *icon,const QColor &color,
|
||||
}
|
||||
|
||||
|
||||
RDCartDrag::RDCartDrag(unsigned cartnum,const QString &title,
|
||||
RD3CartDrag::RD3CartDrag(unsigned cartnum,const QString &title,
|
||||
const QColor &color,QWidget *src)
|
||||
: Q3StoredDrag(RDMIMETYPE_CART,src)
|
||||
{
|
||||
@@ -88,13 +88,13 @@ RDCartDrag::RDCartDrag(unsigned cartnum,const QString &title,
|
||||
}
|
||||
|
||||
|
||||
bool RDCartDrag::canDecode(QMimeSource *e)
|
||||
bool RD3CartDrag::canDecode(QMimeSource *e)
|
||||
{
|
||||
return e->provides(RDMIMETYPE_CART);
|
||||
}
|
||||
|
||||
|
||||
bool RDCartDrag::decode(QMimeSource *e,unsigned *cartnum,QColor *color,
|
||||
bool RD3CartDrag::decode(QMimeSource *e,unsigned *cartnum,QColor *color,
|
||||
QString *title)
|
||||
{
|
||||
RDProfile *p=new RDProfile();
|
||||
@@ -111,20 +111,20 @@ bool RDCartDrag::decode(QMimeSource *e,unsigned *cartnum,QColor *color,
|
||||
}
|
||||
|
||||
|
||||
bool RDCartDrag::decode(QMimeSource *e,RDLogLine *ll,
|
||||
bool RD3CartDrag::decode(QMimeSource *e,RDLogLine *ll,
|
||||
RDLogLine::TransType next_trans,int log_mach,
|
||||
bool timescale,RDLogLine::TransType trans)
|
||||
{
|
||||
unsigned cartnum;
|
||||
|
||||
RDCartDrag::decode(e,&cartnum);
|
||||
RD3CartDrag::decode(e,&cartnum);
|
||||
ll->loadCart(cartnum,next_trans,log_mach,timescale,trans);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void RDCartDrag::SetData(unsigned cartnum,const QColor &color,const QString &title)
|
||||
void RD3CartDrag::SetData(unsigned cartnum,const QColor &color,const QString &title)
|
||||
{
|
||||
QString str="[Rivendell-Cart]\n";
|
||||
str+="Number="+QString().sprintf("%06u",cartnum)+"\n";
|
||||
@@ -1,4 +1,4 @@
|
||||
// rdcartdrag.h
|
||||
// rd3cartdrag.h
|
||||
//
|
||||
// Stored value drag object for Rivendell carts.
|
||||
//
|
||||
@@ -18,8 +18,8 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#ifndef RDCARTDRAG_H
|
||||
#define RDCARTDRAG_H
|
||||
#ifndef RD3CARTDRAG_H
|
||||
#define RD3CARTDRAG_H
|
||||
|
||||
#include <qcolor.h>
|
||||
#include <qpixmap.h>
|
||||
@@ -29,13 +29,13 @@
|
||||
#include <rdcart.h>
|
||||
#include <rdlog_line.h>
|
||||
|
||||
class RDCartDrag : public Q3StoredDrag
|
||||
class RD3CartDrag : public Q3StoredDrag
|
||||
{
|
||||
public:
|
||||
RDCartDrag(unsigned cartnum,const QPixmap *icon,const QColor &color,
|
||||
QWidget *src=0);
|
||||
RDCartDrag(unsigned cartnum,const QString &title,const QColor &color,
|
||||
QWidget *src=0);
|
||||
RD3CartDrag(unsigned cartnum,const QPixmap *icon,const QColor &color,
|
||||
QWidget *src=0);
|
||||
RD3CartDrag(unsigned cartnum,const QString &title,const QColor &color,
|
||||
QWidget *src=0);
|
||||
static bool canDecode(QMimeSource *e);
|
||||
static bool decode(QMimeSource *e,unsigned *cartnum,QColor *color=NULL,
|
||||
QString *title=NULL);
|
||||
@@ -49,4 +49,4 @@ class RDCartDrag : public Q3StoredDrag
|
||||
};
|
||||
|
||||
|
||||
#endif // RDCARTDRAG_H
|
||||
#endif // RD3CARTDRAG_H
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// A drag source for an empty cart.
|
||||
//
|
||||
// (C) Copyright 2013,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2013-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Library General Public License
|
||||
@@ -18,7 +18,7 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <rdemptycart.h>
|
||||
#include "rd3emptycart.h"
|
||||
|
||||
//
|
||||
// Icons
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <QLabel>
|
||||
#include <QMouseEvent>
|
||||
|
||||
RDEmptyCart::RDEmptyCart(QWidget *parent)
|
||||
RD3EmptyCart::RD3EmptyCart(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
empty_label=new QLabel(this);
|
||||
@@ -38,27 +38,27 @@ RDEmptyCart::RDEmptyCart(QWidget *parent)
|
||||
}
|
||||
|
||||
|
||||
RDEmptyCart::~RDEmptyCart()
|
||||
RD3EmptyCart::~RD3EmptyCart()
|
||||
{
|
||||
delete empty_label;
|
||||
}
|
||||
|
||||
|
||||
QSize RDEmptyCart::sizeHint() const
|
||||
QSize RD3EmptyCart::sizeHint() const
|
||||
{
|
||||
return QSize(32,32);
|
||||
}
|
||||
|
||||
|
||||
QSizePolicy RDEmptyCart::sizePolicy() const
|
||||
QSizePolicy RD3EmptyCart::sizePolicy() const
|
||||
{
|
||||
return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
|
||||
}
|
||||
|
||||
|
||||
void RDEmptyCart::mousePressEvent(QMouseEvent *e)
|
||||
void RD3EmptyCart::mousePressEvent(QMouseEvent *e)
|
||||
{
|
||||
QWidget::mousePressEvent(e);
|
||||
RDCartDrag *d=new RDCartDrag(0,"",Qt::lightGray,this);
|
||||
RD3CartDrag *d=new RD3CartDrag(0,"",Qt::lightGray,this);
|
||||
d->dragCopy();
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
// rdemptycart.h
|
||||
// rd3emptycart.h
|
||||
//
|
||||
// A drag source for an empty cart.
|
||||
//
|
||||
// (C) Copyright 2013,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2013-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Library General Public License
|
||||
@@ -18,22 +18,22 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#ifndef RDEMPTYCART_H
|
||||
#define RDEMPTYCART_H
|
||||
#ifndef RD3EMPTYCART_H
|
||||
#define RD3EMPTYCART_H
|
||||
|
||||
#include <qlabel.h>
|
||||
#include <qwidget.h>
|
||||
//Added by qt3to4:
|
||||
#include <QMouseEvent>
|
||||
|
||||
#include <rdcartdrag.h>
|
||||
#include <rd3cartdrag.h>
|
||||
|
||||
class RDEmptyCart : public QWidget
|
||||
class RD3EmptyCart : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
RDEmptyCart(QWidget *parent=0);
|
||||
~RDEmptyCart();
|
||||
RD3EmptyCart(QWidget *parent=0);
|
||||
~RD3EmptyCart();
|
||||
QSize sizeHint() const;
|
||||
QSizePolicy sizePolicy() const;
|
||||
|
||||
@@ -45,4 +45,4 @@ class RDEmptyCart : public QWidget
|
||||
};
|
||||
|
||||
|
||||
#endif // RDEMPTYCART_H
|
||||
#endif // RD3EMPTYCART_H
|
||||
@@ -188,6 +188,12 @@ bool RDLibraryModel::hasChildren(const QModelIndex &parent) const
|
||||
}
|
||||
|
||||
|
||||
Qt::ItemFlags RDLibraryModel::flags(const QModelIndex &index) const
|
||||
{
|
||||
return Qt::ItemIsSelectable|Qt::ItemIsDragEnabled|Qt::ItemIsEnabled;
|
||||
}
|
||||
|
||||
|
||||
QVariant RDLibraryModel::headerData(int section,Qt::Orientation orient,
|
||||
int role) const
|
||||
{
|
||||
|
||||
@@ -48,6 +48,7 @@ class RDLibraryModel : public QAbstractItemModel
|
||||
int columnCount(const QModelIndex &parent=QModelIndex()) const;
|
||||
int rowCount(const QModelIndex &parent=QModelIndex()) const;
|
||||
bool hasChildren(const QModelIndex &parent=QModelIndex()) const;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
QVariant headerData(int section,Qt::Orientation orient,
|
||||
int role=Qt::DisplayRole) const;
|
||||
QVariant data(const QModelIndex &index,int role=Qt::DisplayRole) const;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// The SoundPanel Button for RDAirPlay.
|
||||
//
|
||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include <qpainter.h>
|
||||
|
||||
#include <rdcartdrag.h>
|
||||
#include <rd3cartdrag.h>
|
||||
#include <rdconf.h>
|
||||
|
||||
#include "rdpanel_button.h"
|
||||
@@ -367,7 +367,7 @@ void RDPanelButton::mouseMoveEvent(QMouseEvent *e)
|
||||
if(button_move_count==0) {
|
||||
QPushButton::mouseReleaseEvent(e);
|
||||
if(button_allow_drags) {
|
||||
RDCartDrag *d=new RDCartDrag(button_cart,button_text,button_color,this);
|
||||
RD3CartDrag *d=new RD3CartDrag(button_cart,button_text,button_color,this);
|
||||
d->dragCopy();
|
||||
}
|
||||
}
|
||||
@@ -383,7 +383,7 @@ void RDPanelButton::mouseReleaseEvent(QMouseEvent *e)
|
||||
|
||||
void RDPanelButton::dragEnterEvent(QDragEnterEvent *e)
|
||||
{
|
||||
e->accept(RDCartDrag::canDecode(e)&&button_allow_drags&&
|
||||
e->accept(RD3CartDrag::canDecode(e)&&button_allow_drags&&
|
||||
((button_play_deck==NULL)||(button_play_deck->state()==RDPlayDeck::Stopped)));
|
||||
}
|
||||
|
||||
@@ -394,7 +394,7 @@ void RDPanelButton::dropEvent(QDropEvent *e)
|
||||
QColor color;
|
||||
QString title;
|
||||
|
||||
if(RDCartDrag::decode(e,&cartnum,&color,&title)) {
|
||||
if(RD3CartDrag::decode(e,&cartnum,&color,&title)) {
|
||||
emit cartDropped(button_row,button_col,cartnum,color,title);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Cart slot label widget for RDCartSlot
|
||||
//
|
||||
// (C) Copyright 2012-2020 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2012-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@@ -497,7 +497,7 @@ void RDSlotBox::mousePressEvent(QMouseEvent *e)
|
||||
|
||||
if((line_logline!=NULL)&&(line_mode==RDSlotOptions::CartDeckMode)&&
|
||||
line_allow_drags) {
|
||||
RDCartDrag *d=new RDCartDrag(line_logline->cartNumber(),
|
||||
RD3CartDrag *d=new RD3CartDrag(line_logline->cartNumber(),
|
||||
line_icon_label->pixmap(),
|
||||
line_group_label->palette().
|
||||
color(QColorGroup::Foreground),this);
|
||||
@@ -526,7 +526,7 @@ void RDSlotBox::paintEvent(QPaintEvent *e)
|
||||
|
||||
void RDSlotBox::dragEnterEvent(QDragEnterEvent *e)
|
||||
{
|
||||
e->accept(RDCartDrag::canDecode(e)&&
|
||||
e->accept(RD3CartDrag::canDecode(e)&&
|
||||
(line_mode==RDSlotOptions::CartDeckMode)&&
|
||||
(line_deck->state()==RDPlayDeck::Stopped));
|
||||
}
|
||||
@@ -536,7 +536,7 @@ void RDSlotBox::dropEvent(QDropEvent *e)
|
||||
{
|
||||
unsigned cartnum;
|
||||
|
||||
if(RDCartDrag::decode(e,&cartnum)) {
|
||||
if(RD3CartDrag::decode(e,&cartnum)) {
|
||||
emit cartDropped(cartnum);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <qtimer.h>
|
||||
|
||||
#include <rdairplay_conf.h>
|
||||
#include <rdcartdrag.h>
|
||||
#include <rd3cartdrag.h>
|
||||
#include <rdlog_line.h>
|
||||
#include <rdplaymeter.h>
|
||||
#include <rdplay_deck.h>
|
||||
|
||||
Reference in New Issue
Block a user