Ejemplo n.º 1
0
void XyzWindow::CreateXYZView()
{
	QFrame *XyFrame;
	QFrame *XzFrame;
	QFrame *ZyFrame;
	QWidget *centralWidget;
	
	centralWidget = new QWidget(this);
	QPalette palette;
	palette.setColor(QPalette::Background , QColor(/*200,200,200*/167, 210, 200));
	centralWidget->setAutoFillBackground(true);
	centralWidget->setPalette(palette);
	
	XzFrame = new QFrame(centralWidget);
	XzFrame->setGeometry(QRect(mXorigin1,mYorigin1 , mx+2*FRAM_BORDER , mz+2*FRAM_BORDER));
	XzFrame->setFrameShape(QFrame::StyledPanel);
	XzFrame->setFrameShadow(QFrame::Raised);
	ZyFrame = new QFrame(centralWidget);
	ZyFrame->setGeometry(QRect(mXorigin2 , mYorigin2 , mz+2*FRAM_BORDER ,my+2*FRAM_BORDER));
	ZyFrame->setFrameShape(QFrame::StyledPanel);
	ZyFrame->setFrameShadow(QFrame::Raised);
	XyFrame = new QFrame(centralWidget);
	XyFrame->setGeometry(QRect(mXorigin1 , mYorigin2 , mx+2*FRAM_BORDER  ,my+2*FRAM_BORDER));
	XyFrame->setFrameShape(QFrame::StyledPanel);
	XyFrame->setFrameShadow(QFrame::Raised);
	
	
	palette.setColor(QPalette::Background , QColor(255,0,0));
	XzFrame->setAutoFillBackground(true);
	XzFrame->setPalette(palette);
	ZyFrame->setAutoFillBackground(true);
	ZyFrame->setPalette(palette);
	XyFrame->setAutoFillBackground(true);
	XyFrame->setPalette(palette);
	setCentralWidget(centralWidget);
	
	QGLFormat glFormat;
	glFormat.setRgba(true);
	glFormat.setDoubleBuffer(true);
	glFormat.setDepth(true);
	mXY_GLw = new XyzGL(glFormat , XY_VIEW , XyFrame , this);
	mXY_GLw->setGeometry(FRAM_BORDER , FRAM_BORDER,mx,my);
	mXY_GLw->setAttribute(Qt::WA_DeleteOnClose);
	
	mXZ_GLw = new XyzGL(glFormat , XZ_VIEW , XzFrame , this);
	mXZ_GLw->setGeometry(FRAM_BORDER , FRAM_BORDER , mx ,mz);
	mXZ_GLw->setAttribute(Qt::WA_DeleteOnClose);
	
	mYZ_GLw = new XyzGL(glFormat , ZY_VIEW , ZyFrame , this);
	mYZ_GLw->setGeometry(FRAM_BORDER , FRAM_BORDER ,mz ,my);
	mYZ_GLw->setAttribute(Qt::WA_DeleteOnClose);
}
Ejemplo n.º 2
0
Overview::Overview(QWidget *parent, gGraphView *shared) :
    QWidget(parent),
    ui(new Ui::Overview),
    m_shared(shared)
{
    ui->setupUi(this);

    // Set Date controls locale to 4 digit years
    QLocale locale = QLocale::system();
    QString shortformat = locale.dateFormat(QLocale::ShortFormat);

    if (!shortformat.toLower().contains("yyyy")) {
        shortformat.replace("yy", "yyyy");
    }

    ui->dateStart->setDisplayFormat(shortformat);
    ui->dateEnd->setDisplayFormat(shortformat);

    Qt::DayOfWeek dow = firstDayOfWeekFromLocale();

    ui->dateStart->calendarWidget()->setFirstDayOfWeek(dow);
    ui->dateEnd->calendarWidget()->setFirstDayOfWeek(dow);


    // Stop both calendar drop downs highlighting weekends in red
    QTextCharFormat format = ui->dateStart->calendarWidget()->weekdayTextFormat(Qt::Saturday);
    format.setForeground(QBrush(COLOR_Black, Qt::SolidPattern));
    ui->dateStart->calendarWidget()->setWeekdayTextFormat(Qt::Saturday, format);
    ui->dateStart->calendarWidget()->setWeekdayTextFormat(Qt::Sunday, format);
    ui->dateEnd->calendarWidget()->setWeekdayTextFormat(Qt::Saturday, format);
    ui->dateEnd->calendarWidget()->setWeekdayTextFormat(Qt::Sunday, format);

    // Connect the signals to update which days have CPAP data when the month is changed
    connect(ui->dateStart->calendarWidget(), SIGNAL(currentPageChanged(int, int)),
            SLOT(dateStart_currentPageChanged(int, int)));
    connect(ui->dateEnd->calendarWidget(), SIGNAL(currentPageChanged(int, int)),
            SLOT(dateEnd_currentPageChanged(int, int)));

    QVBoxLayout *framelayout = new QVBoxLayout;
    ui->graphArea->setLayout(framelayout);

    QFrame *border = new QFrame(ui->graphArea);

    framelayout->setMargin(1);
    border->setFrameShape(QFrame::StyledPanel);
    framelayout->addWidget(border,1);

    // Create the horizontal layout to hold the GraphView object and it's scrollbar
    layout = new QHBoxLayout(border);
    layout->setSpacing(0); // remove the ugly margins/spacing
    layout->setMargin(0);
    layout->setContentsMargins(0, 0, 0, 0);
    border->setLayout(layout);
    border->setAutoFillBackground(false);

    // Create the GraphView Object
    GraphView = new gGraphView(ui->graphArea, m_shared);
    GraphView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);

    GraphView->setEmptyText(STR_Empty_NoData);

    // Create the custom scrollbar and attach to GraphView
    scrollbar = new MyScrollBar(ui->graphArea);
    scrollbar->setOrientation(Qt::Vertical);
    scrollbar->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Expanding);
    scrollbar->setMaximumWidth(20);
    GraphView->setScrollBar(scrollbar);


    // Add the graphView and scrollbar to the layout.
    layout->addWidget(GraphView, 1);
    layout->addWidget(scrollbar, 0);
    layout->layout();

    dateLabel = new MyLabel(this);
    dateLabel->setAlignment(Qt::AlignVCenter);
    dateLabel->setText("[Date Widget]");
    QFont font = dateLabel->font();
    font.setPointSizeF(font.pointSizeF()*1.3F);
    dateLabel->setFont(font);
    QPalette palette = dateLabel->palette();
    palette.setColor(QPalette::Base, Qt::blue);
    dateLabel->setPalette(palette);

    ui->dateLayout->addWidget(dateLabel,1);



