本文整理汇总了C++中JoyAxisButton::getSlotsSummary方法的典型用法代码示例。如果您正苦于以下问题:C++ JoyAxisButton::getSlotsSummary方法的具体用法?C++ JoyAxisButton::getSlotsSummary怎么用?C++ JoyAxisButton::getSlotsSummary使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JoyAxisButton
的用法示例。
在下文中一共展示了JoyAxisButton::getSlotsSummary方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
AxisEditDialog::AxisEditDialog(JoyAxis *axis, QWidget *parent) :
QDialog(parent, Qt::Window),
ui(new Ui::AxisEditDialog)
{
ui->setupUi(this);
setAttribute(Qt::WA_DeleteOnClose);
setAxisThrottleConfirm = new SetAxisThrottleDialog(axis, this);
this->axis = axis;
updateWindowTitleAxisName();
initialThrottleState = axis->getThrottle();
ui->horizontalSlider->setValue(axis->getDeadZone());
ui->lineEdit->setText(QString::number(axis->getDeadZone()));
ui->horizontalSlider_2->setValue(axis->getMaxZoneValue());
ui->lineEdit_2->setText(QString::number(axis->getMaxZoneValue()));
JoyAxisButton *nButton = axis->getNAxisButton();
if (!nButton->getActionName().isEmpty())
{
ui->nPushButton->setText(nButton->getActionName());
}
else
{
ui->nPushButton->setText(nButton->getSlotsSummary());
}
JoyAxisButton *pButton = axis->getPAxisButton();
if (!pButton->getActionName().isEmpty())
{
ui->pPushButton->setText(pButton->getActionName());
}
else
{
ui->pPushButton->setText(pButton->getSlotsSummary());
}
int currentThrottle = axis->getThrottle();
//ui->comboBox_2->setCurrentIndex(currentThrottle+1);
if (currentThrottle == JoyAxis::NegativeThrottle || currentThrottle == JoyAxis::NegativeHalfThrottle)
{
int tempindex = currentThrottle == JoyAxis::NegativeHalfThrottle ? 0 : 1;
ui->comboBox_2->setCurrentIndex(tempindex);
ui->nPushButton->setEnabled(true);
ui->pPushButton->setEnabled(false);
}
else if (currentThrottle == JoyAxis::PositiveThrottle || currentThrottle == JoyAxis::PositiveHalfThrottle)
{
int tempindex = currentThrottle == JoyAxis::PositiveThrottle ? 3 : 4;
ui->comboBox_2->setCurrentIndex(tempindex);
ui->pPushButton->setEnabled(true);
ui->nPushButton->setEnabled(false);
}
ui->axisstatusBox->setDeadZone(axis->getDeadZone());
ui->axisstatusBox->setMaxZone(axis->getMaxZoneValue());
ui->axisstatusBox->setThrottle(axis->getThrottle());
ui->joyValueLabel->setText(QString::number(axis->getCurrentRawValue()));
ui->axisstatusBox->setValue(axis->getCurrentRawValue());
selectCurrentPreset();
ui->axisNameLineEdit->setText(axis->getAxisName());
connect(ui->presetsComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(implementPresets(int)));
connect(ui->horizontalSlider, SIGNAL(valueChanged(int)), this, SLOT(updateDeadZoneBox(int)));
connect(ui->horizontalSlider, SIGNAL(valueChanged(int)), ui->axisstatusBox, SLOT(setDeadZone(int)));
connect(ui->horizontalSlider, SIGNAL(valueChanged(int)), axis, SLOT(setDeadZone(int)));
connect(ui->horizontalSlider_2, SIGNAL(valueChanged(int)), this, SLOT(updateMaxZoneBox(int)));
connect(ui->horizontalSlider_2, SIGNAL(valueChanged(int)), ui->axisstatusBox, SLOT(setMaxZone(int)));
connect(ui->horizontalSlider_2, SIGNAL(valueChanged(int)), axis, SLOT(setMaxZoneValue(int)));
connect(ui->comboBox_2, SIGNAL(currentIndexChanged(int)), this, SLOT(updateThrottleUi(int)));
connect(axis, SIGNAL(moved(int)), ui->axisstatusBox, SLOT(setValue(int)));
connect(axis, SIGNAL(moved(int)), this, SLOT(updateJoyValue(int)));
connect(ui->lineEdit, SIGNAL(textEdited(QString)), this, SLOT(updateDeadZoneSlider(QString)));
connect(ui->lineEdit_2, SIGNAL(textEdited(QString)), this, SLOT(updateMaxZoneSlider(QString)));
connect(ui->nPushButton, SIGNAL(clicked()), this, SLOT(openAdvancedNDialog()));
connect(ui->pPushButton, SIGNAL(clicked()), this, SLOT(openAdvancedPDialog()));
connect(ui->mouseSettingsPushButton, SIGNAL(clicked()), this, SLOT(openMouseSettingsDialog()));
connect(ui->axisNameLineEdit, SIGNAL(textEdited(QString)), axis, SLOT(setAxisName(QString)));
connect(axis, SIGNAL(axisNameChanged()), this, SLOT(updateWindowTitleAxisName()));
connect(this, SIGNAL(finished(int)), this, SLOT(checkFinalSettings()));
}