MythPopupBox Class Reference

#include <mythdialogs.h>

Inheritance diagram for MythPopupBox:

MythDialog ConfigPopupDialogWidget KeyGrabPopupBox MythSearchDialog SearchDialog SmartPlaylistDialog SmartPLDateDialog SmartPLOrderByDialog

List of all members.


Detailed Description

Child of MythDialog used for most popup menus in MythTV.

Most users of this class just call one of the static functions These create a dialog and block until it returns with a DialogCode.

When creating an instance yourself and using ExecPopup() or ShowPopup() you can optionally pass it a target and slot for the popupDone(int) signal. It will be sent with the DialogCode that the exec function returns, except it is cast to an int. This is most useful for ShowPopup() which doesn't block or return the result() when the popup is finished.

Definition at line 136 of file mythdialogs.h.


Public Types

enum  LabelSize { Large, Medium, Small }

Public Slots

virtual void AcceptItem (int)
virtual void accept (void)
virtual void reject (void)

Signals

virtual void popupDone (int)

Public Member Functions

 MythPopupBox (MythMainWindow *parent, const char *name=0)
 MythPopupBox (MythMainWindow *parent, bool graphicPopup, QColor popupForeground, QColor popupBackground, QColor popupHighlight, const char *name=0)
void addWidget (QWidget *widget, bool setAppearance=true)
void addLayout (QLayout *layout, int stretch=0)
QLabel * addLabel (QString caption, LabelSize size=Medium, bool wrap=false)
QButton * addButton (QString caption, QObject *target=NULL, const char *slot=NULL)
void ShowPopup (QObject *target=NULL, const char *slot=NULL)
void ShowPopupAtXY (int destx, int desty, QObject *target=NULL, const char *slot=NULL)
DialogCode ExecPopup (QObject *target=NULL, const char *slot=NULL)
DialogCode ExecPopupAtXY (int destx, int desty, QObject *target=NULL, const char *slot=NULL)

Static Public Member Functions

static bool showOkPopup (MythMainWindow *parent, const QString &title, const QString &message, QString button_msg=QString::null)
static bool showOkCancelPopup (MythMainWindow *parent, QString title, QString message, bool focusOk)
static DialogCode Show2ButtonPopup (MythMainWindow *parent, const QString &title, const QString &message, const QString &button1msg, const QString &button2msg, DialogCode default_button)
static DialogCode ShowButtonPopup (MythMainWindow *parent, const QString &title, const QString &message, const QStringList &buttonmsgs, DialogCode default_button)
static bool showGetTextPopup (MythMainWindow *parent, QString title, QString message, QString &text)
static QString showPasswordPopup (MythMainWindow *parent, QString title, QString message)
 Like showGetTextPopup(), but doesn't echo the text entered.

Protected Slots

void defaultButtonPressedHandler (void)

Protected Member Functions

 ~MythPopupBox ()
bool focusNextPrevChild (bool next)
void keyPressEvent (QKeyEvent *e)

Private Attributes

QVBoxLayout * vbox
QColor popupForegroundColor
int hpadding
int wpadding
bool arrowAccel

Member Enumeration Documentation

Enumerator:
Large 
Medium 
Small 

Definition at line 148 of file mythdialogs.h.


Constructor & Destructor Documentation

MythPopupBox::MythPopupBox ( MythMainWindow parent,
const char *  name = 0 
)

MythPopupBox::MythPopupBox ( MythMainWindow parent,
bool  graphicPopup,
QColor  popupForeground,
QColor  popupBackground,
QColor  popupHighlight,
const char *  name = 0 
)

Definition at line 295 of file mythdialogs.cpp.

MythPopupBox::~MythPopupBox (  )  [inline, protected]

Definition at line 207 of file mythdialogs.h.


Member Function Documentation

void MythPopupBox::addWidget ( QWidget *  widget,
bool  setAppearance = true 
)

