1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-21 15:25:17 +03:00

Merge branch 'upstream/next'

This commit is contained in:
projectkk2glider 2014-04-16 09:34:14 +02:00
commit 4ccbc13f6a
44 changed files with 2840 additions and 3020 deletions

View file

@ -370,3 +370,5 @@ Uwe Kuehn
David Beatty
Aaron Stringer
Alan J Wasserman
Wolfgang Rauser
Samuel Cook

View file

@ -134,9 +134,7 @@ Mode 4:
</size>
</property>
<property name="whatsThis">
<string>Channel order
This is used by the templated to determine which channel goes to what number output.</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Channel order&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Defines the order of the default mixes created on a new model.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="currentIndex">
<number>0</number>
@ -318,7 +316,7 @@ This is used by the templated to determine which channel goes to what number out
</sizepolicy>
</property>
<property name="text">
<string>Channel Order</string>
<string>Default Channel Order</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
@ -559,7 +557,7 @@ This is used by the templated to determine which channel goes to what number out
<bool>true</bool>
</property>
<property name="text">
<string>General Settings Label</string>
<string notr="true">General Settings Label</string>
</property>
</widget>
</item>

View file

@ -353,7 +353,7 @@ void burnDialog::on_useProfileImageCB_clicked()
if (!fileName.isEmpty()){
QImage image(fileName);
if (image.isNull()) {
QMessageBox::critical(this, tr("Error"), tr("The profile image %1 does not contain an image.").arg(fileName));
QMessageBox::critical(this, tr("Error"), tr("Profile image %1 is invalid.").arg(fileName));
}
else {
imageSource = PROFILE;

View file

@ -971,7 +971,7 @@ void compareDialog::printCurves()
QString str = "<table border=1 cellspacing=0 cellpadding=3 style=\"page-break-after:always;\" width=\"100%\"><tr><td><h2>";
str.append(tr("Curves"));
str.append("</h2></td></tr><tr><td>");
str.append("<table border=1 cellspacing=0 cellpadding=3 width=\"100%\"><tr><td colspan=11><b>"+tr("5 Points Curves")+"</b></td></tr><tr>");
str.append("<table border=1 cellspacing=0 cellpadding=3 width=\"100%\"><tr><td colspan=11><b>"+tr("5 Point Curves")+"</b></td></tr><tr>");
for(i=0; i<5; i++)
str.append(doTC(tr("pt %1").arg(i+1), "", true));
str.append("<td></td>");
@ -1001,7 +1001,7 @@ void compareDialog::printCurves()
}
str.append("</table></td></tr><tr><td>");
str.append("<table border=1 cellspacing=0 cellpadding=3 width=\"100%\"><tr><td colspan=19><b>"+tr("9 Points Curves")+"</b></td></tr><tr>");
str.append("<table border=1 cellspacing=0 cellpadding=3 width=\"100%\"><tr><td colspan=19><b>"+tr("9 Point Curves")+"</b></td></tr><tr>");
for(i=0; i<9; i++)
str.append(doTC(tr("pt %1").arg(i+1), "", true));
str.append("<td></td>");

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
<string/>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">

View file

@ -225,7 +225,7 @@ void customizeSplashDialog::loadProfile(Side side)
if (!fileName.isEmpty()) {
if (!side.displayImage( fileName, PROFILE ))
QMessageBox::critical(this, tr("Error"), tr("Cannot load the profile image %1.").arg(fileName));
QMessageBox::critical(this, tr("Error"), tr("Cannot load profile image %1.").arg(fileName));
}
side.markSourceButton();
}

View file

@ -308,10 +308,7 @@ QString RawSource::toString()
case SOURCE_TYPE_PPM:
return QObject::tr("TR%1").arg(index+1);
case SOURCE_TYPE_CH:
if (index < GetEepromInterface()->getCapability(Outputs))
return QObject::tr("CH%1%2").arg((index+1)/10).arg((index+1)%10);
else
return QObject::tr("X%1").arg(index-GetEepromInterface()->getCapability(Outputs)+1);
return QObject::tr("CH%1").arg(index+1);
case SOURCE_TYPE_TELEMETRY:
return CHECK_IN_ARRAY(telemetry, index);
case SOURCE_TYPE_GVAR:

View file

@ -1022,7 +1022,6 @@ enum Capability {
RotaryEncoders,
Outputs,
ChannelsName,
ExtraChannels,
ExtraInputs,
ExtendedTrims,
NumCurves,

View file

@ -239,8 +239,6 @@ int Er9xInterface::getCapability(const Capability capability)
return 13;
case Outputs:
return 16;
case ExtraChannels:
return 0;
case Simulation:
return 1;
case Telemetry:

View file

@ -283,8 +283,6 @@ int Ersky9xInterface::getCapability(const Capability capability)
return 13;
case Outputs:
return ERSKY9X_NUM_CHNOUT_V11;
case ExtraChannels:
return 0;
case Simulation:
return 1;
case Telemetry:

View file

@ -241,8 +241,6 @@ int Gruvin9xInterface::getCapability(const Capability capability)
return 13;
case Outputs:
return 16;
case ExtraChannels:
return 0;
case ExtendedTrims:
return 500;
case Simulation:

View file

@ -705,8 +705,9 @@ class FlightModeField: public TransformedField {
}
}
else {
for (int i=0; i<NUM_STICKS; i++)
for (int i=0; i<NUM_STICKS; i++) {
internalField.Append(new SignedField<16>(trimBase[i]));
}
}
internalField.Append(new SwitchField<8>(phase.swtch, board, version));
@ -776,22 +777,29 @@ class FlightModeField: public TransformedField {
}
}
else {
int trim;
if (board == BOARD_STOCK || (board == BOARD_M128 && version >= 215))
trim = ((trimBase[i]) << 2) + (trimExt[i] & 0x03);
else
trim = trimBase[i];
if (trim > 500) {
phase.trimRef[i] = trim - 501;
if (phase.trimRef[i] >= index)
phase.trimRef[i] += 1;
if (phase.swtch == RawSwitch(SWITCH_TYPE_NONE)) {
phase.trimRef[i] = 0;
phase.trimMode[i] = 0;
phase.trim[i] = 0;
}
else {
phase.trimRef[i] = index;
phase.trimMode[i] = 0;
phase.trim[i] = trim;
int trim;
if (board == BOARD_STOCK || (board == BOARD_M128 && version >= 215))
trim = ((trimBase[i]) << 2) + (trimExt[i] & 0x03);
else
trim = trimBase[i];
if (trim > 500) {
phase.trimRef[i] = trim - 501;
if (phase.trimRef[i] >= index)
phase.trimRef[i] += 1;
phase.trimMode[i] = 0;
phase.trim[i] = 0;
}
else {
phase.trimRef[i] = index/*own trim*/;
phase.trimMode[i] = 0;
phase.trim[i] = trim;
}
}
}
}

View file

@ -581,8 +581,6 @@ int OpenTxInterface::getCapability(const Capability capability)
return (IS_ARM(board) ? 23 : 7);
case HasSoundMixer:
return (IS_ARM(board) ? 1 : 0);
case ExtraChannels:
return 0;
case ExtraInputs:
return 1;
case ExtendedTrims:

View file

@ -159,8 +159,6 @@ int Th9xInterface::getCapability(const Capability capability)
return TH9X_MAX_SWITCHES;
case Outputs:
return 8;
case ExtraChannels:
return 4;
case OffsetWeight:
return 125;
case Simulation:

View file

@ -51,7 +51,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -64,7 +64,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -77,7 +77,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -100,7 +100,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -113,7 +113,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -126,7 +126,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -139,7 +139,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -152,7 +152,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -214,7 +214,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -227,7 +227,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -240,7 +240,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -253,7 +253,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -266,7 +266,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -279,7 +279,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -292,7 +292,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -305,7 +305,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -318,7 +318,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -331,7 +331,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -344,7 +344,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -357,7 +357,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -370,7 +370,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -383,7 +383,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -396,7 +396,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -409,7 +409,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -422,7 +422,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -435,7 +435,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -448,7 +448,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -461,7 +461,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -474,7 +474,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -487,7 +487,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -500,7 +500,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -513,7 +513,7 @@
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -574,7 +574,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -587,7 +587,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -614,7 +614,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -627,7 +627,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -640,7 +640,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -653,7 +653,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -666,7 +666,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -679,7 +679,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -699,7 +699,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -712,7 +712,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>FwInfo</string>
<string notr="true">FwInfo</string>
</property>
</widget>
</item>
@ -725,7 +725,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>

View file

@ -540,7 +540,7 @@ Mode 4:
</sizepolicy>
</property>
<property name="text">
<string>Channel Order (For Templates)</string>
<string>Default Channel Order</string>
</property>
</widget>
</item>
@ -683,9 +683,7 @@ Mode 4:
<string/>
</property>
<property name="whatsThis">
<string>Channel order
This is used by the templated to determine which channel goes to what number output.</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Channel order&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Defines the order of the default mixes created on a new model.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="currentIndex">
<number>0</number>
@ -1628,12 +1626,7 @@ p, li { white-space: pre-wrap; }
<string/>
</property>
<property name="whatsThis">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;LCD Screen Contrast&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Values can be 20-45&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string/>
</property>
<property name="minimum">
<number>10</number>
@ -2388,7 +2381,7 @@ Acceptable values are 5v..10v</string>
<item row="4" column="5">
<widget class="QLabel" name="label_pot4">
<property name="text">
<string>POT 4</string>
<string>Pot. 4</string>
</property>
</widget>
</item>
@ -2402,7 +2395,7 @@ Acceptable values are 5v..10v</string>
<item row="3" column="5">
<widget class="QLabel" name="label_pot3">
<property name="text">
<string>POT 3</string>
<string>Pot. 3</string>
</property>
</widget>
</item>
@ -2422,14 +2415,14 @@ Acceptable values are 5v..10v</string>
<item row="2" column="5">
<widget class="QLabel" name="label_pot2">
<property name="text">
<string>POT 2</string>
<string>Pot. 2</string>
</property>
</widget>
</item>
<item row="1" column="5">
<widget class="QLabel" name="label_pot1">
<property name="text">
<string>POT 1</string>
<string>Pot. 1</string>
</property>
</widget>
</item>
@ -2456,7 +2449,7 @@ Acceptable values are 5v..10v</string>
<item row="3" column="0">
<widget class="QLabel" name="label_17">
<property name="text">
<string>STICK 3</string>
<string>Stick 3</string>
</property>
</widget>
</item>
@ -2493,7 +2486,7 @@ Acceptable values are 5v..10v</string>
<item row="1" column="0">
<widget class="QLabel" name="label_15">
<property name="text">
<string>STICK 1</string>
<string>Stick 1</string>
</property>
</widget>
</item>
@ -2542,7 +2535,7 @@ Acceptable values are 5v..10v</string>
<item row="2" column="0">
<widget class="QLabel" name="label_16">
<property name="text">
<string>STICK 2</string>
<string>Stick 2</string>
</property>
</widget>
</item>
@ -2627,7 +2620,7 @@ Acceptable values are 5v..10v</string>
<item row="4" column="0">
<widget class="QLabel" name="label_18">
<property name="text">
<string>STICK 4</string>
<string>Stick 4</string>
</property>
</widget>
</item>

View file

@ -605,7 +605,7 @@ void populateSourceCB(QComboBox *b, const RawSource & source, const ModelData &
if (item == source) b->setCurrentIndex(b->count()-1);
}
for (int i=0; i<GetEepromInterface()->getCapability(Outputs)+GetEepromInterface()->getCapability(ExtraChannels); i++) {
for (int i=0; i<GetEepromInterface()->getCapability(Outputs); i++) {
item = RawSource(SOURCE_TYPE_CH, i);
b->addItem(item.toString(), item.toValue());
if (item == source) b->setCurrentIndex(b->count()-1);

View file

@ -277,7 +277,7 @@ void MainWindow::checkForUpdateFinished(QNetworkReply * reply)
}
}
#else
QMessageBox::warning(this, tr("New release available"), tr("A new release of Companion is available please check the OpenTX website!"));
QMessageBox::warning(this, tr("New release available"), tr("A new release of Companion is available, please check the OpenTX website!"));
#endif
} else {
if (showcheckForUpdatesResult && check1done && check2done)
@ -341,7 +341,7 @@ void MainWindow::reply1Accepted()
int errnum=hline.mid(6).toInt();
switch(errnum) {
case 1:
errormsg=tr("Firmware does not longer fit in the radio, due to selected firmware options");
errormsg=tr("Not enough memory for all the selected firmware options");
break;
case 2:
errormsg=tr("Compilation server temporary failure, try later");
@ -380,7 +380,7 @@ void MainWindow::reply1Accepted()
int errnum=hline.mid(6).toInt();
switch(errnum) {
case 1:
errormsg=tr("Firmware does not fit in the radio, due to selected firmware options");
errormsg=tr("Not enough memory for all the selected firmware options");
break;
case 2:
errormsg=tr("Compilation server termporary failure, try later");
@ -1611,14 +1611,14 @@ void MainWindow::createActions()
}
updateProfilesActions();
newAct = addAct("new.png", tr("New Models+Settings"), tr("Create a new Models and Settings file"), QKeySequence::New, SLOT(newFile()));
openAct = addAct("open.png", tr("Open Models+Settings..."), tr("Open Models and Settings file"), QKeySequence::Open, SLOT(openFile()));
saveAct = addAct("save.png", tr("Save Models+Settings..."), tr("Save Models and Settings file"), QKeySequence::Save, SLOT(save()));
saveAsAct = addAct("saveas.png", tr("Save Models+Settings as..."), tr("Save Models and Settings file"), QKeySequence::SaveAs, SLOT(saveAs()));
exitAct = addAct("exit.png", tr("Exit"), tr("Exit the application"), QKeySequence::Quit, SLOT(closeAllWindows()), qApp);
cutAct = addAct("cut.png", tr("Cut Model"), tr("Cut current model to the clipboard"), QKeySequence::Cut, SLOT(cut()));
copyAct = addAct("copy.png", tr("Copy Model..."), tr("Copy current model to the clipboard"), QKeySequence::Copy, SLOT(copy()));
pasteAct = addAct("paste.png", tr("Paste Model..."), tr("Paste model from clipboard"), QKeySequence::Paste, SLOT(paste()));
newAct = addAct("new.png", tr("New"), tr("Create a new Models and Settings file"), QKeySequence::New, SLOT(newFile()));
openAct = addAct("open.png", tr("Open..."), tr("Open Models and Settings file"), QKeySequence::Open, SLOT(openFile()));
saveAct = addAct("save.png", tr("Save"), tr("Save Models and Settings file"), QKeySequence::Save, SLOT(save()));
saveAsAct = addAct("saveas.png", tr("Save As..."), tr("Save Models and Settings file"), QKeySequence::SaveAs, SLOT(saveAs()));
exitAct = addAct("exit.png", tr("Exit"), tr("Exit the application"), QKeySequence::Quit, SLOT(closeAllWindows()), qApp);
cutAct = addAct("cut.png", tr("Cut Model"), tr("Cut current model to the clipboard"), QKeySequence::Cut, SLOT(cut()));
copyAct = addAct("copy.png", tr("Copy Model"), tr("Copy current model to the clipboard"), QKeySequence::Copy, SLOT(copy()));
pasteAct = addAct("paste.png", tr("Paste Model"), tr("Paste model from clipboard"), QKeySequence::Paste, SLOT(paste()));
QActionGroup *themeAlignGroup = new QActionGroup(this);
classicThemeAct = addAct( themeAlignGroup, tr("Classical"), tr("The classic companion9x icon theme"), SLOT(setClassicTheme()));
@ -1641,12 +1641,12 @@ void MainWindow::createActions()
finnishLangAct = addAct( langAlignGroup, tr("Finnish"), tr("Use Finnish in menus"), SLOT(setFILanguage()));
frenchLangAct = addAct( langAlignGroup, tr("French"), tr("Use French in menus"), SLOT(setFRLanguage()));
italianLangAct = addAct( langAlignGroup, tr("Italian"), tr("Use Italian in menus"), SLOT(setITLanguage()));
hebrewLangAct = addAct( langAlignGroup, tr("Hebrew"), tr("Use Hebrew in menus"), SLOT(setHELanguage()));
// hebrewLangAct = addAct( langAlignGroup, tr("Hebrew"), tr("Use Hebrew in menus"), SLOT(setHELanguage()));
polishLangAct = addAct( langAlignGroup, tr("Polish"), tr("Use Polish in menus"), SLOT(setPLLanguage()));
portugueseLangAct = addAct( langAlignGroup, tr("Portuguese"), tr("Use Portuguese in menus"), SLOT(setPTLanguage()));
// portugueseLangAct = addAct( langAlignGroup, tr("Portuguese"), tr("Use Portuguese in menus"), SLOT(setPTLanguage()));
swedishLangAct = addAct( langAlignGroup, tr("Swedish"), tr("Use Swedish in menus"), SLOT(setSELanguage()));
russianLangAct = addAct( langAlignGroup, tr("Russian"), tr("Use Russian in menus"), SLOT(setRULanguage()));
dutchLangAct = addAct( langAlignGroup, tr("Dutch"), tr("Use Dutch in menus"), SLOT(setNLLanguage()));
// russianLangAct = addAct( langAlignGroup, tr("Russian"), tr("Use Russian in menus"), SLOT(setRULanguage()));
// dutchLangAct = addAct( langAlignGroup, tr("Dutch"), tr("Use Dutch in menus"), SLOT(setNLLanguage()));
aboutAct = addAct("information.png", tr("About..."), tr("Show the application's About box"), SLOT(about()));
printAct = addAct("print.png", tr("Print..."), tr("Print current model"), SLOT(print()));
@ -1681,7 +1681,7 @@ void MainWindow::createActions()
void MainWindow::createMenus()
{
QMenu *recentFileMenu=new QMenu(tr("Recent Models+Settings"), this);
QMenu *recentFileMenu=new QMenu(tr("Recent Files"), this);
QMenu *languageMenu=new QMenu(tr("Set Menu Language"), this);
QMenu *themeMenu=new QMenu(tr("Set Icon Theme"), this);
QMenu *iconThemeSizeMenu=new QMenu(tr("Set Icon Size"), this);
@ -1718,13 +1718,13 @@ void MainWindow::createMenus()
languageMenu->addAction(germanLangAct);
languageMenu->addAction(finnishLangAct);
languageMenu->addAction(frenchLangAct);
languageMenu->addAction(hebrewLangAct);
// languageMenu->addAction(hebrewLangAct);
languageMenu->addAction(italianLangAct);
languageMenu->addAction(polishLangAct);
languageMenu->addAction(portugueseLangAct);
// languageMenu->addAction(portugueseLangAct);
languageMenu->addAction(swedishLangAct);
languageMenu->addAction(russianLangAct);
languageMenu->addAction(dutchLangAct);
// languageMenu->addAction(russianLangAct);
// languageMenu->addAction(dutchLangAct);
settingsMenu->addMenu(themeMenu);
themeMenu->addAction(classicThemeAct);
@ -1843,7 +1843,7 @@ void MainWindow::createToolBars()
profileButton->setMenu(createProfilesMenu());
profileButton->setIcon(CompanionIcon("profiles.png"));
profileButton->setToolTip(tr("Radio Profile"));
profileButton->setStatusTip(tr("Show a selection list of radio profiles"));
profileButton->setStatusTip(tr("Show the list of radio profiles"));
fileToolBar->addWidget(profileButton);
fileToolBar->addAction(editSplashAct);

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string/>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
@ -65,12 +65,12 @@
<widget class="QComboBox" name="curveCustom">
<item>
<property name="text">
<string>Standard</string>
<string>Fixed X</string>
</property>
</item>
<item>
<property name="text">
<string>Custom</string>
<string>Custom X</string>
</property>
</item>
</widget>

View file

@ -33,7 +33,7 @@
<item row="2" column="1">
<widget class="QComboBox" name="sourceCB">
<property name="whatsThis">
<string>The source for the mixer</string>
<string>Source for the mixer.</string>
</property>
</widget>
</item>
@ -73,7 +73,7 @@
<item>
<widget class="QComboBox" name="weightCB">
<property name="whatsThis">
<string>Phase used by the input.</string>
<string/>
</property>
</widget>
</item>
@ -104,7 +104,7 @@
<item row="0" column="0">
<widget class="QLabel" name="lb_FP0">
<property name="text">
<string>0</string>
<string notr="true">0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -114,7 +114,7 @@
<item row="0" column="1">
<widget class="QLabel" name="lb_FP1">
<property name="text">
<string>1</string>
<string notr="true">1</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -124,7 +124,7 @@
<item row="0" column="2">
<widget class="QLabel" name="lb_FP2">
<property name="text">
<string>2</string>
<string notr="true">2</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -134,7 +134,7 @@
<item row="0" column="3">
<widget class="QLabel" name="lb_FP3">
<property name="text">
<string>3</string>
<string notr="true">3</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -144,7 +144,7 @@
<item row="0" column="4">
<widget class="QLabel" name="lb_FP4">
<property name="text">
<string>4</string>
<string notr="true">4</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -154,7 +154,7 @@
<item row="0" column="5">
<widget class="QLabel" name="lb_FP5">
<property name="text">
<string>5</string>
<string notr="true">5</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -164,7 +164,7 @@
<item row="0" column="6">
<widget class="QLabel" name="lb_FP6">
<property name="text">
<string>6</string>
<string notr="true">6</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -174,7 +174,7 @@
<item row="0" column="7">
<widget class="QLabel" name="lb_FP7">
<property name="text">
<string>7</string>
<string notr="true">7</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -184,7 +184,7 @@
<item row="0" column="8">
<widget class="QLabel" name="lb_FP8">
<property name="text">
<string>8</string>
<string notr="true">8</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -266,7 +266,7 @@
<item row="9" column="1">
<widget class="QComboBox" name="switchesCB">
<property name="whatsThis">
<string>Switch used by the input.
<string>Switch used to enable the line.
If blank then the input is considered to be &quot;ON&quot; all the time.</string>
</property>
</widget>
@ -332,17 +332,7 @@ If blank then the input is considered to be &quot;ON&quot; all the time.</string
<item row="3" column="1">
<widget class="QDoubleSpinBox" name="scale">
<property name="whatsThis">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; text-decoration: underline;&quot;&gt;Delay ans Slow&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These values control the speed and delay of the output of the mix. &lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;If Delay is not zero the actuation of the mix will be delayed by the specified amount of seconds.&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;If Slow is not zero then the speed of the mix will be set by the value specified -&amp;gt; the value states the number of seconds it takes to transit from -100 to 100.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string/>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@ -395,7 +385,7 @@ p, li { white-space: pre-wrap; }
<string/>
</property>
<property name="whatsThis">
<string>The curve used by the input</string>
<string>Curve applied to the source.</string>
</property>
</widget>
</item>

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
@ -169,7 +169,7 @@
<item row="1" column="0">
<widget class="QLabel" name="trim1Label">
<property name="text">
<string>trim1</string>
<string notr="true">trim1</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@ -277,7 +277,7 @@
<item row="0" column="0">
<widget class="QLabel" name="trim2Label">
<property name="text">
<string>trim2</string>
<string notr="true">trim2</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@ -303,7 +303,7 @@
<item row="1" column="0">
<widget class="QLabel" name="trim4Label">
<property name="text">
<string>trim4</string>
<string notr="true">trim4</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@ -313,7 +313,7 @@
<item row="0" column="0">
<widget class="QLabel" name="trim3Label">
<property name="text">
<string>trim3</string>
<string notr="true">trim3</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string/>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1" columnminimumwidth="100,0">
<property name="horizontalSpacing">

View file

@ -16,10 +16,7 @@ MixerDialog::MixerDialog(QWidget *parent, ModelData & model, MixData *mixdata, G
QLabel * lb_fp[] = {ui->lb_FP0,ui->lb_FP1,ui->lb_FP2,ui->lb_FP3,ui->lb_FP4,ui->lb_FP5,ui->lb_FP6,ui->lb_FP7,ui->lb_FP8 };
QCheckBox * cb_fp[] = {ui->cb_FP0,ui->cb_FP1,ui->cb_FP2,ui->cb_FP3,ui->cb_FP4,ui->cb_FP5,ui->cb_FP6,ui->cb_FP7,ui->cb_FP8 };
if (md->destCh > (unsigned int)GetEepromInterface()->getCapability(Outputs))
this->setWindowTitle(tr("DEST -> X%1").arg(md->destCh-GetEepromInterface()->getCapability(Outputs)));
else
this->setWindowTitle(tr("DEST -> CH%1%2").arg(md->destCh/10).arg(md->destCh%10));
this->setWindowTitle(tr("DEST -> CH%1").arg(md->destCh));
populateSourceCB(ui->sourceCB, md->srcRaw, model, POPULATE_SOURCES | POPULATE_VIRTUAL_INPUTS | POPULATE_SWITCHES | POPULATE_TRIMS);
ui->sourceCB->removeItem(0);

View file

@ -204,7 +204,7 @@ p, li { white-space: pre-wrap; }
<item row="0" column="0">
<widget class="QLabel" name="lb_FP0">
<property name="text">
<string>0</string>
<string notr="true">0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -214,7 +214,7 @@ p, li { white-space: pre-wrap; }
<item row="0" column="1">
<widget class="QLabel" name="lb_FP1">
<property name="text">
<string>1</string>
<string notr="true">1</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -224,7 +224,7 @@ p, li { white-space: pre-wrap; }
<item row="0" column="2">
<widget class="QLabel" name="lb_FP2">
<property name="text">
<string>2</string>
<string notr="true">2</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -234,7 +234,7 @@ p, li { white-space: pre-wrap; }
<item row="0" column="3">
<widget class="QLabel" name="lb_FP3">
<property name="text">
<string>3</string>
<string notr="true">3</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -244,7 +244,7 @@ p, li { white-space: pre-wrap; }
<item row="0" column="4">
<widget class="QLabel" name="lb_FP4">
<property name="text">
<string>4</string>
<string notr="true">4</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -254,7 +254,7 @@ p, li { white-space: pre-wrap; }
<item row="0" column="5">
<widget class="QLabel" name="lb_FP5">
<property name="text">
<string>5</string>
<string notr="true">5</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -264,7 +264,7 @@ p, li { white-space: pre-wrap; }
<item row="0" column="6">
<widget class="QLabel" name="lb_FP6">
<property name="text">
<string>6</string>
<string notr="true">6</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -274,7 +274,7 @@ p, li { white-space: pre-wrap; }
<item row="0" column="7">
<widget class="QLabel" name="lb_FP7">
<property name="text">
<string>7</string>
<string notr="true">7</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -284,7 +284,7 @@ p, li { white-space: pre-wrap; }
<item row="0" column="8">
<widget class="QLabel" name="lb_FP8">
<property name="text">
<string>8</string>
<string notr="true">8</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>

View file

@ -5,7 +5,8 @@
MixesPanel::MixesPanel(QWidget *parent, ModelData & model, GeneralSettings & generalSettings):
ModelPanel(parent, model, generalSettings),
mixInserted(false)
mixInserted(false),
highlightedSource(0)
{
QGridLayout * mixesLayout = new QGridLayout(this);
@ -46,20 +47,15 @@ QString MixesPanel::getChannelLabel(int curDest)
{
QString str;
int outputs = GetEepromInterface()->getCapability(Outputs);
if (curDest > outputs) {
str = QObject::tr("X%1 ").arg(curDest-outputs);
}
else {
str = QObject::tr("CH%1").arg(curDest);
str.append(" ");
if (GetEepromInterface()->getCapability(HasChNames)) {
QString name = model.limitData[curDest-1].name;
if (!name.isEmpty()) {
name = QString("(") + name + QString(")");
}
name.append(" ");
str += name.left(8);
str = QObject::tr("CH%1").arg(curDest);
(str.length() < 4) ? str.append(" ") : str.append(" ");
if (GetEepromInterface()->getCapability(HasChNames)) {
QString name = model.limitData[curDest-1].name;
if (!name.isEmpty()) {
name = QString("(") + name + QString(")");
}
name.append(" ");
str += name.left(8);
}
return str;
}
@ -73,25 +69,84 @@ void MixesPanel::update()
unsigned int curDest = 0;
int i;
unsigned int outputs = GetEepromInterface()->getCapability(Outputs);
for (i=0; i<GetEepromInterface()->getCapability(Mixes); i++) {
MixData *md = &model.mixData[i];
if ((md->destCh==0) || (md->destCh>outputs+(unsigned int)GetEepromInterface()->getCapability(ExtraChannels))) continue;
// qDebug() << "md->destCh: " << md->destCh;
if (md->destCh==0 || md->destCh>outputs) continue;
QString str = "";
while (curDest < md->destCh-1) {
curDest++;
str = getChannelLabel(curDest);
qba.clear();
qba.append((quint8)-curDest);
QListWidgetItem *itm = new QListWidgetItem(str);
itm->setData(Qt::UserRole,qba);
MixerlistWidget->addItem(itm);
AddMixerLine(-curDest);
}
if (AddMixerLine(i)) {
curDest++;
}
}
while (curDest < outputs) {
curDest++;
AddMixerLine(-curDest);
}
}
#define MIX_ROW_HEIGHT_INCREASE 8 //how much space is added above mixer row (for new channel), if 0 space adding is disabled
bool MixesPanel::AddMixerLine(int dest)
{
bool new_ch;
QString str = getMixerText(dest, &new_ch);
QListWidgetItem *itm = new QListWidgetItem();
itm->setData(Qt::UserRole, QByteArray(1, (quint8)dest));
#if MIX_ROW_HEIGHT_INCREASE > 0
if ((new_ch && (dest > 0)) || (dest < 0)) {
//increase size of this row
QFontMetrics * fm = new QFontMetrics(itm->font());
QRect rect = fm->boundingRect("C)");
itm->setSizeHint(QSize(-1, (rect.height() * (14+MIX_ROW_HEIGHT_INCREASE))/10));
}
#endif
MixerlistWidget->addItem(itm);
MixerlistWidget->setItemWidget(itm, getMixerWidget(str));
// qDebug() << "MixesPanel::AddMixerLine(): " << str;
return new_ch;
}
QWidget * MixesPanel::getMixerWidget(const QString & mixer_text)
{
QLabel * l = new QLabel();
l->setFont(QFont("Courier New",12));
l->setTextFormat(Qt::RichText);
l->setAlignment(Qt::AlignBottom);
QString formated_str(mixer_text);
formated_str.replace(" ", "&nbsp;");
l->setText(formated_str);
return l;
}
QString MixesPanel::getMixerText(int dest, bool * new_ch)
{
QString str;
*new_ch = 0;
if (dest < 0) {
str = getChannelLabel(-dest);
//highlight channell if needed
if (-dest == (int)highlightedSource) {
str = "<b>" + str + "</b>";
}
}
else {
MixData *md = &model.mixData[dest];
//md->destCh from 1 to 32
str = getChannelLabel(md->destCh);
if (curDest != md->destCh) {
curDest = md->destCh;
}
if ((dest == 0) || (model.mixData[dest-1].destCh != md->destCh)) {
*new_ch = 1;
//highlight channell if needed
if (md->destCh == highlightedSource) {
str = "<b>" + str + "</b>";
}
}
else {
str.fill(' ');
}
@ -102,63 +157,53 @@ void MixesPanel::update()
default: str += " "; break;
};
str += " " + md->srcRaw.toString();
//highlight source if needed
if ( (md->srcRaw.type == SOURCE_TYPE_CH) && (md->srcRaw.index+1 == (int)highlightedSource) ) {
str += " <b>" + Qt::escape(md->srcRaw.toString()) + "</b>";
}
else {
str += " " + Qt::escape(md->srcRaw.toString());
}
str += " " + tr("Weight(%1)").arg(getGVarString(md->weight, true));
str += " " + Qt::escape(tr("Weight(%1)").arg(getGVarString(md->weight, true)));
QString phasesStr = getPhasesStr(md->phases, model);
if (!phasesStr.isEmpty()) str += " " + phasesStr;
if (!phasesStr.isEmpty()) str += " " + Qt::escape(phasesStr);
if (md->swtch.type != SWITCH_TYPE_NONE) {
str += " " + tr("Switch(%1)").arg(md->swtch.toString());
str += " " + Qt::escape(tr("Switch(%1)").arg(md->swtch.toString()));
}
if (md->carryTrim>0) {
str += " " + tr("No Trim");
str += " " + Qt::escape(tr("No Trim"));
}
else if (md->carryTrim<0) {
str += " " + RawSource(SOURCE_TYPE_TRIM, (-(md->carryTrim)-1)).toString();
str += " " + Qt::escape(RawSource(SOURCE_TYPE_TRIM, (-(md->carryTrim)-1)).toString());
}
if (md->noExpo) str += " " + tr("No DR/Expo");
if (md->sOffset) str += " " + tr("Offset(%1)").arg(getGVarString(md->sOffset));
if (md->curve.value) str += " " + md->curve.toString();
if (md->noExpo) str += " " + Qt::escape(tr("No DR/Expo"));
if (md->sOffset) str += " " + Qt::escape(tr("Offset(%1)").arg(getGVarString(md->sOffset)));
if (md->curve.value) str += " " + Qt::escape(md->curve.toString());
int scale = GetEepromInterface()->getCapability(SlowScale);
if (scale == 0)
scale = 1;
if (md->delayDown || md->delayUp)
str += tr(" Delay(u%1:d%2)").arg((double)md->delayUp/scale).arg((double)md->delayDown/scale);
str += Qt::escape(tr(" Delay(u%1:d%2)").arg((double)md->delayUp/scale).arg((double)md->delayDown/scale));
if (md->speedDown || md->speedUp)
str += tr(" Slow(u%1:d%2)").arg((double)md->speedUp/scale).arg((double)md->speedDown/scale);
if (md->mixWarn) str += tr(" Warn(%1)").arg(md->mixWarn);
str += Qt::escape(tr(" Slow(u%1:d%2)").arg((double)md->speedUp/scale).arg((double)md->speedDown/scale));
if (md->mixWarn) str += Qt::escape(tr(" Warn(%1)").arg(md->mixWarn));
if (GetEepromInterface()->getCapability(HasMixerNames)) {
QString MixerName;
MixerName.append(md->name);
if (!MixerName.isEmpty()) {
str += QString("(%1)").arg(MixerName);
str += Qt::escape(QString("(%1)").arg(MixerName));
}
}
qba.clear();
qba.append((quint8)i);
qba.append((const char*)md, sizeof(MixData));
QListWidgetItem *itm = new QListWidgetItem(str);
itm->setData(Qt::UserRole, qba); // mix number
MixerlistWidget->addItem(itm); //(str);
}
while(curDest<outputs+GetEepromInterface()->getCapability(ExtraChannels)) {
curDest++;
QString str = getChannelLabel(curDest);
qba.clear();
qba.append((quint8)-curDest);
QListWidgetItem *itm = new QListWidgetItem(str);
itm->setData(Qt::UserRole,qba); // add new mixer
MixerlistWidget->addItem(itm);
}
return str;
}
bool MixesPanel::gm_insertMix(int idx)
{
if (idx<0 || idx>=GetEepromInterface()->getCapability(Mixes) || model.mixData[GetEepromInterface()->getCapability(Mixes)-1].destCh > 0) {
@ -367,6 +412,26 @@ void MixesPanel::mixerOpen()
gm_openMix(idx);
}
void MixesPanel::mixerHighlight()
{
int idx = MixerlistWidget->currentItem()->data(Qt::UserRole).toByteArray().at(0);
int dest;
if (idx<0) {
dest = -idx;
}
else {
dest = model.mixData[idx].destCh;
}
highlightedSource = ( (int)highlightedSource == dest) ? 0 : dest;
// qDebug() << "MixesPanel::mixerHighlight(): " << highlightedSource ;
for(int i=0; i<MixerlistWidget->count(); i++) {
int t = MixerlistWidget->item(i)->data(Qt::UserRole).toByteArray().at(0);
bool dummy;
QWidget *w = getMixerWidget(getMixerText(t, &dummy));
MixerlistWidget->setItemWidget(MixerlistWidget->item(i), w);
}
}
void MixesPanel::mixerAdd()
{
if (!MixerlistWidget->currentItem())
@ -401,10 +466,11 @@ void MixesPanel::mixerlistWidget_customContextMenuRequested(QPoint pos)
QMenu contextMenu;
contextMenu.addAction(CompanionIcon("add.png"), tr("&Add"),this,SLOT(mixerAdd()),tr("Ctrl+A"));
contextMenu.addAction(CompanionIcon("edit.png"), tr("&Edit"),this,SLOT(mixerOpen()),tr("Enter"));
contextMenu.addAction(CompanionIcon("fuses.png"), tr("&Toogle &highlight"),this,SLOT(mixerHighlight()),tr("Ctrl+T"));
contextMenu.addSeparator();
contextMenu.addAction(CompanionIcon("clear.png"), tr("&Delete"),this,SLOT(mixersDelete()),tr("Delete"));
contextMenu.addAction(CompanionIcon("copy.png"), tr("&Copy"),this,SLOT(mixersCopy()),tr("Ctrl+C"));
contextMenu.addAction(CompanionIcon("cut.png"), tr("&Cut"),this,SLOT(mixersCut()),tr("Ctrl+X"));
contextMenu.addAction(CompanionIcon("cut.png"), tr("C&ut"),this,SLOT(mixersCut()),tr("Ctrl+X"));
contextMenu.addAction(CompanionIcon("paste.png"), tr("&Paste"),this,SLOT(mixersPaste()),tr("Ctrl+V"))->setEnabled(hasData);
contextMenu.addAction(CompanionIcon("duplicate.png"), tr("Du&plicate"),this,SLOT(mixersDuplicate()),tr("Ctrl+U"));
contextMenu.addSeparator();
@ -433,6 +499,7 @@ void MixesPanel::mixerlistWidget_KeyPress(QKeyEvent *event)
if(event->matches(QKeySequence::Cut)) mixersCut();
if(event->matches(QKeySequence::Paste)) mixersPaste();
if(event->matches(QKeySequence::Underline)) mixersDuplicate();
if(event->matches(QKeySequence::AddTab)) mixerHighlight();
if(event->key()==Qt::Key_Return || event->key()==Qt::Key_Enter) mixerOpen();
if(event->matches(QKeySequence::MoveToNextLine))
@ -443,11 +510,14 @@ void MixesPanel::mixerlistWidget_KeyPress(QKeyEvent *event)
int MixesPanel::gm_moveMix(int idx, bool dir) //true=inc=down false=dec=up
{
if(idx>GetEepromInterface()->getCapability(Mixes) || (idx==0 && !dir) || (idx==GetEepromInterface()->getCapability(Mixes) && dir)) return idx;
if(idx>GetEepromInterface()->getCapability(Mixes) || (idx==GetEepromInterface()->getCapability(Mixes) && dir)) return idx;
int tdx = dir ? idx+1 : idx-1;
MixData &src=model.mixData[idx];
MixData &tgt=model.mixData[tdx];
if (src.destCh == 1 && !dir)
return idx;
unsigned int outputs = GetEepromInterface()->getCapability(Outputs);
if((src.destCh==0) || (src.destCh>outputs) || (tgt.destCh>outputs)) return idx;

View file

@ -27,6 +27,8 @@ class MixesPanel : public ModelPanel
void mixerAdd();
void moveMixUp();
void moveMixDown();
void mixerHighlight();
void mixerlistWidget_customContextMenuRequested(QPoint pos);
void mixerlistWidget_doubleClicked(QModelIndex index);
@ -40,6 +42,7 @@ class MixesPanel : public ModelPanel
private:
MixersList *MixerlistWidget;
bool mixInserted;
unsigned int highlightedSource;
int getMixerIndex(unsigned int dch);
bool gm_insertMix(int idx);
@ -50,6 +53,9 @@ class MixesPanel : public ModelPanel
QList<int> createMixListFromSelected();
void setSelectedByMixList(QList<int> list);
QString getChannelLabel(int curDest);
bool AddMixerLine(int dest);
QString getMixerText(int dest, bool * new_ch);
QWidget * getMixerWidget(const QString & mixer_text);
};
#endif // MIXES_H

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
@ -153,7 +153,7 @@ If this is checked the throttle will be reversed. Idle will be forward, trim wi
</font>
</property>
<property name="text">
<string>Timer2</string>
<string>Timer 2</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@ -169,7 +169,7 @@ If this is checked the throttle will be reversed. Idle will be forward, trim wi
</font>
</property>
<property name="text">
<string>Timer1</string>
<string>Timer 1</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
@ -42,7 +42,7 @@
</font>
</property>
<property name="text">
<string>Label</string>
<string notr="true">Label</string>
</property>
</widget>
</item>
@ -85,7 +85,10 @@
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="suffix">
<string>ch</string>
<string/>
</property>
<property name="prefix">
<string>CH </string>
</property>
<property name="minimum">
<number>1</number>
@ -192,7 +195,7 @@
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="suffix">
<string> usec</string>
<string> us</string>
</property>
<property name="minimum">
<number>100</number>
@ -307,7 +310,7 @@
</size>
</property>
<property name="suffix">
<string> mSec</string>
<string> ms</string>
</property>
<property name="decimals">
<number>1</number>
@ -338,7 +341,7 @@
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="suffix">
<string>ch</string>
<string/>
</property>
<property name="minimum">
<number>1</number>

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string/>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="margin">
@ -26,7 +26,7 @@
<enum>QDateTimeEdit::MinuteSection</enum>
</property>
<property name="displayFormat">
<string>mm:ss</string>
<string notr="true">mm:ss</string>
</property>
</widget>
</item>
@ -60,7 +60,7 @@
<item>
<widget class="QLabel" name="persistentValue">
<property name="text">
<string> (00:00:00)</string>
<string notr="true"> (00:00:00)</string>
</property>
</widget>
</item>

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,0,0,0,0,0">
<property name="spacing">
@ -534,7 +534,7 @@
</item>
<item>
<property name="text">
<string>CEL</string>
<string>CELS</string>
</property>
</item>
</widget>

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>

View file

@ -968,7 +968,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -981,7 +981,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -994,7 +994,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1007,7 +1007,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1020,7 +1020,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1033,7 +1033,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1046,7 +1046,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1059,7 +1059,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1072,7 +1072,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1085,7 +1085,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1098,7 +1098,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1111,7 +1111,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1124,7 +1124,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1137,7 +1137,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1150,7 +1150,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1163,7 +1163,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1176,7 +1176,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1189,7 +1189,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1202,7 +1202,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1215,7 +1215,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1228,7 +1228,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1241,7 +1241,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1254,7 +1254,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1267,7 +1267,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1280,7 +1280,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1293,7 +1293,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1306,7 +1306,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1319,7 +1319,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1332,7 +1332,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1345,7 +1345,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1358,7 +1358,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1371,7 +1371,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1384,7 +1384,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1397,7 +1397,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1410,7 +1410,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1423,7 +1423,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1436,7 +1436,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1449,7 +1449,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1462,7 +1462,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1475,7 +1475,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1488,7 +1488,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>
@ -1501,7 +1501,7 @@ May be different from firmware language</string>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<string notr="true">CheckBox</string>
</property>
</widget>
</item>

View file

@ -23,7 +23,7 @@
</size>
</property>
<property name="windowTitle">
<string>Dialog</string>
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>

View file

@ -73,7 +73,7 @@
<number>6</number>
</property>
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout" columnstretch="0,0,0,0">
<layout class="QGridLayout" name="gridLayout" columnstretch="0,0,0">
<item row="1" column="1">
<widget class="QGraphicsView" name="leftStick">
<property name="minimumSize">
@ -121,7 +121,7 @@ QPushButton:checked {
}</string>
</property>
<property name="text">
<string>THR</string>
<string notr="true">THR</string>
</property>
<property name="checkable">
<bool>true</bool>
@ -151,7 +151,7 @@ QPushButton:checked {
}</string>
</property>
<property name="text">
<string>RUD</string>
<string notr="true">RUD</string>
</property>
<property name="checkable">
<bool>true</bool>
@ -181,7 +181,7 @@ QPushButton:checked {
}</string>
</property>
<property name="text">
<string>ELE</string>
<string notr="true">ELE</string>
</property>
<property name="checkable">
<bool>true</bool>
@ -211,7 +211,7 @@ QPushButton:checked {
}</string>
</property>
<property name="text">
<string>AIL</string>
<string notr="true">AIL</string>
</property>
<property name="checkable">
<bool>true</bool>
@ -355,7 +355,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="leftXPerc">
<property name="text">
<string>TextLabel</string>
<string notr="true">TextLabel</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -365,7 +365,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="leftYPerc">
<property name="text">
<string>TextLabel</string>
<string notr="true">TextLabel</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -393,6 +393,9 @@ QPushButton:checked {
<property name="text">
<string notr="true">&lt;-</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
<item>
@ -428,6 +431,9 @@ QPushButton:checked {
<property name="text">
<string notr="true">-&gt;</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
@ -451,6 +457,9 @@ QPushButton:checked {
<property name="text">
<string notr="true">^</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
<item>
@ -486,6 +495,9 @@ QPushButton:checked {
<property name="text">
<string notr="true">v</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
@ -535,7 +547,7 @@ QPushButton:pressed {
}</string>
</property>
<property name="text">
<string>TRN</string>
<string notr="true">TRN</string>
</property>
</widget>
</item>
@ -562,7 +574,7 @@ QPushButton:checked {
}</string>
</property>
<property name="text">
<string>GEA</string>
<string notr="true">GEA</string>
</property>
<property name="checkable">
<bool>true</bool>
@ -595,7 +607,7 @@ QPushButton:checked {
}</string>
</property>
<property name="text">
<string>ID0</string>
<string notr="true">ID0</string>
</property>
<property name="checkable">
<bool>true</bool>
@ -632,7 +644,7 @@ QPushButton:checked {
}</string>
</property>
<property name="text">
<string>ID1</string>
<string notr="true">ID1</string>
</property>
<property name="checkable">
<bool>true</bool>
@ -665,7 +677,7 @@ QPushButton:checked {
}</string>
</property>
<property name="text">
<string>ID2</string>
<string notr="true">ID2</string>
</property>
<property name="checkable">
<bool>true</bool>
@ -812,7 +824,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="rightXPerc">
<property name="text">
<string>TextLabel</string>
<string notr="true">TextLabel</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -822,7 +834,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="rightYPerc">
<property name="text">
<string>TextLabel</string>
<string notr="true">TextLabel</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -850,6 +862,9 @@ QPushButton:checked {
<property name="text">
<string notr="true">&lt;-</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
<item>
@ -885,6 +900,9 @@ QPushButton:checked {
<property name="text">
<string notr="true">-&gt;</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
@ -908,6 +926,9 @@ QPushButton:checked {
<property name="text">
<string notr="true">^</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
<item>
@ -943,6 +964,9 @@ QPushButton:checked {
<property name="text">
<string notr="true">v</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
@ -1010,7 +1034,7 @@ QPushButton:checked {
</size>
</property>
<property name="toolTip">
<string>P1</string>
<string notr="true">P1</string>
</property>
<property name="minimum">
<number>-1024</number>
@ -1032,7 +1056,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="dialP_1value">
<property name="text">
<string>0 %</string>
<string notr="true">0 %</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1067,7 +1091,7 @@ QPushButton:checked {
</size>
</property>
<property name="toolTip">
<string>P2</string>
<string notr="true">P2</string>
</property>
<property name="minimum">
<number>-1024</number>
@ -1092,7 +1116,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="dialP_2value">
<property name="text">
<string>0 %</string>
<string notr="true">0 %</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1127,7 +1151,7 @@ QPushButton:checked {
</size>
</property>
<property name="toolTip">
<string>P3</string>
<string notr="true">P3</string>
</property>
<property name="minimum">
<number>-1024</number>
@ -1149,7 +1173,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="dialP_3value">
<property name="text">
<string>0 %</string>
<string notr="true">0 %</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>

View file

@ -301,6 +301,9 @@
<property name="text">
<string notr="true">^</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
<item alignment="Qt::AlignHCenter">
@ -342,6 +345,9 @@
<property name="text">
<string notr="true">v</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
@ -555,7 +561,7 @@ QPushButton:checked {
</size>
</property>
<property name="toolTip">
<string>S1</string>
<string/>
</property>
<property name="minimum">
<number>-1024</number>
@ -585,7 +591,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="leftXPerc">
<property name="text">
<string>TextLabel</string>
<string notr="true">TextLabel</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -595,7 +601,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="leftYPerc">
<property name="text">
<string>TextLabel</string>
<string notr="true">TextLabel</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -619,7 +625,7 @@ QPushButton:checked {
</size>
</property>
<property name="toolTip">
<string>SB</string>
<string/>
</property>
<property name="maximum">
<number>2</number>
@ -675,7 +681,7 @@ QPushButton:checked {
</size>
</property>
<property name="toolTip">
<string>SA</string>
<string/>
</property>
<property name="maximum">
<number>2</number>
@ -715,7 +721,7 @@ QPushButton:checked {
</size>
</property>
<property name="toolTip">
<string>SE</string>
<string/>
</property>
<property name="maximum">
<number>2</number>
@ -743,7 +749,7 @@ QPushButton:checked {
<item row="3" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>SF</string>
<string notr="true">SF</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -765,10 +771,10 @@ QPushButton:checked {
</size>
</property>
<property name="toolTip">
<string>SF</string>
<string/>
</property>
<property name="statusTip">
<string>SF</string>
<string/>
</property>
<property name="maximum">
<number>1</number>
@ -811,7 +817,7 @@ QPushButton:checked {
</size>
</property>
<property name="toolTip">
<string>LS</string>
<string/>
</property>
<property name="minimum">
<number>-1024</number>
@ -833,7 +839,7 @@ QPushButton:checked {
<item row="3" column="6">
<widget class="QLabel" name="label_2">
<property name="text">
<string>SA</string>
<string notr="true">SA</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -843,7 +849,7 @@ QPushButton:checked {
<item row="3" column="8">
<widget class="QLabel" name="label_3">
<property name="text">
<string>SB</string>
<string notr="true">SB</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -853,7 +859,7 @@ QPushButton:checked {
<item row="3" column="5">
<widget class="QLabel" name="label_5">
<property name="text">
<string>SE</string>
<string notr="true">SE</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -863,7 +869,7 @@ QPushButton:checked {
<item row="3" column="3">
<widget class="QLabel" name="label_9">
<property name="text">
<string>LS</string>
<string notr="true">LS</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -873,7 +879,7 @@ QPushButton:checked {
<item row="3" column="10">
<widget class="QLabel" name="label_10">
<property name="text">
<string>S1</string>
<string notr="true">S1</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -899,6 +905,9 @@ QPushButton:checked {
<property name="text">
<string notr="true">&lt;-</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
<item>
@ -934,6 +943,9 @@ QPushButton:checked {
<property name="text">
<string notr="true">-&gt;</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
@ -982,6 +994,9 @@ QPushButton:checked {
<property name="text">
<string notr="true">^</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
<item alignment="Qt::AlignHCenter">
@ -1017,6 +1032,9 @@ QPushButton:checked {
<property name="text">
<string notr="true">v</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
@ -1038,7 +1056,7 @@ QPushButton:checked {
</size>
</property>
<property name="toolTip">
<string>S2</string>
<string/>
</property>
<property name="minimum">
<number>-1024</number>
@ -1060,7 +1078,7 @@ QPushButton:checked {
<item row="3" column="1">
<widget class="QLabel" name="label_11">
<property name="text">
<string>S2</string>
<string notr="true">S2</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1254,7 +1272,7 @@ QPushButton:checked {
</size>
</property>
<property name="toolTip">
<string>SD</string>
<string/>
</property>
<property name="maximum">
<number>2</number>
@ -1294,7 +1312,7 @@ QPushButton:checked {
</size>
</property>
<property name="toolTip">
<string>SC</string>
<string/>
</property>
<property name="maximum">
<number>2</number>
@ -1360,7 +1378,7 @@ QPushButton:checked {
</size>
</property>
<property name="toolTip">
<string>SG</string>
<string/>
</property>
<property name="maximum">
<number>2</number>
@ -1403,7 +1421,7 @@ QPushButton:checked {
</size>
</property>
<property name="toolTip">
<string>RS</string>
<string/>
</property>
<property name="minimum">
<number>-1024</number>
@ -1437,7 +1455,7 @@ QPushButton:checked {
</size>
</property>
<property name="toolTip">
<string>SH</string>
<string/>
</property>
<property name="styleSheet">
<string notr="true"/>
@ -1468,7 +1486,7 @@ QPushButton:checked {
<item row="3" column="3">
<widget class="QLabel" name="label_4">
<property name="text">
<string>SC</string>
<string notr="true">SC</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1478,7 +1496,7 @@ QPushButton:checked {
<item row="3" column="5">
<widget class="QLabel" name="label_6">
<property name="text">
<string>SD</string>
<string notr="true">SD</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1488,7 +1506,7 @@ QPushButton:checked {
<item row="3" column="6">
<widget class="QLabel" name="label_7">
<property name="text">
<string>SG</string>
<string notr="true">SG</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1498,7 +1516,7 @@ QPushButton:checked {
<item row="3" column="11">
<widget class="QLabel" name="label_8">
<property name="text">
<string>SH</string>
<string notr="true">SH</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1508,7 +1526,7 @@ QPushButton:checked {
<item row="3" column="8">
<widget class="QLabel" name="label_12">
<property name="text">
<string>RS</string>
<string notr="true">RS</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1526,7 +1544,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="rightXPerc">
<property name="text">
<string>TextLabel</string>
<string notr="true">TextLabel</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1536,7 +1554,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="rightYPerc">
<property name="text">
<string>TextLabel</string>
<string notr="true">TextLabel</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1564,6 +1582,9 @@ QPushButton:checked {
<property name="text">
<string notr="true">&lt;-</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
<item>
@ -1605,6 +1626,9 @@ QPushButton:checked {
<property name="text">
<string notr="true">-&gt;</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
</layout>

File diff suppressed because it is too large Load diff

View file

@ -736,7 +736,7 @@ FblPage::FblPage(WizardDialog *dlg, QString image, QString title, QString text,
rollCB = new QComboBox();
QLayout *l = layout();
l->addWidget(new QLabel(tr("Trottle Channel:")));
l->addWidget(new QLabel(tr("Throttle Channel:")));
l->addWidget(throttleCB);
l->addWidget(new QLabel(tr("Yaw Channel:")));
l->addWidget(yawCB);
@ -771,7 +771,7 @@ HeliPage::HeliPage(WizardDialog *dlg, QString image, QString title, QString text
rollCB = new QComboBox();
QLayout *l = layout();
l->addWidget(new QLabel(tr("Trottle Channel:")));
l->addWidget(new QLabel(tr("Throttle Channel:")));
l->addWidget(throttleCB);
l->addWidget(new QLabel(tr("Yaw Channel:")));
l->addWidget(yawCB);
@ -806,7 +806,7 @@ MultirotorPage::MultirotorPage(WizardDialog *dlg, QString image, QString title,
rollCB = new QComboBox();
QLayout *l = layout();
l->addWidget(new QLabel(tr("Trottle Channel:")));
l->addWidget(new QLabel(tr("Throttle Channel:")));
l->addWidget(throttleCB);
l->addWidget(new QLabel(tr("Yaw Channel:")));
l->addWidget(yawCB);

View file

@ -770,8 +770,10 @@ void editName(uint8_t x, uint8_t y, char *name, uint8_t size, uint8_t event, uin
uint8_t mode = 0;
if (active) {
if (s_editMode <= 0) mode = INVERS+FIXEDWIDTH;
else mode = FIXEDWIDTH;
if (s_editMode <= 0)
mode = INVERS + FIXEDWIDTH;
else
mode = FIXEDWIDTH;
}
lcd_putsnAtt(x, y, name, size, ZCHAR | mode);
@ -783,7 +785,7 @@ void editName(uint8_t x, uint8_t y, char *name, uint8_t size, uint8_t event, uin
if (p1valdiff || IS_ROTARY_RIGHT(event) || IS_ROTARY_LEFT(event) || event==EVT_KEY_FIRST(KEY_DOWN) || event==EVT_KEY_FIRST(KEY_UP)
|| event==EVT_KEY_REPT(KEY_DOWN) || event==EVT_KEY_REPT(KEY_UP)) {
v = checkIncDec(event, abs(v), 0, LEN_STD_CHARS, 0);
v = checkIncDec(event, abs(v), 0, ZCHAR_MAX, 0);
if (c <= 0) v = -v;
}

View file

@ -1249,6 +1249,10 @@ void putsTelemetryChannel(xcoord_t x, uint8_t y, uint8_t channel, lcdint_t val,
putsTelemetryValue(x, y, div10_and_round(val), UNIT_RAW, att|PREC1);
break;
case TELEM_ASPD-1:
putsTelemetryValue(x, y, val, UNIT_KTS, att);
break;
#if defined(CPUARM)
case TELEM_SWR-1:
#endif

View file

@ -198,7 +198,9 @@ char idx2char(int8_t idx)
if (idx < 27) return 'A' + idx - 1;
if (idx < 37) return '0' + idx - 27;
if (idx <= 40) return pgm_read_byte(s_charTab+idx-37);
// Needed if we want the special chars ... if (idx <= ZCHAR_MAX) return 'z' + 5 + idx - 40;
#if LEN_SPECIAL_CHARS > 0
if (idx <= ZCHAR_MAX) return 'z' + 5 + idx - 40;
#endif
return ' ';
}
@ -206,6 +208,9 @@ char idx2char(int8_t idx)
int8_t char2idx(char c)
{
if (c == '_') return 37;
#if LEN_SPECIAL_CHARS > 0
if (c < 0 && c+128 <= LEN_SPECIAL_CHARS) return 41 + (c+128);
#endif
if (c >= 'a') return 'a' - c - 1;
if (c >= 'A') return c - 'A' + 1;
if (c >= '0') return c - '0' + 27;
@ -3309,10 +3314,13 @@ PLAY_FUNCTION(playValue, uint8_t idx)
break;
case MIXSRC_FIRST_TELEM+TELEM_VSPD-1:
case MIXSRC_FIRST_TELEM+TELEM_ASPD-1:
PLAY_NUMBER(div10_and_round(val), 1+UNIT_METERS_PER_SECOND, PREC1);
break;
case MIXSRC_FIRST_TELEM+TELEM_ASPD-1:
PLAY_NUMBER(val, 1+UNIT_KTS, 0);
break;
case MIXSRC_FIRST_TELEM+TELEM_CONSUMPTION-1:
PLAY_NUMBER(val, 1+UNIT_MAH, 0);
break;

View file

@ -791,6 +791,8 @@ void resetTelemetry()
frskyData.hub.gpsSpeed_bp = 100;
frskyData.hub.gpsSpeed_ap = 50;
frskyData.hub.airSpeed = 100;
frskyData.hub.cellsCount = 6;
frskyData.hub.baroAltitudeOffset = 500 * 100;

View file

@ -78,7 +78,7 @@
#define TR_DATETIME "DATE:""ZEIT:"
#define LEN_VLCD "\006"
#define TR_VLCD "NormalOptrex"
#define TR_VLCD "Normal""Optrex"
#define LEN_COUNTRYCODES TR("\002", "\007")
#define TR_COUNTRYCODES TR("US""JP""EU", "Amerika""Japan\0 ""Europa\0")

View file

@ -1,4 +1,4 @@
/*
/*
* Authors (alphabetical order)
* - Andre Bernet <bernet.andre@gmail.com>
* - Bertrand Songis <bsongis@gmail.com>
@ -96,7 +96,7 @@
#define TR_VTRIMINC TR("Expo\0 ""ExFin\0""Fin\0 ""Moyen\0""Gros\0 ","Exponentiel""Extra Fin\0 ""Fin\0 ""Moyen\0 ""Grossier\0 ")
#define LEN_VBEEPCOUNTDOWN "\007"
#define TR_VBEEPCOUNTDOWN "Silence""Bips\0 ""Voix\0 "
#define TR_VBEEPCOUNTDOWN "Aucun\0 ""Bips\0 ""Voix\0 "
#define LEN_CURVE_TYPES "\010"
#define TR_CURVE_TYPES "Standard""Libre\0"