MythTV  master
Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
MythUIButtonListItem Class Reference

#include <mythuibuttonlist.h>

Inheritance diagram for MythUIButtonListItem:
Inheritance graph
[legend]
Collaboration diagram for MythUIButtonListItem:
Collaboration graph
[legend]

Public Types

enum  CheckState { CantCheck = -1, NotChecked = 0, HalfChecked, FullChecked }
 

Public Member Functions

 MythUIButtonListItem (MythUIButtonList *lbtype, QString text, QString image="", bool checkable=false, CheckState state=CantCheck, bool showArrow=false, int listPosition=-1)
 
 MythUIButtonListItem (MythUIButtonList *lbtype, const QString &text, QVariant data, int listPosition=-1)
 
template<typename SLOT >
 MythUIButtonListItem (typename std::enable_if< FunctionPointerTest< SLOT >::MemberFunction, MythUIButtonList * >::type lbtype, const QString &text, SLOT slot, int listPosition=-1)
 
template<typename SLOT >
 MythUIButtonListItem (typename std::enable_if< FunctionPointerTest< SLOT >::MemberConstFunction, MythUIButtonList * >::type lbtype, const QString &text, SLOT slot, int listPosition=-1)
 
virtual ~MythUIButtonListItem ()
 
MythUIButtonListparent () const
 
void SetText (const QString &text, const QString &name="", const QString &state="")
 
void SetTextFromMap (const InfoMap &infoMap, const QString &state="")
 
void SetTextFromMap (const QMap< QString, TextProperties > &stringMap)
 
QString GetText (const QString &name="") const
 
bool FindText (const QString &searchStr, const QString &fieldList="**ALL**", bool startsWith=false) const
 
void SetFontState (const QString &state, const QString &name="")
 
void SetImage (MythImage *image, const QString &name="")
 Sets an image directly, should only be used in special circumstances since it bypasses the cache. More...
 
MythImageGetImage (const QString &name="")
 Gets a MythImage which has been assigned to this button item, as with SetImage() it should only be used in special circumstances since it bypasses the cache. More...
 
bool HasImage (const QString &name="")
 Returns true when the image exists. More...
 
void SetImage (const QString &filename, const QString &name="", bool force_reload=false)
 
void SetImageFromMap (const InfoMap &imageMap)
 
QString GetImageFilename (const QString &name="") const
 
void DisplayState (const QString &state, const QString &name)
 
void SetStatesFromMap (const InfoMap &stateMap)
 
bool isVisible () const
 
void setVisible (bool flag)
 
bool checkable () const
 
void setCheckable (bool flag)
 
bool isEnabled () const
 
void setEnabled (bool flag)
 
CheckState state () const
 
void setChecked (CheckState state)
 
void setDrawArrow (bool flag)
 
void SetData (QVariant data)
 
QVariant GetData ()
 
bool MoveUpDown (bool flag)
 
virtual void SetToRealButton (MythUIStateType *button, bool selected)
 

Protected Attributes

MythUIButtonListm_parent {nullptr}
 
QString m_text
 
QString m_fontState
 
MythImagem_image {nullptr}
 
QString m_imageFilename
 
bool m_checkable {false}
 
CheckState m_state {CantCheck}
 
QVariant m_data {0}
 
bool m_showArrow {false}
 
bool m_isVisible {false}
 
bool m_enabled {true}
 
QMap< QString, TextPropertiesm_strings
 
QMap< QString, MythImage * > m_images
 
InfoMap m_imageFilenames
 
InfoMap m_states
 

Friends

class MythUIButtonList
 
class MythGenericTree
 

Detailed Description

Definition at line 27 of file mythuibuttonlist.h.

Member Enumeration Documentation

◆ CheckState

Enumerator
CantCheck 
NotChecked 
HalfChecked 
FullChecked 

Definition at line 30 of file mythuibuttonlist.h.

Constructor & Destructor Documentation

◆ MythUIButtonListItem() [1/4]

