mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-12 07:35:55 +01:00
2019-10-07 Fred Gleason <fredg@paravelsystems.com>
* Refactored rdcartslots(1) to use the 'RDDialog' and 'RDWidget' base classes.
This commit is contained in:
@@ -19184,3 +19184,6 @@
|
|||||||
2019-10-07 Fred Gleason <fredg@paravelsystems.com>
|
2019-10-07 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Replaced references to 'helvetica' fonts to use font engine
|
* Replaced references to 'helvetica' fonts to use font engine
|
||||||
values in 'lib/'.
|
values in 'lib/'.
|
||||||
|
2019-10-07 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Refactored rdcartslots(1) to use the 'RDDialog' and 'RDWidget'
|
||||||
|
base classes.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// Hour Selector widget for RDAirPlay
|
// Hour Selector widget for RDAirPlay
|
||||||
//
|
//
|
||||||
// (C) Copyright 2012-2018 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2012-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@@ -18,19 +18,11 @@
|
|||||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <qsignalmapper.h>
|
|
||||||
|
|
||||||
#include "hourselector.h"
|
#include "hourselector.h"
|
||||||
|
|
||||||
HourSelector::HourSelector(QWidget *parent)
|
HourSelector::HourSelector(QWidget *parent)
|
||||||
: QWidget(parent)
|
: RDWidget(parent)
|
||||||
{
|
{
|
||||||
//
|
|
||||||
// Fonts
|
|
||||||
//
|
|
||||||
QFont font("helvetica",16,QFont::Bold);
|
|
||||||
font.setPixelSize(16);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Palettes
|
// Palettes
|
||||||
//
|
//
|
||||||
@@ -44,7 +36,7 @@ HourSelector::HourSelector(QWidget *parent)
|
|||||||
connect(mapper,SIGNAL(mapped(int)),this,SLOT(hourClicked(int)));
|
connect(mapper,SIGNAL(mapped(int)),this,SLOT(hourClicked(int)));
|
||||||
for(unsigned i=0;i<24;i++) {
|
for(unsigned i=0;i<24;i++) {
|
||||||
hour_button[i]=new QPushButton(this);
|
hour_button[i]=new QPushButton(this);
|
||||||
hour_button[i]->setFont(font);
|
hour_button[i]->setFont(bigButtonFont());
|
||||||
hour_button[i]->setDisabled(true);
|
hour_button[i]->setDisabled(true);
|
||||||
mapper->setMapping(hour_button[i],i);
|
mapper->setMapping(hour_button[i],i);
|
||||||
connect(hour_button[i],SIGNAL(clicked()),mapper,SLOT(map()));
|
connect(hour_button[i],SIGNAL(clicked()),mapper,SLOT(map()));
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// Hour Selector widget for RDAirPlay
|
// Hour Selector widget for RDAirPlay
|
||||||
//
|
//
|
||||||
// (C) Copyright 2012-2018 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2012-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@@ -21,16 +21,10 @@
|
|||||||
#ifndef HOURSELECTOR_H
|
#ifndef HOURSELECTOR_H
|
||||||
#define HOURSELECTOR_H
|
#define HOURSELECTOR_H
|
||||||
|
|
||||||
#include <qwidget.h>
|
|
||||||
#include <qpushbutton.h>
|
|
||||||
#include <qtimer.h>
|
|
||||||
|
|
||||||
#include <rdairplay_conf.h>
|
|
||||||
#include <rdlistview.h>
|
|
||||||
#include <rdlistviewitem.h>
|
|
||||||
#include <rdlogplay.h>
|
#include <rdlogplay.h>
|
||||||
|
#include <rdwidget.h>
|
||||||
|
|
||||||
class HourSelector : public QWidget
|
class HourSelector : public RDWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// A Dedicated Cart Slot Utility for Rivendell.
|
// A Dedicated Cart Slot Utility for Rivendell.
|
||||||
//
|
//
|
||||||
// (C) Copyright 2012-2018 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2012-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@@ -18,27 +18,10 @@
|
|||||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <math.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/wait.h>
|
|
||||||
#include <signal.h>
|
|
||||||
|
|
||||||
#include <qmessagebox.h>
|
|
||||||
#include <qapplication.h>
|
#include <qapplication.h>
|
||||||
#include <qwindowsstyle.h>
|
#include <qmessagebox.h>
|
||||||
#include <qtranslator.h>
|
#include <qtranslator.h>
|
||||||
#include <qtextcodec.h>
|
|
||||||
#include <qpainter.h>
|
|
||||||
#include <qpixmap.h>
|
|
||||||
//Added by qt3to4:
|
|
||||||
#include <QCloseEvent>
|
|
||||||
#include <QPaintEvent>
|
|
||||||
|
|
||||||
#include <dbversion.h>
|
|
||||||
#include <rd.h>
|
|
||||||
#include <rdapplication.h>
|
|
||||||
#include <rddbheartbeat.h>
|
|
||||||
#include <rdescape_string.h>
|
#include <rdescape_string.h>
|
||||||
|
|
||||||
#include "rdcartslots.h"
|
#include "rdcartslots.h"
|
||||||
@@ -48,18 +31,11 @@
|
|||||||
//
|
//
|
||||||
#include "../icons/rdcartslots-22x22.xpm"
|
#include "../icons/rdcartslots-22x22.xpm"
|
||||||
|
|
||||||
MainWidget::MainWidget(QWidget *parent)
|
MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
||||||
: QWidget(parent)
|
: RDWidget(c,parent)
|
||||||
{
|
{
|
||||||
QString err_msg;
|
QString err_msg;
|
||||||
|
|
||||||
//
|
|
||||||
// Force a reasonable default font.
|
|
||||||
//
|
|
||||||
QFont mfont("helvetica",12,QFont::Normal);
|
|
||||||
mfont.setPixelSize(12);
|
|
||||||
qApp->setFont(mfont);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Open the Database
|
// Open the Database
|
||||||
//
|
//
|
||||||
@@ -261,7 +237,9 @@ int main(int argc,char *argv[])
|
|||||||
QTextCodec::locale(),".");
|
QTextCodec::locale(),".");
|
||||||
a.installTranslator(&tr);
|
a.installTranslator(&tr);
|
||||||
|
|
||||||
MainWidget *w=new MainWidget();
|
RDConfig *config=new RDConfig();
|
||||||
|
config->load();
|
||||||
|
MainWidget *w=new MainWidget(config);
|
||||||
a.setMainWidget(w);
|
a.setMainWidget(w);
|
||||||
w->setGeometry(QRect(QPoint(0,0),w->sizeHint()));
|
w->setGeometry(QRect(QPoint(0,0),w->sizeHint()));
|
||||||
w->show();
|
w->show();
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// A Dedicated Cart Slot Utility for Rivendell.
|
// A Dedicated Cart Slot Utility for Rivendell.
|
||||||
//
|
//
|
||||||
// (C) Copyright 2012-2018 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2012-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@@ -21,24 +21,8 @@
|
|||||||
#ifndef RDCARTSLOTS_H
|
#ifndef RDCARTSLOTS_H
|
||||||
#define RDCARTSLOTS_H
|
#define RDCARTSLOTS_H
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#include <qwidget.h>
|
|
||||||
#include <qtimer.h>
|
|
||||||
#include <qpixmap.h>
|
|
||||||
|
|
||||||
#include <rdstereometer.h>
|
|
||||||
#include <rdcae.h>
|
|
||||||
#include <rdsystem.h>
|
|
||||||
#include <rdmacro.h>
|
|
||||||
#include <rdconfig.h>
|
|
||||||
#include <rdevent_player.h>
|
|
||||||
#include <rdcartslot.h>
|
#include <rdcartslot.h>
|
||||||
#include <rdcart_dialog.h>
|
#include <rdwidget.h>
|
||||||
#include <rdslotdialog.h>
|
|
||||||
#include <rdcueeditdialog.h>
|
|
||||||
#include <rdlistsvcs.h>
|
|
||||||
#include <rdairplay_conf.h>
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Settings
|
// Settings
|
||||||
@@ -47,11 +31,11 @@
|
|||||||
#define METER_INTERVAL 50
|
#define METER_INTERVAL 50
|
||||||
#define RDCARTSLOTS_USAGE "\n"
|
#define RDCARTSLOTS_USAGE "\n"
|
||||||
|
|
||||||
class MainWidget : public QWidget
|
class MainWidget : public RDWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
MainWidget(QWidget *parent=0);
|
MainWidget(RDConfig *c,QWidget *parent=0);
|
||||||
QSize sizeHint() const;
|
QSize sizeHint() const;
|
||||||
QSizePolicy sizePolicy() const;
|
QSizePolicy sizePolicy() const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user