Browse Source

The Joystick Settings window now supports selecting between multiple joysticks for control input and updates its UI accordingly. Much work is left to be done: light/dark styling, settings management, control mappings.

QGC4.4
Bryant 12 years ago
parent
commit
e169b59ff2
  1. 52
      src/input/JoystickInput.cc
  2. 39
      src/input/JoystickInput.h
  3. 168
      src/ui/JoystickWidget.cc
  4. 10
      src/ui/JoystickWidget.h
  5. 303
      src/ui/JoystickWidget.ui

52
src/input/JoystickInput.cc

@ -38,7 +38,9 @@ JoystickInput::JoystickInput() : @@ -38,7 +38,9 @@ JoystickInput::JoystickInput() :
autoButtonMapping(-1),
manualButtonMapping(-1),
stabilizeButtonMapping(-1),
joystickName(tr("Unitinialized"))
joystickName(tr("Unitinialized")),
joystickButtons(0),
joystickID(0)
{
loadSettings();
@ -47,10 +49,11 @@ JoystickInput::JoystickInput() : @@ -47,10 +49,11 @@ JoystickInput::JoystickInput() :
calibrationNegative[i] = sdlJoystickMin;
}
// Listen for when the active UAS changes so we can change who we're sending data to.
connect(UASManager::instance(), SIGNAL(activeUASSet(UASInterface*)), this, SLOT(setActiveUAS(UASInterface*)));
// Enter main loop
//start();
// Start this thread. This allows the Joystick Settings window to work correctly even w/o any UASes connected.
start();
}
JoystickInput::~JoystickInput()
@ -108,14 +111,13 @@ void JoystickInput::setActiveUAS(UASInterface* uas) @@ -108,14 +111,13 @@ void JoystickInput::setActiveUAS(UASInterface* uas)
this->uas = uas;
if (this->uas)
{
tmp = dynamic_cast<UAS*>(this->uas);
if(tmp) {
connect(this, SIGNAL(joystickChanged(double,double,double,double,int,int,int)), tmp, SLOT(setManualControlCommands(double,double,double,double,int,int,int)));
connect(this, SIGNAL(buttonPressed(int)), tmp, SLOT(receiveButton(int)));
}
if (!isRunning())
{
start();
}
}
@ -127,10 +129,10 @@ void JoystickInput::init() @@ -127,10 +129,10 @@ void JoystickInput::init()
}
// Enumerate joysticks and select one
int numJoysticks = SDL_NumJoysticks();
joysticksFound = SDL_NumJoysticks();
// Wait for joysticks if none is connected
while (numJoysticks == 0 && !done)
// Wait for joysticks if none are connected
while (joysticksFound == 0 && !done)
{
QGC::SLEEP::msleep(400);
// INITIALIZE SDL Joystick support
@ -138,29 +140,33 @@ void JoystickInput::init() @@ -138,29 +140,33 @@ void JoystickInput::init()
{
printf("Couldn't initialize SimpleDirectMediaLayer: %s\n", SDL_GetError());
}
numJoysticks = SDL_NumJoysticks();
joysticksFound = SDL_NumJoysticks();
}
if (done)
{
return;
}
printf("%d Input devices found:\n", numJoysticks);
for(int i=0; i < SDL_NumJoysticks(); i++ )
qDebug() << QString("%1 Input devices found:").arg(joysticksFound);
for(int i=0; i < joysticksFound; i++ )
{
printf("\t- %s\n", SDL_JoystickName(i));
joystickName = QString(SDL_JoystickName(i));
qDebug() << QString("\t- %1").arg(SDL_JoystickName(i));
SDL_Joystick* x = SDL_JoystickOpen(i);
qDebug() << QString("Number of Axes: %1").arg(QString::number(SDL_JoystickNumAxes(x)));
qDebug() << QString("Number of Buttons: %1").arg(QString::number(SDL_JoystickNumButtons(x)));
qDebug() << QString("Number of Balls: %1").arg(QString::number(SDL_JoystickNumBalls(x)));
SDL_JoystickClose(x);
}
printf("\nOpened %s\n", SDL_JoystickName(defaultIndex));
SDL_JoystickEventState(SDL_ENABLE);
joystick = SDL_JoystickOpen(defaultIndex);
// And attach to the default joystick.
setActiveJoystick(defaultIndex);
// Make sure active UAS is set
setActiveUAS(UASManager::instance()->getActiveUAS());
}
void JoystickInput::shutdown()
{
done = true;
@ -324,6 +330,18 @@ void JoystickInput::run() @@ -324,6 +330,18 @@ void JoystickInput::run()
}
void JoystickInput::setActiveJoystick(int id)
{
joystickID = id;
joystick = SDL_JoystickOpen(joystickID);
if (joystick)
{
joystickName = QString(SDL_JoystickName(joystickID));
joystickButtons = SDL_JoystickNumButtons(joystick);
qDebug() << QString("Switching to joystick '%1' with %2 buttons").arg(joystickName, QString::number(joystickButtons));
}
}
const QString& JoystickInput::getName()
{
return joystickName;

39
src/input/JoystickInput.h

@ -69,41 +69,61 @@ public: @@ -69,41 +69,61 @@ public:
*/
void storeSettings();
int getMappingThrustAxis()
int getMappingThrustAxis() const
{
return thrustAxis;
}
int getMappingXAxis()
int getMappingXAxis() const
{
return xAxis;
}
int getMappingYAxis()
int getMappingYAxis() const
{
return yAxis;
}
int getMappingYawAxis()
int getMappingYawAxis() const
{
return yawAxis;
}
int getMappingAutoButton()
int getMappingAutoButton() const
{
return autoButtonMapping;
}
int getMappingManualButton()
int getMappingManualButton() const
{
return manualButtonMapping;
}
int getMappingStabilizeButton()
int getMappingStabilizeButton() const
{
return stabilizeButtonMapping;
}
int getJoystickNumButtons() const
{
return joystickButtons;
}
int getJoystickID() const
{
return joystickID;
}
int getNumJoysticks() const
{
return joysticksFound;
}
QString getJoystickNameById(int id) const
{
return QString(SDL_JoystickName(id));
}
const double sdlJoystickMin;
const double sdlJoystickMax;
@ -127,6 +147,9 @@ protected: @@ -127,6 +147,9 @@ protected:
int stabilizeButtonMapping;
SDL_Event event;
QString joystickName;
int joystickButtons;
int joystickID;
int joysticksFound;
void init();
@ -198,6 +221,8 @@ signals: @@ -198,6 +221,8 @@ signals:
public slots:
void setActiveUAS(UASInterface* uas);
/** @brief Switch to a new joystick by ID number. */
void setActiveJoystick(int id);
void setMappingThrustAxis(int mapping)
{
thrustAxis = mapping;

168
src/ui/JoystickWidget.cc

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
JoystickWidget::JoystickWidget(JoystickInput* joystick, QWidget *parent) :
QDialog(parent),
joystick(joystick),
m_ui(new Ui::JoystickWidget)
{
m_ui->setupUi(this);
@ -14,30 +15,50 @@ JoystickWidget::JoystickWidget(JoystickInput* joystick, QWidget *parent) : @@ -14,30 +15,50 @@ JoystickWidget::JoystickWidget(JoystickInput* joystick, QWidget *parent) :
position.moveCenter(QDesktopWidget().availableGeometry().center());
move(position.topLeft());
clearKeys();
this->joystick = joystick;
m_ui->rollMapSpinBox->setValue(joystick->getMappingXAxis());
m_ui->pitchMapSpinBox->setValue(joystick->getMappingYAxis());
m_ui->yawMapSpinBox->setValue(joystick->getMappingYawAxis());
m_ui->throttleMapSpinBox->setValue(joystick->getMappingThrustAxis());
m_ui->autoMapSpinBox->setValue(joystick->getMappingAutoButton());
// Initialize the UI based on the current joystick
initUI();
// Watch for input events from the joystick
connect(this->joystick, SIGNAL(joystickChanged(double,double,double,double,int,int,int)), this, SLOT(updateJoystick(double,double,double,double,int,int)));
connect(this->joystick, SIGNAL(buttonPressed(int)), this, SLOT(pressKey(int)));
// Watch for changes to the button/axis mappings
connect(m_ui->rollMapSpinBox, SIGNAL(valueChanged(int)), this->joystick, SLOT(setMappingXAxis(int)));
connect(m_ui->pitchMapSpinBox, SIGNAL(valueChanged(int)), this->joystick, SLOT(setMappingYAxis(int)));
connect(m_ui->yawMapSpinBox, SIGNAL(valueChanged(int)), this->joystick, SLOT(setMappingYawAxis(int)));
connect(m_ui->throttleMapSpinBox, SIGNAL(valueChanged(int)), this->joystick, SLOT(setMappingThrustAxis(int)));
connect(m_ui->autoMapSpinBox, SIGNAL(valueChanged(int)), this->joystick, SLOT(setMappingAutoButton(int)));
// Display the widget
this->window()->setWindowTitle(tr("Joystick Settings"));
if (joystick) updateStatus(tr("Found joystick: %1").arg(joystick->getName()));
// Update the UI if the joystick changes.
connect(m_ui->joystickNameComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(updateUIForJoystick(int)));
// Display the widget above all other windows.
this->raise();
this->show();
}
void JoystickWidget::initUI()
{
// Add the joysticks to the top combobox. They're indexed by their item number.
// And set the currently-selected combobox item to the current joystick.
int joysticks = joystick->getNumJoysticks();
if (joysticks)
{
for (int i = 0; i < joysticks; i++)
{
m_ui->joystickNameComboBox->addItem(joystick->getJoystickNameById(i));
}
m_ui->joystickNameComboBox->setCurrentIndex(joystick->getJoystickID());
}
else
{
m_ui->joystickNameComboBox->addItem(tr("No joysticks found. Connect and restart QGC to add one."));
}
// Add any missing buttons
updateUIForJoystick(joystick->getJoystickID());
}
JoystickWidget::~JoystickWidget()
{
delete m_ui;
@ -63,6 +84,35 @@ void JoystickWidget::changeEvent(QEvent *e) @@ -63,6 +84,35 @@ void JoystickWidget::changeEvent(QEvent *e)
}
}
void JoystickWidget::updateUIForJoystick(int id)
{
// Delete all the old buttonlabels
foreach (QLabel* l, m_ui->buttonLabelBox->findChildren<QLabel*>())
{
delete l;
}
// Set the JoystickInput to listen to the new joystick instead.
joystick->setActiveJoystick(id);
// And add new ones for every new button found.
for (int i = 0; i < joystick->getJoystickNumButtons(); i++)
{
QLabel* buttonLabel = new QLabel(m_ui->buttonLabelBox);
buttonLabel->setText(QString::number(i));
buttonLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
buttonLabel->setAlignment(Qt::AlignCenter);
// And make sure we insert BEFORE the vertical spacer.
m_ui->buttonLabelLayout->insertWidget(i, buttonLabel);
}
// Update the mapping UI
m_ui->rollMapSpinBox->setValue(joystick->getMappingXAxis());
m_ui->pitchMapSpinBox->setValue(joystick->getMappingYAxis());
m_ui->yawMapSpinBox->setValue(joystick->getMappingYawAxis());
m_ui->throttleMapSpinBox->setValue(joystick->getMappingThrustAxis());
m_ui->autoMapSpinBox->setValue(joystick->getMappingAutoButton());
}
void JoystickWidget::setThrottle(float thrust)
{
@ -91,66 +141,46 @@ void JoystickWidget::setHat(float x, float y) @@ -91,66 +141,46 @@ void JoystickWidget::setHat(float x, float y)
updateStatus(tr("Hat position: x: %1, y: %2").arg(x).arg(y));
}
void JoystickWidget::clearKeys()
{
QString colorstyle;
QColor buttonStyleColor = QColor(200, 20, 20);
colorstyle = QString("QLabel { border: 1px solid #EEEEEE; border-radius: 4px; padding: 0px; margin: 0px; background-color: %1;}").arg(buttonStyleColor.name());
m_ui->button0->setStyleSheet(colorstyle);
m_ui->button1->setStyleSheet(colorstyle);
m_ui->button2->setStyleSheet(colorstyle);
m_ui->button3->setStyleSheet(colorstyle);
m_ui->button4->setStyleSheet(colorstyle);
m_ui->button5->setStyleSheet(colorstyle);
m_ui->button6->setStyleSheet(colorstyle);
m_ui->button7->setStyleSheet(colorstyle);
m_ui->button8->setStyleSheet(colorstyle);
m_ui->button9->setStyleSheet(colorstyle);
m_ui->button10->setStyleSheet(colorstyle);
}
void JoystickWidget::pressKey(int key)
{
QString colorstyle;
QColor buttonStyleColor = QColor(20, 200, 20);
colorstyle = QString("QLabel { border: 1px solid #EEEEEE; border-radius: 4px; padding: 0px; margin: 0px; background-color: %1;}").arg(buttonStyleColor.name());
switch(key) {
case 0:
m_ui->button0->setStyleSheet(colorstyle);
break;
case 1:
m_ui->button1->setStyleSheet(colorstyle);
break;
case 2:
m_ui->button2->setStyleSheet(colorstyle);
break;
case 3:
m_ui->button3->setStyleSheet(colorstyle);
break;
case 4:
m_ui->button4->setStyleSheet(colorstyle);
break;
case 5:
m_ui->button5->setStyleSheet(colorstyle);
break;
case 6:
m_ui->button6->setStyleSheet(colorstyle);
break;
case 7:
m_ui->button7->setStyleSheet(colorstyle);
break;
case 8:
m_ui->button8->setStyleSheet(colorstyle);
break;
case 9:
m_ui->button9->setStyleSheet(colorstyle);
break;
case 10:
m_ui->button10->setStyleSheet(colorstyle);
break;
}
QTimer::singleShot(20, this, SLOT(clearKeys()));
// QString colorstyle;
// QColor buttonStyleColor = QColor(20, 200, 20);
// colorstyle = QString("QLabel { border: 1px solid #EEEEEE; border-radius: 4px; padding: 0px; margin: 0px; background-color: %1;}").arg(buttonStyleColor.name());
// switch(key) {
// case 0:
// m_ui->button0->setStyleSheet(colorstyle);
// break;
// case 1:
// m_ui->button1->setStyleSheet(colorstyle);
// break;
// case 2:
// m_ui->button2->setStyleSheet(colorstyle);
// break;
// case 3:
// m_ui->button3->setStyleSheet(colorstyle);
// break;
// case 4:
// m_ui->button4->setStyleSheet(colorstyle);
// break;
// case 5:
// m_ui->button5->setStyleSheet(colorstyle);
// break;
// case 6:
// m_ui->button6->setStyleSheet(colorstyle);
// break;
// case 7:
// m_ui->button7->setStyleSheet(colorstyle);
// break;
// case 8:
// m_ui->button8->setStyleSheet(colorstyle);
// break;
// case 9:
// m_ui->button9->setStyleSheet(colorstyle);
// break;
// case 10:
// m_ui->button10->setStyleSheet(colorstyle);
// break;
// }
updateStatus(tr("Key %1 pressed").arg(key));
}

10
src/ui/JoystickWidget.h

@ -69,20 +69,26 @@ public slots: @@ -69,20 +69,26 @@ public slots:
void setZ(float z);
/** @brief Hat switch position */
void setHat(float x, float y);
/** @brief Clear keys */
void clearKeys();
/** @brief Joystick keys, as labeled on the joystick */
void pressKey(int key);
/** @brief Update status string */
void updateStatus(const QString& status);
protected:
/** @brief Update the proper number of buttons for the current joystick. */
void updateButtons();
/** @brief UI change event */
virtual void changeEvent(QEvent *e);
JoystickInput* joystick; ///< Reference to the joystick
protected slots:
/** @brief Update the UI for a new joystick based on SDL ID. */
void updateUIForJoystick(int id);
private:
Ui::JoystickWidget *m_ui;
/** @brief Initialize all dynamic UI elements (button list, joystick names, etc.) */
void initUI();
};
#endif // JOYSTICKWIDGET_H