MythUIButtonListItem::MythUIButtonListItem ( MythUIButtonList lbtype,
QString  text,
QString  image = "",
bool  checkable = false,
CheckState  state = CantCheck,
bool  showArrow = false,
int  listPosition = -1 
)

Definition at line 3207 of file mythuibuttonlist.cpp.

◆ MythUIButtonListItem() [2/4]

MythUIButtonListItem::MythUIButtonListItem ( MythUIButtonList lbtype,
const QString &  text,
QVariant  data,
int  listPosition = -1 
)

Definition at line 3224 of file mythuibuttonlist.cpp.

◆ MythUIButtonListItem() [3/4]

template<typename SLOT >
MythUIButtonListItem::MythUIButtonListItem ( typename std::enable_if< FunctionPointerTest< SLOT >::MemberFunction, MythUIButtonList * >::type  lbtype,
const QString &  text,
SLOT  slot,
int  listPosition = -1 
)
inline

Definition at line 44 of file mythuibuttonlist.h.

◆ MythUIButtonListItem() [4/4]

template<typename SLOT >
MythUIButtonListItem::MythUIButtonListItem ( typename std::enable_if< FunctionPointerTest< SLOT >::MemberConstFunction, MythUIButtonList * >::type  lbtype,
const QString &  text,
SLOT  slot,
int  listPosition = -1 
)
inline

Definition at line 48 of file mythuibuttonlist.h.

◆ ~MythUIButtonListItem()

MythUIButtonListItem::~MythUIButtonListItem ( )
virtual

Definition at line 3247 of file mythuibuttonlist.cpp.

Member Function Documentation

◆ parent()

MythUIButtonList * MythUIButtonListItem::parent ( ) const

◆ SetText()

void MythUIButtonListItem::SetText ( const QString &  text,
const QString &  name = "",
const QString &  state = "" 
)

◆ SetTextFromMap() [1/2]

void MythUIButtonListItem::SetTextFromMap ( const InfoMap infoMap,
const QString &  state = "" 
)

◆ SetTextFromMap() [2/2]

void MythUIButtonListItem::SetTextFromMap ( const QMap< QString, TextProperties > &  stringMap)

Definition at line 3299 of file mythuibuttonlist.cpp.

◆ GetText()

QString MythUIButtonListItem::GetText ( const QString &  name = "") const

Definition at line 3305 of file mythuibuttonlist.cpp.

Referenced by MythTerminal::AddText(), ProgFinder::alphabetListItemSelected(), StatusBox::clicked(), NetSearch::customEvent(), NetTree::customEvent(), ChannelEditor::del(), CustomEdit::deleteRule(), ScreenSetup::doListSelect(), NetSearch::DoSearch(), SpinBoxEntryDialog::entryChanged(), SmartPLOrderByDialog::fieldListSelectionChanged(), MythControls::GetCurrentAction(), MythControls::GetCurrentContext(), MythControls::GetCurrentKey(), SmartPLOrderByDialog::getFieldList(), MythUIButtonList::GetIntValue(), MythUIButtonList::GetValue(), ProgLister::HandleVisible(), RawSettingsEditor::Init(), AudioSetupWizard::Init(), CustomPriority::installClicked(), ChannelEditor::itemChanged(), ImportIconsWizard::itemChanged(), PlaybackBox::ItemLoaded(), MythUISpinBox::keyPressEvent(), StatusBox::keyPressEvent(), SmartPLOrderByDialog::orderByChanged(), PhrasePopup::phraseSelected(), MusicCommon::playlistItemVisible(), VideoSetupWizard::playVideoTest(), AudioSetupWizard::save(), VideoSetupWizard::save(), MythDialogBox::Select(), RawSettingsEditor::selectionChanged(), ChannelEditor::setSortMode(), ChannelEditor::setSourceID(), NetSearch::SlotItemChanged(), MythBrowser::slotTabSelected(), CustomEdit::storeClicked(), CustomEdit::storeRule(), StreamView::streamItemVisible(), SearchStream::streamVisible(), VideoSetupWizard::testHDVideo(), CustomPriority::testSchedule(), VideoSetupWizard::testSDVideo(), AudioSetupWizard::toggleSpeakers(), PlaylistEditorView::treeItemVisible(), AudioSetupWizard::UpdateCapabilities(), NetTree::UpdateCurrentItem(), MythUIButtonList::updateLCD(), LogViewer::updateLogItem(), PlaybackBox::updateRecList(), MythControls::UpdateRightList(), VideoDialog::UpdateText(), and BookmarkManager::UpdateURLList().

