MythTV  master
importnative.cpp
Go to the documentation of this file.
1 #include <cstdlib>
2 
3 // Qt
4 #include <QApplication>
5 #include <QDir>
6 #include <QFileInfo>
7 #include <QDomDocument>
8 
9 // Myth
10 #include <mythcontext.h>
11 #include <mythdbcon.h>
12 #include <mythuihelper.h>
13 #include <mythmainwindow.h>
14 #include <mythuitext.h>
15 #include <mythuitextedit.h>
16 #include <mythuibutton.h>
17 #include <mythuibuttonlist.h>
18 #include <mythdialogbox.h>
19 #include <mythsystemlegacy.h>
20 #include <exitcodes.h>
21 #include <mythdate.h>
22 
23 // mytharchive
24 #include "importnative.h"
25 #include "archiveutil.h"
26 #include "logviewer.h"
27 
28 
30 
31 static bool loadDetailsFromXML(const QString &filename, FileDetails *details)
32 {
33  QDomDocument doc("mydocument");
34  QFile file(filename);
35  if (!file.open(QIODevice::ReadOnly))
36  return false;
37 
38  if (!doc.setContent(&file))
39  {
40  file.close();
41  return false;
42  }
43  file.close();
44 
45  QString docType = doc.doctype().name();
46 
47  if (docType == "MYTHARCHIVEITEM")
48  {
49  QDomNodeList itemNodeList = doc.elementsByTagName("item");
50  QString type, dbVersion;
51 
52  if (itemNodeList.count() < 1)
53  {
54  LOG(VB_GENERAL, LOG_ERR,
55  "Couldn't find an 'item' element in XML file");
56  return false;
57  }
58 
59  QDomNode n = itemNodeList.item(0);
60  QDomElement e = n.toElement();
61  type = e.attribute("type");
62  dbVersion = e.attribute("databaseversion");
63  if (type == "recording")
64  {
65  QDomNodeList nodeList = e.elementsByTagName("recorded");
66  if (nodeList.count() < 1)
67  {
68  LOG(VB_GENERAL, LOG_ERR,
69  "Couldn't find a 'recorded' element in XML file");
70  return false;
71  }
72 
73  n = nodeList.item(0);
74  e = n.toElement();
75  n = e.firstChild();
76  while (!n.isNull())
77  {
78  e = n.toElement();
79  if (!e.isNull())
80  {
81  if (e.tagName() == "title")
82  details->title = e.text();
83 
84  if (e.tagName() == "subtitle")
85  details->subtitle = e.text();
86 
87  if (e.tagName() == "starttime")
88  details->startTime = MythDate::fromString(e.text());
89 
90  if (e.tagName() == "description")
91  details->description = e.text();
92  }
93  n = n.nextSibling();
94  }
95 
96  // get channel info
97  n = itemNodeList.item(0);
98  e = n.toElement();
99  nodeList = e.elementsByTagName("channel");
100  if (nodeList.count() < 1)
101  {
102  LOG(VB_GENERAL, LOG_ERR,
103  "Couldn't find a 'channel' element in XML file");
104  details->chanID = "";
105  details->chanNo = "";
106  details->chanName = "";
107  details->callsign = "";
108  return false;
109  }
110 
111  n = nodeList.item(0);
112  e = n.toElement();
113  details->chanID = e.attribute("chanid");
114  details->chanNo = e.attribute("channum");
115  details->chanName = e.attribute("name");
116  details->callsign = e.attribute("callsign");
117  return true;
118  }
119  if (type == "video")
120  {
121  QDomNodeList nodeList = e.elementsByTagName("videometadata");
122  if (nodeList.count() < 1)
123  {
124  LOG(VB_GENERAL, LOG_ERR,
125  "Couldn't find a 'videometadata' element in XML file");
126  return false;
127  }
128 
129  n = nodeList.item(0);
130  e = n.toElement();
131  n = e.firstChild();
132  while (!n.isNull())
133  {
134  e = n.toElement();
135  if (!e.isNull())
136  {
137  if (e.tagName() == "title")
138  {
139  details->title = e.text();
140  details->subtitle = "";
141  details->startTime = QDateTime();
142  }
143 
144  if (e.tagName() == "plot")
145  {
146  details->description = e.text();
147  }
148  }
149  n = n.nextSibling();
150  }
151 
152  details->chanID = "N/A";
153  details->chanNo = "N/A";
154  details->chanName = "N/A";
155  details->callsign = "N/A";
156 
157  return true;
158  }
159  }
160 
161  return false;
162 }
163 
165 
167  FileSelector(parent, nullptr, FSTYPE_FILE, "", "*.xml")
168 {
169  m_curDirectory = gCoreContext->GetSetting("MythNativeLoadFilename", "/");
170 }
171 
173 {
174  gCoreContext->SaveSetting("MythNativeLoadFilename", m_curDirectory);
175 }
176 
178 {
179  // Load the theme for this screen
180  bool foundtheme = LoadWindowFromXML("mythnative-ui.xml", "archivefile_selector", this);
181  if (!foundtheme)
182  return false;
183 
184  bool err = false;
185  UIUtilW::Assign(this, m_titleText, "title");
186  UIUtilE::Assign(this, m_fileButtonList, "filelist", &err);
187  UIUtilE::Assign(this, m_locationEdit, "location_edit", &err);
188  UIUtilE::Assign(this, m_backButton, "back_button", &err);
189  UIUtilE::Assign(this, m_homeButton, "home_button", &err);
190  UIUtilE::Assign(this, m_nextButton, "next_button", &err);
191  UIUtilE::Assign(this, m_prevButton, "prev_button", &err);
192  UIUtilE::Assign(this, m_cancelButton, "cancel_button", &err);
193  UIUtilE::Assign(this, m_progTitle, "title_text", &err);
194  UIUtilE::Assign(this, m_progSubtitle, "subtitle_text", &err);
195  UIUtilE::Assign(this, m_progStartTime, "starttime_text", &err);
196 
197  if (err)
198  {
199  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'archivefile_selector'");
200  return false;
201  }
202 
203  if (m_titleText)
204  m_titleText->SetText(tr("Find File To Import"));
205 
206  connect(m_nextButton, SIGNAL(Clicked()), this, SLOT(nextPressed()));
207  connect(m_cancelButton, SIGNAL(Clicked()), this, SLOT(cancelPressed()));
208  connect(m_prevButton, SIGNAL(Clicked()), this, SLOT(prevPressed()));
209 
210  connect(m_locationEdit, SIGNAL(LosingFocus()),
211  this, SLOT(locationEditLostFocus()));
213 
214  connect(m_backButton, SIGNAL(Clicked()), this, SLOT(backPressed()));
215  connect(m_homeButton, SIGNAL(Clicked()), this, SLOT(homePressed()));
216 
218  this, SLOT(itemSelected(MythUIButtonListItem *)));
219 
221  this, SLOT(itemClicked(MythUIButtonListItem *)));
222 
223  BuildFocusList();
224 
226 
228  updateFileList();
229 
230  return true;
231 }
232 
234 {
235  m_xmlFile.clear();
236 
237  if (!item)
238  return;
239 
240  FileData *fileData = item->GetData().value<FileData*>();
241  if (!fileData)
242  return;
243 
244  if (loadDetailsFromXML(m_curDirectory + "/" + fileData->filename, &m_details))
245  {
246  m_xmlFile = m_curDirectory + "/" + fileData->filename;
250  .toString("dd MMM yy (hh:mm)"));
251  }
252  else
253  {
254  m_progTitle->Reset();
257  }
258 }
259 
261 {
262  if (m_xmlFile == "")
263  {
264  ShowOkPopup(tr("The selected item is not a valid archive file!"));
265  }
266  else
267  {
269 
270  ImportNative *native = new ImportNative(mainStack, this, m_xmlFile, m_details);
271 
272  if (native->Create())
273  mainStack->AddScreen(native);
274  }
275 }
276 
278 {
279  Close();
280 }
281 
283 {
284  Close();
285 }
286 
288 
290 {
291  // Load the theme for this screen
292  bool foundtheme = LoadWindowFromXML("mythnative-ui.xml", "importnative", this);
293  if (!foundtheme)
294  return false;
295 
296  bool err = false;
297  UIUtilE::Assign(this, m_progTitle_text, "progtitle", &err);
298  UIUtilE::Assign(this, m_progDateTime_text, "progdatetime", &err);
299  UIUtilE::Assign(this, m_progDescription_text, "progdescription", &err);
300 
301  UIUtilE::Assign(this, m_chanID_text, "chanid", &err);
302  UIUtilE::Assign(this, m_chanNo_text, "channo", &err);
303  UIUtilE::Assign(this, m_chanName_text, "name", &err);
304  UIUtilE::Assign(this, m_callsign_text, "callsign", &err);
305 
306  UIUtilE::Assign(this, m_localChanID_text, "local_chanid", &err);
307  UIUtilE::Assign(this, m_localChanNo_text, "local_channo", &err);
308  UIUtilE::Assign(this, m_localChanName_text, "local_name", &err);
309  UIUtilE::Assign(this, m_localCallsign_text, "local_callsign", &err);
310 
311  UIUtilE::Assign(this, m_searchChanID_button, "searchchanid_button", &err);
312  UIUtilE::Assign(this, m_searchChanNo_button, "searchchanno_button", &err);
313  UIUtilE::Assign(this, m_searchChanName_button, "searchname_button", &err);
314  UIUtilE::Assign(this, m_searchCallsign_button ,"searchcallsign_button", &err);
315 
316  UIUtilE::Assign(this, m_finishButton, "finish_button", &err);
317  UIUtilE::Assign(this, m_prevButton, "prev_button", &err);
318  UIUtilE::Assign(this, m_cancelButton, "cancel_button", &err);
319 
320  if (err)
321  {
322  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'importarchive'");
323  return false;
324  }
325 
326  connect(m_finishButton, SIGNAL(Clicked()), this, SLOT(finishedPressed()));
327  connect(m_prevButton, SIGNAL(Clicked()), this, SLOT(prevPressed()));
328  connect(m_cancelButton, SIGNAL(Clicked()), this, SLOT(cancelPressed()));
329 
330  connect(m_searchChanID_button, SIGNAL(Clicked()), this, SLOT(searchChanID()));
331  connect(m_searchChanNo_button, SIGNAL(Clicked()), this, SLOT(searchChanNo()));
332  connect(m_searchChanName_button, SIGNAL(Clicked()), this, SLOT(searchName()));
333  connect(m_searchCallsign_button, SIGNAL(Clicked()), this, SLOT(searchCallsign()));
334 
336 
338  .toString("dd MMM yy (hh:mm)"));
340  (m_details.subtitle == "" ? m_details.subtitle + "\n" : "") + m_details.description);
341 
346 
349 
350  BuildFocusList();
351 
353 
354  return true;
355 }
356 
357 bool ImportNative::keyPressEvent(QKeyEvent *event)
358 {
359  if (GetFocusWidget()->keyPressEvent(event))
360  return true;
361 
362  QStringList actions;
363  bool handled = GetMythMainWindow()->TranslateKeyPress("Global", event, actions);
364 
365  for (int i = 0; i < actions.size() && !handled; i++)
366  {
367  QString action = actions[i];
368  handled = true;
369 
370  if (action == "MENU")
371  {
372  }
373  else
374  handled = false;
375  }
376 
377  if (!handled && MythScreenType::keyPressEvent(event))
378  handled = true;
379 
380  return handled;
381 }
382 
384 
385 {
386  if (m_details.chanID != "N/A" && m_localChanID_text->GetText() == "")
387  {
388  ShowOkPopup(tr("You need to select a valid channel id!"));
389  return;
390  }
391 
392  QString commandline;
393  QString tempDir = gCoreContext->GetSetting("MythArchiveTempDir", "");
394  QString chanID = m_localChanID_text->GetText();
395 
396  if (chanID == "")
397  chanID = m_details.chanID;
398 
399  if (tempDir == "")
400  return;
401 
402  if (!tempDir.endsWith("/"))
403  tempDir += "/";
404 
405  QString logDir = tempDir + "logs";
406 
407  // remove any existing logs
408  myth_system("rm -f " + logDir + "/*.log");
409 
410  commandline = "mytharchivehelper --logpath " + logDir + " --importarchive "
411  "--infile \"" + m_xmlFile +
412  "\" --chanid " + chanID;
413 
416  uint retval = myth_system(commandline, flags);
417  if (retval != GENERIC_EXIT_RUNNING && retval != GENERIC_EXIT_OK)
418  {
419  ShowOkPopup(tr("It was not possible to import the Archive. "
420  " An error occured when running 'mytharchivehelper'") );
421  return;
422  }
423 
424  showLogViewer();
425 
427  Close();
428 }
429 
431 {
432  Close();
433 }
434 
436 {
438  Close();
439 }
440 
441 void ImportNative::findChannelMatch(const QString &chanID, const QString &chanNo,
442  const QString &name, const QString &callsign)
443 {
444  // find best match in channel table for this recording
445 
446  // look for an exact match - maybe the user is importing back an old recording
447  MSqlQuery query(MSqlQuery::InitCon());
448  query.prepare("SELECT chanid, channum, name, callsign FROM channel "
449  "WHERE chanid = :CHANID AND channum = :CHANNUM AND name = :NAME "
450  "AND callsign = :CALLSIGN;");
451  query.bindValue(":CHANID", chanID);
452  query.bindValue(":CHANNUM", chanNo);
453  query.bindValue(":NAME", name);
454  query.bindValue(":CALLSIGN", callsign);
455 
456  if (query.exec() && query.next())
457  {
458  // got match
459  m_localChanID_text->SetText(query.value(0).toString());
460  m_localChanNo_text->SetText(query.value(1).toString());
461  m_localChanName_text->SetText(query.value(2).toString());
462  m_localCallsign_text->SetText(query.value(3).toString());
463  return;
464  }
465 
466  // try to find callsign
467  query.prepare("SELECT chanid, channum, name, callsign FROM channel "
468  "WHERE callsign = :CALLSIGN;");
469  query.bindValue(":CALLSIGN", callsign);
470 
471  if (query.exec() && query.next())
472  {
473  // got match
474  m_localChanID_text->SetText(query.value(0).toString());
475  m_localChanNo_text->SetText(query.value(1).toString());
476  m_localChanName_text->SetText(query.value(2).toString());
477  m_localCallsign_text->SetText(query.value(3).toString());
478  return;
479  }
480 
481  // try to find name
482  query.prepare("SELECT chanid, channum, name, callsign FROM channel "
483  "WHERE name = :NAME;");
484  query.bindValue(":NAME", callsign);
485 
486  if (query.exec() && query.next())
487  {
488  // got match
489  m_localChanID_text->SetText(query.value(0).toString());
490  m_localChanNo_text->SetText(query.value(1).toString());
491  m_localChanName_text->SetText(query.value(2).toString());
492  m_localCallsign_text->SetText(query.value(3).toString());
493  return;
494  }
495 
496  // give up
501 }
502 
503 void ImportNative::showList(const QString &caption, QString &value,
504  const char *slot)
505 {
506  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
507 
508  MythUISearchDialog *searchDialog = new
509  MythUISearchDialog(popupStack, caption, m_searchList, true, value);
510 
511  if (!searchDialog->Create())
512  {
513  delete searchDialog;
514  searchDialog = nullptr;
515  return;
516  }
517 
518  connect(searchDialog, SIGNAL(haveResult(QString)), this, slot);
519 
520  popupStack->AddScreen(searchDialog);
521 }
522 
523 void ImportNative::fillSearchList(const QString &field)
524 {
525 
526  m_searchList.clear();
527 
528  QString querystr;
529  querystr = QString("SELECT %1 FROM channel ORDER BY %2").arg(field).arg(field);
530 
531  MSqlQuery query(MSqlQuery::InitCon());
532 
533  if (query.exec(querystr))
534  {
535  while (query.next())
536  {
537  m_searchList << query.value(0).toString();
538  }
539  }
540 }
541 
543 {
544  QString s;
545 
546  fillSearchList("chanid");
547 
548  s = m_chanID_text->GetText();
549  showList(tr("Select a channel id"), s, SLOT(gotChanID(QString)));
550 }
551 
552 void ImportNative::gotChanID(const QString& value)
553 {
554  MSqlQuery query(MSqlQuery::InitCon());
555  query.prepare("SELECT chanid, channum, name, callsign "
556  "FROM channel WHERE chanid = :CHANID;");
557  query.bindValue(":CHANID", value);
558 
559  if (query.exec() && query.next())
560  {
561  m_localChanID_text->SetText(query.value(0).toString());
562  m_localChanNo_text->SetText(query.value(1).toString());
563  m_localChanName_text->SetText(query.value(2).toString());
564  m_localCallsign_text->SetText(query.value(3).toString());
565  }
566 }
567 
569 {
570  QString s;
571 
572  fillSearchList("channum");
573 
574  s = m_chanNo_text->GetText();
575  showList(tr("Select a channel number"), s, SLOT(gotChanNo(QString)));
576 }
577 
578 void ImportNative::gotChanNo(const QString& value)
579 {
580  MSqlQuery query(MSqlQuery::InitCon());
581  query.prepare("SELECT chanid, channum, name, callsign "
582  "FROM channel WHERE channum = :CHANNUM;");
583  query.bindValue(":CHANNUM", value);
584 
585  if (query.exec() && query.next())
586  {
587  m_localChanID_text->SetText(query.value(0).toString());
588  m_localChanNo_text->SetText(query.value(1).toString());
589  m_localChanName_text->SetText(query.value(2).toString());
590  m_localCallsign_text->SetText(query.value(3).toString());
591  }
592 }
593 
595 {
596  QString s;
597 
598  fillSearchList("name");
599 
600  s = m_chanName_text->GetText();
601  showList(tr("Select a channel name"), s, SLOT(gotName(QString)));
602 }
603 
604 void ImportNative::gotName(const QString& value)
605 {
606  MSqlQuery query(MSqlQuery::InitCon());
607  query.prepare("SELECT chanid, channum, name, callsign "
608  "FROM channel WHERE name = :NAME;");
609  query.bindValue(":NAME", value);
610 
611  if (query.exec() && query.next())
612  {
613  m_localChanID_text->SetText(query.value(0).toString());
614  m_localChanNo_text->SetText(query.value(1).toString());
615  m_localChanName_text->SetText(query.value(2).toString());
616  m_localCallsign_text->SetText(query.value(3).toString());
617  }
618 }
619 
621 {
622  QString s;
623 
624  fillSearchList("callsign");
625 
626  s = m_callsign_text->GetText();
627  showList(tr("Select a Callsign"), s, SLOT(gotCallsign(QString)));
628 }
629 
630 void ImportNative::gotCallsign(const QString& value)
631 {
632  MSqlQuery query(MSqlQuery::InitCon());
633  query.prepare("SELECT chanid, channum, name, callsign "
634  "FROM channel WHERE callsign = :CALLSIGN;");
635  query.bindValue(":CALLSIGN", value);
636 
637  if (query.exec() && query.next())
638  {
639  m_localChanID_text->SetText(query.value(0).toString());
640  m_localChanNo_text->SetText(query.value(1).toString());
641  m_localChanName_text->SetText(query.value(2).toString());
642  m_localCallsign_text->SetText(query.value(3).toString());
643  }
644 }
MythUIText * m_progStartTime
Definition: importnative.h:70
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
Definition: mythdbcon.cpp:782
ArchiveFileSelector(MythScreenStack *parent)
void finishedPressed()
avoid disabling UI drawing
Definition: mythsystem.h:35
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
Definition: mythdbcon.cpp:863
MythUIButton * m_cancelButton
Definition: importnative.h:135
void showList(const QString &caption, QString &value, const char *slot)
bool Create(void) override
MythUIText * m_localChanName_text
Definition: importnative.h:125
QString m_xmlFile
Definition: importnative.h:108
FileDetails m_details
Definition: importnative.h:63
#define GENERIC_EXIT_OK
Exited with no error.
Definition: exitcodes.h:10
bool TranslateKeyPress(const QString &context, QKeyEvent *e, QStringList &actions, bool allowJumps=true)
Get a list of actions for a keypress in the given context.
void LosingFocus()
QDateTime startTime
Definition: importnative.h:32
MythConfirmationDialog * ShowOkPopup(const QString &message, QObject *parent, const char *slot, bool showCancel)
Non-blocking version of MythPopupBox::showOkPopup()
MythUIText * m_titleText
Definition: fileselector.h:85
MythUIText * m_chanName_text
Definition: importnative.h:120
MythUIText * m_progDateTime_text
Definition: importnative.h:115
FileDetails m_details
Definition: importnative.h:109
MythUIText * m_localChanID_text
Definition: importnative.h:123
MythUIButton * m_nextButton
Definition: importnative.h:66
MythUIText * m_localCallsign_text
Definition: importnative.h:126
void SaveSetting(const QString &key, int newValue)
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:125
run child in the background
Definition: mythsystem.h:36
MythUIButton * m_searchCallsign_button
Definition: importnative.h:131
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:136
void cancelPressed(void)
MythScreenType * m_previousScreen
Definition: importnative.h:110
void gotCallsign(const QString &value)
MythUIText * m_progTitle
Definition: importnative.h:68
MythScreenStack * GetStack(const QString &stackname)
void backPressed(void)
unsigned int uint
Definition: compat.h:140
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
MythScreenStack * GetMainStack()
void updateFileList(void)
QString m_curDirectory
Definition: fileselector.h:78
MythUIButton * m_prevButton
Definition: importnative.h:67
QString description
Definition: importnative.h:33
bool Create(void) override
void BuildFocusList(void)
MythUIButton * m_homeButton
Definition: fileselector.h:91
void searchCallsign(void)
bool keyPressEvent(QKeyEvent *e) override
Key event handler.
void findChannelMatch(const QString &chanid, const QString &chanNo, const QString &name, const QString &callsign)
QString GetText(void) const
Definition: mythuitext.h:43
MythUIText * m_callsign_text
Definition: importnative.h:121
QVariant value(int i) const
Definition: mythdbcon.h:198
virtual void Close()
void gotChanNo(const QString &value)
MythUIText * m_progTitle_text
Definition: importnative.h:114
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
MythUIText * m_chanNo_text
Definition: importnative.h:119
void updateSelectedList(void)
MythUIButton * m_cancelButton
Definition: fileselector.h:89
MythUIButton * m_searchChanID_button
Definition: importnative.h:128
MythUIButtonList * m_fileButtonList
Definition: fileselector.h:86
QString GetSetting(const QString &key, const QString &defaultval="")
void gotChanID(const QString &value)
void Reset(void) override
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuitext.cpp:84
void searchChanNo(void)
#define GENERIC_EXIT_RUNNING
Process is running.
Definition: exitcodes.h:25
MythUIText * m_progDescription_text
Definition: importnative.h:116
void gotName(const QString &value)
void cancelPressed()
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)
Definition: mythuiutils.h:27
static MSqlQueryInfo InitCon(ConnectionReuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Definition: mythdbcon.cpp:535
void fillSearchList(const QString &field)
void homePressed(void)
const char * name
Definition: ParseText.cpp:328
uint myth_system(const QString &command, uint flags, uint timeout)
void searchChanID(void)
MythUIButton * m_finishButton
Definition: importnative.h:133
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
QString title
Definition: importnative.h:30
void SetText(const QString &text, bool moveCursor=true)
MythUIText * m_progSubtitle
Definition: importnative.h:69
MythUIType * GetFocusWidget(void) const
MythUIButton * m_searchChanNo_button
Definition: importnative.h:129
MythMainWindow * GetMythMainWindow(void)
QString filename
Definition: fileselector.h:21
MythUIButton * m_prevButton
Definition: importnative.h:134
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
Definition: mythdbcon.cpp:807
bool keyPressEvent(QKeyEvent *) override
Key event handler.
#define LOG(_MASK_, _LEVEL_, _STRING_)
Definition: mythlogging.h:41
string dbVersion
Definition: mythburn.py:143
QString callsign
Definition: importnative.h:37
bool Create(void) override
MythUIButton * m_backButton
Definition: fileselector.h:90
QString subtitle
Definition: importnative.h:31
void showLogViewer(void)
Definition: logviewer.cpp:24
QString chanName
Definition: importnative.h:36
void searchName(void)
MythUIButton * m_searchChanName_button
Definition: importnative.h:130
QString chanID
Definition: importnative.h:34
bool SetFocusWidget(MythUIType *widget=nullptr)
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
Definition: mythdbcon.cpp:603
void itemClicked(MythUIButtonListItem *item)
void prevPressed()
MythUIText * m_localChanNo_text
Definition: importnative.h:124
QDateTime fromString(const QString &dtstr)
Converts kFilename && kISODate formats to QDateTime.
Definition: mythdate.cpp:30
void itemSelected(MythUIButtonListItem *item)
QString chanNo
Definition: importnative.h:35
MythUIText * m_chanID_text
Definition: importnative.h:118
void locationEditLostFocus(void)
Provide a dialog to quickly find an entry in a list.
static bool loadDetailsFromXML(const QString &filename, FileDetails *details)
QStringList m_searchList
Definition: importnative.h:112
avoid blocking LIRC & Joystick Menu
Definition: mythsystem.h:34
MythUITextEdit * m_locationEdit
Definition: fileselector.h:87