Child of MythDialog used for most popup menus in MythTV. More...
#include <mythdialogs.h>
Public Types | |
| enum | LabelSize { Large, Medium, Small } |
Public Slots | |
| virtual void | AcceptItem (int) |
| virtual void | accept (void) |
| virtual void | reject (void) |
Signals | |
| void | popupDone (int) |
Public Member Functions | |
| MythPopupBox (MythMainWindow *parent, const char *name="MythPopupBox") | |
| MythPopupBox (MythMainWindow *parent, bool graphicPopup, QColor popupForeground, QColor popupBackground, QColor popupHighlight, const char *name="MythPopupBox") | |
| void | addWidget (QWidget *widget, bool setAppearance=true) |
| void | addLayout (QLayout *layout, int stretch=0) |
| QLabel * | addLabel (QString caption, LabelSize size=Medium, bool wrap=false) |
| QAbstractButton * | 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()) |
| 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) |
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 |
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 122 of file mythdialogs.h.
Definition at line 135 of file mythdialogs.h.
| MythPopupBox::MythPopupBox | ( | MythMainWindow * | parent, | |
| const char * | name = "MythPopupBox" | |||
| ) |
Definition at line 257 of file mythdialogs.cpp.
Referenced by ShowButtonPopup(), showGetTextPopup(), and showOkPopup().
| MythPopupBox::MythPopupBox | ( | MythMainWindow * | parent, | |
| bool | graphicPopup, | |||
| QColor | popupForeground, | |||
| QColor | popupBackground, | |||
| QColor | popupHighlight, | |||
| const char * | name = "MythPopupBox" | |||
| ) |
Definition at line 282 of file mythdialogs.cpp.
| MythPopupBox::~MythPopupBox | ( | ) | [inline, protected] |
Definition at line 180 of file mythdialogs.h.
| void MythPopupBox::addWidget | ( | QWidget * | widget, | |
| bool | setAppearance = true | |||
| ) |
Definition at line 411 of file mythdialogs.cpp.
Referenced by addButton(), addLabel(), DeviceTree::RunTypeDialog(), showGetTextPopup(), ChannelImporter::ShowManualChannelPopup(), StorageGroupPopup::showPopup(), and RecordingProfilePopup::showPopup().
| void MythPopupBox::addLayout | ( | QLayout * | layout, | |
| int | stretch = 0 | |||
| ) |
Definition at line 472 of file mythdialogs.cpp.
Definition at line 429 of file mythdialogs.cpp.
Referenced by DeviceTree::RunTypeDialog(), ShowButtonPopup(), showGetTextPopup(), ChannelImporter::ShowManualChannelPopup(), showOkPopup(), StorageGroupPopup::showPopup(), and RecordingProfilePopup::showPopup().
| QAbstractButton * MythPopupBox::addButton | ( | QString | caption, | |
| QObject * | target = NULL, |
|||
| const char * | slot = NULL | |||
| ) |
Definition at line 457 of file mythdialogs.cpp.
Referenced by ShowButtonPopup(), showGetTextPopup(), ChannelImporter::ShowManualChannelPopup(), showOkPopup(), StorageGroupPopup::showPopup(), and RecordingProfilePopup::showPopup().
| void MythPopupBox::ShowPopup | ( | QObject * | target = NULL, |
|
| const char * | slot = NULL | |||
| ) |
Definition at line 477 of file mythdialogs.cpp.
Referenced by ExecPopup().
| void MythPopupBox::ShowPopupAtXY | ( | int | destx, | |
| int | desty, | |||
| QObject * | target = NULL, |
|||
| const char * | slot = NULL | |||
| ) |
Definition at line 482 of file mythdialogs.cpp.
Referenced by ExecPopupAtXY(), and ShowPopup().
| DialogCode MythPopupBox::ExecPopup | ( | QObject * | target = NULL, |
|
| const char * | slot = NULL | |||
| ) |
Definition at line 605 of file mythdialogs.cpp.
Referenced by DeviceTree::RunTypeDialog(), ShowButtonPopup(), showGetTextPopup(), ChannelImporter::ShowManualChannelPopup(), showOkPopup(), StorageGroupPopup::showPopup(), and RecordingProfilePopup::showPopup().
| DialogCode MythPopupBox::ExecPopupAtXY | ( | int | destx, | |
| int | desty, | |||
| QObject * | target = NULL, |
|||
| const char * | slot = NULL | |||
| ) |
Definition at line 615 of file mythdialogs.cpp.
| bool MythPopupBox::showOkPopup | ( | MythMainWindow * | parent, | |
| const QString & | title, | |||
| const QString & | message, | |||
| QString | button_msg = QString() | |||
| ) | [static] |
Definition at line 694 of file mythdialogs.cpp.
Referenced by AudioConfigSettings::AudioRescan(), AudioTest::AudioTest(), PlaybackProfileConfigs::btnPress(), CardInput::CreateNewInputGroup(), CaptureCardEditor::edit(), get_cardtype(), ChannelScannerGUI::InformUser(), MythThemedDialog::MythThemedDialog(), ChannelImporter::Process(), SchemaUpgradeWizard::PromptForUpgrade(), XMLTV_generic_config::Save(), ScanWizard::SetPage(), AudioTest::togglequality(), and AudioSetupWizard::toggleSpeakers().
| DialogCode MythPopupBox::Show2ButtonPopup | ( | MythMainWindow * | parent, | |
| const QString & | title, | |||
| const QString & | message, | |||
| const QString & | button1msg, | |||
| const QString & | button2msg, | |||
| DialogCode | default_button | |||
| ) | [static] |
Definition at line 744 of file mythdialogs.cpp.
Referenced by ProfileGroupEditor::callDelete(), VideoSourceEditor::del(), CaptureCardEditor::del(), MythGamePlayerEditor::del(), TransportListEditor::Delete(), StorageGroupListEditor::doDelete(), StorageGroupEditor::doDelete(), PlayGroupEditor::doDelete(), ChannelGroupEditor::doDelete(), VideoSourceEditor::edit(), CaptureCardEditor::edit(), VideoSourceEditor::menu(), CaptureCardEditor::menu(), TransportListEditor::Menu(), and MythGamePlayerEditor::menu().
| DialogCode MythPopupBox::ShowButtonPopup | ( | MythMainWindow * | parent, | |
| const QString & | title, | |||
| const QString & | message, | |||
| const QStringList & | buttonmsgs, | |||
| DialogCode | default_button | |||
| ) | [static] |
Definition at line 759 of file mythdialogs.cpp.
Referenced by ChannelImporter::QueryUserDelete(), ChannelImporter::QueryUserInsert(), ChannelImporter::QueryUserUpdate(), MediaMonitor::selectDrivePopup(), and Show2ButtonPopup().
| bool MythPopupBox::showGetTextPopup | ( | MythMainWindow * | parent, | |
| QString | title, | |||
| QString | message, | |||
| QString & | text | |||
| ) | [static] |
Definition at line 716 of file mythdialogs.cpp.
Referenced by PlaybackProfileConfigs::btnPress(), CardInput::CreateNewInputGroup(), RotorPosMap::edit(), PlayGroupEditor::open(), and ChannelGroupEditor::open().
| void MythPopupBox::AcceptItem | ( | int | i | ) | [virtual, slot] |
Reimplemented from MythDialog.
Definition at line 587 of file mythdialogs.cpp.
Referenced by defaultButtonPressedHandler().
| void MythPopupBox::accept | ( | void | ) | [virtual, slot] |
Reimplemented from MythDialog.
Definition at line 593 of file mythdialogs.cpp.
Referenced by showGetTextPopup(), and showOkPopup().
| void MythPopupBox::reject | ( | void | ) | [virtual, slot] |
Reimplemented from MythDialog.
Definition at line 599 of file mythdialogs.cpp.
Referenced by keyPressEvent(), and showGetTextPopup().
| void MythPopupBox::popupDone | ( | int | ) | [signal] |
Referenced by accept(), AcceptItem(), reject(), and ShowPopupAtXY().
Definition at line 324 of file mythdialogs.cpp.
| void MythPopupBox::keyPressEvent | ( | QKeyEvent * | e | ) | [protected] |
Reimplemented from MythDialog.
Definition at line 566 of file mythdialogs.cpp.
| void MythPopupBox::defaultButtonPressedHandler | ( | void | ) | [protected, slot] |
Definition at line 626 of file mythdialogs.cpp.
Referenced by addButton().
QVBoxLayout* MythPopupBox::vbox [private] |
Definition at line 188 of file mythdialogs.h.
Referenced by addLayout(), addWidget(), and MythPopupBox().
QColor MythPopupBox::popupForegroundColor [private] |
Definition at line 189 of file mythdialogs.h.
Referenced by addWidget(), and MythPopupBox().
int MythPopupBox::hpadding [private] |
Definition at line 190 of file mythdialogs.h.
Referenced by MythPopupBox(), and ShowPopupAtXY().
int MythPopupBox::wpadding [private] |
Definition at line 190 of file mythdialogs.h.
Referenced by MythPopupBox(), and ShowPopupAtXY().
1.6.3