◆ FindText()

bool MythUIButtonListItem::FindText ( const QString &  searchStr,
const QString &  fieldList = "**ALL**",
bool  startsWith = false 
) const

Definition at line 3314 of file mythuibuttonlist.cpp.

Referenced by MythUIButtonList::DoFind().

◆ SetFontState()

void MythUIButtonListItem::SetFontState ( const QString &  state,
const QString &  name = "" 
)

◆ SetImage() [1/2]

void MythUIButtonListItem::SetImage ( MythImage image,
const QString &  name = "" 
)

◆ GetImage()

MythImage * MythUIButtonListItem::GetImage ( const QString &  name = "")

Gets a MythImage which has been assigned to this button item, as with SetImage() it should only be used in special circumstances since it bypasses the cache.

Note
The reference count is set for one use, call DecrRef() to delete.

Definition at line 3436 of file mythuibuttonlist.cpp.

◆ HasImage()

bool MythUIButtonListItem::HasImage ( const QString &  name = "")
inline

Returns true when the image exists.

Definition at line 79 of file mythuibuttonlist.h.

Referenced by ZMEvents::eventVisible().

◆ SetImage() [2/2]

void MythUIButtonListItem::SetImage ( const QString &  filename,
const QString &  name = "",
bool  force_reload = false 
)

Definition at line 3456 of file mythuibuttonlist.cpp.

◆ SetImageFromMap()

void MythUIButtonListItem::SetImageFromMap ( const InfoMap imageMap)

Definition at line 3430 of file mythuibuttonlist.cpp.

Referenced by GalleryThumbView::UpdateImageItem().

◆ GetImageFilename()

QString MythUIButtonListItem::GetImageFilename ( const QString &  name = "") const

◆ DisplayState()

void MythUIButtonListItem::DisplayState ( const QString &  state,
const QString &  name 
)

◆ SetStatesFromMap()

void MythUIButtonListItem::SetStatesFromMap ( const InfoMap stateMap)

Definition at line 3523 of file mythuibuttonlist.cpp.

◆ isVisible()

bool MythUIButtonListItem::isVisible ( ) const
inline

Definition at line 99 of file mythuibuttonlist.h.

◆ setVisible()

void MythUIButtonListItem::setVisible ( bool  flag)
inline

Definition at line 100 of file mythuibuttonlist.h.

Referenced by StandardSetting::updateButton().

◆ checkable()

bool MythUIButtonListItem::checkable ( ) const

Definition at line 3529 of file mythuibuttonlist.cpp.

Referenced by MythUIButtonList::updateLCD().

◆ setCheckable()

void MythUIButtonListItem::setCheckable ( bool  flag)

◆ isEnabled()

bool MythUIButtonListItem::isEnabled ( ) const

Definition at line 3565 of file mythuibuttonlist.cpp.

Referenced by MythUIButtonList::keyPressEvent().

◆ setEnabled()

void MythUIButtonListItem::setEnabled ( bool  flag)

◆ state()

MythUIButtonListItem::CheckState MythUIButtonListItem::state ( ) const

◆ setChecked()

void MythUIButtonListItem::setChecked ( MythUIButtonListItem::CheckState  state)

◆ setDrawArrow()

void MythUIButtonListItem::setDrawArrow ( bool  flag)

◆ SetData()

void MythUIButtonListItem::SetData ( QVariant  data)

◆ GetData()

QVariant MythUIButtonListItem::GetData ( void  )

Definition at line 3580 of file mythuibuttonlist.cpp.