//    uc = new SummaryChart(STR_UNIT_Hours, GT_BAR);
//    uc->addSlice(NoChannel, COLOR_Green, ST_HOURS);
//    UC->AddLayer(uc);

  /*  return;

    // TODO: Automate graph creation process





    float percentile = p_profile->general->prefCalcPercentile() / 100.0;
    int mididx = p_profile->general->prefCalcMiddle();
    SummaryType ST_mid;

    if (mididx == 0) { ST_mid = ST_PERC; }
    if (mididx == 1) { ST_mid = ST_WAVG; }
    if (mididx == 2) { ST_mid = ST_AVG; }

    SummaryType ST_max = p_profile->general->prefCalcMax() ? ST_PERC : ST_MAX;
    const EventDataType maxperc = 0.995F;

    US = createGraph(STR_GRAPH_SessionTimes, tr("Session Times"), tr("Session Times\n(hours)"), YT_Time);
    SET = createGraph("Settings", STR_TR_Settings, STR_TR_Settings);


    TGMV = createGraph(schema::channel[CPAP_TgMV].code(), schema::channel[CPAP_TgMV].label(), tr("Target\nVentilation\n(L/min)"));
    PTB = createGraph(schema::channel[CPAP_PTB].code(), schema::channel[CPAP_PTB].label(), tr("Patient\nTriggered\nBreaths\n(%)"));
    SES = createGraph(STR_GRAPH_Sessions, STR_TR_Sessions, STR_TR_Sessions + tr("\n(count)"));


    ahihr = new SummaryChart(STR_UNIT_EventsPerHour, GT_POINTS);
    ahihr->addSlice(ahicode, COLOR_Blue, ST_MAX);
    ahihr->addSlice(ahicode, COLOR_Orange, ST_WAVG);
    AHIHR->AddLayer(ahihr);

    weight = new SummaryChart(STR_TR_Weight, GT_POINTS);
    weight->setMachineType(MT_JOURNAL);
    weight->addSlice(Journal_Weight, COLOR_Black, ST_SETAVG);
    WEIGHT->AddLayer(weight);

    bmi = new SummaryChart(STR_TR_BMI, GT_POINTS);
    bmi->setMachineType(MT_JOURNAL);
    bmi->addSlice(Journal_BMI, COLOR_DarkBlue, ST_SETAVG);
    BMI->AddLayer(bmi);

    zombie = new SummaryChart(tr("Zombie Meter"), GT_POINTS);
    zombie->setMachineType(MT_JOURNAL);
    zombie->addSlice(Journal_ZombieMeter, COLOR_DarkRed, ST_SETAVG);
    ZOMBIE->AddLayer(zombie);

    pulse = new SummaryChart(STR_TR_PulseRate, GT_POINTS);
    pulse->setMachineType(MT_OXIMETER);
    pulse->addSlice(OXI_Pulse, COLOR_Red, ST_mid, 0.5);
    pulse->addSlice(OXI_Pulse, COLOR_Pink, ST_MIN);
    pulse->addSlice(OXI_Pulse, COLOR_Orange, ST_MAX);
    PULSE->AddLayer(pulse);

    spo2 = new SummaryChart(STR_TR_SpO2, GT_POINTS);
    spo2->setMachineType(MT_OXIMETER);
    spo2->addSlice(OXI_SPO2, COLOR_Cyan, ST_mid, 0.5);
    spo2->addSlice(OXI_SPO2, COLOR_LightBlue, ST_PERC, percentile);
    spo2->addSlice(OXI_SPO2, COLOR_Blue, ST_MIN);
    SPO2->AddLayer(spo2);


    fl = new SummaryChart(STR_TR_FL, GT_POINTS);
    fl->addSlice(CPAP_FlowLimit, COLOR_Brown, ST_CPH);
    FL->AddLayer(fl);

    sa = new SummaryChart(STR_TR_SA, GT_POINTS);
    sa->addSlice(CPAP_SensAwake, COLOR_Brown, ST_CNT);
    SA->AddLayer(sa);

    us = new SummaryChart(STR_UNIT_Hours, GT_SESSIONS);
    us->addSlice(NoChannel, COLOR_DarkBlue, ST_HOURS);
    us->addSlice(NoChannel, COLOR_Blue, ST_SESSIONS);
    US->AddLayer(us);

    ses = new SummaryChart(STR_TR_Sessions, GT_POINTS);
    ses->addSlice(NoChannel, COLOR_Blue, ST_SESSIONS);
    SES->AddLayer(ses);

    if (ahicode == CPAP_RDI) {
        bc = new SummaryChart(STR_TR_RDI, GT_BAR);
    } else {
        bc = new SummaryChart(STR_TR_AHI, GT_BAR);
    }

    bc->addSlice(CPAP_ClearAirway, COLOR_ClearAirway, ST_CPH);
    bc->addSlice(CPAP_Obstructive, COLOR_Obstructive, ST_CPH);
    bc->addSlice(CPAP_Apnea, COLOR_Apnea, ST_CPH);
    bc->addSlice(CPAP_Hypopnea, COLOR_Hypopnea, ST_CPH);

    if (p_profile->general->calculateRDI()) {
        bc->addSlice(CPAP_RERA, COLOR_RERA, ST_CPH);
    }
//    bc->addSlice(CPAP_UserFlag1, COLOR_UserFlag1, ST_CPH);
//    bc->addSlice(CPAP_UserFlag2, COLOR_UserFlag2, ST_CPH);


    AHI->AddLayer(bc);

    set = new SummaryChart("", GT_POINTS);
    //set->addSlice(PRS1_SysOneResistSet,COLOR_Gray,ST_SETAVG);
    set->addSlice(CPAP_HumidSetting, COLOR_Blue, ST_SETWAVG);
    set->addSlice(CPAP_PresReliefLevel, COLOR_Red, ST_SETWAVG);
    set->addSlice(CPAP_PresReliefMode, COLOR_Red, ST_SETWAVG);
//    set->addSlice(RMS9_EPRLevel,COLOR_Green,ST_SETWAVG);
    //set->addSlice(INTP_SmartFlex,COLOR_Purple,ST_SETWAVG);
    SET->AddLayer(set);

    rr = new SummaryChart(tr("breaths/min"), GT_POINTS);
    rr->addSlice(CPAP_RespRate, COLOR_LightBlue, ST_MIN);
    rr->addSlice(CPAP_RespRate, COLOR_Blue, ST_mid, 0.5);
    rr->addSlice(CPAP_RespRate, COLOR_LightGreen, ST_PERC, percentile);
    rr->addSlice(CPAP_RespRate, COLOR_Green, ST_max, maxperc);
    // rr->addSlice(CPAP_RespRate,COLOR_Green,ST_MAX);
    RR->AddLayer(rr);

    tv = new SummaryChart(tr("L/b"), GT_POINTS);
    tv->addSlice(CPAP_TidalVolume, COLOR_LightBlue, ST_MIN);
    tv->addSlice(CPAP_TidalVolume, COLOR_Blue, ST_mid, 0.5);
    tv->addSlice(CPAP_TidalVolume, COLOR_LightGreen, ST_PERC, percentile);
    tv->addSlice(CPAP_TidalVolume, COLOR_Green, ST_max, maxperc);
    TV->AddLayer(tv);

    mv = new SummaryChart(STR_UNIT_LPM, GT_POINTS);
    mv->addSlice(CPAP_MinuteVent, COLOR_LightBlue, ST_MIN);
    mv->addSlice(CPAP_MinuteVent, COLOR_Blue, ST_mid, 0.5);
    mv->addSlice(CPAP_MinuteVent, COLOR_LightGreen, ST_PERC, percentile);
    mv->addSlice(CPAP_MinuteVent, COLOR_Green, ST_max, maxperc);
    MV->AddLayer(mv);

    // should merge...
    tgmv = new SummaryChart(STR_UNIT_LPM, GT_POINTS);
    tgmv->addSlice(CPAP_TgMV, COLOR_LightBlue, ST_MIN);
    tgmv->addSlice(CPAP_TgMV, COLOR_Blue, ST_mid, 0.5);
    tgmv->addSlice(CPAP_TgMV, COLOR_LightGreen, ST_PERC, percentile);
    tgmv->addSlice(CPAP_TgMV, COLOR_Green, ST_max, maxperc);
    TGMV->AddLayer(tgmv);

    ptb = new SummaryChart(tr("%PTB"), GT_POINTS);
    ptb->addSlice(CPAP_PTB, COLOR_Yellow, ST_MIN);
    ptb->addSlice(CPAP_PTB, COLOR_Blue, ST_mid, 0.5);
    ptb->addSlice(CPAP_PTB, COLOR_LightGray, ST_PERC, percentile);
    ptb->addSlice(CPAP_PTB, COLOR_Orange, ST_WAVG);
    PTB->AddLayer(ptb);

    pr = new SummaryChart(STR_TR_Pressure, GT_POINTS);
    // Added in summarychart.. Slightly annoying..
    PR->AddLayer(pr);


    totlk = new SummaryChart(STR_TR_TotalLeaks, GT_POINTS);
    totlk->addSlice(CPAP_LeakTotal, COLOR_LightBlue, ST_mid, 0.5);
    totlk->addSlice(CPAP_LeakTotal, COLOR_DarkGray, ST_PERC, percentile);
    totlk->addSlice(CPAP_LeakTotal, COLOR_Gray, ST_max, maxperc);
    //tot->addSlice(CPAP_Leak, COLOR_DarkBlue, ST_WAVG);
    //tot->addSlice(CPAP_Leak, COLOR_DarkYellow);
    TOTLK->AddLayer(totlk);


    NLL->AddLayer(nll = new SummaryChart(tr("% %1").arg(schema::channel[CPAP_LargeLeak].fullname()), GT_POINTS));
    nll->addSlice(CPAP_LargeLeak, schema::channel[CPAP_LargeLeak].defaultColor(), ST_SPH);
    // <--- The code to the previous marker is crap

    AHI->setPinned(false);
    SES->setRecMinY(1);
    SET->setRecMinY(0);

    //SET->setRecMaxY(5);

    */
    RebuildGraphs(false);

    ui->rangeCombo->setCurrentIndex(p_profile->general->lastOverviewRange());

    icon_on = new QIcon(":/icons/session-on.png");
    icon_off = new QIcon(":/icons/session-off.png");

    GraphView->resetLayout();
    GraphView->LoadSettings("Overview"); //no trans

    GraphView->setEmptyImage(QPixmap(":/docs/sheep.png"));

    connect(GraphView, SIGNAL(updateCurrentTime(double)), this, SLOT(on_LineCursorUpdate(double)));
    connect(GraphView, SIGNAL(updateRange(double,double)), this, SLOT(on_RangeUpdate(double,double)));

    connect(GraphView, SIGNAL(GraphsChanged()), this, SLOT(updateGraphCombo()));
}
Ejemplo n.º 3
0
void gpSessionView::InitLayout()
{
    // layout to hold the two main vboxlayouts;
    QHBoxLayout* pMainLayout = new QHBoxLayout;

    QVBoxLayout* pThumbLayout = new QVBoxLayout;
    QVBoxLayout* pImageLayout = new QVBoxLayout;

    // Create the image section
    m_pImageLabel = new QLabel;

    // This pixmap is set so that the label will demand the max size possible
    QPixmap placeHolderPixmap(GP_IMAGE_SECTION_WIDTH, GP_IMAGE_SECTION_WIDTH);
    m_pImageLabel->setPixmap(placeHolderPixmap);

    m_pImageLabel->setMaximumWidth(GP_IMAGE_SECTION_WIDTH);
    m_pImageLabel->setMaximumHeight(GP_IMAGE_SECTION_WIDTH);

    // Create the frame analysis section:
    m_pCurrentFrameCaptionLabel = new QLabel(GPU_STR_dashboard_MainImageCaptionRunning);
    m_pCurrentFrameCaptionLabel->setStyleSheet(AF_STR_captionLabelStyleSheetMain);

    m_pCurrentFrameDetailsLabel = new QLabel;
    QLabel* pPropsHTMLLabelCaption = new QLabel(GPU_STR_dashboard_ExecutionCaption);
    m_pCurrentFrameDetailsLabel->setStyleSheet("font-weight: bold; color: gray; font-size: 15px;");

    pPropsHTMLLabelCaption->setStyleSheet(AF_STR_captionLabelStyleSheetMain);
    m_pPropsHTMLLabel = new QLabel;
    m_pPropsHTMLLabel->setTextFormat(Qt::RichText);

    QFrame* pImageFrameWidget = new QFrame;
    QPalette p = pImageFrameWidget->palette();
    p.setColor(backgroundRole(), Qt::white);
    p.setColor(QPalette::Base, Qt::white);
    p.setColor(QPalette::Shadow, Qt::red);
    pImageFrameWidget->setAutoFillBackground(true);
    pImageFrameWidget->setPalette(p);
    pImageFrameWidget->setLineWidth(1);
    pImageFrameWidget->setMidLineWidth(1);
    pImageFrameWidget->setFrameStyle(QFrame::Panel | QFrame::Raised);


    QVBoxLayout* pImageFrameLayout = new QVBoxLayout;
    m_pCurrentFrameDetailsLabel->setContentsMargins(0, 0, 0, 0);

    pImageFrameLayout->addWidget(m_pCurrentFrameDetailsLabel, 0, Qt::AlignCenter);
    pImageFrameLayout->addWidget(m_pImageLabel, 0, Qt::AlignCenter);
    pImageFrameWidget->setLayout(pImageFrameLayout);

    pImageLayout->addWidget(m_pCurrentFrameCaptionLabel);
    pImageLayout->addSpacing(4);
    pImageLayout->addWidget(pImageFrameWidget);
    pImageLayout->addStretch();
    pImageLayout->addWidget(pPropsHTMLLabelCaption);
    pImageLayout->addWidget(m_pPropsHTMLLabel);

    FillExecutionDetails();

    // Create the frame analysis section:
    m_pCapturedFramesCaptionLabel = new QLabel(GPU_STR_dashboard_CapturedFramesCaption);
    m_pCapturedFramesCaptionLabel->setStyleSheet(AF_STR_captionLabelStyleSheetMain);

#define GP_SessionViewButtonStyle "QToolButton { border: 1px solid transparent; background-color: transparent; font-weight: bold; color: gray; }" \
    "QToolButton:hover { border: 1px solid gray; background-color: #CDE6F7; color: black;}"

    QHBoxLayout* pButtonsLayout = new QHBoxLayout;
    pButtonsLayout->addStretch();

    m_pCaptureButton = new QToolButton;
    m_pCaptureButton->setText(GPU_STR_dashboard_CaptureButton);
    m_pCaptureButton->setStyleSheet(GP_SessionViewButtonStyle);
    m_pCaptureButton->setToolTip(GPU_STR_dashboard_CaptureTooltip);

    m_pStopButton = new QToolButton;
    m_pStopButton->setStyleSheet(GP_SessionViewButtonStyle);
    m_pStopButton->setText(GPU_STR_dashboard_StopButton);
    m_pStopButton->setToolTip(GPU_STR_dashboard_StopTooltip);

    m_pOpenTimelineButton = new QToolButton;
    m_pOpenTimelineButton->setStyleSheet(GP_SessionViewButtonStyle);
    m_pOpenTimelineButton->setText(GPU_STR_dashboard_OpenTimelineButton);
    m_pOpenTimelineButton->setToolTip(GPU_STR_dashboard_OpenTimelineTooltip);

    bool rc = connect(m_pCaptureButton, SIGNAL(clicked()), this, SLOT(OnCaptureButtonClick()));
    GT_ASSERT(rc);

    rc = connect(m_pStopButton, SIGNAL(clicked()), this, SLOT(OnStopButtonClick()));
    GT_ASSERT(rc);

    rc = connect(m_pOpenTimelineButton, SIGNAL(clicked()), this, SLOT(OnOpenTimelineButtonClick()));
    GT_ASSERT(rc);

    QPixmap captureButtonIcon;
    acIconSize largerButtonIcon = acGetScaledIconSize(AC_32x32_ICON);
    int iconDim = acIconSizeToPixelSize(largerButtonIcon);
    QSize iconSize(iconDim, iconDim);
    acSetIconInPixmap(captureButtonIcon, AC_ICON_EXECUTION_CAPTURE, largerButtonIcon);
    m_pCaptureButton->setIcon(captureButtonIcon);
    m_pCaptureButton->setIconSize(iconSize);
    m_pCaptureButton->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
    m_pCaptureButton->setFixedWidth(acScalePixelSizeToDisplayDPI(GP_SESSION_VIEW_BUTTON_SIZE));

    QPixmap stopButtonIcon;
    acSetIconInPixmap(stopButtonIcon, AC_ICON_EXECUTION_STOP, largerButtonIcon);
    m_pStopButton->setIcon(stopButtonIcon);
    m_pStopButton->setIconSize(iconSize);
    m_pStopButton->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
    m_pStopButton->setFixedWidth(acScalePixelSizeToDisplayDPI(GP_SESSION_VIEW_BUTTON_SIZE));

    QPixmap openTimelineButtonIcon;
    acSetIconInPixmap(openTimelineButtonIcon, AC_ICON_FRAME_ANALYSIS_APP_TREE_TIMELINE, largerButtonIcon);
    m_pOpenTimelineButton->setIcon(openTimelineButtonIcon);
    m_pOpenTimelineButton->setIconSize(iconSize);
    m_pOpenTimelineButton->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
    m_pOpenTimelineButton->setFixedWidth(acScalePixelSizeToDisplayDPI(GP_SESSION_VIEW_BUTTON_SIZE));

#if AMDT_BUILD_CONFIGURATION == AMDT_DEBUG_BUILD
    m_pSimulateUserCaptureButton = new QToolButton;
    m_pSimulateUserCaptureButton->setText("Capture Simulate");
    QImage captureInv(captureButtonIcon.toImage());
    captureInv.invertPixels(QImage::InvertRgb);
    m_pSimulateUserCaptureButton->setIcon(QPixmap::fromImage(captureInv));
    m_pSimulateUserCaptureButton->setIconSize(iconSize);
    m_pSimulateUserCaptureButton->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
    m_pSimulateUserCaptureButton->setStyleSheet(GP_SessionViewButtonStyle);
    rc = connect(m_pSimulateUserCaptureButton, SIGNAL(clicked()), this, SLOT(OnSimulateCaptureButtonClick()));
    GT_ASSERT(rc);
    // pButtonsLayout->addWidget(m_pSimulateUserCaptureButton);
#endif

    pButtonsLayout->addWidget(m_pCaptureButton);
    pButtonsLayout->addWidget(m_pStopButton);
    pButtonsLayout->addWidget(m_pOpenTimelineButton);
    pButtonsLayout->addStretch();
    pImageFrameLayout->addLayout(pButtonsLayout, Qt::AlignCenter | Qt::AlignVCenter);
    pImageFrameLayout->addStretch();

    // Initialize and fill the thumbnail view
    m_pSnapshotsThumbView = new acThumbnailView;
    m_pSnapshotsThumbView->SetItemTooltip(GPU_STR_dashboard_ItemTooltip);

    rc = connect(m_pSnapshotsThumbView, SIGNAL(ItemDoubleClicked(const QVariant&)), this, SLOT(OnItemDoubleClicked(const QVariant&)));
    GT_ASSERT(rc);
    rc = connect(m_pSnapshotsThumbView, SIGNAL(ItemPressed(const QVariant&)), this, SLOT(OnItemPressed(const QVariant&)));
    GT_ASSERT(rc);

    pThumbLayout->addWidget(m_pCapturedFramesCaptionLabel);
    pThumbLayout->addWidget(m_pSnapshotsThumbView, Qt::AlignLeft);

    QWidget* pLeftWidget = new QWidget;
    QWidget* pRightWidget = new QWidget;
    pLeftWidget->setLayout(pImageLayout);
    pRightWidget->setLayout(pThumbLayout);
    pLeftWidget->setMinimumWidth(200);
    pRightWidget->setMinimumWidth(200);

    pMainLayout->addWidget(pLeftWidget, 0);
    pMainLayout->addWidget(pRightWidget, 1);

    setLayout(pMainLayout);
}