void TutorialStateChecklistWizardPoints::begin ()
{
    LOG4CPP_INFO_S ((*mainCat)) << "TutorialStateChecklistWizardPoints::begin ()";

    TutorialStateChecklistWizardAbstract::begin();
    connect (previous(), SIGNAL (signalTriggered ()), this, SLOT (slotPrevious ()));
}
void TutorialStateCurveSelection::begin ()
{
  LOG4CPP_INFO_S ((*mainCat)) << "TutorialStateCurveSelection::begin ()";

  m_title = createTitle ("Curve Selection");
  m_background = createPixmapItem (":/engauge/img/panel_curve_selection.png",
                                   QPoint (0, 30));
  m_text0 = createTextItem ("After the axis points have been created, a\n"
                            "curve is selected to receive curve points.\n"
                            "Step 1 - click on Curve, Point Match, Color\n"
                            "Picker or Segment Fill buttons.",
                            QPoint (250, 40));
  m_text1 = createTextItem ("Step 2 - Select the desired curve name. If\n"
                            "that curve name has not been created yet,\n"
                            "use the menu option Settings / Curve Names\n"
                            "to create it.",
                            QPoint (250, 120));
  m_text2 = createTextItem ("Step 3 - Change the background from the\n"
                            "original image to the filtered image\n"
                            "produced for the current curve, using the\n"
                            "menu option View / Background / Filtered\n"
                            "Image. This filtering enables the powerful\n"
                            "automated algorithms discussed later in\n"
                            "the tutorial.",
                            QPoint (250, 200));
  m_text3 = createTextItem ("If the current curve is no longer visible\n"
                            "in the filtered image, then change the\n"
                            "current Color Filter settings. In the figure,\n"
                            "the orange points have disappeared.",
                            QPoint (250, 330));

  QSize backgroundSize = context().tutorialDlg().backgroundSize();

  m_previous = new TutorialButton ("Previous",
                                   context().tutorialDlg().scene());
  m_previous->setGeometry (QPoint (buttonMargin (),
                                   backgroundSize.height() - buttonMargin() - m_previous->size().height()));
  connect (m_previous, SIGNAL (signalTriggered ()), this, SLOT (slotPrevious ()));

  m_colorFilter = new TutorialButton ("Color Filter Settings",
                                      context().tutorialDlg().scene());
  m_colorFilter->setGeometry (QPoint (backgroundSize.width () / 2.0 - m_colorFilter->size ().width () / 2,
                                      backgroundSize.height () - buttonMargin () - m_colorFilter->size ().height ()));
  connect (m_colorFilter, SIGNAL (signalTriggered ()), this, SLOT (slotColorFilter ()));

  m_next = new TutorialButton ("Next",
                               context().tutorialDlg().scene());
  m_next->setGeometry (QPoint (backgroundSize.width () - buttonMargin () - m_next->size ().width (),
                               backgroundSize.height () - buttonMargin () - m_next->size ().height ()));
  connect (m_next, SIGNAL (signalTriggered ()), this, SLOT (slotNext ()));
}
Exemple #3
0
bool VideoSetupWizard::Create()
{
    bool foundtheme = false;

    // Load the theme for this screen
    foundtheme = LoadWindowFromXML("config-ui.xml", "videowizard", this);

    if (!foundtheme)
        return false;

    m_playbackProfileButtonList =
        dynamic_cast<MythUIButtonList *> (GetChild("playbackprofiles"));

    m_testSDButton = dynamic_cast<MythUIButton *> (GetChild("testsd"));
    m_testHDButton = dynamic_cast<MythUIButton *> (GetChild("testhd"));

    m_nextButton = dynamic_cast<MythUIButton *> (GetChild("next"));
    m_prevButton = dynamic_cast<MythUIButton *> (GetChild("previous"));

    if (!m_playbackProfileButtonList || !m_testSDButton ||
        !m_testHDButton ||!m_nextButton || !m_prevButton)
    {
        LOG(VB_GENERAL, LOG_ERR, "Theme is missing critical theme elements.");
        return false;
    }

    m_playbackProfileButtonList->SetHelpText( tr("Select from one of the "
                                "preconfigured playback profiles.  When "
                                "satisfied, you can test Standard Definition "
                                "and High Definition playback with the selected "
                                "profile before moving on.") );
    m_testSDButton->SetHelpText( tr("Test your playback settings with Standard "
                                    "Definition content. (480p)") );
    m_testHDButton->SetHelpText( tr("Test your playback settings with High "
                                    "Definition content (1080p).") );
    m_nextButton->SetHelpText( tr("Save these changes and move on to the "
                                  "next configuration step.") );
    m_prevButton->SetHelpText(tr("Return to the previous configuration step."));

    connect(m_testSDButton, SIGNAL(Clicked()), this, SLOT(testSDVideo()));
    connect(m_testHDButton, SIGNAL(Clicked()), this, SLOT(testHDVideo()));
    connect(m_nextButton, SIGNAL(Clicked()), this, SLOT(slotNext()));
    connect(m_prevButton, SIGNAL(Clicked()), this, SLOT(slotPrevious()));

    BuildFocusList();
    loadData();

    return true;
}
Calibration::Calibration() : QWidget()
{
	step = 1;
	
	// Etat de l'étalonnage :
	webcamChoisie = -1;
	tracking = ""; 
	choixWebcams = NULL;
	trackingChoice = NULL;

	// Layout principal
	QVBoxLayout *layoutPrincipal = new QVBoxLayout();
		QLabel *labelPrincipal = new QLabel(tr("Configuration :"));
			QFont font; font.setPointSize(20); labelPrincipal->setFont(font);
        		labelPrincipal->setAlignment(Qt::AlignCenter);
		QSpacerItem *espaceHaut = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
		layoutCentral = new QVBoxLayout();
		QSpacerItem *espaceBas = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
		QGridLayout *layoutBas = new QGridLayout();
			QSpacerItem *espaceBasGauche = new QSpacerItem(20, 40, QSizePolicy::Expanding, QSizePolicy::Minimum);
			boutonPrecedent = new QPushButton(tr("<- Precedent"));
			boutonSuivant = new QPushButton(tr("Suivant ->"));
	
	// Boutons suivants et précédents
	layoutBas->addItem(espaceBasGauche,0,0,1,1);
	layoutBas->addWidget(boutonPrecedent,0,1,1,1);
	layoutBas->addWidget(boutonSuivant,0,2,1,1);
	
	layoutPrincipal->addWidget(labelPrincipal);
	layoutPrincipal->addItem(espaceHaut);
	layoutPrincipal->addLayout(layoutCentral);
	layoutPrincipal->addItem(espaceBas);
	layoutPrincipal->addLayout(layoutBas);
	
	setLayout(layoutPrincipal);
	loadWebcamsStep(0);
	
	connect(boutonPrecedent, SIGNAL(clicked()), this, SLOT(slotPrevious()));
	connect(boutonSuivant,SIGNAL(clicked()), this, SLOT(slotNext()));
}
HistoryGUIClient::HistoryGUIClient ( Kopete::ChatSession *parent )
		: QObject ( parent ), KXMLGUIClient ( parent )
{
	setComponentData ( KGenericFactory<HistoryPlugin>::componentData() );

	m_manager = parent;

	// Refuse to build this client, it is based on wrong parameters
	if ( !m_manager || m_manager->members().isEmpty() )
		deleteLater();

	QList<Kopete::Contact*> mb=m_manager->members();
	m_logger=new HistoryLogger ( mb.first() , this );

	actionLast = new KAction ( KIcon ( "go-last" ), i18n ( "Latest History" ), this );
	actionCollection()->addAction ( "historyLast", actionLast );
	connect ( actionLast, SIGNAL (triggered(bool)), this, SLOT (slotLast()) );
	actionPrev = KStandardAction::back ( this, SLOT (slotPrevious()), this );
	actionCollection()->addAction ( "historyPrevious", actionPrev );
	actionNext = KStandardAction::forward ( this, SLOT (slotNext()), this );
	actionCollection()->addAction ( "historyNext", actionNext );

	KAction *viewChatHistory = new KAction( KIcon("view-history"), i18n("View &History" ), this );
	actionCollection()->addAction( "viewChatHistory", viewChatHistory );
	viewChatHistory->setShortcut(KShortcut (Qt::CTRL + Qt::Key_H));
	connect(viewChatHistory, SIGNAL(triggered(bool)), this, SLOT(slotViewHistory()));

	KAction *actionQuote = new KAction ( KIcon ( "go-last" ),i18n ( "Quote Last Message" ), this );
	actionCollection()->addAction ( "historyQuote",actionQuote );
	connect ( actionQuote,SIGNAL (triggered(bool)),this,SLOT (slotQuote()) );

	// we are generally at last when beginning
	actionPrev->setEnabled ( true );
	actionNext->setEnabled ( false );
	actionLast->setEnabled ( false );

	setXMLFile ( "historychatui.rc" );
}
void TutorialStateAxisPoints::begin ()
{
  LOG4CPP_INFO_S ((*mainCat)) << "TutorialStateAxisPoints::begin ()";

  m_title = createTitle (tr ("Axis Points"));
  m_background = createPixmapItem (":/engauge/img/panel_axis_points.png",
                                   QPoint (0, 30));
  m_text0 = createTextItem (tr ("Axis points are first defined to\n"
                                "define the coordinates. Step 1 -\n"
                                "Click on the Axis Points button"),
                            QPoint (320, 60));
  m_text1 = createTextItem (tr ("Step 2 - Click on an axis or grid\n"
                                "line with known coordinates. An axis\n"
                                "point appears, with a dialog window\n"
                                "for entering the axis point's\n"
                                "coordinates"),
                            QPoint (300, 210));
  m_text2 = createTextItem (tr ("Step 3 - Enter the two coordinates\n"
                                "of the axis point and then click Ok.\n"
                                "Repeat steps 2 and 3 twice more\n"
                                "until three axis points are created"),
                            QPoint (280, 320));

  QSize backgroundSize = context().tutorialDlg().backgroundSize();

  m_previous = new TutorialButton (tr ("Previous"),
                                   context().tutorialDlg().scene());
  m_previous->setGeometry (QPoint (buttonMargin (),
                                   backgroundSize.height() - buttonMargin() - m_previous->size().height()));
  connect (m_previous, SIGNAL (signalTriggered ()), this, SLOT (slotPrevious ()));

  m_next = new TutorialButton (tr ("Next"),
                               context().tutorialDlg().scene());
  m_next->setGeometry (QPoint (backgroundSize.width () - buttonMargin () - m_next->size ().width (),
                               backgroundSize.height () - buttonMargin () - m_next->size ().height ()));
  connect (m_next, SIGNAL (signalTriggered ()), this, SLOT (slotNext ()));
}
Exemple #7
0
void scopePlot::init(QString title)
{
  
  setup=true;
  setCentralWidget(wd);
  connect(ui.offsetWheel, SIGNAL(valueChanged(double)),SLOT(slotOffsetChanged(double )));
  connect(ui.rangeWheel, SIGNAL(valueChanged(double)), SLOT(slotRangeChanged(double )));
  connect(ui.samplesPushButton, SIGNAL(clicked()), this, SLOT(slotSamplesButtton()));
  plW=ui.plotWindow;
  plW->setTitle(title);
  plW->setCanvasBackground(Qt::darkBlue);
  curve1->attach(plW);
  curve2->attach(plW);
  curve3->attach(plW);
  curve4->attach(plW);
  plW->setAxisTitle(QwtPlot::xBottom,xAxisTitle);
  plW->setAxisScale(QwtPlot::xBottom, 0, 100);
  plW->setAxisTitle(QwtPlot::yLeft, "Values");
  plW->setAxisScale(QwtPlot::yLeft, -1.5, 1.5);

  QwtPlotGrid *grid = new QwtPlotGrid;
  grid->enableXMin(true);
  grid->setMajorPen(QPen(Qt::white, 0, Qt::DotLine));
  grid->setMinorPen(QPen(Qt::gray, 0 , Qt::DotLine));
  grid->attach(plW);
  QwtText m1("M1");
  m1.setColor(QColor(Qt::white));
  marker1=new QwtPlotMarker();
  marker1->setValue(0.0, 0.0);
  marker1->setLabel(m1);
  marker1->setLabelAlignment(Qt::AlignRight | Qt::AlignBottom);
  marker1->setLinePen(QPen(QColor(200,150,0), 0, Qt::DashDotLine));
  marker1->setSymbol( new QwtSymbol(QwtSymbol::Diamond,QColor(Qt::green), QColor(Qt::green), QSize(7,7)));
  //	marker1->hide();
  marker1->attach(plW);



  QwtText m2("M2");
  m2.setColor(QColor(Qt::white));
  marker2=new QwtPlotMarker();
  marker2->setValue(0.0, 0.0);
  marker2->setLabel(m2);
  marker2->setLabelAlignment(Qt::AlignLeft | Qt::AlignTop);
  marker2->setLinePen(QPen(QColor(200,150,0), 0, Qt::DashDotLine));
  marker2->setSymbol( new QwtSymbol(QwtSymbol::Diamond,QColor(Qt::yellow), QColor(Qt::yellow), QSize(7,7)));
  //	marker2->hide();
  marker2->attach(plW);



  legend = new QwtLegend;
  legend->setFrameStyle(QFrame::Box|QFrame::Sunken);
  legend->setDefaultItemMode(QwtLegendData::Checkable);
  QPalette pal(legend->palette());
  pal.setColor(QPalette::Window,Qt::darkBlue);
  pal.setColor(QPalette::WindowText,Qt::white);
  pal.setColor(QPalette::Text,Qt::black);
  legend->setPalette(pal);
  plW->insertLegend(legend, QwtPlot::BottomLegend);

  picker = new QwtPlotPicker(QwtPlot::xBottom, QwtPlot::yLeft,QwtPlotPicker::CrossRubberBand, QwtPicker::AlwaysOn, plW->canvas());
  picker->setStateMachine(new QwtPickerDragPointMachine());
  picker->setRubberBandPen(QColor(Qt::green));
  picker->setRubberBand(QwtPicker::CrossRubberBand);
  picker->setTrackerPen(QColor(Qt::white));
  picker->setEnabled(true);
  plW->replot();

  QwtPlotItemList items = plW->itemList( QwtPlotItem::Rtti_PlotCurve);
  for ( int i = 0; i < items.size(); i++ )
    {
      const QVariant itemInfo = plW->itemToInfo( items[i] );

      QwtLegendLabel *legendLabel =qobject_cast<QwtLegendLabel *>( legend->legendWidget( itemInfo ) );
      if (legendLabel )
        {
          legendLabel->setChecked( true );
        }

      items[i]->setVisible( true );
    }
  connect(picker, SIGNAL(moved(const QPointF  &)),SLOT(pickerMoved(const QPointF &)));
  connect(picker, SIGNAL(selected(const QPointF  &)), SLOT(pickerSelected(const QPointF  &)));
  connect(legend, SIGNAL(checked(const QVariant &, bool ,int)),SLOT(legendClicked(const QVariant &,bool)));
  connect(ui.nextButton, SIGNAL(clicked()),SLOT(slotNext()));
  connect(ui.previousButton, SIGNAL(clicked()),SLOT(slotPrevious()));
  plW->setAxisTitle(QwtPlot::xBottom,xAxisTitle);
  xOffset=0;
}
Exemple #8
0
void StandGrapher::createGui()
{
    //--------------------------------------------------
    // Universal button creator for the navigation bars
    //--------------------------------------------------
    class ButtonCreator
    {
    public:
        static QPushButton * create(QWidget * parent, const QString & objName, const QIcon & icon,
            const QKeySequence & key, QString toolTip, QWidget * target, const char * slot)
        {
            QPushButton * button = new QPushButton(parent);
            button->setObjectName(objName);
            button->setFocusPolicy(Qt::NoFocus);
            connect(button, SIGNAL(pressed()), target, slot);

            button->setIconSize(QSize(32, 32));
            button->setIcon(QIcon(icon));

            if (!key.isEmpty())
                toolTip += " " + tr("(Shortcut: <b>%1</b>)").arg(key.toString());
            button->setToolTip(toolTip);

            QShortcut * shortcut = new QShortcut(key, target);
            connect(shortcut, SIGNAL(activated()), target, slot);

            return button;
        }
    };

    QList<QPushButton *> buttons;

    //-------------------------------------------
    // Horizontal tool box
    //-------------------------------------------

    hToolBox = new QFrame(this);
    hToolBox->setFrameStyle(QFrame::StyledPanel | QFrame::Plain);
    hToolBox->setAutoFillBackground(true);
    hToolBox->setCursor(Qt::ArrowCursor);
    hToolBox->installEventFilter(this);

    // Create buttons
    buttons << ButtonCreator::create(hToolBox, "Start_button", QIcon(":/start.png"),
        Qt::Key_Home, tr("Start"), this, SLOT(slotStart()));
    buttons << ButtonCreator::create(hToolBox, "Prev_button", QIcon(":/previous.png"),
        Qt::Key_Left, tr("Previous"), this, SLOT(slotPrevious()));
    buttons << ButtonCreator::create(hToolBox, "HFit_button", QIcon(":/fit.png"),
        QKeySequence(), tr("Fit horizontally"), this, SLOT(slotFit()));
    buttons << ButtonCreator::create(hToolBox, "Next_button", QIcon(":/next.png"),
        Qt::Key_Right, tr("Next"), this, SLOT(slotNext()));
    buttons << ButtonCreator::create(hToolBox, "Finish_button", QIcon(":/finish.png"),
        Qt::Key_End, tr("End"), this, SLOT(slotEnd()));
    buttons << ButtonCreator::create(hToolBox, "HZoomIn_button", QIcon(":/plus.png"),
        Qt::Key_Plus, tr("Wider"), this, SLOT(slotZoomIn()));
    buttons << ButtonCreator::create(hToolBox, "HZoomOut_button", QIcon(":/minus.png"),
        Qt::Key_Minus, tr("Narrower"), this, SLOT(slotZoomOut()));

    // Layout buttons
    QHBoxLayout * hLayout = new QHBoxLayout(hToolBox);
    foreach(QPushButton * button, buttons)
        hLayout->addWidget(button);
    hToolBox->setLayout(hLayout);

    //-------------------------------------------
    // Vertical tool box
    //-------------------------------------------

    vToolBox = new QFrame(this);
    vToolBox->setFrameStyle(QFrame::StyledPanel | QFrame::Plain);
    vToolBox->setAutoFillBackground(true);
    vToolBox->setCursor(Qt::ArrowCursor);
    vToolBox->installEventFilter(this);

    buttons.clear();
    buttons << ButtonCreator::create(vToolBox, "Up_button", QIcon(":/up.png"),
        Qt::Key_Up, tr("Up"), this, SLOT(slotUp()));
    buttons << ButtonCreator::create(vToolBox, "VFit_button", QIcon(":/fit_vert.png"),
        QKeySequence(), tr("Fit vertically"), this, SLOT(slotVFit()));
    buttons << ButtonCreator::create(vToolBox, "Down_button", QIcon(":/down.png"),
        Qt::Key_Down, tr("Down"), this, SLOT(slotDown()));
    buttons << ButtonCreator::create(vToolBox, "VZoomIn_button", QIcon(":/plus.png"),
        Qt::SHIFT+Qt::Key_Plus, tr("Wider"), this, SLOT(slotVZoomIn()));
    buttons << ButtonCreator::create(vToolBox, "VZoomOut_button", QIcon(":/minus.png"),
        Qt::SHIFT+Qt::Key_Minus, tr("Narrower"), this, SLOT(slotVZoomOut()));

    // Layout buttons
    QVBoxLayout * vLayout = new QVBoxLayout(vToolBox);
    foreach(QPushButton * button, buttons)
        vLayout->addWidget(button);
    vToolBox->setLayout(vLayout);

    //-------------------------------------------
    // Tool Box
    //-------------------------------------------

    toolBox = new QFrame(this);
    toolBox->setFrameStyle(QFrame::StyledPanel | QFrame::Plain);
    toolBox->setAutoFillBackground(true);
    toolBox->setCursor(Qt::ArrowCursor);
    toolBox->installEventFilter(this);

    buttons.clear();

    // Filter button
    filterButton = new QPushButton(toolBox);
    filterButton->setIcon(QIcon(":/filter.png"));
    filterButton->setCheckable(true);
    filterButton->setShortcut(Qt::Key_F);
    filterButton->setToolTip(tr("Filter window"));
    connect(filterButton, SIGNAL(released()), this, SLOT(slotFilterWindow()));
    buttons << filterButton;

    filterWindow = new ParamsFilterWidget(this);

    connect(filterWindow, SIGNAL( modelChanged(Stand_trace_model::Ptr) ),
        this, SLOT( setModel(Stand_trace_model::Ptr) ));

    connect(filterWindow, SIGNAL(windowClosed()),
        filterButton, SLOT(toggle()));

    // Drawing lines option
    drawLinesButton = new QPushButton(toolBox);
    drawLinesButton->setIcon(QIcon(":/draw_lines.png"));
    drawLinesButton->setCheckable(true);
    drawLinesButton->setChecked(true);
    drawLinesButton->setShortcut(Qt::Key_L);
    drawLinesButton->setToolTip(tr("Draw lines"));
    connect(drawLinesButton, SIGNAL(released()), this, SLOT(slotDrawLineSwither()));
    buttons << drawLinesButton;

    // Antialiasing option
    antialiasingButton = new QPushButton(toolBox);
    antialiasingButton->setIcon(QIcon(":/antialiasing.png"));
    antialiasingButton->setCheckable(true);
    antialiasingButton->setChecked(antialiasing);
    antialiasingButton->setShortcut(Qt::Key_A);
    antialiasingButton->setToolTip(tr("Antialiasing"));
    connect(antialiasingButton, SIGNAL(clicked(bool)), this, SLOT(slotAntialiasingSwither(bool)));
    buttons << antialiasingButton;

    // Print button
    printButton = new QPushButton(toolBox);
    printButton->setIcon(QIcon(":/printer.png"));
    printButton->setShortcut(Qt::Key_P);
    printButton->setToolTip(tr("Print"));
    connect(printButton, SIGNAL(released()), this, SLOT(slotPrintGraph()));
    buttons << printButton;

    // Setup buttons
    foreach (QPushButton * button, buttons) {
        button->setIconSize(QSize(16, 16));
        button->setFocusPolicy(Qt::NoFocus);
        button->setToolTip(button->toolTip() + " " +
            tr("(Shortcut: <b>%1</b>)").arg(button->shortcut().toString()));
    }
Exemple #9
0
bool AudioSetupWizard::Create()
{
    bool foundtheme = false;

    // Load the theme for this screen
    foundtheme = LoadWindowFromXML("config-ui.xml", "audiowizard", this);

    if (!foundtheme)
        return false;

    m_audioDeviceButtonList =
        dynamic_cast<MythUIButtonList *> (GetChild("audiodevices"));
    m_speakerNumberButtonList =
        dynamic_cast<MythUIButtonList *> (GetChild("speakers"));

    m_dtsCheck = dynamic_cast<MythUICheckBox *> (GetChild("dtscheck"));
    m_ac3Check = dynamic_cast<MythUICheckBox *> (GetChild("ac3check"));
    m_eac3Check = dynamic_cast<MythUICheckBox *> (GetChild("eac3check"));
    m_truehdCheck = dynamic_cast<MythUICheckBox *> (GetChild("truehdcheck"));
    m_dtshdCheck = dynamic_cast<MythUICheckBox *> (GetChild("dtshdcheck"));

    m_testSpeakerButton =
        dynamic_cast<MythUIButton *> (GetChild("testspeakers"));

    m_nextButton = dynamic_cast<MythUIButton *> (GetChild("next"));
    m_prevButton = dynamic_cast<MythUIButton *> (GetChild("previous"));

    if (!m_audioDeviceButtonList || !m_speakerNumberButtonList ||
        !m_dtsCheck || !m_ac3Check || !m_eac3Check || !m_truehdCheck ||
        !m_dtshdCheck || !m_testSpeakerButton || !m_nextButton || !m_prevButton)
    {
        LOG(VB_GENERAL, LOG_ERR, "Theme is missing critical theme elements.");
        return false;
    }

    // Pre-set the widgets to their database values
    // Buttonlists are set in load()

    int dtsSetting = gCoreContext->GetNumSetting("DTSPassThru", 0);
    if (dtsSetting == 1)
        m_dtsCheck->SetCheckState(MythUIStateType::Full);

    int ac3Setting = gCoreContext->GetNumSetting("AC3PassThru", 0);
    if (ac3Setting == 1)
        m_ac3Check->SetCheckState(MythUIStateType::Full);

    int eac3Setting = gCoreContext->GetNumSetting("EAC3PassThru", 0);
    if (eac3Setting == 1)
        m_eac3Check->SetCheckState(MythUIStateType::Full);

    int truehdSetting = gCoreContext->GetNumSetting("TrueHDPassThru", 0);
    if (truehdSetting == 1)
        m_truehdCheck->SetCheckState(MythUIStateType::Full);

    int dtshdSetting = gCoreContext->GetNumSetting("DTSHDPassThru", 0);
    if (dtshdSetting == 1)
        m_dtshdCheck->SetCheckState(MythUIStateType::Full);

    // Help Text

    // Buttonlists
    m_audioDeviceButtonList->SetHelpText( tr("Select from one of the "
                                    "audio devices detected on your system.  When "
                                    "satisfied, you can test audio before moving "
                                    "on.  If you fail to configure audio, video "
                                    "playback may fail as well.") );
    m_speakerNumberButtonList->SetHelpText( tr("Select the number of speakers you "
                                    "have.") );

    // Checkboxes
    m_dtsCheck->SetHelpText( tr("Select this checkbox if your receiver "
                                   "is capable of playing DTS.") );
    m_ac3Check->SetHelpText( tr("Select this checkbox if your receiver "
                                   "is capable of playing AC-3 (Dolby Digital).") );
    m_eac3Check->SetHelpText( tr("Select this checkbox if your receiver "
                                   "is capable of playing E-AC-3 (Dolby Digital Plus).") );
    m_truehdCheck->SetHelpText( tr("Select this checkbox if your receiver "
                                   "is capable of playing TrueHD.") );
    m_dtshdCheck->SetHelpText( tr("Select this checkbox if your receiver "
                                   "is capable of playing DTS-HD.") );

    // Buttons
    m_testSpeakerButton->SetHelpText( tr("Test your audio settings by playing "
                                    "noise through each speaker.") );
    m_nextButton->SetHelpText( tr("Save these changes and move on to the next "
                                  "configuration step.") );
    m_prevButton->SetHelpText( tr("Return to the previous configuration step.") );

    // I hate to SetText but it's the only way to make it reliably bi-modal
    m_testSpeakerButton->SetText(tr("Test Speakers"));

    connect(m_testSpeakerButton, SIGNAL(Clicked()), this, SLOT(toggleSpeakers()));
    connect(m_nextButton, SIGNAL(Clicked()), this, SLOT(slotNext()));
    connect(m_prevButton, SIGNAL(Clicked()), this, SLOT(slotPrevious()));

    QString message = tr("Discovering audio devices...");
    LoadInBackground(message);

    BuildFocusList();

    return true;
}