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 <mythmainwindow.h>
9 #include <mythcontext.h>
10 #include <mythdbcon.h>
11 #include <mythdirs.h>
12 #include <mythuicheckbox.h>
13 #include <mythuibuttonlist.h>
14 #include <mythsystemlegacy.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  (void) item;
330 
331  UpdateURLList();
333 }
334 
336 {
337  if (!item)
338  return;
339 
340  auto *site = item->GetData().value<Bookmark*>();
341  if (!site)
342  return;
343 
344  m_savedBookmark = *site;
345 
346  QString cmd = gCoreContext->GetSetting("WebBrowserCommand", "Internal");
347  QString zoom = gCoreContext->GetSetting("WebBrowserZoomLevel", "1.0");
348  QStringList urls;
349 
350  urls.append(site->m_url);
351 
352  if (cmd.toLower() == "internal")
353  {
355 
356  MythScreenType *mythbrowser = nullptr;
357  if (urls[0].startsWith("mythflash://"))
358  mythbrowser = new MythFlashPlayer(mainStack, urls);
359  else
360  mythbrowser = new MythBrowser(mainStack, urls);
361 
362  if (mythbrowser->Create())
363  {
364  connect(mythbrowser, &MythScreenType::Exiting, this, &BookmarkManager::slotBrowserClosed);
365  mainStack->AddScreen(mythbrowser);
366  }
367  else
368  delete mythbrowser;
369  }
370  else
371  {
372  cmd.replace("%ZOOM%", zoom);
373  cmd.replace("%URL%", urls.join(" "));
374 
375  cmd.replace("&","\\&");
376  cmd.replace(";","\\;");
377 
378  GetMythMainWindow()->AllowInput(false);
380  GetMythMainWindow()->AllowInput(true);
381 
382  // we need to reload the bookmarks incase the user added/deleted
383  // any while in MythBrowser
384  ReloadBookmarks();
385  }
386 }
387 
389 {
390  if (edit)
391  {
393 
394  if (!item || !item->GetData().isValid())
395  {
396  LOG(VB_GENERAL, LOG_ERR, "BookmarkManager: Something is wrong. "
397  "Asked to edit a non existent bookmark!");
398  return;
399  }
400  auto *site = item->GetData().value<Bookmark*>();
401  if (!site)
402  {
403  LOG(VB_GENERAL, LOG_ERR, "BookmarkManager: Something is wrong. "
404  "Existing bookmark is invalid!");
405  return;
406  }
407 
408  m_savedBookmark = *site;
409  }
410 
411 
413 
414  auto *editor = new BookmarkEditor(&m_savedBookmark, edit, mainStack,
415  "bookmarkeditor");
416 
418 
419  if (editor->Create())
420  mainStack->AddScreen(editor);
421 }
422 
424 {
425  ReloadBookmarks();
426 }
427 
429 {
431  UpdateGroupList();
432 
434  UpdateURLList();
435 
436  // try to set the current item to name
437  for (int x = 0; x < m_bookmarkList->GetCount(); x++)
438  {
440  if (item && item->GetData().isValid())
441  {
442  auto *site = item->GetData().value<Bookmark*>();
443  if (site && (*site == m_savedBookmark))
444  {
446  break;
447  }
448  }
449  }
450 }
451 
453 {
455  auto *config = new BrowserConfig(mainStack, "browserconfig");
456 
457  if (config->Create())
458  mainStack->AddScreen(config);
459 }
460 
462 {
463  // Clear all homepage information
465 
466  // Set the homepage information for selected bookmark
468  if (item && item->GetData().isValid())
469  {
470  auto *site = item->GetData().value<Bookmark*>();
471  if (site)
472  UpdateHomepageInDB(site);
473  }
474  ReloadBookmarks();
475 }
476 
478 {
479  ShowEditDialog(false);
480 }
481 
483 {
484  ShowEditDialog(true);
485 }
486 
488 {
490  return;
491 
492  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
493 
494  QString message = tr("Are you sure you want to delete the selected bookmark?");
495 
496  auto *dialog = new MythConfirmationDialog(popupStack, message, true);
497 
498  if (dialog->Create())
499  popupStack->AddScreen(dialog);
500 
501  connect(dialog, &MythConfirmationDialog::haveResult,
503 }
504 
506 {
507  if (!doDelete)
508  return;
509 
511  if (item)
512  {
513  QString category = "";
514  auto *site = item->GetData().value<Bookmark*>();
515  if (site)
516  {
517  category = site->m_category;
518  RemoveFromDB(site);
519  }
520 
522  UpdateGroupList();
523 
524  if (category != "")
526 
527  UpdateURLList();
528  }
529 }
530 
532 {
533  if (GetMarkedCount() == 0)
534  return;
535 
536  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
537 
538  QString message = tr("Are you sure you want to delete the marked bookmarks?");
539 
540  auto *dialog = new MythConfirmationDialog(popupStack, message, true);
541 
542  if (dialog->Create())
543  popupStack->AddScreen(dialog);
544 
545  connect(dialog, &MythConfirmationDialog::haveResult,
547 }
548 
550 {
551  if (!doDelete)
552  return;
553 
554  QString category = m_groupList->GetValue();
555 
556  for (auto *site : qAsConst(m_siteList))
557  {
558  if (site && site->m_selected)
559  RemoveFromDB(site);
560  }
561 
563  UpdateGroupList();
564 
565  if (category != "")
567 
568  UpdateURLList();
569 }
570 
572 {
574  if (item)
575  slotBookmarkClicked(item);
576 }
577 
579 {
580  if (GetMarkedCount() == 0)
581  return;
582 
584  if (item && item->GetData().isValid())
585  {
586  auto *site = item->GetData().value<Bookmark*>();
587  if (site)
588  m_savedBookmark = *site;
589  }
590 
591  QString cmd = gCoreContext->GetSetting("WebBrowserCommand", "Internal");
592  QString zoom = gCoreContext->GetSetting("WebBrowserZoomLevel", "1.0");
593  QStringList urls;
594 
595  for (const auto *site : qAsConst(m_siteList))
596  {
597  if (site && site->m_selected)
598  urls.append(site->m_url);
599  }
600 
601  if (cmd.toLower() == "internal")
602  {
604 
605  auto *mythbrowser = new MythBrowser(mainStack, urls);
606 
607  if (mythbrowser->Create())
608  {
609  connect(mythbrowser, &MythScreenType::Exiting, this, &BookmarkManager::slotBrowserClosed);
610  mainStack->AddScreen(mythbrowser);
611  }
612  else
613  delete mythbrowser;
614  }
615  else
616  {
617  cmd.replace("%ZOOM%", zoom);
618  cmd.replace("%URL%", urls.join(" "));
619 
620  cmd.replace("&","\\&");
621  cmd.replace(";","\\;");
622 
623  GetMythMainWindow()->AllowInput(false);
625  GetMythMainWindow()->AllowInput(true);
626 
627  // we need to reload the bookmarks incase the user added/deleted
628  // any while in MythBrowser
629  ReloadBookmarks();
630  }
631 }
632 
634 {
635  // we need to reload the bookmarks incase the user added/deleted
636  // any while in MythBrowser
637  ReloadBookmarks();
638 }
639 
641 {
642  for (int x = 0; x < m_bookmarkList->GetCount(); x++)
643  {
645  if (item)
646  {
648 
649  auto *site = item->GetData().value<Bookmark*>();
650  if (site)
651  site->m_selected = false;
652  }
653  }
654 }
MythUIButton::Clicked
void Clicked()
BrowserConfig::m_zoomEdit
MythUITextEdit * m_zoomEdit
Definition: bookmarkmanager.h:48
MythUIButtonList::GetItemAt
MythUIButtonListItem * GetItemAt(int pos) const
Definition: mythuibuttonlist.cpp:1676
BookmarkManager::slotDoDeleteMarked
void slotDoDeleteMarked(bool doDelete)
Definition: bookmarkmanager.cpp:549
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:324
BookmarkManager::m_groupList
MythUIButtonList * m_groupList
Definition: bookmarkmanager.h:104
MythDialogBox::SetReturnEvent
void SetReturnEvent(QObject *retobject, const QString &resultid)
Definition: mythdialogbox.cpp:300
BrowserConfig::m_commandEdit
MythUITextEdit * m_commandEdit
Definition: bookmarkmanager.h:47
MythFlashPlayer
Definition: mythflashplayer.h:9
doDelete
bool doDelete
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:638
MythUIButtonList::GetItemCurrent
MythUIButtonListItem * GetItemCurrent() const
Definition: mythuibuttonlist.cpp:1590
myth_system
uint myth_system(const QString &command, uint flags, uint timeout)
Definition: mythsystemlegacy.cpp:501
BrowserConfig::m_titleText
MythUIText * m_titleText
Definition: bookmarkmanager.h:51
MythScreenType::Close
virtual void Close()
Definition: mythscreentype.cpp:402
BookmarkManager::m_savedBookmark
Bookmark m_savedBookmark
Definition: bookmarkmanager.h:101
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
MythUIType::GetChild
MythUIType * GetChild(const QString &name) const
Get a named child of this UIType.
Definition: mythuitype.cpp:131
BookmarkManager::slotDeleteCurrent
void slotDeleteCurrent(void)
Definition: bookmarkmanager.cpp:487
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:282
arg
arg(title).arg(filename).arg(doDelete))
mythdbcon.h
BookmarkManager::slotEditDialogExited
void slotEditDialogExited(void)
Definition: bookmarkmanager.cpp:423
RemoveFromDB
bool RemoveFromDB(Bookmark *site)
Definition: browserdbutil.cpp:158
MythUIButtonListItem::FullChecked
@ FullChecked
Definition: mythuibuttonlist.h:34
MythUITextEdit
A text entry and edit widget.
Definition: mythuitextedit.h:33
BookmarkManager::m_messageText
MythUIText * m_messageText
Definition: bookmarkmanager.h:105
BrowserConfig::m_cancelButton
MythUIButton * m_cancelButton
Definition: bookmarkmanager.h:55
category
QString category
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:1422
Bookmark::m_url
QString m_url
Definition: bookmarkmanager.h:21
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
MythUITextEdit::GetText
QString GetText(void) const
Definition: mythuitextedit.h:47
BookmarkManager::slotDoDeleteCurrent
void slotDoDeleteCurrent(bool doDelete)
Definition: bookmarkmanager.cpp:505
mythdirs.h
Bookmark::m_isHomepage
bool m_isHomepage
Definition: bookmarkmanager.h:22
BrowserConfig
Definition: bookmarkmanager.h:34
BookmarkManager::slotDeleteMarked
void slotDeleteMarked(void)
Definition: bookmarkmanager.cpp:531
MythMainWindow::GetStack
MythScreenStack * GetStack(const QString &stackname)
Definition: mythmainwindow.cpp:329
mythuibuttonlist.h
MythUIButtonList::GetCount
int GetCount() const
Definition: mythuibuttonlist.cpp:1655
BookmarkManager::slotClearMarked
void slotClearMarked(void)
Definition: bookmarkmanager.cpp:640
MythScreenType::GetFocusWidget
MythUIType * GetFocusWidget(void) const
Definition: mythscreentype.cpp:112
MythUIType::TakingFocus
void TakingFocus()
mythsystemlegacy.h
MythUIButtonListItem
Definition: mythuibuttonlist.h:28
MythUITextEdit::SetText
void SetText(const QString &text, bool moveCursor=true)
Definition: mythuitextedit.cpp:216
bookmarkeditor.h
BookmarkManager::slotSetHomepage
void slotSetHomepage(void)
Definition: bookmarkmanager.cpp:461
BookmarkManager::slotSettings
static void slotSettings(void)
Definition: bookmarkmanager.cpp:452
BookmarkEditor
Site category, name and URL edit screen.
Definition: bookmarkeditor.h:19
MythUIType::Refresh
void Refresh(void)
Definition: mythuitype.cpp:1032
MythUIButtonList::itemClicked
void itemClicked(MythUIButtonListItem *item)
BookmarkManager::m_siteList
QList< Bookmark * > m_siteList
Definition: bookmarkmanager.h:99
MythScreenType::SetFocusWidget
bool SetFocusWidget(MythUIType *widget=nullptr)
Definition: mythscreentype.cpp:117
MythDialogBox::AddButton
void AddButton(const QString &title)
Definition: mythdialogbox.h:197
MythDialogBox
Basic menu dialog, message and a list of options.
Definition: mythdialogbox.h:167
Bookmark::m_selected
bool m_selected
Definition: bookmarkmanager.h:23
MythDialogBox::Create
bool Create(void) override
Definition: mythdialogbox.cpp:127
BookmarkManager::slotAddBookmark
void slotAddBookmark(void)
Definition: bookmarkmanager.cpp:477
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:222
Bookmark::m_category
QString m_category
Definition: bookmarkmanager.h:18
MythUIButton
A single button widget.
Definition: mythuibutton.h:22
browserdbutil.h
BookmarkManager::slotBrowserClosed
void slotBrowserClosed(void)
Definition: bookmarkmanager.cpp:633
ResetHomepageFromDB
bool ResetHomepageFromDB()
Definition: browserdbutil.cpp:96
MythUIStateType::Full
@ Full
Definition: mythuistatetype.h:25
Bookmark
Definition: bookmarkmanager.h:14
MythUIButtonListItem::GetData
QVariant GetData()
Definition: mythuibuttonlist.cpp:3580
uint
unsigned int uint
Definition: compat.h:141
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:60
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:16
MythCoreContext::GetNumSetting
int GetNumSetting(const QString &key, int defaultval=0)
Definition: mythcorecontext.cpp:933
BookmarkManager::m_menuPopup
MythDialogBox * m_menuPopup
Definition: bookmarkmanager.h:107
MythUIButtonListItem::GetText
QString GetText(const QString &name="") const
Definition: mythuibuttonlist.cpp:3305
BrowserConfig::Create
bool Create(void) override
Definition: bookmarkmanager.cpp:25
MythUIText
All purpose text widget, displays a text string.
Definition: mythuitext.h:29
MythScreenType::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythscreentype.cpp:414
BookmarkManager::Create
bool Create(void) override
Definition: bookmarkmanager.cpp:140
MythBrowser
Definition: mythbrowser.h:18
MythConfirmationDialog
Dialog asking for user confirmation.
Definition: mythdialogbox.h:271
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:692
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:578
BookmarkManager::ReloadBookmarks
void ReloadBookmarks(void)
Definition: bookmarkmanager.cpp:428
BrowserConfig::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: bookmarkmanager.cpp:94
MythUIButtonList::GetValue
virtual QString GetValue() const
Definition: mythuibuttonlist.cpp:1609
MythUIText::SetText
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:134
MythUIButtonListItem::state
CheckState state() const
Definition: mythuibuttonlist.cpp:3534
MythUIType::SetVisible
virtual void SetVisible(bool visible)
Definition: mythuitype.cpp:1086
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:114
GetMythMainWindow
MythMainWindow * GetMythMainWindow(void)
Definition: mythmainwindow.cpp:108
MythUIButtonList::MoveToNamedPosition
bool MoveToNamedPosition(const QString &position_name)
Definition: mythuibuttonlist.cpp:2282
MythUIButtonList::SetItemCurrent
void SetItemCurrent(MythUIButtonListItem *item)
Definition: mythuibuttonlist.cpp:1557
build_compdb.action
action
Definition: build_compdb.py:9
MythScreenType::Exiting
void Exiting()
MythMainWindow::AllowInput
void AllowInput(bool allow)
Definition: mythmainwindow.cpp:1557
BookmarkManager::m_bookmarkList
MythUIButtonList * m_bookmarkList
Definition: bookmarkmanager.h:103
BookmarkManager::slotShowCurrent
void slotShowCurrent(void)
Definition: bookmarkmanager.cpp:571
kMSDontDisableDrawing
@ kMSDontDisableDrawing
avoid disabling UI drawing
Definition: mythsystem.h:35
BookmarkManager::UpdateGroupList
void UpdateGroupList(void)
Definition: bookmarkmanager.cpp:185
MythCoreContext::SaveSetting
void SaveSetting(const QString &key, int newValue)
Definition: mythcorecontext.cpp:902
BookmarkManager::slotGroupSelected
void slotGroupSelected(MythUIButtonListItem *item)
Definition: bookmarkmanager.cpp:327
Bookmark::m_name
QString m_name
Definition: bookmarkmanager.h:19
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:152
GetSiteList
int GetSiteList(QList< Bookmark * > &siteList)
Definition: browserdbutil.cpp:202
BookmarkManager::ShowEditDialog
void ShowEditDialog(bool edit)
Definition: bookmarkmanager.cpp:388
mythmainwindow.h
BrowserConfig::m_enablePluginsCheck
MythUICheckBox * m_enablePluginsCheck
Definition: bookmarkmanager.h:52
MythUIButtonListItem::setChecked
void setChecked(CheckState state)
Definition: mythuibuttonlist.cpp:3544
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:52
BrowserConfig::m_descriptionText
MythUIText * m_descriptionText
Definition: bookmarkmanager.h:50
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:54
BookmarkManager::slotEditBookmark
void slotEditBookmark(void)
Definition: bookmarkmanager.cpp:482
mythbrowser.h
MythCoreContext::GetSetting
QString GetSetting(const QString &key, const QString &defaultval="")
Definition: mythcorecontext.cpp:919
MythUIButtonListItem::NotChecked
@ NotChecked
Definition: mythuibuttonlist.h:32
BookmarkManager::slotBookmarkClicked
void slotBookmarkClicked(MythUIButtonListItem *item)
Definition: bookmarkmanager.cpp:335