void MythPopupBox::addLayout ( QLayout *  layout,
int  stretch = 0 
)

QLabel * MythPopupBox::addLabel ( QString  caption,
LabelSize  size = Medium,
bool  wrap = false 
)

Definition at line 380 of file mythdialogs.cpp.

Referenced by TabView::actionAddBookmark(), chooseQueue(), ProgLister::chooseView(), PreviousList::chooseView(), VideoTree::createPopup(), VideoDialog::createPopup(), MythFlixQueue::displayOptions(), MythFlix::displayOptions(), DatabaseBox::doActivePopup(), PhoneUIBox::doAddEntryPopup(), PhoneUIBox::doCallPopup(), PhoneUIBox::doIMPopup(), PhoneUIBox::doMenuPopup(), mythvideo_videomanager::VideoManagerImp::DoVideoMenu(), PhoneUIBox::drawCallPopupCallHistory(), DatabaseBox::ErrorPopup(), PlaybackBoxMusic::getInsertPLOptions(), UIManagedTreeListType::incSearchStart(), UIListBtnType::incSearchStart(), PlaybackBox::initPopup(), PlaybackBox::initRecGroupPopup(), KeyGrabPopupBox::KeyGrabPopupBox(), FileAssocDialog::makeNewExtension(), MythSearchDialog::MythSearchDialog(), TabView::openMenu(), ProgLister::powerEdit(), DeviceTree::RunTypeDialog(), SearchDialog::SearchDialog(), MoviesUI::showAbout(), ShowButtonPopup(), SmartPlaylistEditor::showCategoryPopup(), TabView::showEnterURLDialog(), GameTreeItem::showGameInfo(), showGetTextPopup(), ZMEvents::showMenu(), PlaybackBoxMusic::showMenu(), PlaybackBox::showMenu(), MoviesUI::showMenu(), ImportMusicDialog::showMenu(), EditMetadataDialog::showMenu(), showOkCancelPopup(), showOkPopup(), showPasswordPopup(), PlaybackBox::showPlaylistJobPopup(), PlaybackBox::showPlaylistPopup(), WelcomeDialog::showPopup(), StorageGroupPopup::showPopup(), RecordingProfilePopup::showPopup(), PlaybackBox::showRecTitleChanger(), EditMetadataDialog::showSaveMenu(), PhoneUIBox::showStatistics(), VideoTree::slotViewPlot(), and VideoDialog::slotViewPlot().

QButton * MythPopupBox::addButton ( QString  caption,
QObject *  target = NULL,
const char *  slot = NULL 
)

Definition at line 406 of file mythdialogs.cpp.

