forked from OpenPanzerProject/OP-Config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
combo_auxchannelpositions.cpp
30 lines (25 loc) · 1.41 KB
/
combo_auxchannelpositions.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "combo_auxchannelpositions.h"
AuxChannelPositionsCombo::AuxChannelPositionsCombo(QWidget *parent) : QComboBox(parent)
{
// Fill on creation
this->insertItem(0, "2", 2);
this->insertItem(1, "3", 3);
// this->insertItem(2, "4", 4);
// this->insertItem(3, "5", 5);
this->insertItem(4, "6", 6);
// Switches with up to 6 positions are already defined in TCB firmware, and the number can be increased to any
// higher amount, although exceeding 3 positions doesn't make sense for most radios unless the user can
// do advaned programming or has installed a custom rotary knob. 6 positions are probably the common for these
// modifications (or the user can mix a 2 and 3 position switch).
// For now we hide positions 4 and 5 just to reduce clutter but they are available with no other change than
// simply uncommenting the lines above. If positions greater than 6 are desired new definitions will need to
// be created in TCB firmware, mainly in OP_Radio
// Connect to my custom signal
connect(this, SIGNAL(editTextChanged(QString)), this, SLOT(AuxChannelPositionChangedSlot(QString)));
connect(this, SIGNAL(currentIndexChanged(QString)), this, SLOT(AuxChannelPositionChangedSlot(QString)));
}
void AuxChannelPositionsCombo::AuxChannelPositionChangedSlot(const QString &)
{
// Send out custom signal with a pointer to this box
emit AuxChannelPositionChanged(this);
}