mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-27 22:22:36 +02:00
2018-02-01 Fred Gleason <fredg@paravelsystems.com>
* Added an 'RDApplication::userChanged() signal.
This commit is contained in:
parent
b1d43dde69
commit
0e47266a4d
@ -16625,3 +16625,5 @@
|
||||
* Converted rdclilogedit(1) to use RDApplication.
|
||||
2018-02-01 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Converted rddelete(1) to use RDApplication.
|
||||
2018-02-01 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added an 'RDApplication::userChanged() signal.
|
||||
|
@ -147,6 +147,7 @@ bool RDApplication::open(QString *err_msg)
|
||||
app_user=new RDUser();
|
||||
app_cae=new RDCae(app_station,app_config,this);
|
||||
app_ripc=new RDRipc(app_station,app_config,this);
|
||||
connect(app_ripc,SIGNAL(userChanged()),this,SLOT(userChangedData()));
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -216,3 +217,10 @@ RDUser *RDApplication::user()
|
||||
{
|
||||
return app_user;
|
||||
}
|
||||
|
||||
|
||||
void RDApplication::userChangedData()
|
||||
{
|
||||
app_user->setName(app_ripc->user());
|
||||
emit userChanged();
|
||||
}
|
||||
|
@ -56,6 +56,12 @@ class RDApplication : public QObject
|
||||
RDSystem *system();
|
||||
RDUser *user();
|
||||
|
||||
private slots:
|
||||
void userChangedData();
|
||||
|
||||
signals:
|
||||
void userChanged();
|
||||
|
||||
private:
|
||||
RDAirPlayConf *app_airplay_conf;
|
||||
RDAirPlayConf *app_panel_conf;
|
||||
|
@ -316,7 +316,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
// RIPC Connection
|
||||
//
|
||||
connect(rda->ripc(),SIGNAL(connected(bool)),this,SLOT(ripcConnected(bool)));
|
||||
connect(rda->ripc(),SIGNAL(userChanged()),this,SLOT(userData()));
|
||||
connect(rda,SIGNAL(userChanged()),this,SLOT(userData()));
|
||||
connect(rda->ripc(),SIGNAL(rmlReceived(RDMacro *)),
|
||||
this,SLOT(rmlReceivedData(RDMacro *)));
|
||||
connect(rda->ripc(),SIGNAL(gpiStateChanged(int,int,bool)),
|
||||
@ -1434,13 +1434,6 @@ void MainWidget::logReloadedData(int log)
|
||||
|
||||
void MainWidget::userData()
|
||||
{
|
||||
/*
|
||||
if(rduser!=NULL) {
|
||||
delete rduser;
|
||||
}
|
||||
rduser=new RDUser(rda->ripc()->user());
|
||||
*/
|
||||
rda->user()->setName(rda->ripc()->user());
|
||||
LogLine(RDConfig::LogInfo,QString().
|
||||
sprintf("user changed to '%s'",(const char *)rda->ripc()->user()));
|
||||
SetCaption();
|
||||
|
@ -97,7 +97,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
// RIPC Connection
|
||||
//
|
||||
connect(rda->ripc(),SIGNAL(userChanged()),this,SLOT(userData()));
|
||||
connect(rda,SIGNAL(userChanged()),this,SLOT(userData()));
|
||||
connect(rda->ripc(),SIGNAL(rmlReceived(RDMacro *)),
|
||||
this,SLOT(rmlReceivedData(RDMacro *)));
|
||||
|
||||
@ -182,7 +182,6 @@ QSizePolicy MainWidget::sizePolicy() const
|
||||
|
||||
void MainWidget::userData()
|
||||
{
|
||||
rda->user()->setName(rda->ripc()->user());
|
||||
for(unsigned i=0;i<panel_slots.size();i++) {
|
||||
panel_slots[i]->setUser(rda->user());
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
// RIPC Connection
|
||||
//
|
||||
#ifndef WIN32
|
||||
connect(rda->ripc(),SIGNAL(userChanged()),this,SLOT(userChangedData()));
|
||||
connect(rda,SIGNAL(userChanged()),this,SLOT(userChangedData()));
|
||||
rda->ripc()->connectHost("localhost",RIPCD_TCP_PORT,rda->config()->password());
|
||||
#endif // WIN32
|
||||
|
||||
@ -193,7 +193,6 @@ void MainWidget::userChangedData()
|
||||
QString str1;
|
||||
QString str2;
|
||||
|
||||
rda->user()->setName(rda->ripc()->user());
|
||||
str1=QString("RDCastManager")+" v"+VERSION+" - "+tr("Host");
|
||||
str2=QString(tr("User"));
|
||||
setCaption(str1+": "+rda->config()->stationName()+" "+str2+" "+rda->ripc()->user());
|
||||
|
@ -227,7 +227,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
connect(rda->ripc(),SIGNAL(connected(bool)),
|
||||
this,SLOT(ripcConnectedData(bool)));
|
||||
connect(rda->ripc(),SIGNAL(userChanged()),this,SLOT(ripcUserData()));
|
||||
connect(rda,SIGNAL(userChanged()),this,SLOT(ripcUserData()));
|
||||
rda->ripc()->connectHost("localhost",RIPCD_TCP_PORT,rda->config()->password());
|
||||
|
||||
//
|
||||
@ -922,13 +922,6 @@ void MainWidget::ripcUserData()
|
||||
str=QString("RDCatch")+" v"+VERSION+" - "+tr("Host")+":";
|
||||
setCaption(str+" "+rda->config()->stationName()+", "+tr("User")+": "+
|
||||
rda->ripc()->user());
|
||||
/*
|
||||
if(catch_user!=NULL) {
|
||||
delete catch_user;
|
||||
}
|
||||
catch_user=new RDUser(rda->ripc()->user());
|
||||
*/
|
||||
rda->user()->setName(rda->ripc()->user());
|
||||
|
||||
//
|
||||
// Set Control Perms
|
||||
|
@ -179,7 +179,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
rdaudioport_conf=new RDAudioPort(rda->config()->stationName(),
|
||||
rda->libraryConf()->inputCard());
|
||||
connect(rda->ripc(),SIGNAL(connected(bool)),this,SLOT(connectedData(bool)));
|
||||
connect(rda->ripc(),SIGNAL(userChanged()),this,SLOT(userData()));
|
||||
connect(rda,SIGNAL(userChanged()),this,SLOT(userData()));
|
||||
rda->ripc()->
|
||||
connectHost("localhost",RIPCD_TCP_PORT,rda->config()->password());
|
||||
cut_clipboard=NULL;
|
||||
@ -498,7 +498,6 @@ void MainWidget::userData()
|
||||
}
|
||||
|
||||
SetCaption(rda->ripc()->user());
|
||||
rda->user()->setName(rda->ripc()->user());
|
||||
|
||||
lib_group_box->clear();
|
||||
lib_group_box->insertItem(tr("ALL"));
|
||||
|
@ -153,7 +153,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
#ifndef WIN32
|
||||
connect(rda->ripc(),SIGNAL(connected(bool)),this,SLOT(connectedData(bool)));
|
||||
connect(rda->ripc(),SIGNAL(userChanged()),this,SLOT(userData()));
|
||||
connect(rda,SIGNAL(userChanged()),this,SLOT(userData()));
|
||||
rda->ripc()->connectHost("localhost",RIPCD_TCP_PORT,rda->config()->password());
|
||||
#else
|
||||
rdripc=NULL;
|
||||
@ -336,8 +336,6 @@ void MainWidget::userData()
|
||||
str2=QString(tr("User"));
|
||||
setCaption(str1+": "+rda->config()->stationName()+", "+str2+": "+
|
||||
rda->ripc()->user());
|
||||
rda->user()->setName(rda->ripc()->user());
|
||||
|
||||
|
||||
log_filter_widget->setUser(rda->user());
|
||||
RefreshList();
|
||||
|
@ -130,7 +130,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
// RIPC Connection
|
||||
//
|
||||
connect(rda->ripc(),SIGNAL(userChanged()),this,SLOT(userData()));
|
||||
connect(rda,SIGNAL(userChanged()),this,SLOT(userData()));
|
||||
rda->ripc()->connectHost("localhost",RIPCD_TCP_PORT,rda->config()->password());
|
||||
|
||||
//
|
||||
@ -249,7 +249,6 @@ void MainWidget::userData()
|
||||
QString str1=tr("RDLogManager - User: ");
|
||||
setCaption(QString().sprintf("%s%s",(const char *)str1,
|
||||
(const char *)rda->ripc()->user()));
|
||||
rda->user()->setName(rda->ripc()->user());
|
||||
|
||||
//
|
||||
// Set Control Perms
|
||||
|
@ -150,7 +150,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
// RIPC Connection
|
||||
//
|
||||
connect(rda->ripc(),SIGNAL(userChanged()),this,SLOT(userData()));
|
||||
connect(rda,SIGNAL(userChanged()),this,SLOT(userData()));
|
||||
connect(rda->ripc(),SIGNAL(rmlReceived(RDMacro *)),
|
||||
this,SLOT(rmlReceivedData(RDMacro *)));
|
||||
|
||||
@ -345,7 +345,6 @@ QSizePolicy MainWidget::sizePolicy() const
|
||||
|
||||
void MainWidget::userData()
|
||||
{
|
||||
rda->user()->setName(rda->ripc()->user());
|
||||
SetCaption();
|
||||
rda->ripc()->sendOnairFlag();
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ MainObject::MainObject(QObject *parent)
|
||||
//
|
||||
// RIPC Connection
|
||||
//
|
||||
connect(rda->ripc(),SIGNAL(userChanged()),this,SLOT(userData()));
|
||||
connect(rda,SIGNAL(userChanged()),this,SLOT(userData()));
|
||||
rda->ripc()->
|
||||
connectHost("localhost",RIPCD_TCP_PORT,rda->config()->password());
|
||||
}
|
||||
@ -90,7 +90,6 @@ void MainObject::userData()
|
||||
// Get User Context
|
||||
//
|
||||
disconnect(rda->ripc(),SIGNAL(userChanged()),this,SLOT(userData()));
|
||||
rda->user()->setName(rda->ripc()->user());
|
||||
|
||||
//
|
||||
// Start up command processor
|
||||
|
@ -110,7 +110,7 @@ MainObject::MainObject(QObject *parent)
|
||||
//
|
||||
// RIPC Connection
|
||||
//
|
||||
connect(rda->ripc(),SIGNAL(userChanged()),this,SLOT(userData()));
|
||||
connect(rda,SIGNAL(userChanged()),this,SLOT(userData()));
|
||||
rda->ripc()->connectHost("localhost",RIPCD_TCP_PORT,rda->config()->password());
|
||||
|
||||
//
|
||||
@ -149,7 +149,6 @@ void MainObject::userData()
|
||||
// Get User Context
|
||||
//
|
||||
disconnect(rda->ripc(),SIGNAL(userChanged()),this,SLOT(userData()));
|
||||
rda->user()->setName(rda->ripc()->user());
|
||||
|
||||
//
|
||||
// Process Objects
|
||||
|
Loading…
x
Reference in New Issue
Block a user