Referenced by TabView::actionAddBookmark(), VideoDialog::AddPopupViews(), MythFlixQueue::displayOptions(), MythFlix::displayOptions(), DatabaseBox::doActivePopup(), PhoneUIBox::doAddDirectoryPopup(), PhoneUIBox::doAddEntryPopup(), PhoneUIBox::doCallPopup(), PhoneUIBox::doIMPopup(), VideoTree::doMenu(), VideoGallery::doMenu(), VideoBrowser::doMenu(), PhoneUIBox::doMenuPopup(), DatabaseBox::doPlaylistPopup(), PhoneUIBox::doUrlPopup(), mythvideo_videomanager::VideoManagerImp::DoVideoMenu(), DatabaseBox::ErrorPopup(), PlaybackBoxMusic::getInsertPLOptions(), UIManagedTreeListType::incSearchStart(), UIListBtnType::incSearchStart(), KeyGrabPopupBox::KeyGrabPopupBox(), FileAssocDialog::makeNewExtension(), MythSearchDialog::MythSearchDialog(), TabView::openMenu(), SearchDialog::SearchDialog(), MoviesUI::showAbout(), PlaybackBox::showActionPopup(), ShowButtonPopup(), ShowCastDialog(), SmartPlaylistEditor::showCategoryPopup(), PlaybackBox::showDeletePopup(), MythNews::showEditDialog(), ZMConsole::showEditFunctionPopup(), TabView::showEnterURLDialog(), PlaybackBox::showFileNotFoundActionPopup(), GameTreeItem::showGameInfo(), showGetTextPopup(), PlaybackBox::showIconHelp(), PlaybackBox::showJobPopup(), ZMEvents::showMenu(), VideoSelector::showMenu(), ThumbFinder::showMenu(), RecordingSelector::showMenu(), PlaybackBoxMusic::showMenu(), PlaybackBox::showMenu(), MythNews::showMenu(), MythburnWizard::showMenu(), MoviesUI::showMenu(), LogViewer::showMenu(), ImportMusicDialog::showMenu(), ExportNativeWizard::showMenu(), EditMetadataDialog::showMenu(), showOkCancelPopup(), showOkPopup(), showPasswordPopup(), PlaybackBox::showPlayFromPopup(), PlaybackBox::showPlaylistJobPopup(), PlaybackBox::showPlaylistPopup(), WelcomeDialog::showPopup(), StorageGroupPopup::showPopup(), RecordingProfilePopup::showPopup(), PlaybackBox::showRecordingPopup(), EditMetadataDialog::showSaveMenu(), PlaybackBox::showStoragePopup(), PlaybackBox::showTranscodingProfiles(), VideoTree::slotViewPlot(), and VideoDialog::slotViewPlot().

void MythPopupBox::ShowPopup ( QObject *  target = NULL,
const char *  slot = NULL 
)

void MythPopupBox::ShowPopupAtXY ( int  destx,
int  desty,
QObject *  target = NULL,
const char *  slot = NULL 
)

DialogCode MythPopupBox::ExecPopup ( QObject *  target = NULL,
const char *  slot = NULL 
)

DialogCode MythPopupBox::ExecPopupAtXY ( int  destx,
int  desty,
QObject *  target = NULL,
const char *  slot = NULL 
)

bool MythPopupBox::showOkPopup ( MythMainWindow parent,
const QString &  title,
const QString &  message,
QString  button_msg = QString::null 
) [static]

Definition at line 632 of file mythdialogs.cpp.

Referenced by ImportMusicDialog::addAllNewPressed(), ImportMusicDialog::addPressed(), PlaybackProfileConfigs::btnPress(), LogViewer::cancelClicked(), ChannelEditor::channelIconImport(), ZMClient::checkProtoVersion(), MythContext::CheckProtoVersion(), MediaMonitor::ChooseAndEjectMedia(), MythContextPrivate::ChooseBackend(), BackendSelect::Connect(), MythContext::ConnectServer(), ZMClient::connectToHost(), CardInput::CreateNewInputGroup(), PlaybackBoxMusic::customEvent(), MusicPlayer::customEvent(), MythControls::DeleteKey(), ScreenSetup::doListSelect(), mythvideo_videomanager::VideoManagerImp::DoRemoveVideo(), CaptureCardEditor::edit(), MythFlixQueue::executeExternal(), MythFlix::executeExternal(), executeExternal(), get_cardtype(), RecordingSelector::getRecordingList(), getTempDirectory(), VideoSelector::getVideoList(), MythburnWizard::handleAddVideo(), ExportNativeWizard::handleAddVideo(), IconView::HandleImageSelect(), IconView::HandleMediaDeviceSelect(), MythburnWizard::handleNextPage(), ExportNativeWizard::handleNextPage(), ScanWizardScanner::ImportDVBUtils(), ScanWizardScanner::ImportM3U(), MythContext::Init(), ZMLivePlayer::initMonitorLayout(), internal_play_media(), VideoDialog::loadWindow(), RecOptDialog::LoadWindow(), ImportIconsWizard::menuSelection(), MythImageFileDialog::MythImageFileDialog(), MythThemedDialog::MythThemedDialog(), ImportNativeWizard::nextPressed(), FileSelector::OKPressed(), mythvideo_videomanager::VideoManagerImp::OnPosterDownloadTimeout(), MythThemedMenuPrivate::parseMenu(), PlaybackBox::PlaybackBox(), MythContextPrivate::PromptForDatabaseParams(), MythContext::PromptForSchemaUpgrade(), RecOptDialog::RecOptDialog(), MythControls::ResolveConflict(), MythburnWizard::runScript(), ExportNativeWizard::runScript(), runVideoSelector(), XMLTV_generic_config::save(), ScreenSetup::saveData(), ScanWizardScanner::Scan(), MythContext::SendReceiveStringList(), ScanWizard::SetPage(), Weather::setupScreens(), PlaybackBox::showAvailablePopup(), mythvideo_videomanager::ExecuteExternalCommand::ShowError(), TV::ShowNoRecorderDialog(), showStatus(), WelcomeDialog::shutdownNow(), MythFlixQueue::slotMoveToQueue(), startDVDRipper(), Ripper::startRipper(), MoviesUI::updateMovieTimes(), and WeatherCallback().

