Example #1
0
void TaskBullseye::onButtonClick(lw::Button* pButton){
	if ( pButton == _pBtnNext ){
		onBtnNext();
	}else if ( pButton == _pBtnRestart ){
		onBtnRestart();
	}
}
Example #2
0
void TaskBullseye::onBtnRestart(){
	onBtnNext();
	_round = 1;
	_totalScore = 0.f;
	_pBtnRestart->show(false);
	_life = 0;
}
uoReportPreviewDlg::uoReportPreviewDlg(QWidget *parent)
	:QDialog(parent)
{
	setupUi(this);
	hide();
	m_scaleFactor = 1.0;
	setWindowFlags(Qt::Dialog| Qt::WindowMinimizeButtonHint| Qt::WindowMaximizeButtonHint);

    m_imageLabel = new QLabel;
    m_imageLabel->setBackgroundRole(QPalette::Base);
    m_imageLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
    m_imageLabel->setScaledContents(true);


	m_scrollArea = new QScrollArea;
    m_scrollArea->setBackgroundRole(QPalette::Dark);
    m_scrollArea->setWidget(m_imageLabel);
    m_scrollArea->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);

	QGridLayout* t_gridLayout = new QGridLayout;
	t_gridLayout->setSpacing(0);
//#if (QT_VERSION > 0x040201)
	t_gridLayout->setHorizontalSpacing(0);
	t_gridLayout->setContentsMargins(0, 0, 0, 0);
//#endif
	m_frame->setLayout(t_gridLayout);
	t_gridLayout->addWidget(m_scrollArea);
	//QObject::
	connect(m_pbPrint,SIGNAL(clicked()),this, SLOT(onBtnPrint()));
	connect(m_pbPage,SIGNAL(clicked()),this, SLOT(onBtnPage()));
	connect(m_pbNext,SIGNAL(clicked()),this, SLOT(onBtnNext()));
	connect(m_pbPrevious,SIGNAL(clicked()),this, SLOT(onBtnPrevious()));
	connect(m_pbZoomIn,SIGNAL(clicked()),this, SLOT(onBtnZoomIn()));
	connect(m_pbZoomOut,SIGNAL(clicked()),this, SLOT(onBtnZoomOut()));
	connect(m_pbNormSize,SIGNAL(clicked()),this, SLOT(onBtnnormalSize()));
	connect(m_pbClose,SIGNAL(clicked()),this, SLOT(onBtnClose()));
	connect(m_leCurentPage,SIGNAL(editingFinished()),this, SLOT(onSetPageNom()));
	m_pageList = NULL;
	m_pagesAll = m_pageCurent = -1;
	updatePageNom();
}