Referenced by BackendSelection::Accept(), GroupSelector::AcceptItem(), CustomPriority::addClicked(), MythUISpinBox::AddSelection(), StreamView::addStream(), MythThemedMenu::buttonAction(), ViewScheduled::ChangeGroup(), MythBurn::changeProfile(), ChannelRecPriority::changeRecPriority(), ProgramRecPriority::changeRecPriority(), ChannelEditor::channelIconImport(), CustomEdit::clauseChanged(), CustomEdit::clauseClicked(), LocationDialog::clearResults(), StatusBox::clicked(), ImportCoverArtDialog::copyPressed(), EditAlbumartDialog::copySelectedImageToTag(), MythBurn::createConfigFile(), SmartPlaylistEditor::criteriaChanged(), EditAlbumartDialog::customEvent(), LyricsView::customEvent(), MusicCommon::customEvent(), SearchView::customEvent(), StreamView::customEvent(), ScreenSetup::customEvent(), StandardSettingDialog::customEvent(), MythThemedMenu::customEvent(), GalleryThumbView::customEvent(), ChannelEditor::customEvent(), ProgramRecPriority::deactivate(), StandardSettingDialog::deleteEntry(), StandardSettingDialog::deleteEntryConfirmed(), MythNews::deleteNewsSite(), ViewScheduled::deleteRule(), ScreenSetup::deleteScreen(), PlaybackBox::deleteSelected(), SmartPlaylistEditor::doDeleteCriteria(), RSSEditor::DoDeleteSite(), ScreenSetup::doListSelect(), EditAlbumartDialog::doRemoveImageFromTag(), StreamView::doRemoveStream(), SchedOptMixin::DupMethodChanged(), ProgramRecPriority::edit(), ChannelEditor::edit(), SmartPlaylistEditor::editCriteria(), MythBurn::editDetails(), StreamView::editStream(), MythBurn::editThumbnails(), ZMEvents::eventVisible(), FileAssocDialogPrivate::GetCurrentFA(), PlaybackBox::GetCurrentProgram(), ProgramRecPriority::GetCurrentProgram(), ViewScheduled::GetCurrentProgram(), MythUIButtonList::GetDataValue(), EditAlbumartDialog::gridItemChanged(), MythUIButtonTree::handleClick(), PlaybackBox::HandleRecordingRemoveEvent(), MythUIButtonTree::handleSelect(), ProgLister::HandleSelected(), ProgLister::HandleVisible(), ThemeChooser::itemChanged(), FileSelector::itemClicked(), LocationDialog::itemClicked(), GalleryThumbView::ItemClicked(), PlaybackBox::ItemLoaded(), ArchiveFileSelector::itemSelected(), LocationDialog::itemSelected(), PlaybackBox::ItemVisible(), MusicCommon::keyPressEvent(), BookmarkManager::keyPressEvent(), PlaylistEditorView::keyPressEvent(), SearchView::keyPressEvent(), StandardSettingDialog::keyPressEvent(), StandardSettingDialog::LevelDown(), ViewScheduled::LoadList(), StoreOptMixin::MaxEpisodesChanged(), ChannelEditor::menu(), ImportIconsWizard::menuSelection(), PlaybackSettingsDialog::MoveProfileItemDown(), PlaybackSettingsDialog::MoveProfileItemUp(), FileSelector::OKPressed(), MythUIFileBrowser::OKPressed(), FileAssocDialog::OnDeletePressed(), MythUIFileBrowser::PathClicked(), MythUIFileBrowser::PathSelected(), PlaybackBox::PlayFromBeginning(), PlaybackBox::PlayFromBookmark(), PlaybackBox::PlayFromBookmarkOrProgStart(), PlaybackBox::PlayFromLastPlayPos(), MusicCommon::playlistItemVisible(), MythNews::processAndShowNews(), MythBurn::profileChanged(), ProfileDialog::profileChanged(), EditMetadataDialog::ratingSpinChanged(), CustomEdit::recordClicked(), BookmarkManager::ReloadBookmarks(), ProgramRecPriority::remove(), MythUIButtonTree::RemoveItem(), ExportNative::removeItem(), MythBurn::removeItem(), ProgramRecPriority::RemoveItemFromList(), EditAlbumartDialog::removeSelectedImageFromTag(), StreamView::removeStream(), restore_position(), SourceSetup::retrieveSpinboxUpdate(), CustomEdit::ruleChanged(), CustomPriority::ruleChanged(), ScheduleEditor::RuleChanged(), LanguageSelection::Save(), FilterOptMixin::Save(), AudioSetupWizard::save(), save_position(), ThemeChooser::saveAndReload(), MythBurn::saveConfiguration(), ScreenSetup::saveData(), SourceSetup::saveData(), PlaybackBox::saveRecMetadata(), ProgramRecPriority::scheduleChanged(), MythDialogBox::Select(), RawSettingsEditor::selectionChanged(), ImageSearchResultsDialog::sendResult(), MetadataResultsDialog::sendResult(), VideoFilterDialog::SetBrowse(), MythThemedMenu::setButtonActive(), VideoFilterDialog::SetCast(), EditMetadataDialog::SetCategory(), VideoFilterDialog::SetCategory(), EditMetadataDialog::SetChild(), VideoFilterDialog::setCountry(), VideoFilterDialog::SetCoverFile(), SelectDestination::setDestination(), VideoFilterDialog::setGenre(), StatusBox::setHelpText(), VideoFilterDialog::SetInetRef(), EditMetadataDialog::SetLevel(), LyricsView::setLyricTime(), VideoFilterDialog::setOrderby(), VideoFilterDialog::setRunTime(), ChannelEditor::setSourceID(), StandardSettingDialog::settingClicked(), StandardSettingDialog::settingSelected(), GalleryThumbView::SetUiSelection(), VideoFilterDialog::SetUserRating(), VideoFilterDialog::SetWatched(), VideoFilterDialog::SetYear(), BookmarkManager::ShowEditDialog(), MythNews::ShowEditDialog(), ZMConsole::showEditFunctionPopup(), EditAlbumartDialog::showMenu(), ScheduleEditor::showMenu(), MythBurn::ShowMenu(), SearchView::ShowMenu(), StandardSettingDialog::ShowMenu(), PlaybackSettingsDialog::ShowMenu(), SmartPLResultViewer::showTrackInfo(), BookmarkManager::slotBookmarkClicked(), MythNewsConfig::slotCategoryChanged(), BookmarkManager::slotClearMarked(), BookmarkManager::slotDoDeleteCurrent(), RSSEditor::SlotEditSite(), RSSEditor::SlotItemChanged(), PlayerSettings::slotSave(), BookmarkManager::slotSetHomepage(), BookmarkManager::slotShowMarked(), MythNews::slotSiteSelected(), ProgramRecPriority::SortList(), ChannelRecPriority::SortList(), SourceSetup::sourceListItemSelected(), SearchStream::streamClicked(), StreamView::streamItemVisible(), SearchStream::streamVisible(), ExportNative::titleChanged(), RecordingSelector::titleChanged(), VideoSelector::titleChanged(), PlaybackBox::toggleAutoExpire(), ThemeChooser::toggleFullscreenPreview(), NetEditorBase::ToggleItem(), MythNewsConfig::toggleItem(), PlaybackBox::togglePlayListItem(), PlaybackBox::togglePlayListTitle(), PlaybackBox::togglePreserveEpisode(), RecordingSelector::toggleSelected(), VideoSelector::toggleSelected(), AudioSetupWizard::toggleSpeakers(), MythBurn::toggleUseCutlist(), PlaybackBox::toggleWatched(), SearchView::trackClicked(), SearchView::trackVisible(), SmartPLResultViewer::trackVisible(), PlaylistEditorView::treeItemClicked(), PlaylistEditorView::treeItemVisible(), ChannelRecPriority::upcoming(), AudioSetupWizard::UpdateCapabilities(), ScreenSetup::updateHelpText(), GalleryThumbView::UpdateImageItem(), ChannelRecPriority::updateInfo(), ProgramRecPriority::updateInfo(), ViewScheduled::updateInfo(), ViewScheduleDiff::updateInfo(), MythNews::updateInfoView(), ProgramRecPriority::UpdateList(), StatusBox::updateLogList(), PlaybackBox::updateRecGroup(), PlaybackBox::updateRecList(), FileAssocDialog::UpdateScreen(), SourceSetup::updateSpinboxUpdate(), ImportCoverArtDialog::updateStatus(), StreamView::updateStream(), SearchView::updateTracksList(), PlaybackBox::UpdateUIListItem(), RawSettingsEditor::valueChanged(), ScreenSetup::~ScreenSetup(), and SourceSetup::~SourceSetup().

