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