MythTV  master
bookmarkmanager.cpp
Go to the documentation of this file.
1 // C++
2 #include <iostream>
3 
4 // Qt
5 #include <QString>
6 
7 // MythTV
8 #include <libmyth/mythcontext.h>
10 #include <libmythbase/mythdirs.h>
15 
16 // mythbrowser
17 #include "bookmarkmanager.h"
18 #include "bookmarkeditor.h"
19 #include "browserdbutil.h"
20 #include "mythbrowser.h"
21 #include "mythflashplayer.h"
22 
23 // ---------------------------------------------------
24 
26 {
27  // Load the theme for this screen
28  bool foundtheme = LoadWindowFromXML("browser-ui.xml", "browserconfig", this);
29  if (!foundtheme)
30  return false;
31 
32  m_titleText = dynamic_cast<MythUIText *> (GetChild("title"));
33 
34  if (m_titleText)
35  m_titleText->SetText(tr("MythBrowser Settings"));
36 
37  m_commandEdit = dynamic_cast<MythUITextEdit *> (GetChild("command"));
38  m_zoomEdit = dynamic_cast<MythUITextEdit *> (GetChild("zoom"));
39  m_enablePluginsCheck = dynamic_cast<MythUICheckBox *> (GetChild("enablepluginscheck"));
40 
41  m_descriptionText = dynamic_cast<MythUIText *> (GetChild("description"));
42 
43  m_okButton = dynamic_cast<MythUIButton *> (GetChild("ok"));
44  m_cancelButton = dynamic_cast<MythUIButton *> (GetChild("cancel"));
45 
47  {
48  LOG(VB_GENERAL, LOG_ERR, "Theme is missing critical theme elements.");
49  return false;
50  }
51 
52  m_commandEdit->SetText(gCoreContext->GetSetting("WebBrowserCommand",
53  "Internal"));
54 
55  m_zoomEdit->SetText(gCoreContext->GetSetting("WebBrowserZoomLevel", "1.0"));
56 
57  int setting = gCoreContext->GetNumSetting("WebBrowserEnablePlugins", 1);
58  if (setting == 1)
60 
63 
69 
71 
73 
74  return true;
75 }
76 
78 {
79  float zoom = m_zoomEdit->GetText().toFloat();
80  if (zoom > 5.0F)
81  zoom = 5.0F;
82  if (zoom < 0.3F)
83  zoom = 0.3F;
84  gCoreContext->SaveSetting("WebBrowserZoomLevel", QString("%1").arg(zoom));
85  gCoreContext->SaveSetting("WebBrowserCommand", m_commandEdit->GetText());
86  int checkstate = 0;
88  checkstate = 1;
89  gCoreContext->SaveSetting("WebBrowserEnablePlugins", checkstate);
90 
91  Close();
92 }
93 
94 bool BrowserConfig::keyPressEvent(QKeyEvent *event)
95 {
96  if (GetFocusWidget()->keyPressEvent(event))
97  return true;
98 
99  return MythScreenType::keyPressEvent(event);
100 }
101 
103 {
104  if (!m_descriptionText)
105  return;
106 
107  QString msg = "";
108  if (GetFocusWidget() == m_commandEdit)
109  {
110  msg = tr("This is the command that will be used to show the web browser. "
111  "Use 'Internal' to use the built in web browser'. "
112  "%ZOOM% and %URL% will be replaced with the zoom level and URL list.");
113  }
114  else if (GetFocusWidget() == m_zoomEdit)
115  {
116  msg = tr("This is the default text size that will be used. Valid values "
117  "for the Internal browser are from 0.3 to 5.0 with 1.0 being "
118  "normal size less than 1 is smaller and greater than 1 is "
119  "larger than normal size.");
120  }
121  else if (GetFocusWidget() == m_enablePluginsCheck)
122  {
123  msg = tr("If checked this will enable browser plugins if the 'Internal' "
124  "browser is being used.");
125  }
126  else if (GetFocusWidget() == m_cancelButton)
127  {
128  msg = tr("Exit without saving settings");
129  }
130  else if (GetFocusWidget() == m_okButton)
131  {
132  msg = tr("Save settings and Exit");
133  }
134 
136 }
137 
138 // ---------------------------------------------------
139 
141 {
142  // Load the theme for this screen
143  bool foundtheme = LoadWindowFromXML("browser-ui.xml", "bookmarkmanager", this);
144  if (!foundtheme)
145  return false;
146 
147  m_groupList = dynamic_cast<MythUIButtonList *>(GetChild("grouplist"));
148  m_bookmarkList = dynamic_cast<MythUIButtonList *>(GetChild("bookmarklist"));
149 
150  // optional text area warning user hasn't set any bookmarks yet
151  m_messageText = dynamic_cast<MythUIText *>(GetChild("messagetext"));
152  if (m_messageText)
153  m_messageText->SetText(tr("No bookmarks defined.\n\n"
154  "Use the 'Add Bookmark' menu option to add new bookmarks"));
155 
156  if (!m_groupList || !m_bookmarkList)
157  {
158  LOG(VB_GENERAL, LOG_ERR, "Theme is missing critical theme elements.");
159  return false;
160  }
161 
163  UpdateGroupList();
164  UpdateURLList();
165 
168 
171 
172  BuildFocusList();
173 
175 
176  return true;
177 }
178 
180 {
181  while (!m_siteList.isEmpty())
182  delete m_siteList.takeFirst();
183 }
184 
186 {
187  m_groupList->Reset();
188  QStringList groups;
189  for (int x = 0; x < m_siteList.count(); x++)
190  {
191  Bookmark *site = m_siteList.at(x);
192 
193  if (groups.indexOf(site->m_category) == -1)
194  {
195  groups.append(site->m_category);
197  }
198  }
199 }
200 
202 {
204 
205  if (m_messageText)
206  m_messageText->SetVisible((m_siteList.count() == 0));
207 
209  if (!item)
210  return;
211 
212  QString group = item->GetText();
213 
214  for (int x = 0; x < m_siteList.count(); x++)
215  {
216  Bookmark *site = m_siteList.at(x);
217 
218  if (group == site->m_category)
219  {
220  auto *item2 = new MythUIButtonListItem(m_bookmarkList,
221  "", "", true, MythUIButtonListItem::NotChecked);
222  item2->SetText(site->m_name, "name");
223  item2->SetText(site->m_url, "url");
224  if (site->m_isHomepage)
225  item2->DisplayState("yes", "homepage");
226  item2->SetData(QVariant::fromValue(site));
227  item2->setChecked(site->m_selected ?
229  }
230  }
231 }
232 
234 {
235  auto selected = [](auto *site){ return site && site->m_selected; };
236  return std::count_if(m_siteList.cbegin(), m_siteList.cend(), selected);
237 }
238 
239 bool BookmarkManager::keyPressEvent(QKeyEvent *event)
240 {
241  if (GetFocusWidget()->keyPressEvent(event))
242  return true;
243 
244  QStringList actions;
245  bool handled = GetMythMainWindow()->TranslateKeyPress("qt", event, actions);
246 
247  for (int i = 0; i < actions.size() && !handled; i++)
248  {
249 
250  QString action = actions[i];
251  handled = true;
252 
253  if (action == "MENU")
254  {
255  QString label = tr("Actions");
256 
257  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
258 
259  m_menuPopup = new MythDialogBox(label, popupStack, "actionmenu");
260 
261  if (!m_menuPopup->Create())
262  {
263  delete m_menuPopup;
264  m_menuPopup = nullptr;
265  return true;
266  }
267 
268  m_menuPopup->SetReturnEvent(this, "action");
269 
272 
274  {
276  m_menuPopup->AddButton(tr("Delete Bookmark"), &BookmarkManager::slotDeleteCurrent);
278  }
279 
280  if (GetMarkedCount() > 0)
281  {
285  }
286 
288 
289  popupStack->AddScreen(m_menuPopup);
290  }
291  else if (action == "INFO")
292  {
294 
295  if (item)
296  {
297  auto *site = item->GetData().value<Bookmark*>();
298 
300  {
302  if (site)
303  site->m_selected = true;
304  }
305  else
306  {
308  if (site)
309  site->m_selected = false;
310  }
311  }
312  }
313  else if (action == "DELETE")
315  else if (action == "EDIT")
317  else
318  handled = false;
319  }
320 
321  if (!handled && MythScreenType::keyPressEvent(event))
322  handled = true;
323 
324  return handled;
325 }
326 
328 {
329  UpdateURLList();
331 }
332 
334 {
335  if (!item)
336  return;
337 
338  auto *site = item->GetData().value<Bookmark*>();
339  if (!site)
340  return;
341 
342  m_savedBookmark = *site;
343 
344  QString cmd = gCoreContext->GetSetting("WebBrowserCommand", "Internal");
345  QString zoom = gCoreContext->GetSetting("WebBrowserZoomLevel", "1.0");
346  QStringList urls;
347 
348  urls.append(site->m_url);
349 
350  if (cmd.toLower() == "internal")
351  {
353 
354  MythScreenType *mythbrowser = nullptr;
355  if (urls[0].startsWith("mythflash://"))
356  mythbrowser = new MythFlashPlayer(mainStack, urls);
357  else
358  mythbrowser = new MythBrowser(mainStack, urls);
359 
360  if (mythbrowser->Create())
361  {
362  connect(mythbrowser, &MythScreenType::Exiting, this, &BookmarkManager::slotBrowserClosed);
363  mainStack->AddScreen(mythbrowser);
364  }
365  else
366  delete mythbrowser;
367  }
368  else
369  {
370  cmd.replace("%ZOOM%", zoom);
371  cmd.replace("%URL%", urls.join(" "));
372 
373  cmd.replace("&","\\&");
374  cmd.replace(";","\\;");
375 
376  GetMythMainWindow()->AllowInput(false);
378  GetMythMainWindow()->AllowInput(true);
379 
380  // we need to reload the bookmarks incase the user added/deleted
381  // any while in MythBrowser
382  ReloadBookmarks();
383  }
384 }
385 
387 {
388  if (edit)
389  {
391 
392  if (!item || !item->GetData().isValid())
393  {
394  LOG(VB_GENERAL, LOG_ERR, "BookmarkManager: Something is wrong. "
395  "Asked to edit a non existent bookmark!");
396  return;
397  }
398  auto *site = item->GetData().value<Bookmark*>();
399  if (!site)
400  {
401  LOG(VB_GENERAL, LOG_ERR, "BookmarkManager: Something is wrong. "
402  "Existing bookmark is invalid!");
403  return;
404  }
405 
406  m_savedBookmark = *site;
407  }
408 
409 
411 
412  auto *editor = new BookmarkEditor(&m_savedBookmark, edit, mainStack,
413  "bookmarkeditor");
414 
416 
417  if (editor->Create())
418  mainStack->AddScreen(editor);
419 }
420 
422 {
423  ReloadBookmarks();
424 }
425 
427 {
429  UpdateGroupList();
430 
432  UpdateURLList();
433 
434  // try to set the current item to name
435  for (int x = 0; x < m_bookmarkList->GetCount(); x++)
436  {
438  if (item && item->GetData().isValid())
439  {
440  auto *site = item->GetData().value<Bookmark*>();
441  if (site && (*site == m_savedBookmark))
442  {
444  break;
445  }
446  }
447  }
448 }
449 
451 {
453  auto *config = new BrowserConfig(mainStack, "browserconfig");
454 
455  if (config->Create())
456  mainStack->AddScreen(config);
457 }
458 
460 {
461  // Clear all homepage information
463 
464  // Set the homepage information for selected bookmark
466  if (item && item->GetData().isValid())
467  {
468  auto *site = item->GetData().value<Bookmark*>();
469  if (site)
470  UpdateHomepageInDB(site);
471  }
472  ReloadBookmarks();
473 }
474 
476 {
477  ShowEditDialog(false);
478 }
479 
481 {
482  ShowEditDialog(true);
483 }
484 
486 {
488  return;
489 
490  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
491 
492  QString message = tr("Are you sure you want to delete the selected bookmark?");
493 
494  auto *dialog = new MythConfirmationDialog(popupStack, message, true);
495 
496  if (dialog->Create())
497  popupStack->AddScreen(dialog);
498 
499  connect(dialog, &MythConfirmationDialog::haveResult,
501 }
502 
504 {
505  if (!doDelete)
506  return;
507 
509  if (item)
510  {
511  QString category = "";
512  auto *site = item->GetData().value<Bookmark*>();
513  if (site)
514  {
515  category = site->m_category;
516  RemoveFromDB(site);
517  }
518 
520  UpdateGroupList();
521 
522  if (category != "")
523  m_groupList->MoveToNamedPosition(category);
524 
525  UpdateURLList();
526  }
527 }
528 
530 {
531  if (GetMarkedCount() == 0)
532  return;
533 
534  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
535 
536  QString message = tr("Are you sure you want to delete the marked bookmarks?");
537 
538  auto *dialog = new MythConfirmationDialog(popupStack, message, true);
539 
540  if (dialog->Create())
541  popupStack->AddScreen(dialog);
542 
543  connect(dialog, &MythConfirmationDialog::haveResult,
545 }
546 
548 {
549  if (!doDelete)
550  return;
551 
552  QString category = m_groupList->GetValue();
553 
554  for (auto *site : qAsConst(m_siteList))
555  {
556  if (site && site->m_selected)
557  RemoveFromDB(site);
558  }
559 
561  UpdateGroupList();
562 
563  if (category != "")
564  m_groupList->MoveToNamedPosition(category);
565 
566  UpdateURLList();
567 }
568 
570 {
572  if (item)
573  slotBookmarkClicked(item);
574 }
575 
577 {
578  if (GetMarkedCount() == 0)
579  return;
580 
582  if (item && item->GetData().isValid())
583  {
584  auto *site = item->GetData().value<Bookmark*>();
585  if (site)
586  m_savedBookmark = *site;
587  }
588 
589  QString cmd = gCoreContext->GetSetting("WebBrowserCommand", "Internal");
590  QString zoom = gCoreContext->GetSetting("WebBrowserZoomLevel", "1.0");
591  QStringList urls;
592 
593  for (const auto *site : qAsConst(m_siteList))
594  {
595  if (site && site->m_selected)
596  urls.append(site->m_url);
597  }
598 
599  if (cmd.toLower() == "internal")
600  {
602 
603  auto *mythbrowser = new MythBrowser(mainStack, urls);
604 
605  if (mythbrowser->Create())
606  {
607  connect(mythbrowser, &MythScreenType::Exiting, this, &BookmarkManager::slotBrowserClosed);
608  mainStack->AddScreen(mythbrowser);
609  }
610  else
611  delete mythbrowser;
612  }
613  else
614  {
615  cmd.replace("%ZOOM%", zoom);
616  cmd.replace("%URL%", urls.join(" "));
617 
618  cmd.replace("&","\\&");
619  cmd.replace(";","\\;");
620 
621  GetMythMainWindow()->AllowInput(false);
623  GetMythMainWindow()->AllowInput(true);
624 
625  // we need to reload the bookmarks incase the user added/deleted
626  // any while in MythBrowser
627  ReloadBookmarks();
628  }
629 }
630 
632 {
633  // we need to reload the bookmarks incase the user added/deleted
634  // any while in MythBrowser
635  ReloadBookmarks();
636 }
637 
639 {
640  for (int x = 0; x < m_bookmarkList->GetCount(); x++)
641  {
643  if (item)
644  {
646 
647  auto *site = item->GetData().value<Bookmark*>();
648  if (site)
649  site->m_selected = false;
650  }
651  }
652 }
MythUIButton::Clicked
void Clicked()
BrowserConfig::m_zoomEdit
MythUITextEdit * m_zoomEdit
Definition: bookmarkmanager.h:46
MythUIButtonList::GetItemAt
MythUIButtonListItem * GetItemAt(int pos) const
Definition: mythuibuttonlist.cpp:1673
BookmarkManager::slotDoDeleteMarked
void slotDoDeleteMarked(bool doDelete)
Definition: bookmarkmanager.cpp:547
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:318
BookmarkManager::m_groupList
MythUIButtonList * m_groupList
Definition: bookmarkmanager.h:102
MythDialogBox::SetReturnEvent
void SetReturnEvent(QObject *retobject, const QString &resultid)
Definition: mythdialogbox.cpp:301
BrowserConfig::m_commandEdit
MythUITextEdit * m_commandEdit
Definition: bookmarkmanager.h:45
MythFlashPlayer
Definition: mythflashplayer.h:8
MythUIButtonList::GetItemCurrent
MythUIButtonListItem * GetItemCurrent() const
Definition: mythuibuttonlist.cpp:1587
BrowserConfig::m_titleText
MythUIText * m_titleText
Definition: bookmarkmanager.h:49
MythScreenType::Close
virtual void Close()
Definition: mythscreentype.cpp:386
BookmarkManager::m_savedBookmark
Bookmark m_savedBookmark
Definition: bookmarkmanager.h:99
MythUIType::GetChild
MythUIType * GetChild(const QString &name) const
Get a named child of this UIType.
Definition: mythuitype.cpp:133
BookmarkManager::slotDeleteCurrent
void slotDeleteCurrent(void)
Definition: bookmarkmanager.cpp:485
BookmarkManager::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: bookmarkmanager.cpp:239
MythUIButtonList::itemSelected
void itemSelected(MythUIButtonListItem *item)
bookmarkmanager.h
UpdateHomepageInDB
bool UpdateHomepageInDB(Bookmark *site)
Definition: browserdbutil.cpp:104
MythConfirmationDialog::haveResult
void haveResult(bool)
MythScreenStack
Definition: mythscreenstack.h:16
MythScreenType::Create
virtual bool Create(void)
Definition: mythscreentype.cpp:266
mythdbcon.h
BookmarkManager::slotEditDialogExited
void slotEditDialogExited(void)
Definition: bookmarkmanager.cpp:421
RemoveFromDB
bool RemoveFromDB(Bookmark *site)
Definition: browserdbutil.cpp:158
MythUIButtonListItem::FullChecked
@ FullChecked
Definition: mythuibuttonlist.h:48
MythUITextEdit
A text entry and edit widget.
Definition: mythuitextedit.h:34
BookmarkManager::m_messageText
MythUIText * m_messageText
Definition: bookmarkmanager.h:103
BrowserConfig::m_cancelButton
MythUIButton * m_cancelButton
Definition: bookmarkmanager.h:53
Bookmark::m_url
QString m_url
Definition: bookmarkmanager.h:19
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
MythUITextEdit::GetText
QString GetText(void) const
Definition: mythuitextedit.h:50
BookmarkManager::slotDoDeleteCurrent
void slotDoDeleteCurrent(bool doDelete)
Definition: bookmarkmanager.cpp:503
mythdirs.h
Bookmark::m_isHomepage
bool m_isHomepage
Definition: bookmarkmanager.h:20
BrowserConfig
Definition: bookmarkmanager.h:31
myth_system
uint myth_system(const QString &command, uint flags, std::chrono::seconds timeout)
Definition: mythsystemlegacy.cpp:506
BookmarkManager::slotDeleteMarked
void slotDeleteMarked(void)
Definition: bookmarkmanager.cpp:529
mythuibuttonlist.h
MythUIButtonList::GetCount
int GetCount() const
Definition: mythuibuttonlist.cpp:1652
BookmarkManager::slotClearMarked
void slotClearMarked(void)
Definition: bookmarkmanager.cpp:638
MythScreenType::GetFocusWidget
MythUIType * GetFocusWidget(void) const
Definition: mythscreentype.cpp:113
MythUIType::TakingFocus
void TakingFocus()
mythsystemlegacy.h
MythUIButtonListItem
Definition: mythuibuttonlist.h:41
MythUITextEdit::SetText
void SetText(const QString &text, bool moveCursor=true)
Definition: mythuitextedit.cpp:197
bookmarkeditor.h
BookmarkManager::slotSetHomepage
void slotSetHomepage(void)
Definition: bookmarkmanager.cpp:459
BookmarkManager::slotSettings
static void slotSettings(void)
Definition: bookmarkmanager.cpp:450
BookmarkEditor
Site category, name and URL edit screen.
Definition: bookmarkeditor.h:18
MythUIType::Refresh
void Refresh(void)
Definition: mythuitype.cpp:1054
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
BookmarkManager::m_siteList
QList< Bookmark * > m_siteList
Definition: bookmarkmanager.h:97
MythScreenType::SetFocusWidget
bool SetFocusWidget(MythUIType *widget=nullptr)
Definition: mythscreentype.cpp:118
MythDialogBox::AddButton
void AddButton(const QString &title)
Definition: mythdialogbox.h:198
MythDialogBox
Basic menu dialog, message and a list of options.
Definition: mythdialogbox.h:166
Bookmark::m_selected
bool m_selected
Definition: bookmarkmanager.h:21
MythDialogBox::Create
bool Create(void) override
Definition: mythdialogbox.cpp:127
BookmarkManager::slotAddBookmark
void slotAddBookmark(void)
Definition: bookmarkmanager.cpp:475
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:206
Bookmark::m_category
QString m_category
Definition: bookmarkmanager.h:16
MythUIButton
A single button widget.
Definition: mythuibutton.h:21
browserdbutil.h
BookmarkManager::slotBrowserClosed
void slotBrowserClosed(void)
Definition: bookmarkmanager.cpp:631
ResetHomepageFromDB
bool ResetHomepageFromDB()
Definition: browserdbutil.cpp:96
MythUIStateType::Full
@ Full
Definition: mythuistatetype.h:25
Bookmark
Definition: bookmarkmanager.h:11
MythUIButtonListItem::GetData
QVariant GetData()
Definition: mythuibuttonlist.cpp:3665
uint
unsigned int uint
Definition: compat.h:81
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:55
BookmarkManager::UpdateURLList
void UpdateURLList(void)
Definition: bookmarkmanager.cpp:201
mythflashplayer.h
MythUICheckBox
A checkbox widget supporting three check states - on,off,half and two conditions - selected and unsel...
Definition: mythuicheckbox.h:15
MythCoreContext::GetNumSetting
int GetNumSetting(const QString &key, int defaultval=0)
Definition: mythcorecontext.cpp:911
BookmarkManager::m_menuPopup
MythDialogBox * m_menuPopup
Definition: bookmarkmanager.h:105
MythUIButtonListItem::GetText
QString GetText(const QString &name="") const
Definition: mythuibuttonlist.cpp:3315
BrowserConfig::Create
bool Create(void) override
Definition: bookmarkmanager.cpp:25
MythUIText
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
MythScreenType::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythscreentype.cpp:404
BookmarkManager::Create
bool Create(void) override
Definition: bookmarkmanager.cpp:140
MythBrowser
Definition: mythbrowser.h:18
MythConfirmationDialog
Dialog asking for user confirmation. Ok and optional Cancel button.
Definition: mythdialogbox.h:272
MythUICheckBox::SetCheckState
void SetCheckState(MythUIStateType::StateType state)
Definition: mythuicheckbox.cpp:66
XMLParseBase::LoadWindowFromXML
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
Definition: xmlparsebase.cpp:695
BookmarkManager::~BookmarkManager
~BookmarkManager() override
Definition: bookmarkmanager.cpp:179
BookmarkManager::GetMarkedCount
uint GetMarkedCount(void)
Definition: bookmarkmanager.cpp:233
BookmarkManager::slotShowMarked
void slotShowMarked(void)
Definition: bookmarkmanager.cpp:576
BookmarkManager::ReloadBookmarks
void ReloadBookmarks(void)
Definition: bookmarkmanager.cpp:426
BrowserConfig::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: bookmarkmanager.cpp:94
MythUIButtonList::GetValue
virtual QString GetValue() const
Definition: mythuibuttonlist.cpp:1606
MythUIText::SetText
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:132
MythUIButtonListItem::state
CheckState state() const
Definition: mythuibuttonlist.cpp:3619
MythUIType::SetVisible
virtual void SetVisible(bool visible)
Definition: mythuitype.cpp:1108
mythcontext.h
MythUIButtonList::Reset
void Reset() override
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuibuttonlist.cpp:116
GetMythMainWindow
MythMainWindow * GetMythMainWindow(void)
Definition: mythmainwindow.cpp:104
MythUIButtonList::MoveToNamedPosition
bool MoveToNamedPosition(const QString &position_name)
Definition: mythuibuttonlist.cpp:2279
MythUIButtonList::SetItemCurrent
void SetItemCurrent(MythUIButtonListItem *item)
Definition: mythuibuttonlist.cpp:1554
build_compdb.action
action
Definition: build_compdb.py:9
MythScreenType::Exiting
void Exiting()
MythMainWindow::GetStack
MythScreenStack * GetStack(const QString &Stackname)
Definition: mythmainwindow.cpp:323
BookmarkManager::m_bookmarkList
MythUIButtonList * m_bookmarkList
Definition: bookmarkmanager.h:101
BookmarkManager::slotShowCurrent
void slotShowCurrent(void)
Definition: bookmarkmanager.cpp:569
kMSDontDisableDrawing
@ kMSDontDisableDrawing
avoid disabling UI drawing
Definition: mythsystem.h:37
BookmarkManager::UpdateGroupList
void UpdateGroupList(void)
Definition: bookmarkmanager.cpp:185
MythCoreContext::SaveSetting
void SaveSetting(const QString &key, int newValue)
Definition: mythcorecontext.cpp:880
BookmarkManager::slotGroupSelected
void slotGroupSelected(MythUIButtonListItem *item)
Definition: bookmarkmanager.cpp:327
Bookmark::m_name
QString m_name
Definition: bookmarkmanager.h:17
MythMainWindow::AllowInput
void AllowInput(bool Allow)
Definition: mythmainwindow.cpp:1526
mythuicheckbox.h
MythUICheckBox::GetCheckState
MythUIStateType::StateType GetCheckState() const
Definition: mythuicheckbox.cpp:98
MythUIButtonList
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
Definition: mythuibuttonlist.h:191
GetSiteList
int GetSiteList(QList< Bookmark * > &siteList)
Definition: browserdbutil.cpp:202
BookmarkManager::ShowEditDialog
void ShowEditDialog(bool edit)
Definition: bookmarkmanager.cpp:386
mythmainwindow.h
BrowserConfig::m_enablePluginsCheck
MythUICheckBox * m_enablePluginsCheck
Definition: bookmarkmanager.h:50
MythUIButtonListItem::setChecked
void setChecked(CheckState state)
Definition: mythuibuttonlist.cpp:3629
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:52
BrowserConfig::m_descriptionText
MythUIText * m_descriptionText
Definition: bookmarkmanager.h:48
BrowserConfig::slotFocusChanged
void slotFocusChanged(void)
Definition: bookmarkmanager.cpp:102
BrowserConfig::slotSave
void slotSave(void)
Definition: bookmarkmanager.cpp:77
BrowserConfig::m_okButton
MythUIButton * m_okButton
Definition: bookmarkmanager.h:52
BookmarkManager::slotEditBookmark
void slotEditBookmark(void)
Definition: bookmarkmanager.cpp:480
mythbrowser.h
MythCoreContext::GetSetting
QString GetSetting(const QString &key, const QString &defaultval="")
Definition: mythcorecontext.cpp:897
MythUIButtonListItem::NotChecked
@ NotChecked
Definition: mythuibuttonlist.h:46
BookmarkManager::slotBookmarkClicked
void slotBookmarkClicked(MythUIButtonListItem *item)
Definition: bookmarkmanager.cpp:333