Exemplo n.º 1
0
void TabWidget::setActiveButton(TabButtonWidget *bn)
{
    if (bn != activeButton()) {
        if (m_tabButtons.contains(bn)) {
            TabButtonWidget *prev = activeButton();
            m_activeButton = bn;
            prev->update();
            bn->update();
        }
    }
}
Exemplo n.º 2
0
void SaPlayerWidget::createControlPlane()
{
	recordNowJointsDataPushButton = new QPushButton(QIcon("/sa/icons/saTools/GT.png"),tr("Save"),this);
	//setShortCut()
	connect(recordNowJointsDataPushButton,SIGNAL(clicked()),		this,SLOT(recordNowJointsDataButton()));
	//---
	freshDocumentFilesPushButton = new QPushButton(tr("Fresh"),this);
	freshDocumentFilesPushButton->setShortcut(QKeySequence::Find);
	connect(freshDocumentFilesPushButton,SIGNAL(clicked()),	this,SLOT(freshDocumentFilesButton())	);
	//-------
	openSaConfigFilePushButton = new QPushButton(tr("Open"),this);
	openSaConfigFilePushButton->setShortcut(QKeySequence::Open);
	connect(openSaConfigFilePushButton,SIGNAL(clicked()),		this,SLOT(openSaConfigFileButton()));
	//-------
	openContainerPushButton = new QPushButton(tr("Open Folder"),this);
	connect(openContainerPushButton,SIGNAL(clicked()),		this,SLOT(openFloderButton())	);
	//-------
	currentStepSpinBox = new QSpinBox(this);
	currentStepSpinBox->setRange(1,jointValueVector.size());//@todo:每次fresh后都要修正这里的range
	currentStepSpinBox->setValue(currentStep);
	currentStepSpinBox->setPrefix("Current Step:");
	connect(currentStepSpinBox,SIGNAL(valueChanged(int)),		this,SLOT(currentStepChange(int))	);
	//--------
	activePushButton = new QPushButton("Active?",this);
	connect(activePushButton,SIGNAL(clicked()),		this,SLOT(activeButton())	);
}