From: Hans Åge Martinsen Date: Sat, 10 Sep 2011 00:05:49 +0000 (+0200) Subject: Added some code for the controllers testing tool. The code is still not functional. X-Git-Url: https://git.defcon.no/?a=commitdiff_plain;h=072ed3afd98d2630e8cdffa48c69041bb05c6572;hp=49c14ececbf03a67b8ff1fa76c55489a7ad10371;p=rctxduino Added some code for the controllers testing tool. The code is still not functional. --- diff --git a/tools/jstt/jstt.cpp b/tools/jstt/jstt.cpp index 5698a1a..4e197db 100644 --- a/tools/jstt/jstt.cpp +++ b/tools/jstt/jstt.cpp @@ -5,31 +5,79 @@ jstt::jstt(QWidget *parent) : QMainWindow(parent), ui(new Ui::jstt) { - int i; - ui->setupUi(this); - if( SDL_Init(SDL_INIT_JOYSTICK) == 0 ) { - for(i = 0; i < SDL_NumJoysticks(); i++) { - this->jsNames.append(SDL_JoystickName(i)); - } - ui->Joysticks->addItems(this->jsNames); - } + this->joystick = NULL; + this->init(); } jstt::~jstt() { delete ui; + + if( jsIsOpen() ) jsClose(); + + SDL_Quit(); +} + +void jstt::init() +{ + QStringList jsNames; + + if( SDL_Init(SDL_INIT_JOYSTICK) == 0 ) { + + for(int i = 0; i < SDL_NumJoysticks(); i++) { + jsNames.append(SDL_JoystickName(i)); + } + connect(&jsPullTimer, SIGNAL(timeout()), this, SLOT(processJs())); + + ui->Joysticks->addItems(jsNames); + ui->Joysticks->setCurrentIndex(0); // This will trigger on_Joysticks_currentIndexChanged(int) + } } -void jstt::changeEvent(QEvent *e) +void jstt::jsOpen(int js) { - QMainWindow::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; + if( jsIsOpen() ) jsClose(); + + joystick = SDL_JoystickOpen(js); + if( joystick ) { + jsPullTimer.start(eventTimeout); + /* + + TODO: + + numAxes = SDL_JoystickNumAxes(joystick); + numButtons = SDL_JoystickNumButtons(joystick); + numHats = SDL_JoystickNumHats(joystick); + numTrackballs = SDL_JoystickNumBalls(joystick); + JoystickTimer.start(eventTimeout); + + When we have found out how many axes, buttons etc, we can expand the GUI further + */ + return; + } else { + /* + One should make sure the program will react on this situation instead of just + returning. + */ + return; } } + +void jstt::jsClose() +{ + this->jsPullTimer.stop(); + if( joystick ) SDL_JoystickClose(joystick); + joystick = NULL; +} + +void jstt::processJs() +{ + ui->Chan_1_bar->setValue(30); +} + +void jstt::on_Joysticks_currentIndexChanged(int index) +{ + this->jsOpen(index); +} diff --git a/tools/jstt/jstt.h b/tools/jstt/jstt.h index dd3c478..c2123e5 100644 --- a/tools/jstt/jstt.h +++ b/tools/jstt/jstt.h @@ -4,6 +4,9 @@ #include #include #include +#include + +#define eventTimeout 1 namespace Ui { class jstt; @@ -16,12 +19,19 @@ public: ~jstt(); protected: - void changeEvent(QEvent *e); + void init(); + void jsOpen(int js); + void jsClose(); + void processJs(); + bool jsIsOpen() { return joystick != NULL; } private: Ui::jstt *ui; + SDL_Joystick *joystick; + QTimer jsPullTimer; - QStringList jsNames; +private slots: + void on_Joysticks_currentIndexChanged(int index); }; #endif // JSTT_H diff --git a/tools/jstt/jstt.ui b/tools/jstt/jstt.ui index 599d232..b9a6a07 100644 --- a/tools/jstt/jstt.ui +++ b/tools/jstt/jstt.ui @@ -6,230 +6,327 @@ 0 0 - 350 - 344 + 354 + 457 jstt - - - - 10 - 180 - 331 - 31 - - - - - - - TextLabel - - - - - - - TextLabel - - - - - - - TextLabel - - - - - - - TextLabel - - - - - - + 10 10 331 - 161 + 381 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - 24 - - - Qt::Vertical - - - - - - - - - - Qt::Horizontal - - - - 50 - 20 - - - - + - - - 24 - - - Qt::Vertical - - - - - + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 110 + 110 + + + + + 110 + 110 + + + + + 110 + 110 + + + + + 110 + 110 + + + + + + + + Qt::Horizontal + + + + 46 + 0 + + + + + + + + + 110 + 110 + + + + + 110 + 110 + + + + + 110 + 110 + + + + + 110 + 110 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - Qt::Horizontal - - - - 50 - 20 - - - + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 24 + + + Qt::Vertical + + + + + + + + + + Qt::Horizontal + + + + 50 + 20 + + + + + + + + 24 + + + Qt::Vertical + + + + + + + + + + Qt::Horizontal + + + + 50 + 20 + + + + + + + + 24 + + + Qt::Vertical + + + + + + + + + + Qt::Horizontal + + + + 50 + 20 + + + + + + + + 24 + + + Qt::Vertical + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - 24 - - - Qt::Vertical - - - - - + + + + + TextLabel + + + + + + + TextLabel + + + + + + + TextLabel + + + + + + + TextLabel + + + + - - - Qt::Horizontal - - - - 50 - 20 - - - - - - - - 24 - - - Qt::Vertical - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - + + + + + + + + + Mode 1 + + + + + Mode 2 + + + + + Mode 3 + + + + + Mode 4 + + + + + - - - - 10 - 220 - 331 - 27 - - - - - - - 10 - 250 - 331 - 27 - - - - - Mode 1 - - - - - Mode 2 - - - - - Mode 3 - - - - - Mode 4 - - - + verticalLayoutWidget_2 + Chan_2_val + + + TopToolBarArea + + + false + + + 0 0 - 350 + 354 25 @@ -244,15 +341,6 @@ - - - TopToolBarArea - - - false - - - About @@ -267,6 +355,9 @@ Quit + + Qt::WindowShortcut + diff --git a/tools/jstt/moc_jstt.cpp b/tools/jstt/moc_jstt.cpp index 7c1fb2f..eff15f4 100644 --- a/tools/jstt/moc_jstt.cpp +++ b/tools/jstt/moc_jstt.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** Meta object code from reading C++ file 'jstt.h' ** -** Created: Mon Sep 5 22:51:54 2011 +** Created: Sat Sep 10 02:03:53 2011 ** by: The Qt Meta Object Compiler version 62 (Qt 4.6.3) ** ** WARNING! All changes made in this file will be lost! @@ -23,18 +23,21 @@ static const uint qt_meta_data_jstt[] = { 4, // revision 0, // classname 0, 0, // classinfo - 0, 0, // methods + 1, 14, // methods 0, 0, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags 0, // signalCount + // slots: signature, parameters, type, tag, flags + 12, 6, 5, 5, 0x08, + 0 // eod }; static const char qt_meta_stringdata_jstt[] = { - "jstt\0" + "jstt\0\0index\0on_Joysticks_currentIndexChanged(int)\0" }; const QMetaObject jstt::staticMetaObject = { @@ -64,6 +67,13 @@ int jstt::qt_metacall(QMetaObject::Call _c, int _id, void **_a) _id = QMainWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; + if (_c == QMetaObject::InvokeMetaMethod) { + switch (_id) { + case 0: on_Joysticks_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break; + default: ; + } + _id -= 1; + } return _id; } QT_END_MOC_NAMESPACE diff --git a/tools/jstt/ui_jstt.h b/tools/jstt/ui_jstt.h index a5e3dc9..721bc5f 100644 --- a/tools/jstt/ui_jstt.h +++ b/tools/jstt/ui_jstt.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'jstt.ui' ** -** Created: Mon Sep 5 23:04:32 2011 +** Created: Sat Sep 10 01:13:38 2011 ** by: Qt User Interface Compiler version 4.6.3 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -25,6 +26,7 @@ #include #include #include +#include #include QT_BEGIN_NAMESPACE @@ -36,146 +38,211 @@ public: QAction *actionHelp; QAction *actionQuit; QWidget *centralWidget; - QWidget *horizontalLayoutWidget; - QHBoxLayout *horizontalLayout; - QLabel *label_4; - QLabel *label_3; - QLabel *label_2; - QLabel *label; - QWidget *horizontalLayoutWidget_2; - QHBoxLayout *horizontalLayout_2; + QWidget *verticalLayoutWidget_2; + QVBoxLayout *Std_channels; + QHBoxLayout *Aimboards; + QSpacerItem *horizontalSpacer_8; + QGraphicsView *Aimboard_ch_12; + QSpacerItem *horizontalSpacer_6; + QGraphicsView *Aimboard_ch_34; + QSpacerItem *horizontalSpacer_7; + QHBoxLayout *Channel_bars; QSpacerItem *horizontalSpacer_4; - QProgressBar *Akse_1; + QProgressBar *Chan_1_bar; QSpacerItem *horizontalSpacer; - QProgressBar *Akse_2; + QProgressBar *Chan_2_bar; QSpacerItem *horizontalSpacer_2; - QProgressBar *Akse_3; + QProgressBar *Chan_3_bar; QSpacerItem *horizontalSpacer_3; - QProgressBar *Akse_0; + QProgressBar *Chan_4_bar; QSpacerItem *horizontalSpacer_5; + QHBoxLayout *Channel_values; + QLabel *Chan_1_val; + QLabel *Chan_2_val; + QLabel *Chan_3_val; + QLabel *Chan_4_val; + QVBoxLayout *Comboboxes; QComboBox *Joysticks; - QComboBox *Joysticks_2; - QMenuBar *menuBar; - QMenu *menuFile; + QComboBox *Mode_menu; QToolBar *mainToolBar; QStatusBar *statusBar; + QMenuBar *menuBar; + QMenu *menuFile; void setupUi(QMainWindow *jstt) { if (jstt->objectName().isEmpty()) jstt->setObjectName(QString::fromUtf8("jstt")); - jstt->resize(350, 344); + jstt->resize(354, 457); actionAbout = new QAction(jstt); actionAbout->setObjectName(QString::fromUtf8("actionAbout")); actionHelp = new QAction(jstt); actionHelp->setObjectName(QString::fromUtf8("actionHelp")); actionQuit = new QAction(jstt); actionQuit->setObjectName(QString::fromUtf8("actionQuit")); + actionQuit->setShortcutContext(Qt::WindowShortcut); centralWidget = new QWidget(jstt); centralWidget->setObjectName(QString::fromUtf8("centralWidget")); - horizontalLayoutWidget = new QWidget(centralWidget); - horizontalLayoutWidget->setObjectName(QString::fromUtf8("horizontalLayoutWidget")); - horizontalLayoutWidget->setGeometry(QRect(10, 180, 331, 31)); - horizontalLayout = new QHBoxLayout(horizontalLayoutWidget); - horizontalLayout->setSpacing(6); - horizontalLayout->setContentsMargins(11, 11, 11, 11); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); - horizontalLayout->setContentsMargins(0, 0, 0, 0); - label_4 = new QLabel(horizontalLayoutWidget); - label_4->setObjectName(QString::fromUtf8("label_4")); - - horizontalLayout->addWidget(label_4); - - label_3 = new QLabel(horizontalLayoutWidget); - label_3->setObjectName(QString::fromUtf8("label_3")); - - horizontalLayout->addWidget(label_3); - - label_2 = new QLabel(horizontalLayoutWidget); - label_2->setObjectName(QString::fromUtf8("label_2")); - - horizontalLayout->addWidget(label_2); - - label = new QLabel(horizontalLayoutWidget); - label->setObjectName(QString::fromUtf8("label")); - - horizontalLayout->addWidget(label); - - horizontalLayoutWidget_2 = new QWidget(centralWidget); - horizontalLayoutWidget_2->setObjectName(QString::fromUtf8("horizontalLayoutWidget_2")); - horizontalLayoutWidget_2->setGeometry(QRect(10, 10, 331, 161)); - horizontalLayout_2 = new QHBoxLayout(horizontalLayoutWidget_2); - horizontalLayout_2->setSpacing(6); - horizontalLayout_2->setContentsMargins(11, 11, 11, 11); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); - horizontalLayout_2->setContentsMargins(0, 0, 0, 0); + verticalLayoutWidget_2 = new QWidget(centralWidget); + verticalLayoutWidget_2->setObjectName(QString::fromUtf8("verticalLayoutWidget_2")); + verticalLayoutWidget_2->setGeometry(QRect(10, 10, 331, 381)); + Std_channels = new QVBoxLayout(verticalLayoutWidget_2); + Std_channels->setSpacing(6); + Std_channels->setContentsMargins(11, 11, 11, 11); + Std_channels->setObjectName(QString::fromUtf8("Std_channels")); + Std_channels->setContentsMargins(0, 0, 0, 0); + Aimboards = new QHBoxLayout(); + Aimboards->setSpacing(6); + Aimboards->setObjectName(QString::fromUtf8("Aimboards")); + horizontalSpacer_8 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + Aimboards->addItem(horizontalSpacer_8); + + Aimboard_ch_12 = new QGraphicsView(verticalLayoutWidget_2); + Aimboard_ch_12->setObjectName(QString::fromUtf8("Aimboard_ch_12")); + QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + sizePolicy.setHorizontalStretch(110); + sizePolicy.setVerticalStretch(110); + sizePolicy.setHeightForWidth(Aimboard_ch_12->sizePolicy().hasHeightForWidth()); + Aimboard_ch_12->setSizePolicy(sizePolicy); + Aimboard_ch_12->setMinimumSize(QSize(110, 110)); + Aimboard_ch_12->setMaximumSize(QSize(110, 110)); + Aimboard_ch_12->setBaseSize(QSize(110, 110)); + + Aimboards->addWidget(Aimboard_ch_12); + + horizontalSpacer_6 = new QSpacerItem(46, 0, QSizePolicy::Expanding, QSizePolicy::Minimum); + + Aimboards->addItem(horizontalSpacer_6); + + Aimboard_ch_34 = new QGraphicsView(verticalLayoutWidget_2); + Aimboard_ch_34->setObjectName(QString::fromUtf8("Aimboard_ch_34")); + sizePolicy.setHeightForWidth(Aimboard_ch_34->sizePolicy().hasHeightForWidth()); + Aimboard_ch_34->setSizePolicy(sizePolicy); + Aimboard_ch_34->setMinimumSize(QSize(110, 110)); + Aimboard_ch_34->setMaximumSize(QSize(110, 110)); + Aimboard_ch_34->setBaseSize(QSize(110, 110)); + + Aimboards->addWidget(Aimboard_ch_34); + + horizontalSpacer_7 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + Aimboards->addItem(horizontalSpacer_7); + + + Std_channels->addLayout(Aimboards); + + Channel_bars = new QHBoxLayout(); + Channel_bars->setSpacing(6); + Channel_bars->setObjectName(QString::fromUtf8("Channel_bars")); horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - horizontalLayout_2->addItem(horizontalSpacer_4); + Channel_bars->addItem(horizontalSpacer_4); - Akse_1 = new QProgressBar(horizontalLayoutWidget_2); - Akse_1->setObjectName(QString::fromUtf8("Akse_1")); - Akse_1->setValue(24); - Akse_1->setOrientation(Qt::Vertical); + Chan_1_bar = new QProgressBar(verticalLayoutWidget_2); + Chan_1_bar->setObjectName(QString::fromUtf8("Chan_1_bar")); + Chan_1_bar->setValue(24); + Chan_1_bar->setOrientation(Qt::Vertical); - horizontalLayout_2->addWidget(Akse_1); + Channel_bars->addWidget(Chan_1_bar); horizontalSpacer = new QSpacerItem(50, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - horizontalLayout_2->addItem(horizontalSpacer); + Channel_bars->addItem(horizontalSpacer); - Akse_2 = new QProgressBar(horizontalLayoutWidget_2); - Akse_2->setObjectName(QString::fromUtf8("Akse_2")); - Akse_2->setValue(24); - Akse_2->setOrientation(Qt::Vertical); + Chan_2_bar = new QProgressBar(verticalLayoutWidget_2); + Chan_2_bar->setObjectName(QString::fromUtf8("Chan_2_bar")); + Chan_2_bar->setValue(24); + Chan_2_bar->setOrientation(Qt::Vertical); - horizontalLayout_2->addWidget(Akse_2); + Channel_bars->addWidget(Chan_2_bar); horizontalSpacer_2 = new QSpacerItem(50, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - horizontalLayout_2->addItem(horizontalSpacer_2); + Channel_bars->addItem(horizontalSpacer_2); - Akse_3 = new QProgressBar(horizontalLayoutWidget_2); - Akse_3->setObjectName(QString::fromUtf8("Akse_3")); - Akse_3->setValue(24); - Akse_3->setOrientation(Qt::Vertical); + Chan_3_bar = new QProgressBar(verticalLayoutWidget_2); + Chan_3_bar->setObjectName(QString::fromUtf8("Chan_3_bar")); + Chan_3_bar->setValue(24); + Chan_3_bar->setOrientation(Qt::Vertical); - horizontalLayout_2->addWidget(Akse_3); + Channel_bars->addWidget(Chan_3_bar); horizontalSpacer_3 = new QSpacerItem(50, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - horizontalLayout_2->addItem(horizontalSpacer_3); + Channel_bars->addItem(horizontalSpacer_3); - Akse_0 = new QProgressBar(horizontalLayoutWidget_2); - Akse_0->setObjectName(QString::fromUtf8("Akse_0")); - Akse_0->setValue(24); - Akse_0->setOrientation(Qt::Vertical); + Chan_4_bar = new QProgressBar(verticalLayoutWidget_2); + Chan_4_bar->setObjectName(QString::fromUtf8("Chan_4_bar")); + Chan_4_bar->setValue(24); + Chan_4_bar->setOrientation(Qt::Vertical); - horizontalLayout_2->addWidget(Akse_0); + Channel_bars->addWidget(Chan_4_bar); horizontalSpacer_5 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - horizontalLayout_2->addItem(horizontalSpacer_5); + Channel_bars->addItem(horizontalSpacer_5); + + + Std_channels->addLayout(Channel_bars); + + Channel_values = new QHBoxLayout(); + Channel_values->setSpacing(6); + Channel_values->setObjectName(QString::fromUtf8("Channel_values")); + Chan_1_val = new QLabel(verticalLayoutWidget_2); + Chan_1_val->setObjectName(QString::fromUtf8("Chan_1_val")); + + Channel_values->addWidget(Chan_1_val); + + Chan_2_val = new QLabel(verticalLayoutWidget_2); + Chan_2_val->setObjectName(QString::fromUtf8("Chan_2_val")); + + Channel_values->addWidget(Chan_2_val); + + Chan_3_val = new QLabel(verticalLayoutWidget_2); + Chan_3_val->setObjectName(QString::fromUtf8("Chan_3_val")); + + Channel_values->addWidget(Chan_3_val); + + Chan_4_val = new QLabel(verticalLayoutWidget_2); + Chan_4_val->setObjectName(QString::fromUtf8("Chan_4_val")); + + Channel_values->addWidget(Chan_4_val); + + + Std_channels->addLayout(Channel_values); - Joysticks = new QComboBox(centralWidget); + Comboboxes = new QVBoxLayout(); + Comboboxes->setSpacing(6); + Comboboxes->setObjectName(QString::fromUtf8("Comboboxes")); + Joysticks = new QComboBox(verticalLayoutWidget_2); Joysticks->setObjectName(QString::fromUtf8("Joysticks")); - Joysticks->setGeometry(QRect(10, 220, 331, 27)); - Joysticks_2 = new QComboBox(centralWidget); - Joysticks_2->setObjectName(QString::fromUtf8("Joysticks_2")); - Joysticks_2->setGeometry(QRect(10, 250, 331, 27)); + + Comboboxes->addWidget(Joysticks); + + Mode_menu = new QComboBox(verticalLayoutWidget_2); + Mode_menu->setObjectName(QString::fromUtf8("Mode_menu")); + + Comboboxes->addWidget(Mode_menu); + + + Std_channels->addLayout(Comboboxes); + jstt->setCentralWidget(centralWidget); - menuBar = new QMenuBar(jstt); - menuBar->setObjectName(QString::fromUtf8("menuBar")); - menuBar->setGeometry(QRect(0, 0, 350, 25)); - menuFile = new QMenu(menuBar); - menuFile->setObjectName(QString::fromUtf8("menuFile")); - jstt->setMenuBar(menuBar); + verticalLayoutWidget_2->raise(); + Chan_2_val->raise(); mainToolBar = new QToolBar(jstt); mainToolBar->setObjectName(QString::fromUtf8("mainToolBar")); jstt->addToolBar(Qt::TopToolBarArea, mainToolBar); statusBar = new QStatusBar(jstt); statusBar->setObjectName(QString::fromUtf8("statusBar")); jstt->setStatusBar(statusBar); + menuBar = new QMenuBar(jstt); + menuBar->setObjectName(QString::fromUtf8("menuBar")); + menuBar->setGeometry(QRect(0, 0, 354, 25)); + menuFile = new QMenu(menuBar); + menuFile->setObjectName(QString::fromUtf8("menuFile")); + jstt->setMenuBar(menuBar); menuBar->addAction(menuFile->menuAction()); menuFile->addAction(actionAbout); @@ -194,16 +261,16 @@ public: actionAbout->setText(QApplication::translate("jstt", "About", 0, QApplication::UnicodeUTF8)); actionHelp->setText(QApplication::translate("jstt", "Help", 0, QApplication::UnicodeUTF8)); actionQuit->setText(QApplication::translate("jstt", "Quit", 0, QApplication::UnicodeUTF8)); - label_4->setText(QApplication::translate("jstt", "TextLabel", 0, QApplication::UnicodeUTF8)); - label_3->setText(QApplication::translate("jstt", "TextLabel", 0, QApplication::UnicodeUTF8)); - label_2->setText(QApplication::translate("jstt", "TextLabel", 0, QApplication::UnicodeUTF8)); - label->setText(QApplication::translate("jstt", "TextLabel", 0, QApplication::UnicodeUTF8)); - Akse_1->setFormat(QString()); - Akse_2->setFormat(QString()); - Akse_3->setFormat(QString()); - Akse_0->setFormat(QString()); - Joysticks_2->clear(); - Joysticks_2->insertItems(0, QStringList() + Chan_1_bar->setFormat(QString()); + Chan_2_bar->setFormat(QString()); + Chan_3_bar->setFormat(QString()); + Chan_4_bar->setFormat(QString()); + Chan_1_val->setText(QApplication::translate("jstt", "TextLabel", 0, QApplication::UnicodeUTF8)); + Chan_2_val->setText(QApplication::translate("jstt", "TextLabel", 0, QApplication::UnicodeUTF8)); + Chan_3_val->setText(QApplication::translate("jstt", "TextLabel", 0, QApplication::UnicodeUTF8)); + Chan_4_val->setText(QApplication::translate("jstt", "TextLabel", 0, QApplication::UnicodeUTF8)); + Mode_menu->clear(); + Mode_menu->insertItems(0, QStringList() << QApplication::translate("jstt", "Mode 1", 0, QApplication::UnicodeUTF8) << QApplication::translate("jstt", "Mode 2", 0, QApplication::UnicodeUTF8) << QApplication::translate("jstt", "Mode 3", 0, QApplication::UnicodeUTF8)