303
src/ui/JoystickWidget.ui

@ -17,17 +17,26 @@ @@ -17,17 +17,26 @@
</size>
</property>
<property name="windowTitle">
<string>Dialog</string>
<string>Joystick Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout_2" columnstretch="10,0,0,0,10">
<property name="margin">
<layout class="QGridLayout" name="gridLayout_2" columnstretch="10,0,0,0">
<property name="leftMargin">
<number>8</number>
</property>
<property name="topMargin">
<number>8</number>
</property>
<property name="rightMargin">
<number>8</number>
</property>
<property name="bottomMargin">
<number>8</number>
</property>
<property name="spacing">
<number>8</number>
</property>
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox">
<widget class="QGroupBox" name="buttonLabelBox">
<property name="minimumSize">
<size>
<width>0</width>
@ -37,7 +46,7 @@ @@ -37,7 +46,7 @@
<property name="maximumSize">
<size>
<width>40</width>
<height>400</height>
<height>16777215</height>
</size>
</property>
<property name="title">
@ -49,226 +58,39 @@ @@ -49,226 +58,39 @@
<property name="flat">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="buttonLabelLayout">
<property name="spacing">
<number>1</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>3</number>
</property>
<item>
<widget class="QLabel" name="button0">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="button1">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>1</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="button2">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>2</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="button3">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>3</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="button4">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>4</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="button5">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>5</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="button6">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>6</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="button7">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>7</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="button8">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>8</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="button9">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<property name="topMargin">
<number>3</number>
</property>
<property name="text">
<string>9</string>
<property name="rightMargin">
<number>3</number>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
<property name="bottomMargin">
<number>3</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="button10">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>10</string>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</widget>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="1" column="4">
<item row="1" column="3">
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Mappings</string>
@ -363,7 +185,7 @@ @@ -363,7 +185,7 @@
</layout>
</widget>
</item>
<item row="1" column="2">
<item row="1" column="1">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Stick</string>
@ -372,7 +194,16 @@ @@ -372,7 +194,16 @@
<set>Qt::AlignCenter</set>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>6</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>6</number>
</property>
<item row="0" column="1">
@ -395,7 +226,7 @@ @@ -395,7 +226,7 @@
<property name="smallDecimalPoint">
<bool>true</bool>
</property>
<property name="numDigits">
<property name="digitCount">
<number>3</number>
</property>
<property name="segmentStyle">
@ -436,7 +267,7 @@ @@ -436,7 +267,7 @@
<property name="smallDecimalPoint">
<bool>true</bool>
</property>
<property name="numDigits">
<property name="digitCount">
<number>3</number>
</property>
<property name="segmentStyle">
@ -493,7 +324,7 @@ @@ -493,7 +324,7 @@
</layout>
</widget>
</item>
<item row="1" column="3">
<item row="1" column="2">
<widget class="QGroupBox" name="groupBox_3">
<property name="maximumSize">
<size>
@ -508,13 +339,22 @@ @@ -508,13 +339,22 @@
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item>
<widget class="QProgressBar" name="thrust">
<property name="enabled">
<bool>true</bool>
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
@ -533,7 +373,7 @@ @@ -533,7 +373,7 @@
</layout>
</widget>
</item>
<item row="2" column="0" colspan="5">
<item row="2" column="0" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="statusLabel">
@ -541,7 +381,7 @@ @@ -541,7 +381,7 @@
<number>1</number>
</property>
<property name="text">
<string>No joystick detected yet.. waiting</string>
<string/>
</property>
</widget>
</item>
@ -551,12 +391,15 @@ @@ -551,12 +391,15 @@
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
<set>QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0" colspan="4">
<widget class="QComboBox" name="joystickNameComboBox"/>
</item>
</layout>
</widget>
<resources/>
@ -568,8 +411,8 @@ @@ -568,8 +411,8 @@
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
<x>263</x>
<y>438</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
@ -577,21 +420,5 @@ @@ -577,21 +420,5 @@
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>JoystickWidget</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

Loading…
Cancel
Save