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;
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 }
277 
279 {
280  Close();
281 }
282 
284 {
285  Close();
286 }
287 
289 
291 {
292  // Load the theme for this screen
293  bool foundtheme = LoadWindowFromXML("mythnative-ui.xml", "importnative", this);
294  if (!foundtheme)
295  return false;
296 
297  bool err = false;
298  UIUtilE::Assign(this, m_progTitleText, "progtitle", &err);
299  UIUtilE::Assign(this, m_progDateTimeText, "progdatetime", &err);
300  UIUtilE::Assign(this, m_progDescriptionText, "progdescription", &err);
301 
302  UIUtilE::Assign(this, m_chanIDText, "chanid", &err);
303  UIUtilE::Assign(this, m_chanNoText, "channo", &err);
304  UIUtilE::Assign(this, m_chanNameText, "name", &err);
305  UIUtilE::Assign(this, m_callsignText, "callsign", &err);
306 
307  UIUtilE::Assign(this, m_localChanIDText, "local_chanid", &err);
308  UIUtilE::Assign(this, m_localChanNoText, "local_channo", &err);
309  UIUtilE::Assign(this, m_localChanNameText, "local_name", &err);
310  UIUtilE::Assign(this, m_localCallsignText, "local_callsign", &err);
311 
312  UIUtilE::Assign(this, m_searchChanIDButton, "searchchanid_button", &err);
313  UIUtilE::Assign(this, m_searchChanNoButton, "searchchanno_button", &err);
314  UIUtilE::Assign(this, m_searchChanNameButton, "searchname_button", &err);
315  UIUtilE::Assign(this, m_searchCallsignButton ,"searchcallsign_button", &err);
316 
317  UIUtilE::Assign(this, m_finishButton, "finish_button", &err);
318  UIUtilE::Assign(this, m_prevButton, "prev_button", &err);
319  UIUtilE::Assign(this, m_cancelButton, "cancel_button", &err);
320 
321  if (err)
322  {
323  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'importarchive'");
324  return false;
325  }
326 
330 
335 
337 
339  .toString("dd MMM yy (hh:mm)"));
341  (m_details.subtitle == "" ? m_details.subtitle + "\n" : "") + m_details.description);
342 
347 
350 
351  BuildFocusList();
352 
354 
355  return true;
356 }
357 
358 bool ImportNative::keyPressEvent(QKeyEvent *event)
359 {
360  if (GetFocusWidget()->keyPressEvent(event))
361  return true;
362 
363  QStringList actions;
364  bool handled = GetMythMainWindow()->TranslateKeyPress("Global", event, actions);
365 
366  for (int i = 0; i < actions.size() && !handled; i++)
367  {
368  QString action = actions[i];
369  handled = true;
370 
371  if (action == "MENU")
372  {
373  }
374  else
375  handled = false;
376  }
377 
378  if (!handled && MythScreenType::keyPressEvent(event))
379  handled = true;
380 
381  return handled;
382 }
383 
385 
386 {
387  if (m_details.chanID != "N/A" && m_localChanIDText->GetText() == "")
388  {
389  ShowOkPopup(tr("You need to select a valid channel id!"));
390  return;
391  }
392 
393  QString commandline;
394  QString tempDir = gCoreContext->GetSetting("MythArchiveTempDir", "");
395  QString chanID = m_localChanIDText->GetText();
396 
397  if (chanID == "")
398  chanID = m_details.chanID;
399 
400  if (tempDir == "")
401  return;
402 
403  if (!tempDir.endsWith("/"))
404  tempDir += "/";
405 
406  QString logDir = tempDir + "logs";
407 
408  // remove any existing logs
409  myth_system("rm -f " + logDir + "/*.log");
410 
411  commandline = "mytharchivehelper --logpath " + logDir + " --importarchive "
412  "--infile \"" + m_xmlFile +
413  "\" --chanid " + chanID;
414 
417  uint retval = myth_system(commandline, flags);
418  if (retval != GENERIC_EXIT_RUNNING && retval != GENERIC_EXIT_OK)
419  {
420  ShowOkPopup(tr("It was not possible to import the Archive. "
421  " An error occured when running 'mytharchivehelper'") );
422  return;
423  }
424 
425  showLogViewer();
426 
428  Close();
429 }
430 
432 {
433  Close();
434 }
435 
437 {
439  Close();
440 }
441 
442 void ImportNative::findChannelMatch(const QString &chanID, const QString &chanNo,
443  const QString &name, const QString &callsign)
444 {
445  // find best match in channel table for this recording
446 
447  // look for an exact match - maybe the user is importing back an old recording
449  query.prepare("SELECT chanid, channum, name, callsign FROM channel "
450  "WHERE chanid = :CHANID AND channum = :CHANNUM AND name = :NAME "
451  "AND callsign = :CALLSIGN;");
452  query.bindValue(":CHANID", chanID);
453  query.bindValue(":CHANNUM", chanNo);
454  query.bindValue(":NAME", name);
455  query.bindValue(":CALLSIGN", callsign);
456 
457  if (query.exec() && query.next())
458  {
459  // got match
460  m_localChanIDText->SetText(query.value(0).toString());
461  m_localChanNoText->SetText(query.value(1).toString());
462  m_localChanNameText->SetText(query.value(2).toString());
463  m_localCallsignText->SetText(query.value(3).toString());
464  return;
465  }
466 
467  // try to find callsign
468  query.prepare("SELECT chanid, channum, name, callsign FROM channel "
469  "WHERE callsign = :CALLSIGN;");
470  query.bindValue(":CALLSIGN", callsign);
471 
472  if (query.exec() && query.next())
473  {
474  // got match
475  m_localChanIDText->SetText(query.value(0).toString());
476  m_localChanNoText->SetText(query.value(1).toString());
477  m_localChanNameText->SetText(query.value(2).toString());
478  m_localCallsignText->SetText(query.value(3).toString());
479  return;
480  }
481 
482  // try to find name
483  query.prepare("SELECT chanid, channum, name, callsign FROM channel "
484  "WHERE name = :NAME;");
485  query.bindValue(":NAME", callsign);
486 
487  if (query.exec() && query.next())
488  {
489  // got match
490  m_localChanIDText->SetText(query.value(0).toString());
491  m_localChanNoText->SetText(query.value(1).toString());
492  m_localChanNameText->SetText(query.value(2).toString());
493  m_localCallsignText->SetText(query.value(3).toString());
494  return;
495  }
496 
497  // give up
502 }
503 
504 void ImportNative::showList(const QString &caption, QString &value,
505  const INSlot slot)
506 {
507  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
508 
509  auto *searchDialog = new
510  MythUISearchDialog(popupStack, caption, m_searchList, true, value);
511 
512  if (!searchDialog->Create())
513  {
514  delete searchDialog;
515  searchDialog = nullptr;
516  return;
517  }
518 
519  connect(searchDialog, &MythUISearchDialog::haveResult, this, slot);
520 
521  popupStack->AddScreen(searchDialog);
522 }
523 
524 void ImportNative::fillSearchList(const QString &field)
525 {
526 
527  m_searchList.clear();
528 
529  QString querystr;
530  querystr = QString("SELECT %1 FROM channel ORDER BY %2").arg(field).arg(field);
531 
533 
534  if (query.exec(querystr))
535  {
536  while (query.next())
537  {
538  m_searchList << query.value(0).toString();
539  }
540  }
541 }
542 
544 {
545  QString s;
546 
547  fillSearchList("chanid");
548 
549  s = m_chanIDText->GetText();
550  showList(tr("Select a channel id"), s, &ImportNative::gotChanID);
551 }
552 
553 void ImportNative::gotChanID(const QString& value)
554 {
556  query.prepare("SELECT chanid, channum, name, callsign "
557  "FROM channel WHERE chanid = :CHANID;");
558  query.bindValue(":CHANID", value);
559 
560  if (query.exec() && query.next())
561  {
562  m_localChanIDText->SetText(query.value(0).toString());
563  m_localChanNoText->SetText(query.value(1).toString());
564  m_localChanNameText->SetText(query.value(2).toString());
565  m_localCallsignText->SetText(query.value(3).toString());
566  }
567 }
568 
570 {
571  QString s;
572 
573  fillSearchList("channum");
574 
575  s = m_chanNoText->GetText();
576  showList(tr("Select a channel number"), s, &ImportNative::gotChanNo);
577 }
578 
579 void ImportNative::gotChanNo(const QString& value)
580 {
582  query.prepare("SELECT chanid, channum, name, callsign "
583  "FROM channel WHERE channum = :CHANNUM;");
584  query.bindValue(":CHANNUM", value);
585 
586  if (query.exec() && query.next())
587  {
588  m_localChanIDText->SetText(query.value(0).toString());
589  m_localChanNoText->SetText(query.value(1).toString());
590  m_localChanNameText->SetText(query.value(2).toString());
591  m_localCallsignText->SetText(query.value(3).toString());
592  }
593 }
594 
596 {
597  QString s;
598 
599  fillSearchList("name");
600 
601  s = m_chanNameText->GetText();
602  showList(tr("Select a channel name"), s, &ImportNative::gotName);
603 }
604 
605 void ImportNative::gotName(const QString& value)
606 {
608  query.prepare("SELECT chanid, channum, name, callsign "
609  "FROM channel WHERE name = :NAME;");
610  query.bindValue(":NAME", value);
611 
612  if (query.exec() && query.next())
613  {
614  m_localChanIDText->SetText(query.value(0).toString());
615  m_localChanNoText->SetText(query.value(1).toString());
616  m_localChanNameText->SetText(query.value(2).toString());
617  m_localCallsignText->SetText(query.value(3).toString());
618  }
619 }
620 
622 {
623  QString s;
624 
625  fillSearchList("callsign");
626 
627  s = m_callsignText->GetText();
628  showList(tr("Select a Callsign"), s, &ImportNative::gotCallsign);
629 }
630 
631 void ImportNative::gotCallsign(const QString& value)
632 {
634  query.prepare("SELECT chanid, channum, name, callsign "
635  "FROM channel WHERE callsign = :CALLSIGN;");
636  query.bindValue(":CALLSIGN", value);
637 
638  if (query.exec() && query.next())
639  {
640  m_localChanIDText->SetText(query.value(0).toString());
641  m_localChanNoText->SetText(query.value(1).toString());
642  m_localChanNameText->SetText(query.value(2).toString());
643  m_localCallsignText->SetText(query.value(3).toString());
644  }
645 }
MythUIButton::Clicked
void Clicked()
FSTYPE_FILE
@ FSTYPE_FILE
Definition: fileselector.h:29
MSqlQuery::next
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
Definition: mythdbcon.cpp:783
MSqlQuery
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:126
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:324
FileDetails::chanNo
QString chanNo
Definition: importnative.h:36
e
QDomElement e
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:1420
MythUISearchDialog
Provide a dialog to quickly find an entry in a list.
Definition: mythdialogbox.h:398
ImportNative::gotChanNo
void gotChanNo(const QString &value)
Definition: importnative.cpp:579
FileSelector::backPressed
void backPressed(void)
Definition: fileselector.cpp:188
myth_system
uint myth_system(const QString &command, uint flags, uint timeout)
Definition: mythsystemlegacy.cpp:501
GENERIC_EXIT_OK
#define GENERIC_EXIT_OK
Exited with no error.
Definition: exitcodes.h:10
ImportNative::m_previousScreen
MythScreenType * m_previousScreen
Definition: importnative.h:112
mythuitext.h
ArchiveFileSelector::nextPressed
void nextPressed(void)
Definition: importnative.cpp:261
nodeList
nodeList
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:1271
FileData
Definition: fileselector.h:19
ImportNative::searchChanID
void searchChanID(void)
Definition: importnative.cpp:543
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:84
kMSDontBlockInputDevs
@ kMSDontBlockInputDevs
avoid blocking LIRC & Joystick Menu
Definition: mythsystem.h:34
FileSelector::itemClicked
void itemClicked(MythUIButtonListItem *item)
Definition: fileselector.cpp:125
ImportNative::Create
bool Create(void) override
Definition: importnative.cpp:290
ImportNative::m_progDescriptionText
MythUIText * m_progDescriptionText
Definition: importnative.h:118
FileDetails::subtitle
QString subtitle
Definition: importnative.h:32
doc
QDomDocument doc("MYTHARCHIVEITEM")
MythScreenType::Close
virtual void Close()
Definition: mythscreentype.cpp:402
FileSelector::updateFileList
void updateFileList(void)
Definition: fileselector.cpp:361
FileSelector::homePressed
void homePressed(void)
Definition: fileselector.cpp:200
MythMainWindow::TranslateKeyPress
bool TranslateKeyPress(const QString &context, QKeyEvent *e, QStringList &actions, bool allowJumps=true)
Get a list of actions for a keypress in the given context.
Definition: mythmainwindow.cpp:1142
ImportNative::searchCallsign
void searchCallsign(void)
Definition: importnative.cpp:621
ImportNative::showList
void showList(const QString &caption, QString &value, INSlot slot)
Definition: importnative.cpp:504
MythUISearchDialog::haveResult
void haveResult(QString)
MythUIButtonList::itemSelected
void itemSelected(MythUIButtonListItem *item)
mythdialogbox.h
MSqlQuery::value
QVariant value(int i) const
Definition: mythdbcon.h:198
MythScreenStack
Definition: mythscreenstack.h:16
mythdbcon.h
ImportNative::keyPressEvent
bool keyPressEvent(QKeyEvent *e) override
Key event handler.
Definition: importnative.cpp:358
MSqlQuery::exec
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
Definition: mythdbcon.cpp:603
logviewer.h
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
ImportNative::finishedPressed
void finishedPressed()
Definition: importnative.cpp:384
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:442
ImportNative::searchChanNo
void searchChanNo(void)
Definition: importnative.cpp:569
MythMainWindow::GetStack
MythScreenStack * GetStack(const QString &stackname)
Definition: mythmainwindow.cpp:329
mythuibuttonlist.h
ImportNative::prevPressed
void prevPressed()
Definition: importnative.cpp:431
ImportNative::gotChanID
void gotChanID(const QString &value)
Definition: importnative.cpp:553
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:112
mythsystemlegacy.h
MythUIButtonListItem
Definition: mythuibuttonlist.h:28
MythUITextEdit::SetText
void SetText(const QString &text, bool moveCursor=true)
Definition: mythuitextedit.cpp:216
ArchiveFileSelector::prevPressed
void prevPressed(void)
Definition: importnative.cpp:278
mythdate.h
FileSelector
Definition: fileselector.h:40
ImportNative::m_localChanNoText
MythUIText * m_localChanNoText
Definition: importnative.h:126
MythUIButtonList::itemClicked
void itemClicked(MythUIButtonListItem *item)
ImportNative::m_finishButton
MythUIButton * m_finishButton
Definition: importnative.h:135
archiveutil.h
MythScreenType::SetFocusWidget
bool SetFocusWidget(MythUIType *widget=nullptr)
Definition: mythscreentype.cpp:117
MSqlQuery::InitCon
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Definition: mythdbcon.cpp:535
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:222
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:631
showLogViewer
void showLogViewer(void)
Definition: logviewer.cpp:27
filename
QString filename
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:637
ImportNative::m_localChanNameText
MythUIText * m_localChanNameText
Definition: importnative.h:127
FileSelector::locationEditLostFocus
void locationEditLostFocus(void)
Definition: fileselector.cpp:182
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:3580
uint
unsigned int uint
Definition: compat.h:141
ImportNative::searchName
void searchName(void)
Definition: importnative.cpp:595
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:60
FileSelector::updateSelectedList
void updateSelectedList(void)
Definition: fileselector.cpp:339
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
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:30
kMSRunBackground
@ kMSRunBackground
run child in the background
Definition: mythsystem.h:36
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:414
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:283
mythuitextedit.h
XMLParseBase::LoadWindowFromXML
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
Definition: xmlparsebase.cpp:692
FileDetails
Definition: importnative.h:30
ImportNative::gotName
void gotName(const QString &value)
Definition: importnative.cpp:605
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:864
ImportNative::m_prevButton
MythUIButton * m_prevButton
Definition: importnative.h:136
MythUIText::SetText
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:134
ImportNative::cancelPressed
void cancelPressed()
Definition: importnative.cpp:436
mythcontext.h
ArchiveFileSelector::m_prevButton
MythUIButton * m_prevButton
Definition: importnative.h:68
GetMythMainWindow
MythMainWindow * GetMythMainWindow(void)
Definition: mythmainwindow.cpp:108
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
ImportNative::fillSearchList
void fillSearchList(const QString &field)
Definition: importnative.cpp:524
FileSelector::m_homeButton
MythUIButton * m_homeButton
Definition: fileselector.h:92
ImportNative::m_progDateTimeText
MythUIText * m_progDateTimeText
Definition: importnative.h:117
GENERIC_EXIT_RUNNING
#define GENERIC_EXIT_RUNNING
Process is running.
Definition: exitcodes.h:25
kMSDontDisableDrawing
@ kMSDontDisableDrawing
avoid disabling UI drawing
Definition: mythsystem.h:35
MythCoreContext::SaveSetting
void SaveSetting(const QString &key, int newValue)
Definition: mythcorecontext.cpp:902
MythUIText::GetText
QString GetText(void) const
Definition: mythuitext.h:43
MythUIType::LosingFocus
void LosingFocus()
exitcodes.h
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
query
MSqlQuery query(MSqlQuery::InitCon())
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:557
ImportNative::m_searchChanNoButton
MythUIButton * m_searchChanNoButton
Definition: importnative.h:131
ImportNative
Definition: importnative.h:75
FileSelector::m_cancelButton
MythUIButton * m_cancelButton
Definition: fileselector.h:90
MythCoreContext::GetSetting
QString GetSetting(const QString &key, const QString &defaultval="")
Definition: mythcorecontext.cpp:919
MSqlQuery::prepare
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
Definition: mythdbcon.cpp:808
FileDetails::chanID
QString chanID
Definition: importnative.h:35
ImportNative::m_chanIDText
MythUIText * m_chanIDText
Definition: importnative.h:120