Ticket #4075: backend-autoselect-1.patch
File backend-autoselect-1.patch, 24.2 KB (added by , 17 years ago) |
---|
-
libs/libmyth/mythcontext.cpp
35 35 #include "themeinfo.h" 36 36 37 37 #include "libmythui/mythmainwindow.h" 38 #include "libmythupnp/masterselection.h" 38 39 39 40 // These defines provide portability for different 40 41 // plugin file names. … … 190 191 } 191 192 } 192 193 194 class MediaRenderer; 195 193 196 class MythContextPrivate 194 197 { 195 198 public: 196 199 MythContextPrivate(MythContext *lparent); 197 200 ~MythContextPrivate(); 198 201 199 bool Init(bool gui, DatabaseParams *pParams = NULL);202 bool Init(bool gui, bool promptForBackend); 200 203 bool IsWideMode() const {return (m_baseWidth == 1280);} 201 204 void SetWideMode() {m_baseWidth = 1280; m_baseHeight = 720;} 202 205 bool IsSquareMode() const {return (m_baseWidth == 800);} … … 221 224 int intResponse(const QString &query, int def); 222 225 bool PromptForDatabaseParams(QString error); 223 226 QString TestDBconnection(void); 227 int ChooseBackend(void); 228 bool UPnPconnect(void); 224 229 225 230 MythContext *parent; 226 231 … … 249 254 QMutex m_hostnamelock; 250 255 QString m_localhostname; 251 256 257 MediaRenderer *m_UPnP; //< For automatic backend discover 258 DatabaseParams m_DBparams; //< Database details if we succeed 259 252 260 QMutex serverSockLock; 253 261 bool attemptingToConnect; 254 262 … … 313 321 m_xbase(0), m_ybase(0), m_height(0), m_width(0), 314 322 m_baseWidth(800), m_baseHeight(600), 315 323 m_localhostname(QString::null), 324 m_UPnP(NULL), 316 325 serverSockLock(false), 317 326 attemptingToConnect(false), 318 327 language(""), … … 451 460 } 452 461 } 453 462 454 bool MythContextPrivate::Init(bool gui, DatabaseParams *pParams)463 bool MythContextPrivate::Init(bool gui, bool promptForBackend) 455 464 { 456 465 m_gui = gui; 457 466 … … 460 469 screensaver = ScreenSaverControl::get(); 461 470 462 471 // ---- database connection stuff ---- 472 473 // The user can force the AutoDiscovery chooser by the --prompt argument. 474 // Otherwise, we attempt to load mysql.txt, and then the UPnP config.xml. 475 // If either of these fails, we pop up the chooser. 463 476 464 // Attempts to read DB info from "mysql.txt" from the465 // filesystem, or create it if it does not exist.466 if (!LoadDatabaseSettings(pParams))467 return false;477 if (!promptForBackend) // not forced via command line --prompt 478 { 479 // FIXME: Use XmlConfiguration instead? 480 QFile config(parent->GetConfDir() + "/config.xml"); 468 481 482 if (config.exists()) 483 { 484 if (!UPnPconnect()) // bad UUID, can't find backend 485 promptForBackend = true; 486 } 487 else 488 { 489 if (!LoadSettingsFiles("mysql.txt")) // missing or bad file 490 promptForBackend = true; 491 } 492 } 493 494 495 // There is currently no backend chooser that will run from the console: 496 if (!m_gui) 497 promptForBackend = false; 498 499 500 if (promptForBackend) 501 switch (ChooseBackend()) 502 { 503 case -1: // User cancelled. Exit application 504 return false; 505 506 case 0: // User selected "Do no connect" 507 return true; 508 509 case 1: // User selected a backend, so m_DBparams 510 break; // should now contain the database details 511 512 default: // User asked to configure database manually 513 514 if (!PromptForDatabaseParams("") // Changed their mind? 515 || !parent->SaveDatabaseParams(m_DBparams)) 516 return false; 517 break; 518 } 519 else 520 if (!LoadDatabaseSettings()) 521 return false; 522 469 523 // Attempt to connect to the database, get message for user if it failed. 470 524 QString failure = TestDBconnection(); 471 525 … … 474 528 if (failure.length()) 475 529 { 476 530 VERBOSE(VB_IMPORTANT, failure); 477 if (PromptForDatabaseParams(failure)) 531 if ((promptForBackend && ChooseBackend()) || 532 (!promptForBackend && PromptForDatabaseParams(failure))) 478 533 { 479 534 failure = TestDBconnection(); 480 535 if (failure.length()) … … 504 559 { 505 560 imageCache.clear(); 506 561 562 if (m_UPnP) 563 delete m_UPnP; 507 564 if (m_settings) 508 565 delete m_settings; 509 566 if (m_qtThemeSettings) … … 949 1006 return QString::null; 950 1007 } 951 1008 1009 int MythContextPrivate::ChooseBackend(void) 1010 { 1011 VERBOSE(VB_UPNP, "Putting up the UPnP backend chooser"); 952 1012 1013 TempMainWindow(); 1014 1015 if (!m_UPnP) 1016 m_UPnP = new MediaRenderer(); 1017 1018 int stat = MasterSelection::GetConnectionInfo(m_UPnP, &m_DBparams); 1019 1020 parent->SetMainWindow(NULL); 1021 EndTempWindow(); 1022 1023 return stat; 1024 } 1025 1026 /** 1027 * Get the default backend from config.xml, use UPnP to find it. 1028 * 1029 * @return true if we could get the database connection parameters 1030 * from the backend (which are stored in m_DBparams) 1031 */ 1032 bool MythContextPrivate::UPnPconnect(void) 1033 { 1034 if (!m_UPnP) 1035 m_UPnP = new MediaRenderer(); 1036 1037 DeviceLocation *pDevLoc = m_UPnP->GetDefaultMaster(); 1038 if (!pDevLoc) 1039 { 1040 VERBOSE(VB_UPNP, "No default master backend stored in config.xml ???"); 1041 return false; 1042 } 1043 1044 MythXMLClient mythXml(pDevLoc->m_sLocation); 1045 QString sPin = pDevLoc->m_sSecurityPin; 1046 QString sMsg; 1047 1048 if (mythXml.GetConnectionInfo(sPin, &m_DBparams, sMsg) 1049 == UPnPResult_Success) 1050 { 1051 VERBOSE(VB_GENERAL, QString("UPnP got database hostname: %1") 1052 .arg(m_DBparams.dbHostName)); 1053 return true; 1054 } 1055 1056 // The stored PIN might not be correct, or the backend may not be there. 1057 // We could prompt for the PIN and try again, but that needs a UI. 1058 // Easier to fail for now, and put up the full UI selector later 1059 1060 return false; 1061 } 1062 1063 953 1064 MythContext::MythContext(const QString &binversion) 954 1065 : QObject(), d(NULL), app_binary_version(binversion) 955 1066 { … … 958 1069 d = new MythContextPrivate(this); 959 1070 } 960 1071 961 bool MythContext::Init(bool gui, DatabaseParams *pParams)1072 bool MythContext::Init(bool gui, bool promptForBackend) 962 1073 { 963 1074 if (app_binary_version != MYTH_BINARY_VERSION) 964 1075 { … … 982 1093 return false; 983 1094 } 984 1095 985 if (!d->Init(gui, p Params))1096 if (!d->Init(gui, promptForBackend)) 986 1097 return false; 987 1098 988 1099 ActivateSettingsCache(true); -
libs/libmyth/mythcontext.h
248 248 MythContext(const QString &binversion); 249 249 virtual ~MythContext(); 250 250 251 bool Init(bool gui = true, DatabaseParams *pParams = NULL);251 bool Init(bool gui = true, bool promptForBackend = false); 252 252 253 253 QString GetMasterHostPrefix(void); 254 254 -
libs/libmythupnp/libmythupnp.pro
17 17 18 18 # Input 19 19 20 HEADERS += httprequest.h upnp.h ssdp.h taskqueue.h 21 HEADERS += upnpdevice.h upnptasknotify.h upnptasksearch.h threadpool.h upnputil.h 22 HEADERS += httpserver.h upnpcds.h upnpcdsobjects.h bufferedsocketdevice.h upnpmsrr.h 23 HEADERS += eventing.h upnpcmgr.h upnptaskevent.h upnptaskcache.h ssdpcache.h 20 HEADERS += httprequest.h upnp.h ssdp.h taskqueue.h upnputil.h 21 HEADERS += upnpdevice.h upnptasknotify.h upnptasksearch.h threadpool.h 22 HEADERS += httpserver.h upnpcds.h upnpcdsobjects.h 23 HEADERS += bufferedsocketdevice.h upnpmsrr.h eventing.h upnpcmgr.h 24 HEADERS += upnptaskevent.h upnptaskcache.h ssdpcache.h 24 25 HEADERS += upnpimpl.h multicast.h broadcast.h configuration.h 25 26 HEADERS += soapclient.h mythxmlclient.h 27 HEADERS += mediarenderer.h masterselection.h 26 28 27 29 SOURCES += httprequest.cpp upnp.cpp ssdp.cpp taskqueue.cpp upnputil.cpp 28 30 SOURCES += upnpdevice.cpp upnptasknotify.cpp upnptasksearch.cpp threadpool.cpp 29 SOURCES += httpserver.cpp upnpcds.cpp upnpcdsobjects.cpp bufferedsocketdevice.cpp 30 SOURCES += eventing.cpp upnpcmgr.cpp upnpmsrr.cpp upnptaskevent.cpp ssdpcache.cpp 31 SOURCES += configuration.cpp soapclient.cpp mythxmlclient.cpp 31 SOURCES += httpserver.cpp upnpcds.cpp upnpcdsobjects.cpp 32 SOURCES += bufferedsocketdevice.cpp upnpmsrr.cpp eventing.cpp upnpcmgr.cpp 33 SOURCES += upnptaskevent.cpp ssdpcache.cpp configuration.cpp 34 SOURCES += soapclient.cpp mythxmlclient.cpp 35 SOURCES += mediarenderer.cpp masterselection.cpp 32 36 33 37 INCLUDEPATH += ../libmyth 34 INCLUDEPATH += ../.. 38 INCLUDEPATH += ../.. .. 35 39 DEPENDPATH += ../libmythtv ../libmyth ../libavcodec 36 40 DEPENDPATH += ../libavformat 37 41 -
programs/mythfrontend/masterselection.cpp
27 27 #include "lircevent.h" 28 28 #endif 29 29 30 #include "mythdialogs.h" 31 30 32 ///////////////////////////////////////////////////////////////////////////// 31 33 // return values: -1 = Exit Application 32 34 // 0 = Continue with no Connection Infomation 33 35 // 1 = Connection Information found 34 36 ///////////////////////////////////////////////////////////////////////////// 35 37 36 int MasterSelection::GetConnectionInfo( MediaRenderer *pUPnp, 37 DatabaseParams *pParams, 38 bool bPromptForBackend ) 38 int MasterSelection::GetConnectionInfo(MediaRenderer *pUPnp, 39 DatabaseParams *pParams) 39 40 { 40 41 if ((pUPnp == NULL) || (pParams == NULL)) 41 42 { … … 44 45 return -1; 45 46 } 46 47 47 // ----------------------------------------------------------------------48 // Try to get the last selected (default) Master49 // ----------------------------------------------------------------------50 51 48 int nRetCode = -1; 52 49 bool bExitLoop = false; 53 50 bool bFirstTime = true; 54 51 bool bTryConnectAgain = false; 55 52 QString sPin = ""; 56 M asterSelectionWindow *pMasterWindow = NULL;53 MythMainWindow *pMasterWindow = gContext->GetMainWindow(); 57 54 DeviceLocation *pDeviceLoc = NULL; 58 55 59 if (!bPromptForBackend) 60 pDeviceLoc = pUPnp->GetDefaultMaster(); 56 if (!pMasterWindow) 57 { 58 VERBOSE( VB_UPNP, 59 "MasterSelection::GetConnectionInfo - No main window?" ); 60 return -1; 61 } 62 61 63 62 if (pDeviceLoc != NULL)63 sPin = pDeviceLoc->m_sSecurityPin;64 65 64 // ---------------------------------------------------------------------- 66 65 // Loop until we have a valid DatabaseParams, or the user cancels 67 66 // ---------------------------------------------------------------------- … … 74 73 { 75 74 bFirstTime = true; 76 75 77 if ( pMasterWindow == NULL)78 {79 pMasterWindow = new MasterSelectionWindow();80 pMasterWindow->show();81 }82 83 76 MasterSelectionDialog selectionDlg( pMasterWindow ); 84 77 85 78 // -------------------------------------------------------------- … … 135 128 136 129 case UPnPResult_ActionNotAuthorized: 137 130 { 138 if ( pMasterWindow == NULL)139 {140 pMasterWindow = new MasterSelectionWindow();141 pMasterWindow->show();142 }143 144 131 // Don't show Access Denied Error to user since this 145 132 // is the first time they will see the pin dialog. 146 133 147 134 if (bFirstTime) 148 135 { 149 sMsg = " ";136 sMsg = "Please enter the backend access PIN"; 150 137 bFirstTime = false; 151 138 } 152 139 153 140 // Prompt For Pin and try again... 154 141 155 VERBOSE( VB_IMPORTANT, QString( "Access Denied for %1" )156 .arg( pDeviceLoc->GetFriendlyName( true ) ));142 QString sName = pDeviceLoc->GetFriendlyName( true ); 143 VERBOSE( VB_IMPORTANT, "Access Denied for " + sName); 157 144 158 PinDialog *passwordDlg = new PinDialog(pMasterWindow, 159 pDeviceLoc->GetFriendlyName( true ), sMsg); 145 /*********** 146 PinDialog *passwordDlg = new PinDialog( pMasterWindow, 147 sName, sMsg ); 160 148 161 149 if ( passwordDlg->exec() == QDialog::Accepted ) 162 150 { 163 151 sPin = passwordDlg->GetPin(); 152 } 153 ************/ 154 if (MythPopupBox::showGetTextPopup(pMasterWindow, 155 sName, sMsg, sPin)) 156 { 157 VERBOSE(VB_UPNP, "Got a PIN of " + sPin); 164 158 bTryConnectAgain = true; 165 159 } 160 else VERBOSE(VB_UPNP, "Got no PIN of " + sPin); 166 161 167 delete passwordDlg; 168 162 //delete passwordDlg; 169 163 break; 170 164 } 171 165 172 166 default: 173 167 { 174 if ( pMasterWindow == NULL)175 {176 pMasterWindow = new MasterSelectionWindow();177 pMasterWindow->show();178 }179 180 168 // Display Error Msg and have user select different Master. 181 169 182 170 VERBOSE( VB_IMPORTANT, QString( "Error Retrieving " … … 213 201 } 214 202 } 215 203 216 if ( pMasterWindow != NULL)217 {218 pMasterWindow->hide();219 delete pMasterWindow;220 }221 222 204 return nRetCode; 223 205 } 224 206 … … 226 208 // 227 209 ///////////////////////////////////////////////////////////////////////////// 228 210 229 MasterSelectionWindow::MasterSelectionWindow()230 : QWidget( NULL, "BackgroundWindow")211 PinDialog::PinDialog( MythMainWindow *pParent, QString name, QString sMsg ) 212 : MythDialog( pParent, "Pin Entry", TRUE ) 231 213 { 232 QDesktopWidget *pDesktop = QApplication::desktop();233 234 int nScreenHeight = pDesktop->height();235 236 float fhMulti = nScreenHeight / (float)600;237 238 QFont font = QFont("Arial");239 240 if (!font.exactMatch())241 font = QFont();242 243 font.setStyleHint( QFont::SansSerif, QFont::PreferAntialias );244 font.setPointSize((int)floor(14 * fhMulti ));245 246 QColorGroup colors( QColor( 255, 255, 255 ), // Foreground247 QColor( 0, 64, 128 ), // background248 QColor( 196, 196, 196 ), // light249 QColor( 64, 64, 64 ), // dark250 QColor( 128, 128, 128 ), // mid251 QColor( 255, 255, 255 ), // text252 QColor( 0, 100, 192 )); // Base253 254 QApplication::setFont ( font, TRUE );255 QApplication::setPalette( QPalette( colors, colors, colors ), TRUE );256 257 showFullScreen();258 259 }260 261 /*262 #ifdef USE_LIRC263 264 pthread_t lirc_tid;265 pthread_attr_t attr;266 pthread_attr_init(&attr);267 pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);268 pthread_create(&lirc_tid, &attr, SpawnLirc, this);269 pthread_attr_destroy(&attr);270 271 #endif272 273 #ifdef USE_JOYSTICK_MENU274 pthread_t js_tid;275 276 pthread_attr_t attr2;277 pthread_attr_init(&attr2);278 pthread_attr_setdetachstate(&attr2, PTHREAD_CREATE_DETACHED);279 pthread_create(&js_tid, &attr2, SpawnJoystickMenu, this);280 pthread_attr_destroy(&attr2);281 #endif282 283 #ifdef USING_APPLEREMOTE284 pthread_t appleremote_tid;285 286 pthread_attr_t attr3;287 pthread_attr_init(&attr3);288 pthread_attr_setdetachstate(&attr3, PTHREAD_CREATE_DETACHED);289 pthread_create(&appleremote_tid, &attr3, SpawnAppleRemote, this);290 pthread_attr_destroy(&attr3);291 #endif292 }293 294 void MasterSelectionWindow::customEvent(QCustomEvent *e)295 {296 297 298 #ifdef USE_LIRC299 300 if (e->type() == kLircKeycodeEventType)301 {302 LircKeycodeEvent *lke = (LircKeycodeEvent *)e;303 int keycode = lke->getKeycode();304 305 if (keycode)306 {307 switch (keycode)308 {309 case Qt::Key_Left :310 {311 keycode = Qt::Key_BackTab;312 break;313 }314 case Qt::Key_Right :315 {316 keycode = Qt::Key_Tab;317 break;318 }319 default:320 break;321 }322 323 int mod = keycode & MODIFIER_MASK;324 int k = keycode & ~MODIFIER_MASK; // trim off the mod325 int ascii = 0;326 QString text;327 328 if (k & UNICODE_ACCEL)329 {330 QChar c(k & ~UNICODE_ACCEL);331 ascii = c.latin1();332 text = QString(c);333 }334 335 mod = ((mod & Qt::CTRL) ? Qt::ControlButton : 0) |336 ((mod & Qt::META) ? Qt::MetaButton : 0) |337 ((mod & Qt::ALT) ? Qt::AltButton : 0) |338 ((mod & Qt::SHIFT) ? Qt::ShiftButton : 0);339 340 QKeyEvent key(lke->isKeyDown() ? QEvent::KeyPress :341 QEvent::KeyRelease, k, ascii, mod, text);342 343 QObject *key_target = getTarget();344 if (!key_target)345 QApplication::sendEvent(this, &key);346 else347 QApplication::sendEvent(key_target, &key);348 }349 else350 {351 VERBOSE(VB_IMPORTANT, QString("LircClient warning: attempt to "352 "convert '%1' to a key sequence failed. Fix "353 "your key mappings.")354 .arg(lke->getLircText()));355 }356 }357 358 #endif359 }360 361 */362 363 QObject *MasterSelectionWindow::getTarget()364 {365 QObject *key_target = NULL;366 367 key_target = QWidget::keyboardGrabber();368 369 if (!key_target)370 {371 QWidget *focus_widget = qApp->focusWidget();372 if (focus_widget && focus_widget->isEnabled())373 {374 key_target = focus_widget;375 }376 }377 378 if (!key_target)379 key_target = this;380 381 return key_target;382 }383 384 /////////////////////////////////////////////////////////////////////////////385 //386 /////////////////////////////////////////////////////////////////////////////387 388 PinDialog::PinDialog( QWidget *pParent, QString name, QString sMsg )389 : QDialog( pParent, "Pin Entry", TRUE, WType_Popup )390 {391 214 setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); 392 215 393 216 m_pPassword = new QLineEdit( this ); … … 446 269 // 447 270 ///////////////////////////////////////////////////////////////////////////// 448 271 449 MasterSelectionDialog::MasterSelectionDialog( MasterSelectionWindow *pParent ) 450 : QDialog( pParent, "Master Mediaserver Selection", TRUE, 451 WStyle_Customize | WStyle_NoBorder ) 272 MasterSelectionDialog::MasterSelectionDialog( MythMainWindow *pParent ) 273 : MythDialog( pParent, "Master Mediaserver Selection", TRUE) 452 274 { 453 275 setFocusPolicy(QWidget::NoFocus); 454 276 -
programs/mythfrontend/main.cpp
50 50 51 51 #include "libmythui/myththemedmenu.h" 52 52 #include "libmythui/myththemebase.h" 53 #include "mediarenderer.h"54 #include "masterselection.h"55 53 56 54 #define NO_EXIT 0 57 55 #define QUIT 1 … … 62 60 static MythThemeBase *themeBase; 63 61 XBox *xbox = NULL; 64 62 65 MediaRenderer *g_pUPnp = NULL;66 67 63 void startGuide(void) 68 64 { 69 65 uint chanid = 0; … … 1008 1004 } 1009 1005 1010 1006 gContext = new MythContext(MYTH_BINARY_VERSION); 1011 g_pUPnp = new MediaRenderer();1012 1007 1013 DatabaseParams *pParams = NULL; 1014 1015 if (!bBypassAutoDiscovery) 1008 if (!gContext->Init( true, bPromptForBackend )) 1016 1009 { 1017 pParams = new DatabaseParams;1018 1019 int nRetCode = MasterSelection::GetConnectionInfo( g_pUPnp,1020 pParams,1021 bPromptForBackend );1022 switch( nRetCode )1023 {1024 case -1: // Exit Application1025 return FRONTEND_EXIT_OK;1026 1027 case 0: // Continue with no Connection Infomation1028 {1029 delete pParams;1030 pParams = NULL;1031 1032 break;1033 }1034 1035 case 1: // Connection Information found1036 default:1037 break;1038 }1039 }1040 1041 if (!gContext->Init( true, pParams ))1042 {1043 1010 VERBOSE(VB_IMPORTANT, "Failed to init MythContext, exiting."); 1044 1011 return FRONTEND_EXIT_NO_MYTHCONTEXT; 1045 1012 } 1046 1013 1047 if (pParams != NULL)1048 {1049 delete pParams;1050 pParams = NULL;1051 }1052 1053 1014 for(int argpos = 1; argpos < a.argc(); ++argpos) 1054 1015 { 1055 1016 if (!strcmp(a.argv()[argpos],"-l") || … … 1445 1406 DestroyMythMainWindow(); 1446 1407 delete themeBase; 1447 1408 delete gContext; 1448 delete g_pUPnp;1449 1409 1450 1410 return FRONTEND_EXIT_OK; 1451 1411 } -
programs/mythfrontend/mythfrontend.pro
26 26 HEADERS += manualbox.h playbackbox.h viewscheduled.h globalsettings.h 27 27 HEADERS += manualschedule.h programrecpriority.h channelrecpriority.h 28 28 HEADERS += statusbox.h networkcontrol.h custompriority.h 29 HEADERS += mediarenderer.h masterselection.h30 29 31 30 SOURCES += main.cpp manualbox.cpp playbackbox.cpp viewscheduled.cpp 32 31 SOURCES += globalsettings.cpp manualschedule.cpp programrecpriority.cpp 33 32 SOURCES += channelrecpriority.cpp statusbox.cpp networkcontrol.cpp 34 SOURCES += mediarenderer.cpp masterselection.cpp35 33 SOURCES += custompriority.cpp 36 34 37 35 macx { -
programs/mythfrontend/masterselection.h
17 17 #include <qmap.h> 18 18 #include <math.h> 19 19 20 #include "libmythupnp/upnpdevice.h" 20 #include "mythdialogs.h" 21 #include "upnpdevice.h" 21 22 #include "mediarenderer.h" 22 23 23 24 #ifndef __MASTERSELECTION_H__ … … 31 32 { 32 33 public: 33 34 34 static int GetConnectionInfo( MediaRenderer *pUPnp, 35 DatabaseParams *pParams, 36 bool bPromptForBackend ); 35 static int GetConnectionInfo(MediaRenderer *pUPnp, 36 DatabaseParams *pParams); 37 37 }; 38 38 39 39 ///////////////////////////////////////////////////////////////////////////// … … 66 66 // 67 67 ///////////////////////////////////////////////////////////////////////////// 68 68 69 class MasterSelection Window : public QWidget69 class MasterSelectionDialog : public MythDialog 70 70 { 71 public:72 73 MasterSelectionWindow();74 75 protected:76 77 //void customEvent(QCustomEvent *e);78 QObject *getTarget();79 80 };81 82 /////////////////////////////////////////////////////////////////////////////83 //84 /////////////////////////////////////////////////////////////////////////////85 86 class MasterSelectionDialog : public QDialog87 {88 71 Q_OBJECT 89 72 90 73 protected: … … 108 91 109 92 public: 110 93 111 MasterSelectionDialog( MasterSelectionWindow *pParent );94 MasterSelectionDialog(MythMainWindow *pParent ); 112 95 virtual ~MasterSelectionDialog(); 113 96 114 97 void customEvent(QCustomEvent *e); … … 122 105 // 123 106 ///////////////////////////////////////////////////////////////////////////// 124 107 125 class PinDialog : public QDialog108 class PinDialog : public MythDialog 126 109 { 127 110 Q_OBJECT 128 111 129 112 public: 130 113 131 PinDialog( QWidget *pParent, QString name, QString sMsg ); 114 PinDialog( MythMainWindow *pParent, 115 QString name, QString sMsg ); 132 116 virtual ~PinDialog(); 133 117 134 118 QString GetPin();