2023-01-20 Fred Gleason <fredg@paravelsystems.com>

* Added a splash screen to rdairplay(1).

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2023-01-20 14:26:18 -05:00
parent bf937d9cdb
commit f70e871508
9 changed files with 3474 additions and 15 deletions

View File

@ -23943,3 +23943,5 @@
2023-01-20 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in 'RDApplication' that could cause false detection
of similarly-named windows when enforcing single instances.
2023-01-20 Fred Gleason <fredg@paravelsystems.com>
* Added a splash screen to rdairplay(1).

View File

@ -2,7 +2,7 @@
##
## icons/automake.am for Rivendell
##
## (C) Copyright 2002-2022 Fred Gleason <fredg@paravelsystems.com>
## (C) Copyright 2002-2023 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
@ -363,6 +363,8 @@ EXTRA_DIST = admin.xpm\
rdairplay-22x22.xpm\
rdairplay-512x512.xpm\
rdairplay.ico\
rdairplay-splash.xcf\
rdairplay-splash.xpm\
rdcartslots-128x128.xpm\
rdcartslots-16x16.xpm\
rdcartslots-22x22.xpm\

BIN
icons/rdairplay-splash.xcf Normal file

Binary file not shown.

3361
icons/rdairplay-splash.xpm Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
##
## Automake.am for rivendell/rdairplay
##
## (C) 2002-2021 Fred Gleason <fredg@paravelsystems.com>
## (C) 2002-2023 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
@ -53,6 +53,7 @@ dist_rdairplay_SOURCES = button_log.cpp button_log.h\
post_counter.cpp post_counter.h\
rdairplay.cpp rdairplay.h\
soundpanel.cpp soundpanel.h\
splashscreen.cpp splashscreen.h\
start_button.cpp start_button.h\
stop_counter.cpp stop_counter.h\
topstrip.cpp topstrip.h\
@ -72,6 +73,7 @@ nodist_rdairplay_SOURCES = moc_button_log.cpp\
moc_post_counter.cpp\
moc_rdairplay.cpp\
moc_soundpanel.cpp\
moc_splashscreen.cpp\
moc_start_button.cpp\
moc_stop_counter.cpp\
moc_topstrip.cpp\

View File

@ -2,7 +2,7 @@
//
// The On Air Playout Utility for Rivendell.
//
// (C) Copyright 2002-2022 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2002-2023 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
@ -57,30 +57,39 @@ MainWidget::MainWidget(RDConfig *config,QWidget *parent)
air_panel=NULL;
air_tracker=NULL;
//
// Splash Screen
//
air_splash_screen=new SplashScreen();
air_splash_screen->show();
air_splash_screen->showMessage(tr("Opening database..."));
//
// Get the Startup Date/Time
//
air_startup_datetime=QDateTime(QDate::currentDate(),QTime::currentTime());
//
// Open the Database
//
rda=new RDApplication("RDAirPlay","rdairplay",RDAIRPLAY_USAGE,this);
if(!rda->open(&err_msg,NULL,true)) {
QMessageBox::critical(this,"RDAirPlay - "+tr("Error"),err_msg);
exit(1);
}
//
// Ensure that we're the only instance
//
rda=new RDApplication("RDAirPlay","rdairplay",RDAIRPLAY_USAGE,this);
if(!rda->makeSingleInstance(&err_msg)) {
QMessageBox::critical(this,"RDAirPlay - "+tr("Error"),
tr("Startup error")+": "+err_msg+".");
exit(RDCoreApplication::ExitPriorInstance);
}
//
// Open the Database
//
if(!rda->open(&err_msg,NULL,true)) {
QMessageBox::critical(this,"RDAirPlay - "+tr("Error"),err_msg);
exit(1);
}
air_splash_screen->showMessage(tr("Reading command line options..."));
//
// Read Command Options
//
@ -157,6 +166,8 @@ MainWidget::MainWidget(RDConfig *config,QWidget *parent)
connect(air_master_timer,SIGNAL(timeout()),this,SLOT(masterTimerData()));
air_master_timer->start(MASTER_TIMER_INTERVAL);
air_splash_screen->showMessage(tr("Initializing global resources..."));
//
// Allocate Global Resources
//
@ -264,6 +275,8 @@ MainWidget::MainWidget(RDConfig *config,QWidget *parent)
//
air_event_player=new RDEventPlayer(rda->ripc(),this);
air_splash_screen->showMessage(tr("Initializing widgets..."));
//
// Log Machines
//
@ -404,6 +417,8 @@ MainWidget::MainWidget(RDConfig *config,QWidget *parent)
air_bug_label->setPixmap(*bug);
delete bug;
air_splash_screen->showMessage(tr("Initializing sound panel array..."));
//
// Sound Panel Array
//
@ -708,6 +723,8 @@ MainWidget::MainWidget(RDConfig *config,QWidget *parent)
if(!loadSettings(true)) {
showMaximized();
}
air_splash_screen->showMessage(tr("Connecting to Rivendell services..."));
}
@ -818,6 +835,7 @@ void MainWidget::ripcConnectedData(bool state)
delete q;
}
}
air_splash_screen->finish(this);
}
@ -2180,7 +2198,7 @@ int main(int argc,char *argv[])
QApplication::setStyle(RD_GUI_STYLE);
}
QApplication a(argc,argv);
//
// Start Event Loop
//
@ -2188,6 +2206,7 @@ int main(int argc,char *argv[])
config->load();
MainWidget *w=new MainWidget(config);
w->show();
return a.exec();
}

View File

@ -2,7 +2,7 @@
//
// The On Air Playout Utility for Rivendell.
//
// (C) Copyright 2002-2022 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2002-2023 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
@ -28,6 +28,7 @@
#include "button_log.h"
#include "colors.h"
#include "soundpanel.h"
#include "splashscreen.h"
#include "topstrip.h"
#include "voicetracker.h"
@ -168,6 +169,7 @@ class MainWidget : public RDMainWindow
RDEventPlayer *air_event_player;
TopStrip *air_top_strip;
QLabel *air_bug_label;
SplashScreen *air_splash_screen;
};

View File

@ -0,0 +1,35 @@
// splashscreen.cpp
//
// Splash screen for rdairplay(1)
//
// (C) Copyright 2023 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
// published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
#include "splashscreen.h"
#include "../icons/rdairplay-splash.xpm"
SplashScreen::SplashScreen()
: QSplashScreen(QPixmap(rdairplay_splash_xpm),Qt::WindowStaysOnTopHint)
{
}
void SplashScreen::showMessage(const QString &str)
{
QSplashScreen::showMessage(str+" ",Qt::AlignRight|Qt::AlignBottom,Qt::white);
}

36
rdairplay/splashscreen.h Normal file
View File

@ -0,0 +1,36 @@
// splashscreen.h
//
// Splash screen for rdairplay(1)
//
// (C) Copyright 2023 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
// published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
#ifndef SPLASHSCREEN_H
#define SPLASHSCREEN_H
#include <QSplashScreen>
class SplashScreen : public QSplashScreen
{
Q_OBJECT;
public:
SplashScreen();
public slots:
void showMessage(const QString &str);
};
#endif // SPLASHSCREEN_H