◆ MoveUpDown()

bool MythUIButtonListItem::MoveUpDown ( bool  flag)

◆ SetToRealButton()

void MythUIButtonListItem::SetToRealButton ( MythUIStateType button,
bool  selected 
)
virtual

Friends And Related Function Documentation

◆ MythUIButtonList

friend class MythUIButtonList
friend

Definition at line 138 of file mythuibuttonlist.h.

◆ MythGenericTree

friend class MythGenericTree
friend

Definition at line 139 of file mythuibuttonlist.h.

Member Data Documentation

◆ m_parent

MythUIButtonList* MythUIButtonListItem::m_parent {nullptr}
protected

◆ m_text

QString MythUIButtonListItem::m_text
protected

Definition at line 122 of file mythuibuttonlist.h.

Referenced by FindText(), GetText(), MythUIButtonListItem(), SetText(), and SetToRealButton().

◆ m_fontState

QString MythUIButtonListItem::m_fontState
protected

Definition at line 123 of file mythuibuttonlist.h.

Referenced by SetFontState(), and SetToRealButton().

◆ m_image

MythImage* MythUIButtonListItem::m_image {nullptr}
protected

◆ m_imageFilename

QString MythUIButtonListItem::m_imageFilename
protected

Definition at line 125 of file mythuibuttonlist.h.