bool MythPopupBox::showOkCancelPopup ( MythMainWindow parent,
QString  title,
QString  message,
bool  focusOk 
) [static]

static DialogCode MythPopupBox::Show2ButtonPopup ( MythMainWindow parent,
const QString &  title,
const QString &  message,
const QString &  button1msg,
const QString &  button2msg,
DialogCode  default_button 
) [inline, static]

DialogCode MythPopupBox::ShowButtonPopup ( MythMainWindow parent,
const QString &  title,
const QString &  message,
const QStringList &  buttonmsgs,
DialogCode  default_button 
) [static]

bool MythPopupBox::showGetTextPopup ( MythMainWindow parent,
QString  title,
QString  message,
QString &  text 
) [static]

QString MythPopupBox::showPasswordPopup ( MythMainWindow parent,
QString  title,
QString  message 
) [static]

Like showGetTextPopup(), but doesn't echo the text entered.

Uses MythLineEdit instead of MythRemoteLineEdit, so that PINs can be entered without having to cycle through the number key "phone entry" mode.

Definition at line 711 of file mythdialogs.cpp.

Referenced by BackendSelect::Connect().

void MythPopupBox::AcceptItem ( int  i  )  [virtual, slot]

void MythPopupBox::accept ( void   )  [virtual, slot]

void MythPopupBox::reject ( void   )  [virtual, slot]

virtual void MythPopupBox::popupDone ( int   )  [virtual, signal]

bool MythPopupBox::focusNextPrevChild ( bool  next  )  [protected]

void MythPopupBox::keyPressEvent ( QKeyEvent *  e  )  [protected]

void MythPopupBox::defaultButtonPressedHandler ( void   )  [protected, slot]

Definition at line 568 of file mythdialogs.cpp.

Referenced by addButton().


Member Data Documentation

QVBoxLayout* MythPopupBox::vbox [private]

Reimplemented in SmartPlaylistDialog, SmartPLOrderByDialog, and SmartPLDateDialog.

Definition at line 215 of file mythdialogs.h.

Referenced by addLayout(), addWidget(), and MythPopupBox().

Definition at line 216 of file mythdialogs.h.

Referenced by addWidget(), and MythPopupBox().

int MythPopupBox::hpadding [private]

Definition at line 217 of file mythdialogs.h.

Referenced by MythPopupBox(), and ShowPopupAtXY().

int MythPopupBox::wpadding [private]

Definition at line 217 of file mythdialogs.h.

Referenced by MythPopupBox(), and ShowPopupAtXY().

Definition at line 218 of file mythdialogs.h.

Referenced by addButton(), keyPressEvent(), and MythPopupBox().


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

Generated on Sat Dec 18 05:16:08 2010 for MythTV by  doxygen 1.5.5