mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-09 22:27:08 +01:00
2018-03-21 Fred Gleason <fredg@paravelsystems.com>
* Added support for cart notifications to the RDXport service. * Added support for notifications to rdimport(1).
This commit is contained in:
@@ -1339,6 +1339,12 @@ MainObject::Result MainObject::ImportFile(const QString &filename,
|
||||
cut->setFadeupPoint(import_fadeup_marker->fadeValue(lo,hi));
|
||||
}
|
||||
cart->updateLength();
|
||||
if(cart_created) {
|
||||
SendNotification(RDNotification::AddAction,cart->number());
|
||||
}
|
||||
else {
|
||||
SendNotification(RDNotification::ModifyAction,cart->number());
|
||||
}
|
||||
delete settings;
|
||||
delete conv;
|
||||
delete cut;
|
||||
@@ -2018,6 +2024,17 @@ void MainObject::ReadXmlFile(const QString &basename,RDWaveData *wavedata) const
|
||||
}
|
||||
|
||||
|
||||
void MainObject::SendNotification(RDNotification::Action action,
|
||||
unsigned cartnum)
|
||||
{
|
||||
RDNotification *notify=
|
||||
new RDNotification(RDNotification::CartType,action,QVariant(cartnum));
|
||||
rda->ripc()->sendNotification(*notify);
|
||||
qApp->processEvents();
|
||||
delete notify;
|
||||
}
|
||||
|
||||
|
||||
int main(int argc,char *argv[])
|
||||
{
|
||||
QApplication a(argc,argv,false);
|
||||
|
||||
@@ -29,11 +29,12 @@
|
||||
#include <qfileinfo.h>
|
||||
#include <qdatetime.h>
|
||||
|
||||
#include <rdwavedata.h>
|
||||
#include <rdwavefile.h>
|
||||
#include <rdgroup.h>
|
||||
#include <rdcart.h>
|
||||
#include <rdcut.h>
|
||||
#include <rdgroup.h>
|
||||
#include <rdnotification.h>
|
||||
#include <rdwavedata.h>
|
||||
#include <rdwavefile.h>
|
||||
|
||||
#include "markerset.h"
|
||||
|
||||
@@ -73,6 +74,7 @@ class MainObject : public QObject
|
||||
void WriteTimestampCache(const QString &filename,const QDateTime &dt);
|
||||
bool SchedulerCodeExists(const QString &code) const;
|
||||
void ReadXmlFile(const QString &basename,RDWaveData *wavedata) const;
|
||||
void SendNotification(RDNotification::Action action,unsigned cartnum);
|
||||
unsigned import_file_key;
|
||||
RDGroup *import_group;
|
||||
bool import_verbose;
|
||||
|
||||
Reference in New Issue
Block a user