mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-29 16:50:13 +01:00
2021-06-19 Fred Gleason <fredg@paravelsystems.com>
* Added 'RDMainWindow' to rdcatch(1). Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -21925,3 +21925,5 @@
|
|||||||
* Added 'RDMainWindow' to rdpanel(1).
|
* Added 'RDMainWindow' to rdpanel(1).
|
||||||
2021-06-19 Fred Gleason <fredg@paravelsystems.com>
|
2021-06-19 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Added 'RDMainWindow' to rdcastmanager(1).
|
* Added 'RDMainWindow' to rdcastmanager(1).
|
||||||
|
2021-06-19 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Added 'RDMainWindow' to rdcatch(1).
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ QString CatchConnector::stationName()
|
|||||||
|
|
||||||
|
|
||||||
MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
||||||
: RDWidget(c,parent)
|
: RDMainWindow("rdcatch",c)
|
||||||
{
|
{
|
||||||
QString str;
|
QString str;
|
||||||
QString err_msg;
|
QString err_msg;
|
||||||
@@ -427,7 +427,8 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
|||||||
catch_midnight_timer->setSingleShot(true);
|
catch_midnight_timer->setSingleShot(true);
|
||||||
connect(catch_midnight_timer,SIGNAL(timeout()),this,SLOT(midnightData()));
|
connect(catch_midnight_timer,SIGNAL(timeout()),this,SLOT(midnightData()));
|
||||||
midnightData();
|
midnightData();
|
||||||
LoadGeometry();
|
|
||||||
|
loadSettings(true);
|
||||||
|
|
||||||
QTime current_time=QTime::currentTime().addMSecs(catch_time_offset);
|
QTime current_time=QTime::currentTime().addMSecs(catch_time_offset);
|
||||||
QDate current_date=QDate::currentDate();
|
QDate current_date=QDate::currentDate();
|
||||||
@@ -995,7 +996,9 @@ void MainWidget::heartbeatFailedData(int id)
|
|||||||
void MainWidget::quitMainWidget()
|
void MainWidget::quitMainWidget()
|
||||||
{
|
{
|
||||||
catch_db->removeDatabase(rda->config()->mysqlDbname());
|
catch_db->removeDatabase(rda->config()->mysqlDbname());
|
||||||
SaveGeometry();
|
|
||||||
|
saveSettings();
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1324,37 +1327,6 @@ QString MainWidget::GeometryFile() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWidget::LoadGeometry()
|
|
||||||
{
|
|
||||||
QString geometry_file=GeometryFile();
|
|
||||||
if(geometry_file.isEmpty()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
RDProfile *profile=new RDProfile();
|
|
||||||
profile->setSource(geometry_file);
|
|
||||||
resize(profile->intValue("RDCatch","Width",sizeHint().width()),
|
|
||||||
profile->intValue("RDCatch","Height",sizeHint().height()));
|
|
||||||
|
|
||||||
delete profile;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MainWidget::SaveGeometry()
|
|
||||||
{
|
|
||||||
QString geometry_file=GeometryFile();
|
|
||||||
if(geometry_file.isEmpty()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
FILE *file=fopen(geometry_file.toUtf8(),"w");
|
|
||||||
if(file==NULL) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
fprintf(file,"[RDCatch]\n");
|
|
||||||
fprintf(file,"Width=%d\n",geometry().width());
|
|
||||||
fprintf(file,"Height=%d\n",geometry().height());
|
|
||||||
fclose(file);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int main(int argc,char *argv[])
|
int main(int argc,char *argv[])
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
#include <QScrollArea>
|
#include <QScrollArea>
|
||||||
|
|
||||||
#include <rdcatch_connect.h>
|
#include <rdcatch_connect.h>
|
||||||
|
#include <rdmainwindow.h>
|
||||||
#include <rdtableview.h>
|
#include <rdtableview.h>
|
||||||
#include <rdtransportbutton.h>
|
#include <rdtransportbutton.h>
|
||||||
#include <rdwidget.h>
|
#include <rdwidget.h>
|
||||||
@@ -59,7 +60,7 @@ class CatchConnector
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class MainWidget : public RDWidget
|
class MainWidget : public RDMainWindow
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -116,8 +117,6 @@ class MainWidget : public RDWidget
|
|||||||
int GetMonitor(int serial,int chan);
|
int GetMonitor(int serial,int chan);
|
||||||
int GetConnection(QString station,unsigned chan=0);
|
int GetConnection(QString station,unsigned chan=0);
|
||||||
QString GeometryFile();
|
QString GeometryFile();
|
||||||
void LoadGeometry();
|
|
||||||
void SaveGeometry();
|
|
||||||
std::vector<CatchMonitor *> catch_monitor;
|
std::vector<CatchMonitor *> catch_monitor;
|
||||||
QScrollArea *catch_monitor_area;
|
QScrollArea *catch_monitor_area;
|
||||||
VBox *catch_monitor_vbox;
|
VBox *catch_monitor_vbox;
|
||||||
|
|||||||
Reference in New Issue
Block a user