7 #include <QHostAddress> 60 strlist <<
"QUERY_IS_ACTIVE_BACKEND";
65 if (strlist[0] ==
"TRUE")
94 LOG(VB_GENERAL, LOG_ERR,
"StatusBox, theme is missing " 143 const QString &
help,
144 const QString & detail,
145 const QString & helpdetail,
146 const QString & state,
147 const QString & data)
152 if (detail.isEmpty())
162 if (helpdetail.isEmpty())
167 logline.
state = state;
171 qVariantFromValue(logline));
172 if (logline.
state.isEmpty())
173 logline.
state =
"normal";
175 item->SetFontState(logline.
state);
176 item->DisplayState(logline.
state,
"status");
177 item->SetText(logline.
detail,
"detail");
188 for (
int i = 0; i < actions.size() && !handled; ++i)
190 QString
action = actions[i];
193 QRegExp logNumberKeys(
"^[12345678]$" );
198 currentItem = currentButton->
GetText();
204 if (currentItem == tr(
"Log Entries"))
206 QString message = tr(
"Acknowledge all log entries at " 207 "this priority level or lower?");
214 if (confirmPopup->
Create())
218 else if ((currentItem == tr(
"Log Entries")) &&
219 (logNumberKeys.indexIn(
action) == 0))
257 disconnect(
this, SIGNAL(
updateLog()),
nullptr,
nullptr);
259 const char *slot = (
const char *)item->
GetData().value<
void*>();
261 connect(
this, SIGNAL(
updateLog()), slot);
275 currentItem = currentButton->
GetText();
279 if (currentItem == tr(
"Log Entries"))
281 QString message = tr(
"Acknowledge this log entry?");
289 if (confirmPopup->
Create())
292 else if (currentItem == tr(
"Job Queue"))
299 if (jobStatus == JOB_QUEUED)
301 QString message = tr(
"Delete Job?");
309 if (confirmPopup->
Create())
312 else if ((jobStatus == JOB_PENDING) ||
313 (jobStatus == JOB_STARTING) ||
314 (jobStatus == JOB_RUNNING) ||
315 (jobStatus == JOB_PAUSED))
317 QString label = tr(
"Job Queue Actions:");
327 QVariant data = qVariantFromValue(logline.
data);
329 if (jobStatus == JOB_PAUSED)
330 menuPopup->
AddButton(tr(
"Resume"), data);
334 menuPopup->
AddButton(tr(
"No Change"), data);
336 else if (jobStatus & JOB_DONE)
338 QString message = tr(
"Requeue Job?");
346 if (confirmPopup->
Create())
350 else if (currentItem == tr(
"AutoExpire List"))
356 QString label = tr(
"AutoExpire Actions:");
366 menuPopup->
AddButton(tr(
"Delete Now"), qVariantFromValue(rec));
367 if ((rec)->GetRecordingGroup() ==
"LiveTV")
369 menuPopup->
AddButton(tr(
"Move to Default group"),
370 qVariantFromValue(rec));
372 else if ((rec)->GetRecordingGroup() ==
"Deleted")
373 menuPopup->
AddButton(tr(
"Undelete"), qVariantFromValue(rec));
375 menuPopup->
AddButton(tr(
"Disable AutoExpire"),
376 qVariantFromValue(rec));
377 menuPopup->
AddButton(tr(
"No Change"), qVariantFromValue(rec));
389 QString resultid = dce->
GetId();
392 if (resultid ==
"LogAck")
396 QString sql = dce->
GetData().toString();
398 query.
prepare(
"UPDATE mythlog SET acknowledged = 1 " 399 "WHERE logid = :LOGID ;");
406 else if (resultid ==
"LogAckAll")
411 query.
prepare(
"UPDATE mythlog SET acknowledged = 1 " 412 "WHERE priority <= :PRIORITY ;");
420 else if (resultid ==
"JobDelete")
430 else if (resultid ==
"JobRequeue")
439 else if (resultid ==
"JobModify")
449 else if (buttonnum == 1)
456 else if (resultid ==
"AutoExpireManage")
461 if (!rec || buttonnum == 2)
470 LOG(VB_GENERAL, LOG_ERR, QString(
"Failed to delete recording: %1").arg(rec->
GetTitle()));
475 else if (buttonnum == 1)
477 if ((rec)->GetRecordingGroup() ==
"Deleted")
485 if ((rec)->GetRecordingGroup() ==
"LiveTV")
513 QString helpmsg(tr(
"Listings Status shows the latest " 514 "status information from " 515 "mythfilldatabase"));
521 QDateTime mfdLastRunStart, mfdLastRunEnd, mfdNextRunStart;
522 QString mfdLastRunStatus;
523 QString querytext, DataDirectMessage;
525 QDateTime qdtNow, GuideDataThrough;
530 query.
prepare(
"SELECT max(endtime) FROM program WHERE manualid=0;");
547 AddLogLine(tr(
"Last mythfilldatabase guide update:"), helpmsg);
548 tmp = tr(
"Started: %1").arg(
553 if (mfdLastRunEnd >= mfdLastRunStart)
555 tmp = tr(
"Finished: %1")
562 AddLogLine(tr(
"Result: %1").arg(mfdLastRunStatus), helpmsg);
565 if (mfdNextRunStart >= mfdLastRunStart)
567 tmp = tr(
"Suggested Next: %1")
574 DaysOfData = qdtNow.daysTo(GuideDataThrough);
576 if (GuideDataThrough.isNull())
578 AddLogLine(tr(
"There's no guide data available!"), helpmsg,
580 AddLogLine(tr(
"Have you run mythfilldatabase?"), helpmsg,
586 tr(
"There is guide data until %1")
591 AddLogLine(QString(
"(%1).").arg(tr(
"%n day(s)",
"", DaysOfData)),
596 AddLogLine(tr(
"WARNING: is mythfilldatabase running?"), helpmsg,
599 if (!DataDirectMessage.isEmpty())
601 AddLogLine(tr(
"DataDirect Status: "), helpmsg);
613 QString helpmsg(tr(
"Schedule Status shows current statistics " 614 "from the scheduler."));
622 query.
prepare(
"SELECT COUNT(*) FROM record WHERE type = :TEMPLATE");
626 QString rules = tr(
"%n template rule(s) (is) defined",
"",
627 query.
value(0).toInt());
636 query.
prepare(
"SELECT COUNT(*) FROM record " 637 "WHERE type <> :TEMPLATE AND search = :NOSEARCH");
642 QString rules = tr(
"%n standard rule(s) (is) defined",
"",
643 query.
value(0).toInt());
652 query.
prepare(
"SELECT COUNT(*) FROM record WHERE search > :NOSEARCH");
656 QString rules = tr(
"%n search rule(s) are defined",
"",
657 query.
value(0).toInt());
666 QMap<RecStatus::Type, int> statusMatch;
667 QMap<RecStatus::Type, QString> statusText;
668 QMap<int, int> sourceMatch;
669 QMap<int, QString> sourceText;
670 QMap<int, int> cardMatch;
671 QMap<int, QString> cardText;
672 QMap<int, int> cardParent;
673 QMap<int, bool> cardSchedGroup;
677 int lowerpriority = 0;
680 query.
prepare(
"SELECT MAX(sourceid) FROM videosource");
684 maxSource = query.
value(0).toInt();
687 query.
prepare(
"SELECT sourceid,name FROM videosource");
691 sourceText[query.
value(0).toInt()] = query.
value(1).toString();
694 query.
prepare(
"SELECT MAX(cardid) FROM capturecard");
698 maxCard = query.
value(0).toInt();
701 query.
prepare(
"SELECT cardid, inputname, displayname, parentid, " 708 int inputid = query.
value(0).toInt();
709 cardText[inputid] = query.
value(2).toString();
710 if (cardText[inputid].isEmpty())
711 cardText[inputid] = QString::number(query.
value(1).toInt());
712 cardParent[inputid] = query.
value(3).toInt();
713 cardSchedGroup[inputid] = query.
value(4).toBool();
720 tmpstr = tr(
"%n matching showing(s)",
"", schedList.
size());
724 for (; it != schedList.
end(); ++it)
729 if (statusMatch[recstatus] < 1)
735 ++statusMatch[recstatus];
747 if (cardParent[inputid] && cardSchedGroup[cardParent[inputid]])
748 inputid = cardParent[inputid];
749 ++cardMatch[inputid];
757 #define ADD_STATUS_LOG_LINE(rtype, fstate) \ 759 if (statusMatch[rtype] > 0) \ 761 tmpstr = QString("%1 %2").arg(statusMatch[rtype]) \ 762 .arg(statusText[rtype]); \ 763 AddLogLine(tmpstr, helpmsg, tmpstr, tmpstr, fstate);\ 779 if (lowerpriority > 0)
781 tmpstr = QString(
"%1 %2 %3").arg(lowerpriority).arg(willrec)
782 .arg(tr(
"with lower priority"));
783 AddLogLine(tmpstr, helpmsg, tmpstr, tmpstr,
"warning");
787 tmpstr = QString(
"%1 %2 %3").arg(hdflag).arg(willrec)
788 .arg(tr(
"marked as HDTV"));
792 for (i = 1; i <= maxSource; ++i)
794 if (sourceMatch[i] > 0)
796 tmpstr = QString(
"%1 %2 %3 %4 \"%5\"")
797 .arg(sourceMatch[i]).arg(willrec)
798 .arg(tr(
"from source")).arg(i).arg(sourceText[i]);
802 for (i = 1; i <= maxCard; ++i)
804 if (cardMatch[i] > 0)
806 tmpstr = QString(
"%1 %2 %3 %4 \"%5\"")
807 .arg(cardMatch[i]).arg(willrec)
808 .arg(tr(
"on input")).arg(i).arg(cardText[i]);
827 QStringList recordings;
829 QMap<int, struct info> info;
836 QString helpmsg(tr(
"Input Status shows the current information " 837 "about the state of backend inputs"));
845 "SELECT cardid, parentid, schedgroup, displayname " 846 "FROM capturecard ORDER BY cardid");
856 int inputid = query.
value(0).toInt();
857 int parentid = query.
value(1).toInt();
861 int infoid = inputid;
862 if (parentid && info[parentid].schedgroup)
866 info[infoid].inputid = inputid;
867 info[infoid].schedgroup = query.
value(2).toBool();
868 info[infoid].displayname = query.
value(3).toString();
869 inputids.append(inputid);
872 QString cmd = QString(
"QUERY_REMOTEENCODER %1").arg(inputid);
873 QStringList strlist( cmd );
874 strlist <<
"GET_STATE";
877 int state = strlist[0].toInt();
884 strlist << QString(
"QUERY_REMOTEENCODER %1").arg(inputid);
885 strlist <<
"GET_SLEEPSTATUS";
888 int sleepState = strlist[0].toInt();
890 if (sleepState == -1)
891 info[infoid].errored += 1;
893 info[infoid].unavailable += 1;
895 info[infoid].sleeping += 1;
899 info[infoid].recording += 1;
901 info[infoid].livetv += 1;
903 info[infoid].available += 1;
909 strlist = QStringList( QString(
"QUERY_RECORDER %1").arg(inputid));
910 strlist <<
"GET_RECORDING";
915 QString titlesub = pginfo.
GetTitle();
918 info[infoid].recordings += titlesub;
923 QList<int>::iterator it = inputids.begin();
924 for ( ; it != inputids.end(); ++it)
928 QStringList statuslist;
929 if (info[inputid].errored)
930 statuslist << tr(
"%1 errored").arg(info[inputid].errored);
931 if (info[inputid].unavailable)
932 statuslist << tr(
"%1 unavailable").arg(info[inputid].unavailable);
933 if (info[inputid].sleeping)
934 statuslist << tr(
"%1 sleeping").arg(info[inputid].sleeping);
935 if (info[inputid].recording)
936 statuslist << tr(
"%1 recording").arg(info[inputid].recording);
937 if (info[inputid].livetv)
938 statuslist << tr(
"%1 live television").arg(info[inputid].livetv);
939 if (info[inputid].available)
940 statuslist << tr(
"%1 available").arg(info[inputid].available);
943 if (info[inputid].errored)
945 else if (info[inputid].unavailable || info[inputid].sleeping)
946 fontstate =
"warning";
948 QString shortstatus = tr(
"Input %1 %2: %3")
949 .arg(inputid).arg(info[inputid].displayname)
950 .arg(statuslist.join(tr(
", ")));
951 QString longstatus = shortstatus +
"\n" +
952 info[inputid].recordings.join(
"\n");
954 AddLogLine(shortstatus, helpmsg, longstatus, longstatus, fontstate);
964 QString helpmsg(tr(
"Log Entries shows any unread log entries " 965 "from the system if you have logging enabled"));
972 query.
prepare(
"SELECT logid, module, priority, logdate, host, " 974 "FROM mythlog WHERE acknowledged = 0 " 975 "AND priority <= :PRIORITY ORDER BY logdate DESC;");
984 line = QString(
"%1").arg(query.
value(5).toString());
986 detail = tr(
"On %1 from %2.%3\n%4\n")
990 .arg(query.
value(4).toString())
991 .arg(query.
value(1).toString())
992 .arg(query.
value(5).toString());
994 QString
tmp = query.
value(6).toString();
998 detail.append(tr(
"No further details"));
1001 "", query.
value(0).toString());
1004 if (query.
size() == 0)
1006 AddLogLine(tr(
"No items found at priority level %1 or lower.")
1008 AddLogLine(tr(
"Use 1-8 to change priority level."), helpmsg);
1019 QString helpmsg(tr(
"Job Queue shows any jobs currently in " 1020 "MythTV's Job Queue such as a commercial " 1027 QMap<int, JobQueueEntry> jobs;
1028 QMap<int, JobQueueEntry>::Iterator it;
1039 for (it = jobs.begin(); it != jobs.end(); ++it)
1041 ProgramInfo pginfo((*it).chanid, (*it).recstartts);
1046 detail = QString(
"%1\n%2 %3 @ %4\n%5 %6 %7 %8")
1055 .arg(tr(
"Status: "))
1058 if ((*it).status != JOB_QUEUED)
1059 detail +=
" (" + (*it).hostname +
')';
1062 detail +=
'\n' + tr(
"Scheduled Run Time:") +
' ' +
1067 detail +=
'\n' + (*it).comment;
1069 line = QString(
"%1 @ %2").arg(pginfo.
GetTitle())
1075 if ((*it).status == JOB_ERRORED)
1077 else if ((*it).status == JOB_ABORTED)
1080 AddLogLine(line, helpmsg, detail, detail, font,
1081 QString(
"%1").arg((*it).id));
1085 AddLogLine(tr(
"Job Queue is currently empty."), helpmsg);
1098 static const QString
sm_str(
long long sizeKB,
int prec=1)
1100 if (sizeKB>1024*1024*1024)
1102 double sizeGB = sizeKB/(1024*1024*1024.0);
1103 return QObject::tr(
"%1 TB").arg(sizeGB, 0,
'f', (sizeGB>10)?0:prec);
1105 else if (sizeKB>1024*1024)
1107 double sizeGB = sizeKB/(1024*1024.0);
1108 return QObject::tr(
"%1 GB").arg(sizeGB, 0,
'f', (sizeGB>10)?0:prec);
1110 else if (sizeKB>1024)
1112 double sizeMB = sizeKB/1024.0;
1113 return QObject::tr(
"%1 MB").arg(sizeMB, 0,
'f', (sizeMB>10)?0:prec);
1116 return QObject::tr(
"%1 KB").arg(sizeKB);
1123 QString ret = QObject::tr(
"Unknown");
1124 if (total > 0.0 && free > 0.0)
1126 double percent = (100.0*free)/total;
1127 ret = StatusBox::tr(
"%1 total, %2 used, %3 (or %4%) free.")
1129 .arg(
sm_str(free)).arg(percent, 0,
'f', (percent >= 10.0) ? 0 : 2);
1136 return usage_str_kb((
long long)(total*1024), (
long long)(used*1024),
1137 (
long long)(free*1024));
1141 long long used,
long long free,
1144 const QString tail = StatusBox::tr(
", using your %1 rate of %2 kb/s");
1150 recprof2bps_t::const_iterator it = prof2bps.begin();
1151 for (; it != prof2bps.end(); ++it)
1154 tail.arg(it.key()).arg((
int)((float)(*it) / 1024.0f));
1156 long long bytesPerMin = ((*it) >> 1) * 15;
1157 uint minLeft = ((free<<5)/bytesPerMin)<<5;
1158 minLeft = (minLeft/15)*15;
1159 uint hoursLeft = minLeft/60;
1160 QString hourstring = StatusBox::tr(
"%n hour(s)",
"", hoursLeft);
1161 QString minstring = StatusBox::tr(
"%n minute(s)",
"", minLeft%60);
1162 QString remainstring = StatusBox::tr(
"%1 remaining",
"time");
1163 if (minLeft%60 == 0)
1164 out<<remainstring.arg(hourstring) + pro;
1165 else if (minLeft > 60)
1166 out<<StatusBox::tr(
"%1 and %2 remaining",
"time").arg(hourstring)
1167 .arg(minstring) + pro;
1169 out<<remainstring.arg(minstring) + pro;
1175 int days, hours, min, secs;
1178 str =
" " + StatusBox::tr(
"Uptime") +
": ";
1181 return str + StatusBox::tr(
"unknown",
"unknown uptime");
1183 days = uptime/(60*60*24);
1184 uptime -= days*60*60*24;
1185 hours = uptime/(60*60);
1186 uptime -= hours*60*60;
1193 QString dayLabel = StatusBox::tr(
"%n day(s)",
"", days);
1195 sprintf(buff,
"%d:%02d", hours, min);
1197 return str + QString(
"%1, %2").arg(dayLabel).arg(buff);
1203 sprintf(buff,
"%d:%02d:%02d", hours, min, secs);
1205 return str + QString( buff );
1220 "SELECT sum(filesize) * 8 / " 1221 "sum(((unix_timestamp(endtime) - unix_timestamp(starttime)))) " 1223 "FROM recorded WHERE hostname in (%1) " 1224 "AND (unix_timestamp(endtime) - unix_timestamp(starttime)) > 300;";
1226 query.
prepare(querystr.arg(hostnames));
1228 if (query.
exec() && query.
next() &&
1229 query.
value(0).toDouble() > 0)
1231 QString rateStr = tr(
"average",
"average rate");
1236 (int)(query.
value(0).toDouble());
1240 "SELECT max(filesize * 8 / " 1241 "(unix_timestamp(endtime) - unix_timestamp(starttime))) " 1243 "FROM recorded WHERE hostname in (%1) " 1244 "AND (unix_timestamp(endtime) - unix_timestamp(starttime)) > 300;";
1246 query.
prepare(querystr.arg(hostnames));
1248 if (query.
exec() && query.
next() &&
1249 query.
value(0).toDouble() > 0)
1251 QString rateStr = tr(
"maximum",
"maximum rate");
1256 (int)(query.
value(0).toDouble());
1273 QString machineStr = tr(
"Machine Status shows some operating system " 1274 "statistics of this machine");
1276 machineStr.append(
" " + tr(
"and the MythTV server"));
1283 int totalM, usedM, freeM;
1284 int totalS, usedS, freeS;
1289 line = tr(
"System:");
1291 line = tr(
"This machine:");
1300 line.append(
". " + tr(
"Load") +
": ");
1302 #if defined(_WIN32) || defined(Q_OS_ANDROID) 1303 line.append(tr(
"unknown") +
" - getloadavg() " + tr(
"failed"));
1307 line.append(tr(
"unknown") +
" - getloadavg() " + tr(
"failed"));
1312 sprintf(buff,
"%0.2lf, %0.2lf, %0.2lf", loads[0], loads[1], loads[2]);
1313 line.append(QString(buff));
1322 usedM = totalM - freeM;
1325 line =
" " + tr(
"RAM") +
": " +
usage_str_mb(totalM, usedM, freeM);
1328 usedS = totalS - freeS;
1331 line =
" " + tr(
"Swap") +
1339 line = tr(
"MythTV server") +
':';
1348 line.append(
". " + tr(
"Load") +
": ");
1354 sprintf(buff,
"%0.2f, %0.2f, %0.2f",
1355 static_cast<double>(floads[0]),
1356 static_cast<double>(floads[1]),
1357 static_cast<double>(floads[2]));
1358 line.append(QString(buff));
1361 line.append(tr(
"unknown"));
1368 usedM = totalM - freeM;
1371 line =
" " + tr(
"RAM") +
1376 usedS = totalS - freeS;
1379 line =
" " + tr(
"Swap") +
1390 for (
int i = 0; i < fsInfos.size(); ++i)
1393 if ((fsInfos.size() == 2) && (i == 0) &&
1394 (fsInfos[i].getPath() !=
"TotalDiskSpace") &&
1395 (fsInfos[i+1].getPath() ==
"TotalDiskSpace"))
1398 hostnames = QString(
"\"%1\"").arg(fsInfos[i].getHostname());
1399 hostnames.replace(
' ',
"");
1400 hostnames.replace(
',',
"\",\"");
1406 fsInfos[i].getTotalSpace(), fsInfos[i].getUsedSpace(),
1407 fsInfos[i].getTotalSpace() - fsInfos[i].getUsedSpace(),
1410 if (fsInfos[i].getPath() ==
"TotalDiskSpace")
1412 line = tr(
"Total Disk Space:");
1417 line = tr(
"MythTV Drive #%1:").arg(fsInfos[i].getFSysID());
1420 QStringList tokens = fsInfos[i].getPath().split(
',');
1422 if (tokens.size() > 1)
1424 AddLogLine(QString(
" ") + tr(
"Directories:"), machineStr);
1427 while (curToken < tokens.size())
1429 tokens[curToken++], machineStr);
1433 AddLogLine(QString(
" " ) + tr(
"Directory:") +
' ' +
1434 fsInfos[i].getPath(), machineStr);
1438 QStringList::iterator it = list.begin();
1439 for (;it != list.end(); ++it)
1441 line = QString(
" ") + (*it);
1457 QString helpmsg(tr(
"The AutoExpire List shows all recordings " 1458 "which may be expired and the order of " 1459 "their expiration. Recordings at the top " 1460 "of the list will be expired first."));
1467 QString contentLine;
1470 long long totalSize(0);
1471 long long liveTVSize(0);
1473 long long deletedGroupSize(0);
1474 int deletedGroupCount(0);
1476 vector<ProgramInfo *>::iterator it;
1500 deletedGroupCount++;
1504 staticInfo = tr(
"%n recording(s) consuming %1 (is) allowed to expire\n",
"",
1508 staticInfo += tr(
"%n (is) LiveTV and consume(s) %1\n",
"", liveTVCount)
1509 .arg(
sm_str(liveTVSize / 1024));
1511 if (deletedGroupCount)
1512 staticInfo += tr(
"%n (is) Deleted and consume(s) %1\n",
"",
1514 .arg(
sm_str(deletedGroupSize / 1024));
1528 contentLine += pginfo->
GetTitle() +
1544 AddLogLine(contentLine, staticInfo, detailInfo,
1545 staticInfo + detailInfo);
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
static void disk_usage_with_rec_time_kb(QStringList &out, long long total, long long used, long long free, const recprof2bps_t &prof2bps)
MythUIButtonList * m_categoryList
Error State, if we ever try to enter this state errored is set.
void bindValue(const QString &placeholder, const QVariant &val)
uint GetInputID(void) const
Watching LiveTV is the state for when we are watching a recording and the user has control over the c...
vector< ProgramInfo * > m_expList
static bool DeleteJob(int jobID)
Dialog asking for user confirmation.
void doMachineStatus()
Show machine status.
QString GetChannelName(void) const
This is the channel name in the local market, i.e.
bool TranslateKeyPress(const QString &context, QKeyEvent *e, QStringList &actions, bool allowJumps=true)
Get a list of actions for a keypress in the given context.
static const QList< FileSystemInfo > RemoteGetInfo(MythSocket *sock=nullptr)
virtual uint64_t GetFilesize(void) const
bool Create(void) override
void SaveSetting(const QString &key, int newValue)
uint GetSourceID(void) const
static QString JobText(int jobType)
QSqlQuery wrapper that fetches a DB connection from the connection pool.
StatusBox(MythScreenStack *parent)
bool RemoteGetMemStats(int &totalMB, int &freeMB, int &totalVM, int &freeVM)
Basic menu dialog, message and a list of options.
QString toString(Verbosity v=kLongDescription, QString sep=":", QString grp="\"") const
QString GetTitle(void) const
bool QueryIsDeleteCandidate(bool one_player_allowed=false) const
Returns true iff this is a recording, it is not in use (except by the recorder), and at most one play...
void setHelpText(MythUIButtonListItem *item)
static bool ChangeJobStatus(int jobID, int newStatus, QString comment="")
virtual void SetText(const QString &text)
Holds information on a TV Program one might wish to record.
void RemoteGetAllExpiringRecordings(vector< ProgramInfo * > &expiringlist)
MythScreenStack * GetStack(const QString &stackname)
Watching Recording is the state for when we are watching an in progress recording,...
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
bool getMemStats(int &totalMB, int &freeMB, int &totalVM, int &freeVM)
Returns memory statistics in megabytes.
void clicked(MythUIButtonListItem *item)
static const QString usage_str_kb(long long total, long long used, long long free)
QString GetChanNum(void) const
This is the channel "number", in the form 1, 1_2, 1-2, 1#1, etc.
Q_DECLARE_METATYPE(GrabberScript *)
QDateTime as_utc(const QDateTime &old_dt)
Returns copy of QDateTime with TimeSpec set to UTC.
void BuildFocusList(void)
static int GetJobsInQueue(QMap< int, JobQueueEntry > &jobs, int findJobs=JOB_LIST_NOT_DONE)
uint GetVideoProperties(void) const
void doAutoExpireList(bool updateExpList=true)
Show list of recordings which may AutoExpire.
static bool StopJob(int jobID)
bool RemoteDeleteRecording(uint recordingID, bool forceMetadataDelete, bool forgetHistory)
recprof2bps_t recordingProfilesBPS
QVariant value(int i) const
void AddButton(const QString &title, QVariant data=0, bool newMenu=false, bool setCurrent=false)
static bool ResumeJob(int jobID)
MythScreenStack * m_popupStack
Holds information on recordings and videos.
bool SendReceiveStringList(QStringList &strlist, bool quickTimeout=false, bool block=true)
Send a message to the backend and wait for a response.
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Recording Only is a TVRec only state for when we are recording a program, but there is no one current...
static const QString sm_str(long long sizeKB, int prec=1)
Returns a short string describing an amount of space, choosing one of a number of useful units,...
MythUIText * m_justHelpText
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
QString GetSetting(const QString &key, const QString &defaultval="")
void customEvent(QEvent *) override
static QString toString(Type, uint id)
Converts "recstatus" into a short (unreadable) string.
QString GetSubtitle(void) const
static QString StatusText(int status)
bool isActive(void) const
void SetReturnEvent(QObject *retobject, const QString &resultid)
QString GetRecordingGroup(void) const
uint GetRecordingID(void) const
bool keyPressEvent(QKeyEvent *) override
Key event handler.
static MSqlQueryInfo InitCon(ConnectionReuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Do Today/Yesterday/Tomorrow transform.
static QString i18n(const QString &)
Translations for play,recording, & storage groups +.
void ApplyRecordRecGroupChange(const QString &newrecgroup)
Sets the recording group, both in this RecordingInfo and in the database.
QString toString(const QDateTime &raw_dt, uint format)
Returns formatted string representing the time.
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
MythUIType * GetFocusWidget(void) const
MythMainWindow * GetMythMainWindow(void)
int GetNumSetting(const QString &key, int defaultval=0)
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
bool keyPressEvent(QKeyEvent *) override
Key event handler.
#define LOG(_MASK_, _LEVEL_, _STRING_)
void AddLogLine(const QString &line, const QString &help="", const QString &detail="", const QString &helpdetail="", const QString &state="", const QString &data="")
RecStatus::Type GetRecordingStatus(void) const
#define ADD_STATUS_LOG_LINE(rtype, fstate)
MythUIButtonList * m_logList
int GetRecordingPriority2(void) const
QMap< QString, unsigned int > recprof2bps_t
bool Create(void) override
void updateLogList(MythUIButtonListItem *item)
bool RemoteGetLoad(float load[3])
RecordingType GetRecordingRuleType(void) const
static bool PauseJob(int jobID)
uint GetChanID(void) const
This is the unique key used in the database to locate tuning information.
void SetReturnEvent(QObject *retobject, const QString &resultid)
bool RemoteUndeleteRecording(uint recordingID)
bool LoadFromScheduler(AutoDeleteDeque< TYPE * > &destination, bool &hasConflicts, QString altTable="", int recordid=-1)
A slave's sleep status is undefined when it has never connected to the master backend or is not able ...
bool DisplayState(const QString &name)
QDateTime GetRecordingStartTime(void) const
Approximate time the recording started.
QDateTime GetRecordingEndTime(void) const
Approximate time the recording should have ended, did end, or is intended to end.
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
bool RemoteGetUptime(time_t &uptime)
static void DBError(const QString &where, const MSqlQuery &query)
Screen in which all other widgets are contained and rendered.
void getActualRecordedBPS(QString hostnames)
Fills in recordingProfilesBPS w/ average bitrate from recorded table.
static enum JobStatus GetJobStatus(int jobID)
List::const_iterator const_iterator
QString GetHostName(void)
Event dispatched from MythUI modal dialogs to a listening class containing a result of some form.
MythUIType * GetChild(const QString &name) const
Get a named child of this UIType.
QDateTime fromString(const QString &dtstr)
Converts kFilename && kISODate formats to QDateTime.
bool getUptime(time_t &uptime)
Returns uptime statistics.
#define MYTH_SOURCE_VERSION
static const QString uptimeStr(time_t uptime)
static const QString usage_str_mb(float total, float used, float free)
void SetData(QVariant data)
MythUIStateType * m_iconState
bool Create(void) override
void Init(void) override
Used after calling Load() to assign data to widgets and other UI initilisation which is prohibited in...
void SaveAutoExpire(AutoExpireType autoExpire, bool updateDelete=false)
Set "autoexpire" field in "recorded" table to "autoExpire".