Referenced by GetImageFilename(), SetImage(), and SetToRealButton().

◆ m_checkable

bool MythUIButtonListItem::m_checkable {false}
protected

◆ m_state

CheckState MythUIButtonListItem::m_state {CantCheck}
protected

Definition at line 127 of file mythuibuttonlist.h.

Referenced by MythUIButtonListItem(), setChecked(), SetToRealButton(), and state().

◆ m_data

QVariant MythUIButtonListItem::m_data {0}
protected

Definition at line 128 of file mythuibuttonlist.h.

Referenced by GetData(), MythUIButtonListItem(), and SetData().

◆ m_showArrow

bool MythUIButtonListItem::m_showArrow {false}
protected

Definition at line 129 of file mythuibuttonlist.h.

Referenced by MythUIButtonListItem(), setDrawArrow(), and SetToRealButton().

◆ m_isVisible

bool MythUIButtonListItem::m_isVisible {false}
protected

◆ m_enabled

bool MythUIButtonListItem::m_enabled {true}
protected

Definition at line 131 of file mythuibuttonlist.h.

Referenced by isEnabled(), MythUIButtonListItem(), setEnabled(), and SetToRealButton().

◆ m_strings

QMap<QString, TextProperties> MythUIButtonListItem::m_strings
protected

◆ m_images

QMap<QString, MythImage*> MythUIButtonListItem::m_images
protected

Definition at line 134 of file mythuibuttonlist.h.

Referenced by GetImage(), SetImage(), SetToRealButton(), and ~MythUIButtonListItem().

◆ m_imageFilenames

InfoMap MythUIButtonListItem::m_imageFilenames
protected

Definition at line 135 of file mythuibuttonlist.h.

Referenced by GetImageFilename(), SetImage(), SetImageFromMap(), and SetToRealButton().

◆ m_states

InfoMap MythUIButtonListItem::m_states
protected

Definition at line 136 of file mythuibuttonlist.h.

Referenced by DisplayState(), SetStatesFromMap(), and SetToRealButton().


The documentation for this class was generated from the following files: