Merge pull request #743 from opentx/dvogonen/simplify_burn_dialog

Dvogonen/simplify burn dialog
This commit is contained in:
Bertrand Songis
2014-02-24 00:07:47 +01:00
19 changed files with 509 additions and 734 deletions
+20 -23
View File
@@ -188,17 +188,17 @@ void CompStoreObj::getset( int &number, const QString tag, const int def, const
} }
// ** FwRevision class******************** // ** FwRevision class********************
int FwRevision::get( const QString fwName ) int FwRevision::get( const QString fwType )
{ {
QString result; QString result;
retrieve( result, fwName, "", "FwRevisions" ); retrieve( result, fwType, "", "FwRevisions" );
return result.toInt(); return result.toInt();
} }
void FwRevision::set( const QString fwName, const int fwRevision ) void FwRevision::set( const QString fwType, const int fwRevision )
{ {
QString tempString= QString("%1").arg(fwRevision); QString tempString= QString("%1").arg(fwRevision);
store( tempString, tempString, fwName, "FwRevisions" ); store( tempString, tempString, fwType, "FwRevisions" );
} }
void FwRevision::remove( const QString tag ) void FwRevision::remove( const QString tag )
@@ -280,13 +280,13 @@ void JStickData::flush()
// ** Profile class******************** // ** Profile class********************
// Get declarations // Get declarations
QString Profile::firmware() const { return _firmware; } QString Profile::fwName() const { return _fwName; }
QString Profile::fwType() const { return _fwType; }
QString Profile::name() const { return _name; } QString Profile::name() const { return _name; }
QString Profile::sdPath() const { return _sdPath; } QString Profile::sdPath() const { return _sdPath; }
QString Profile::splashFile() const { return _splashFile; } QString Profile::splashFile() const { return _splashFile; }
bool Profile::burnFirmware() const { return _burnFirmware; } bool Profile::burnFirmware() const { return _burnFirmware; }
bool Profile::renameFwFiles() const { return _renameFwFiles; } bool Profile::renameFwFiles() const { return _renameFwFiles; }
bool Profile::patchImage() const { return _patchImage; }
int Profile::channelOrder() const { return _channelOrder; } int Profile::channelOrder() const { return _channelOrder; }
int Profile::defaultMode() const { return _defaultMode; } int Profile::defaultMode() const { return _defaultMode; }
@@ -305,12 +305,12 @@ int Profile::vBatWarn() const { return _vBatWarn; }
// Set declarations // Set declarations
void Profile::name (const QString x) { store(x, _name, "Name" ,"Profiles", QString("profile%1").arg(index));} void Profile::name (const QString x) { store(x, _name, "Name" ,"Profiles", QString("profile%1").arg(index));}
void Profile::firmware (const QString x) { store(x, _firmware, "firmware" ,"Profiles", QString("profile%1").arg(index));} void Profile::fwName (const QString x) { store(x, _fwName, "fwName" ,"Profiles", QString("profile%1").arg(index));}
void Profile::fwType (const QString x) { store(x, _fwType, "fwType" ,"Profiles", QString("profile%1").arg(index));}
void Profile::sdPath (const QString x) { store(x, _sdPath, "sdPath" ,"Profiles", QString("profile%1").arg(index));} void Profile::sdPath (const QString x) { store(x, _sdPath, "sdPath" ,"Profiles", QString("profile%1").arg(index));}
void Profile::splashFile (const QString x) { store(x, _splashFile, "SplashFileName" ,"Profiles", QString("profile%1").arg(index));} void Profile::splashFile (const QString x) { store(x, _splashFile, "SplashFileName" ,"Profiles", QString("profile%1").arg(index));}
void Profile::burnFirmware (const bool x) { store(x, _burnFirmware, "burnFirmware" ,"Profiles", QString("profile%1").arg(index));} void Profile::burnFirmware (const bool x) { store(x, _burnFirmware, "burnFirmware" ,"Profiles", QString("profile%1").arg(index));}
void Profile::renameFwFiles (const bool x) { store(x, _renameFwFiles, "rename_firmware_files" ,"Profiles", QString("profile%1").arg(index));} void Profile::renameFwFiles (const bool x) { store(x, _renameFwFiles, "rename_firmware_files" ,"Profiles", QString("profile%1").arg(index));}
void Profile::patchImage (const bool x) { store(x, _patchImage, "patchImage" ,"Profiles", QString("profile%1").arg(index));}
void Profile::channelOrder (const int x) { store(x, _channelOrder, "default_channel_order" ,"Profiles", QString("profile%1").arg(index));} void Profile::channelOrder (const int x) { store(x, _channelOrder, "default_channel_order" ,"Profiles", QString("profile%1").arg(index));}
void Profile::defaultMode (const int x) { store(x, _defaultMode, "default_mode" ,"Profiles", QString("profile%1").arg(index));} void Profile::defaultMode (const int x) { store(x, _defaultMode, "default_mode" ,"Profiles", QString("profile%1").arg(index));}
@@ -337,12 +337,12 @@ Profile::Profile()
Profile& Profile::operator=(const Profile& rhs) Profile& Profile::operator=(const Profile& rhs)
{ {
name ( rhs.name() ); name ( rhs.name() );
firmware ( rhs.firmware() ); fwName ( rhs.fwName() );
fwType ( rhs.fwType() );
sdPath ( rhs.sdPath() ); sdPath ( rhs.sdPath() );
splashFile ( rhs.splashFile() ); splashFile ( rhs.splashFile() );
burnFirmware ( rhs.burnFirmware() ); burnFirmware ( rhs.burnFirmware() );
renameFwFiles( rhs.renameFwFiles() ); renameFwFiles( rhs.renameFwFiles() );
patchImage ( rhs.patchImage() );
channelOrder ( rhs.channelOrder() ); channelOrder ( rhs.channelOrder() );
defaultMode ( rhs.defaultMode() ); defaultMode ( rhs.defaultMode() );
beeper ( rhs.beeper() ); beeper ( rhs.beeper() );
@@ -389,13 +389,13 @@ void Profile::init(int newIndex)
{ {
index = newIndex; index = newIndex;
_firmware = ""; _fwName = "";
_fwType = "";
_name = ""; _name = "";
_sdPath = ""; _sdPath = "";
_splashFile = ""; _splashFile = "";
_burnFirmware = false; _burnFirmware = false;
_renameFwFiles = false; _renameFwFiles = false;
_patchImage = false;
_channelOrder = 0; _channelOrder = 0;
_defaultMode = 1; _defaultMode = 1;
@@ -423,13 +423,13 @@ void Profile::init(int newIndex)
void Profile::flush() void Profile::flush()
{ {
// Load and store all variables. Use default values if setting values are missing // Load and store all variables. Use default values if setting values are missing
getset( _firmware, "firmware" ,"" ,"Profiles", QString("profile%1").arg(index)); getset( _fwName, "fwName" ,"" ,"Profiles", QString("profile%1").arg(index));
getset( _fwType, "fwType" ,"" ,"Profiles", QString("profile%1").arg(index));
getset( _name, "Name" ,"" ,"Profiles", QString("profile%1").arg(index)); getset( _name, "Name" ,"" ,"Profiles", QString("profile%1").arg(index));
getset( _sdPath, "sdPath" ,"" ,"Profiles", QString("profile%1").arg(index)); getset( _sdPath, "sdPath" ,"" ,"Profiles", QString("profile%1").arg(index));
getset( _splashFile, "SplashFileName" ,"" ,"Profiles", QString("profile%1").arg(index)); getset( _splashFile, "SplashFileName" ,"" ,"Profiles", QString("profile%1").arg(index));
getset( _burnFirmware, "burnFirmware" ,false ,"Profiles", QString("profile%1").arg(index)); getset( _burnFirmware, "burnFirmware" ,false ,"Profiles", QString("profile%1").arg(index));
getset( _renameFwFiles, "rename_firmware_files" ,false ,"Profiles", QString("profile%1").arg(index)); getset( _renameFwFiles, "rename_firmware_files" ,false ,"Profiles", QString("profile%1").arg(index));
getset( _patchImage, "patchImage" ,false ,"Profiles", QString("profile%1").arg(index));
getset( _channelOrder, "default_channel_order" ,0 ,"Profiles", QString("profile%1").arg(index)); getset( _channelOrder, "default_channel_order" ,0 ,"Profiles", QString("profile%1").arg(index));
getset( _defaultMode, "default_mode" ,1 ,"Profiles", QString("profile%1").arg(index)); getset( _defaultMode, "default_mode" ,1 ,"Profiles", QString("profile%1").arg(index));
@@ -464,7 +464,6 @@ QString AppData::compileServer() { return _compileServer; }
QString AppData::cpuId() { return _cpuId; } QString AppData::cpuId() { return _cpuId; }
QString AppData::dfuArguments() { return _dfuArguments; } QString AppData::dfuArguments() { return _dfuArguments; }
QString AppData::dfuLocation() { return _dfuLocation; } QString AppData::dfuLocation() { return _dfuLocation; }
QString AppData::lastFw() { return _lastFw; }
QString AppData::locale() { return _locale; } QString AppData::locale() { return _locale; }
QString AppData::mcu() { return _mcu; } QString AppData::mcu() { return _mcu; }
QString AppData::programmer() { return _programmer; } QString AppData::programmer() { return _programmer; }
@@ -519,7 +518,6 @@ void AppData::compileServer (const QString x) { store(x, _compileServer,
void AppData::cpuId (const QString x) { store(x, _cpuId, "cpu_id" );} void AppData::cpuId (const QString x) { store(x, _cpuId, "cpu_id" );}
void AppData::dfuArguments (const QString x) { store(x, _dfuArguments, "dfu_arguments" );} void AppData::dfuArguments (const QString x) { store(x, _dfuArguments, "dfu_arguments" );}
void AppData::dfuLocation (const QString x) { store(x, _dfuLocation, "dfu_location" );} void AppData::dfuLocation (const QString x) { store(x, _dfuLocation, "dfu_location" );}
void AppData::lastFw (const QString x) { store(x, _lastFw, "lastFw" );}
void AppData::locale (const QString x) { store(x, _locale, "locale" );} void AppData::locale (const QString x) { store(x, _locale, "locale" );}
void AppData::mcu (const QString x) { store(x, _mcu, "mcu" );} void AppData::mcu (const QString x) { store(x, _mcu, "mcu" );}
void AppData::programmer (const QString x) { store(x, _programmer, "programmer" );} void AppData::programmer (const QString x) { store(x, _programmer, "programmer" );}
@@ -586,11 +584,11 @@ AppData::AppData()
// Store old values in new locations // Store old values in new locations
autoCheckApp(settings.value("startup_check_companion9x", true).toBool()); autoCheckApp(settings.value("startup_check_companion9x", true).toBool());
// Convert and store the firmware name // Convert and store the firmware type
QString firmware = settings.value("firmware", "").toString(); QString fwType = settings.value("firmware", "").toString();
firmware.replace("open9x","opentx"); fwType.replace("open9x","opentx");
firmware.replace("x9da","taranis"); fwType.replace("x9da","taranis");
profile[0].firmware( firmware ); profile[0].fwType( fwType );
// Move the Companion9x profile settings to profile0, the new default profile // Move the Companion9x profile settings to profile0, the new default profile
profile[0].name( settings.value( "Name", "" ).toString()); profile[0].name( settings.value( "Name", "" ).toString());
@@ -598,7 +596,6 @@ AppData::AppData()
profile[0].splashFile( settings.value( "SplashFileName", "" ).toString()); profile[0].splashFile( settings.value( "SplashFileName", "" ).toString());
profile[0].burnFirmware( settings.value( "burnFirmware", false ).toBool()); profile[0].burnFirmware( settings.value( "burnFirmware", false ).toBool());
profile[0].renameFwFiles( settings.value( "rename_firmware_files", false ).toBool()); profile[0].renameFwFiles( settings.value( "rename_firmware_files", false ).toBool());
profile[0].patchImage( settings.value( "patchImage", false ).toBool());
profile[0].channelOrder( settings.value( "default_channel_order", "0" ).toInt()); profile[0].channelOrder( settings.value( "default_channel_order", "0" ).toInt());
profile[0].defaultMode( settings.value( "default_mode", "1" ).toInt()); profile[0].defaultMode( settings.value( "default_mode", "1" ).toInt());
@@ -613,6 +610,7 @@ AppData::AppData()
settings.remove("default_channel_order"); settings.remove("default_channel_order");
settings.remove("default_mode"); settings.remove("default_mode");
settings.remove("firmware"); settings.remove("firmware");
settings.remove("lastFw");
settings.remove("Name"); settings.remove("Name");
settings.remove("patchImage"); settings.remove("patchImage");
settings.remove("rename_firmware_files"); settings.remove("rename_firmware_files");
@@ -638,7 +636,6 @@ AppData::AppData()
getset( _cpuId, "cpu_id" ,"" ); getset( _cpuId, "cpu_id" ,"" );
getset( _dfuArguments, "dfu_arguments" ,"-a 0" ); getset( _dfuArguments, "dfu_arguments" ,"-a 0" );
getset( _dfuLocation, "dfu_location" ,"" ); getset( _dfuLocation, "dfu_location" ,"" );
getset( _lastFw, "lastFw" ,"" );
getset( _locale, "locale" ,"" ); getset( _locale, "locale" ,"" );
getset( _mcu, "mcu" ,"m64" ); getset( _mcu, "mcu" ,"m64" );
getset( _programmer, "programmer" ,"usbasp" ); getset( _programmer, "programmer" ,"usbasp" );
+8 -9
View File
@@ -92,13 +92,13 @@ class Profile: protected CompStoreObj
int index; int index;
// Application Variables // Application Variables
QString _firmware; QString _fwName;
QString _fwType;
QString _name; QString _name;
QString _sdPath; QString _sdPath;
QString _splashFile; QString _splashFile;
bool _burnFirmware; bool _burnFirmware;
bool _renameFwFiles; bool _renameFwFiles;
bool _patchImage;
int _channelOrder; int _channelOrder;
int _defaultMode; int _defaultMode;
@@ -118,13 +118,13 @@ class Profile: protected CompStoreObj
public: public:
// All the get definitions // All the get definitions
QString firmware() const; QString fwName() const;
QString fwType() const;
QString name() const; QString name() const;
QString sdPath() const; QString sdPath() const;
QString splashFile() const; QString splashFile() const;
bool burnFirmware() const; bool burnFirmware() const;
bool renameFwFiles() const; bool renameFwFiles() const;
bool patchImage() const;
int channelOrder() const; int channelOrder() const;
int defaultMode() const; int defaultMode() const;
@@ -143,12 +143,12 @@ class Profile: protected CompStoreObj
// All the set definitions // All the set definitions
void name (const QString); void name (const QString);
void firmware (const QString); void fwName (const QString);
void fwType (const QString);
void sdPath (const QString); void sdPath (const QString);
void splashFile (const QString); void splashFile (const QString);
void burnFirmware (const bool); void burnFirmware (const bool);
void renameFwFiles (const bool); void renameFwFiles (const bool);
void patchImage (const bool);
void channelOrder (const int); void channelOrder (const int);
void defaultMode (const int); void defaultMode (const int);
@@ -195,7 +195,6 @@ class AppData: protected CompStoreObj
QString _cpuId; QString _cpuId;
QString _dfuArguments; QString _dfuArguments;
QString _dfuLocation; QString _dfuLocation;
QString _lastFw;
QString _locale; QString _locale;
QString _mcu; QString _mcu;
QString _programmer; QString _programmer;
@@ -251,7 +250,7 @@ class AppData: protected CompStoreObj
QString cpuId(); QString cpuId();
QString dfuArguments(); QString dfuArguments();
QString dfuLocation(); QString dfuLocation();
QString lastFw(); QString lastFw();
QString locale(); QString locale();
QString mcu(); QString mcu();
QString programmer(); QString programmer();
@@ -287,7 +286,7 @@ class AppData: protected CompStoreObj
int iconSize(); int iconSize();
int historySize(); int historySize();
int jsCtrl(); int jsCtrl();
int modelEditTab(); int modelEditTab(); // This variable is unused an can be removed
int id(); int id();
int theme(); int theme();
int warningId(); int warningId();
+10 -27
View File
@@ -63,7 +63,8 @@ void appPreferencesDialog::writeValues()
g.profile[g.id()].name(ui->profileNameLE->text()); g.profile[g.id()].name(ui->profileNameLE->text());
g.profile[g.id()].sdPath(ui->sdPath->text()); g.profile[g.id()].sdPath(ui->sdPath->text());
g.profile[g.id()].splashFile(ui->SplashFileName->text()); g.profile[g.id()].splashFile(ui->SplashFileName->text());
g.profile[g.id()].firmware(ui->firmwareLE->text()); g.profile[g.id()].fwName(ui->fwNameLE->text());
g.profile[g.id()].fwType(ui->fwTypeLE->text());
saveProfile(); saveProfile();
} }
@@ -145,7 +146,8 @@ void appPreferencesDialog::initSettings()
ui->renameFirmware->setChecked(g.profile[g.id()].renameFwFiles()); ui->renameFirmware->setChecked(g.profile[g.id()].renameFwFiles());
ui->sdPath->setText(g.profile[g.id()].sdPath()); ui->sdPath->setText(g.profile[g.id()].sdPath());
ui->profileNameLE->setText(g.profile[g.id()].name()); ui->profileNameLE->setText(g.profile[g.id()].name());
ui->firmwareLE->setText(g.profile[g.id()].firmware()); ui->fwNameLE->setText(g.profile[g.id()].fwName());
ui->fwTypeLE->setText(g.profile[g.id()].fwType());
ui->SplashFileName->setText(g.profile[g.id()].splashFile()); ui->SplashFileName->setText(g.profile[g.id()].splashFile());
displayImage( g.profile[g.id()].splashFile() ); displayImage( g.profile[g.id()].splashFile() );
@@ -248,7 +250,8 @@ void appPreferencesDialog::saveProfile()
g.profile[g.id()].renameFwFiles( ui->renameFirmware->isChecked()); g.profile[g.id()].renameFwFiles( ui->renameFirmware->isChecked());
g.profile[g.id()].sdPath( ui->sdPath->text()); g.profile[g.id()].sdPath( ui->sdPath->text());
g.profile[g.id()].splashFile( ui->SplashFileName->text()); g.profile[g.id()].splashFile( ui->SplashFileName->text());
g.profile[g.id()].firmware( ui->firmwareLE->text()); g.profile[g.id()].fwName( ui->fwNameLE->text());
g.profile[g.id()].fwType( ui->fwTypeLE->text());
} }
void appPreferencesDialog::on_removeProfileButton_clicked() void appPreferencesDialog::on_removeProfileButton_clicked()
@@ -274,31 +277,11 @@ bool appPreferencesDialog::displayImage( QString fileName )
// Use the firmware name to determine splash width // Use the firmware name to determine splash width
int width = SPLASH_WIDTH; int width = SPLASH_WIDTH;
if (g.profile[g.id()].firmware().contains("taranis")) if (g.profile[g.id()].fwType().contains("taranis"))
width = SPLASHX9D_WIDTH; width = SPLASHX9D_WIDTH;
ui->imageLabel->setPixmap(QPixmap::fromImage(image.scaled(width, SPLASH_HEIGHT))); ui->imageLabel->setPixmap( makePixMap( image, g.profile[g.id()].fwType()));
if (width==SPLASHX9D_WIDTH) { ui->imageLabel->setFixedSize(width, SPLASH_HEIGHT);
image=image.convertToFormat(QImage::Format_RGB32);
QRgb col;
int gray, height = image.height();
for (int i = 0; i < width; ++i) {
for (int j = 0; j < height; ++j) {
col = image.pixel(i, j);
gray = qGray(col);
image.setPixel(i, j, qRgb(gray, gray, gray));
}
}
ui->imageLabel->setPixmap(QPixmap::fromImage(image));
}
else {
ui->imageLabel->setPixmap(QPixmap::fromImage(image.convertToFormat(QImage::Format_Mono)));
}
if (width == SPLASH_WIDTH)
ui->imageLabel->setFixedSize(SPLASH_WIDTH, SPLASH_HEIGHT);
else
ui->imageLabel->setFixedSize(SPLASHX9D_WIDTH, SPLASHX9D_HEIGHT);
return true; return true;
} }
+51 -22
View File
@@ -502,7 +502,7 @@
<string>Radio Settings Profile</string> <string>Radio Settings Profile</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="10" column="1" colspan="4"> <item row="11" column="1" colspan="4">
<widget class="QComboBox" name="stickmodeCB"> <widget class="QComboBox" name="stickmodeCB">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
@@ -556,7 +556,7 @@ Mode 4:
</item> </item>
</widget> </widget>
</item> </item>
<item row="12" column="1" colspan="4"> <item row="13" column="1" colspan="4">
<widget class="QComboBox" name="channelorderCB"> <widget class="QComboBox" name="channelorderCB">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
@@ -706,7 +706,7 @@ This is used by the templated to determine which channel goes to what number out
</item> </item>
</widget> </widget>
</item> </item>
<item row="10" column="0"> <item row="11" column="0">
<widget class="QLabel" name="label_14"> <widget class="QLabel" name="label_14">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum"> <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@@ -726,7 +726,7 @@ This is used by the templated to determine which channel goes to what number out
</property> </property>
</widget> </widget>
</item> </item>
<item row="15" column="1"> <item row="16" column="1">
<spacer name="verticalSpacer_3"> <spacer name="verticalSpacer_3">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
@@ -739,7 +739,7 @@ This is used by the templated to determine which channel goes to what number out
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="4" column="0"> <item row="5" column="0">
<widget class="QLabel" name="label_8"> <widget class="QLabel" name="label_8">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum"> <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@@ -752,7 +752,7 @@ This is used by the templated to determine which channel goes to what number out
</property> </property>
</widget> </widget>
</item> </item>
<item row="12" column="0"> <item row="13" column="0">
<widget class="QLabel" name="label_13"> <widget class="QLabel" name="label_13">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
@@ -768,14 +768,14 @@ This is used by the templated to determine which channel goes to what number out
</property> </property>
</widget> </widget>
</item> </item>
<item row="13" column="1" colspan="4"> <item row="14" column="1" colspan="4">
<widget class="QCheckBox" name="renameFirmware"> <widget class="QCheckBox" name="renameFirmware">
<property name="text"> <property name="text">
<string>Append version number to FW file name</string> <string>Append version number to FW file name</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="3" column="0">
<widget class="QLabel" name="sdPathLabel"> <widget class="QLabel" name="sdPathLabel">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum"> <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@@ -791,7 +791,7 @@ This is used by the templated to determine which channel goes to what number out
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1" colspan="3"> <item row="3" column="1" colspan="3">
<widget class="QLineEdit" name="sdPath"> <widget class="QLineEdit" name="sdPath">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
@@ -813,7 +813,7 @@ This is used by the templated to determine which channel goes to what number out
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="5"> <item row="3" column="5">
<spacer name="horizontalSpacer"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@@ -826,35 +826,35 @@ This is used by the templated to determine which channel goes to what number out
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="14" column="1" colspan="4"> <item row="15" column="1" colspan="4">
<widget class="QCheckBox" name="burnFirmware"> <widget class="QCheckBox" name="burnFirmware">
<property name="text"> <property name="text">
<string>Offer to write FW to Tx after download</string> <string>Offer to write FW to Tx after download</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="14" column="6"> <item row="15" column="6">
<widget class="QPushButton" name="removeProfileButton"> <widget class="QPushButton" name="removeProfileButton">
<property name="text"> <property name="text">
<string>Remove Profile</string> <string>Remove Profile</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="6"> <item row="3" column="6">
<widget class="QPushButton" name="sdPathButton"> <widget class="QPushButton" name="sdPathButton">
<property name="text"> <property name="text">
<string>Open Folder</string> <string>Open Folder</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="9" column="1" colspan="6"> <item row="10" column="1" colspan="6">
<widget class="Line" name="line_6"> <widget class="Line" name="line_6">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="1" colspan="3"> <item row="5" column="1" colspan="3">
<widget class="QLineEdit" name="SplashFileName"> <widget class="QLineEdit" name="SplashFileName">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
@@ -879,12 +879,12 @@ This is used by the templated to determine which channel goes to what number out
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
<string>Firmware</string> <string>Firmware Variant</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1" colspan="2"> <item row="1" column="1" colspan="2">
<widget class="QLineEdit" name="firmwareLE"> <widget class="QLineEdit" name="fwTypeLE">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
@@ -902,14 +902,14 @@ This is used by the templated to determine which channel goes to what number out
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="6"> <item row="5" column="6">
<widget class="QPushButton" name="SplashSelect"> <widget class="QPushButton" name="SplashSelect">
<property name="text"> <property name="text">
<string>Select Image</string> <string>Select Image</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="7" column="6"> <item row="8" column="6">
<widget class="QPushButton" name="clearImageButton"> <widget class="QPushButton" name="clearImageButton">
<property name="text"> <property name="text">
<string>Clear Image</string> <string>Clear Image</string>
@@ -932,7 +932,7 @@ This is used by the templated to determine which channel goes to what number out
</property> </property>
</widget> </widget>
</item> </item>
<item row="7" column="1"> <item row="8" column="1">
<widget class="QLabel" name="imageLabel"> <widget class="QLabel" name="imageLabel">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
@@ -956,7 +956,10 @@ This is used by the templated to determine which channel goes to what number out
<enum>QFrame::Panel</enum> <enum>QFrame::Panel</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Plain</enum>
</property>
<property name="lineWidth">
<number>1</number>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
@@ -966,13 +969,39 @@ This is used by the templated to determine which channel goes to what number out
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1" colspan="6"> <item row="4" column="1" colspan="6">
<widget class="Line" name="line_3"> <widget class="Line" name="line_3">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Firmware File</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="fwNameLE">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>350</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>350</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</widget> </widget>
+110 -227
View File
@@ -9,6 +9,7 @@
#include "hexinterface.h" #include "hexinterface.h"
#include "appdata.h" #include "appdata.h"
// Type 1 = Burn EEPROM, Type 2= Burn Flash
burnDialog::burnDialog(QWidget *parent, int Type, QString * fileName, bool * backupEE, QString DocName): burnDialog::burnDialog(QWidget *parent, int Type, QString * fileName, bool * backupEE, QString DocName):
QDialog(parent), QDialog(parent),
ui(new Ui::burnDialog), ui(new Ui::burnDialog),
@@ -17,17 +18,25 @@ burnDialog::burnDialog(QWidget *parent, int Type, QString * fileName, bool * bac
hexType(Type) hexType(Type)
{ {
ui->setupUi(this); ui->setupUi(this);
ui->libraryButton->setIcon(CompanionIcon("library.png"));
if(!g.profile[g.id()].splashFile().isEmpty()){
imageSource=PROFILE;
imageFile=g.profile[g.id()].splashFile();
}
else{
ui->useProfileImageCB->setDisabled(true);
imageSource=FIRMWARE;
imageFile="";
}
ui->SplashFrame->hide(); ui->SplashFrame->hide();
ui->FramFWInfo->hide(); ui->FramFWInfo->hide();
ui->EEbackupCB->hide(); ui->EEbackupCB->hide();
ui->EEbackupCB->setCheckState(*backup ? Qt::Checked : Qt::Unchecked); ui->EEbackupCB->setCheckState(*backup ? Qt::Checked : Qt::Unchecked);
if (Type == 2) { if (Type == FLASH_FILE_TYPE ) {
ui->EEpromCB->hide(); ui->EEpromCB->hide();
ui->profile_label->hide(); ui->profile_label->hide();
ui->patchcalib_CB->hide(); ui->patchcalib_CB->hide();
ui->patchhw_CB->hide(); ui->patchhw_CB->hide();
ui->InvertColorButton->setDisabled(true);
setWindowTitle(tr("Write firmware to TX")); setWindowTitle(tr("Write firmware to TX"));
if (IS_TARANIS(GetEepromInterface()->getBoard())) { if (IS_TARANIS(GetEepromInterface()->getBoard())) {
ui->EEbackupCB->hide(); ui->EEbackupCB->hide();
@@ -39,12 +48,7 @@ burnDialog::burnDialog(QWidget *parent, int Type, QString * fileName, bool * bac
ui->patchcalib_CB->hide(); ui->patchcalib_CB->hide();
ui->patchhw_CB->hide(); ui->patchhw_CB->hide();
ui->EEpromCB->hide(); ui->EEpromCB->hide();
ui->ImageLoadButton->setDisabled(true);
ui->libraryButton->setDisabled(true);
ui->InvertColorButton->setDisabled(true);
ui->BurnFlashButton->setDisabled(true); ui->BurnFlashButton->setDisabled(true);
ui->ImageFileName->clear();
ui->FwImage->clear();
ui->FWFileName->clear(); ui->FWFileName->clear();
ui->DateField->clear(); ui->DateField->clear();
ui->SVNField->clear(); ui->SVNField->clear();
@@ -63,7 +67,7 @@ burnDialog::burnDialog(QWidget *parent, int Type, QString * fileName, bool * bac
} }
if (!hexfileName->isEmpty()) { if (!hexfileName->isEmpty()) {
ui->FWFileName->setText(*hexfileName); ui->FWFileName->setText(*hexfileName);
if (Type==2) { if (Type==FLASH_FILE_TYPE) {
checkFw(*hexfileName); checkFw(*hexfileName);
} }
else { else {
@@ -104,14 +108,14 @@ burnDialog::burnDialog(QWidget *parent, int Type, QString * fileName, bool * bac
ui->FlashLoadButton->hide(); ui->FlashLoadButton->hide();
hexfileName->clear(); hexfileName->clear();
} }
else if (Type==2) { else if (Type==FLASH_FILE_TYPE) {
QString FileName; QString FileName = g.profile[g.id()].fwName();
FileName = g.lastFw();
QFile file(FileName); QFile file(FileName);
if (file.exists()) { if (file.exists()) {
checkFw(FileName); checkFw(FileName);
} }
} }
updateUI();
resize(0, 0); resize(0, 0);
} }
@@ -124,12 +128,7 @@ void burnDialog::on_FlashLoadButton_clicked()
{ {
QString fileName; QString fileName;
ui->ImageLoadButton->setDisabled(true);
ui->libraryButton->setDisabled(true);
ui->InvertColorButton->setDisabled(true);
ui->BurnFlashButton->setDisabled(true); ui->BurnFlashButton->setDisabled(true);
ui->ImageFileName->clear();
ui->FwImage->clear();
ui->FWFileName->clear(); ui->FWFileName->clear();
ui->DateField->clear(); ui->DateField->clear();
ui->SVNField->clear(); ui->SVNField->clear();
@@ -139,8 +138,10 @@ void burnDialog::on_FlashLoadButton_clicked()
ui->BurnFlashButton->setDisabled(true); ui->BurnFlashButton->setDisabled(true);
ui->EEbackupCB->hide(); ui->EEbackupCB->hide();
QTimer::singleShot(0, this, SLOT(shrink())); QTimer::singleShot(0, this, SLOT(shrink()));
if (hexType==2) { if (hexType==FLASH_FILE_TYPE) {
fileName = QFileDialog::getOpenFileName(this, tr("Open Firmware File"), g.flashDir(), FLASH_FILES_FILTER); fileName = QFileDialog::getOpenFileName(this, tr("Open Firmware File"), g.flashDir(), FLASH_FILES_FILTER);
if(fileName.isEmpty())
return;
checkFw(fileName); checkFw(fileName);
} }
else { else {
@@ -169,6 +170,7 @@ void burnDialog::on_FlashLoadButton_clicked()
QTimer::singleShot(0, this, SLOT(shrink())); QTimer::singleShot(0, this, SLOT(shrink()));
} }
} }
updateUI();
} }
void burnDialog::checkFw(QString fileName) void burnDialog::checkFw(QString fileName)
@@ -176,6 +178,7 @@ void burnDialog::checkFw(QString fileName)
if (fileName.isEmpty()) { if (fileName.isEmpty()) {
return; return;
} }
if (!IS_TARANIS(GetEepromInterface()->getBoard())) { if (!IS_TARANIS(GetEepromInterface()->getBoard())) {
ui->EEbackupCB->show(); ui->EEbackupCB->show();
} }
@@ -190,60 +193,17 @@ void burnDialog::checkFw(QString fileName)
ui->DateField->setText(flash.getDate() + " " + flash.getTime()); ui->DateField->setText(flash.getDate() + " " + flash.getTime());
ui->SVNField->setText(flash.getSvn()); ui->SVNField->setText(flash.getSvn());
ui->ModField->setText(flash.getBuild()); ui->ModField->setText(flash.getBuild());
ui->BurnFlashButton->setEnabled(true);
ui->BurnFlashButton->setText(tr("Write to TX")); ui->SplashFrame->hide();
if (flash.hasSplash()) { if (flash.hasSplash()) {
ui->SplashFrame->show(); ui->SplashFrame->show();
ui->ImageLoadButton->setEnabled(true);
ui->libraryButton->setEnabled(true);
ui->FwImage->setFixedSize(flash.getSplashWidth(), flash.getSplashHeight());
ui->imageLabel->setFixedSize(flash.getSplashWidth(), flash.getSplashHeight()); ui->imageLabel->setFixedSize(flash.getSplashWidth(), flash.getSplashHeight());
ui->FwImage->show();
ui->FwImage->setPixmap(QPixmap::fromImage(flash.getSplash()));
QString ImageStr = g.profile[g.id()].splashFile();
bool PatchFwCB = g.profile[g.id()].patchImage();
if (!ImageStr.isEmpty()) {
QImage Image;
Image.load(ImageStr);
ui->imageLabel->setPixmap(QPixmap::fromImage(Image.convertToFormat(flash.getSplashFormat())));
ui->InvertColorButton->setEnabled(true);
ui->PreferredImageCB->setChecked(true);
ui->PatchFWCB->setChecked(PatchFwCB);
}
else {
QString fileName=ui->ImageFileName->text();
if (!fileName.isEmpty()) {
QImage image(fileName);
if (!image.isNull()) {
ui->InvertColorButton->setEnabled(true);
ui->imageLabel->setPixmap(QPixmap::fromImage(image.scaled(ui->imageLabel->width(), ui->imageLabel->height()).convertToFormat(flash.getSplashFormat())));
ui->PatchFWCB->setEnabled(true);
ui->PatchFWCB->setChecked(PatchFwCB);
}
else {
ui->PatchFWCB->setDisabled(true);
ui->PatchFWCB->setChecked(false);
ui->PreferredImageCB->setDisabled(true);
}
}
else {
ui->PatchFWCB->setDisabled(true);
ui->PatchFWCB->setChecked(false);
ui->PreferredImageCB->setDisabled(true);
}
}
}
else {
ui->FwImage->hide();
ui->ImageFileName->setText("");
ui->SplashFrame->hide();
} }
} }
else { else {
QMessageBox::warning(this, tr("Warning"), tr("%1 is not a known firmware").arg(fileName)); QMessageBox::warning(this, tr("Warning"), tr("%1 may not be a valid firmware file").arg(fileName));
ui->BurnFlashButton->setText(tr("Burn anyway !"));
ui->BurnFlashButton->setEnabled(true);
} }
ui->BurnFlashButton->setEnabled(true);
QTimer::singleShot(0, this, SLOT(shrink())); QTimer::singleShot(0, this, SLOT(shrink()));
g.flashDir( QFileInfo(fileName).dir().absolutePath() ); g.flashDir( QFileInfo(fileName).dir().absolutePath() );
} }
@@ -338,51 +298,92 @@ bool burnDialog::checkeEprom(QString fileName)
return true; return true;
} }
void burnDialog::on_ImageLoadButton_clicked() void burnDialog::displaySplash()
{
QImage image;
if (imageSource == FIRMWARE){
FlashInterface flash(ui->FWFileName->text());
image = flash.getSplash();
}
else{
image.load(imageFile);
}
if (image.isNull()) {
return;
}
ui->imageLabel->setPixmap( makePixMap( image, g.profile[g.id()].fwType()));
}
void burnDialog::updateUI()
{
if (hexType==EEPROM_FILE_TYPE)
return;
ui->useProfileImageCB->setChecked( imageSource == PROFILE );
ui->useFwImageCB->setChecked( imageSource == FIRMWARE );
ui->useLibraryImageCB->setChecked( imageSource == LIBRARY );
ui->useAnotherImageCB->setChecked( imageSource == ANOTHER );
displaySplash();
}
void burnDialog::on_useFwImageCB_clicked()
{
QString fileName = ui->FWFileName->text();
FlashInterface flash(fileName);
if (!flash.isValid()) {
QMessageBox::critical(this, tr("Error"), tr( "The firmware file is not valid." ));
}
else {
if (!flash.hasSplash()) {
QMessageBox::critical(this, tr("Error"), tr( "There is no start screen image in the firmware file." ));
}
else{
imageSource = FIRMWARE;
imageFile = fileName;
}
}
updateUI();
}
void burnDialog::on_useProfileImageCB_clicked()
{
QString fileName = g.profile[g.id()].splashFile();
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));
}
else {
imageSource = PROFILE;
imageFile = fileName;
}
}
updateUI();
}
void burnDialog::on_useAnotherImageCB_clicked()
{ {
QString supportedImageFormats; QString supportedImageFormats;
for (int formatIndex = 0; formatIndex < QImageReader::supportedImageFormats().count(); formatIndex++) { for (int formatIndex = 0; formatIndex < QImageReader::supportedImageFormats().count(); formatIndex++) {
supportedImageFormats += QLatin1String(" *.") + QImageReader::supportedImageFormats()[formatIndex]; supportedImageFormats += QLatin1String(" *.") + QImageReader::supportedImageFormats()[formatIndex];
} }
QString fileName = QFileDialog::getOpenFileName(this, tr("Open image file to use as Tx start screen"), g.imagesDir(), tr("Images (%1)").arg(supportedImageFormats));
QString fileName = QFileDialog::getOpenFileName(this, if (!fileName.isEmpty()){
tr("Open Image to load"), g.imagesDir(), tr("Images (%1)").arg(supportedImageFormats));
if (!fileName.isEmpty()) {
g.imagesDir( QFileInfo(fileName).dir().absolutePath() ); g.imagesDir( QFileInfo(fileName).dir().absolutePath() );
QImage image(fileName); QImage image(fileName);
if (image.isNull()) { if (image.isNull()) {
QMessageBox::critical(this, tr("Error"), tr("Cannot load %1.").arg(fileName)); QMessageBox::critical(this, tr("Error"), tr("Image could not be loaded from %1").arg(fileName));
ui->PatchFWCB->setDisabled(true);
ui->PatchFWCB->setChecked(false);
ui->InvertColorButton->setDisabled(true);
return;
} }
ui->ImageFileName->setText(fileName); else{
ui->InvertColorButton->setEnabled(true); imageSource = ANOTHER;
if (ui->imageLabel->width()!=128) { imageFile = fileName;
image=image.convertToFormat(QImage::Format_RGB32); }
QRgb col;
int gray;
int width = image.width();
int height = image.height();
for (int i = 0; i < width; ++i) {
for (int j = 0; j < height; ++j) {
col = image.pixel(i, j);
gray = qGray(col);
image.setPixel(i, j, qRgb(gray, gray, gray));
}
}
ui->imageLabel->setPixmap(QPixmap::fromImage(image.scaled(ui->imageLabel->width(), ui->imageLabel->height())));
}
else {
ui->imageLabel->setPixmap(QPixmap::fromImage(image.scaled(ui->imageLabel->width(), ui->imageLabel->height()).convertToFormat(QImage::Format_Mono)));
}
ui->PatchFWCB->setEnabled(true);
} }
updateUI();
} }
void burnDialog::on_libraryButton_clicked() void burnDialog::on_useLibraryImageCB_clicked()
{ {
QString fileName; QString fileName;
splashLibrary *ld = new splashLibrary(this,&fileName); splashLibrary *ld = new splashLibrary(this,&fileName);
@@ -390,49 +391,26 @@ void burnDialog::on_libraryButton_clicked()
if (!fileName.isEmpty()) { if (!fileName.isEmpty()) {
QImage image(fileName); QImage image(fileName);
if (image.isNull()) { if (image.isNull()) {
QMessageBox::critical(this, tr("Error"), tr("Cannot load %1.").arg(fileName)); QMessageBox::critical(this, tr("Error"), tr("The library image could not be loaded"));
ui->PatchFWCB->setDisabled(true);
ui->PatchFWCB->setChecked(false);
ui->InvertColorButton->setDisabled(true);
return;
} }
ui->ImageFileName->setText(fileName); else{
ui->InvertColorButton->setEnabled(true); imageSource = LIBRARY;
if (ui->imageLabel->width()!=128) { imageFile = fileName;
image=image.convertToFormat(QImage::Format_RGB32);
QRgb col;
int gray;
int width = image.width();
int height = image.height();
for (int i = 0; i < width; ++i)
{
for (int j = 0; j < height; ++j)
{
col = image.pixel(i, j);
gray = qGray(col);
image.setPixel(i, j, qRgb(gray, gray, gray));
}
}
ui->imageLabel->setPixmap(QPixmap::fromImage(image.scaled(ui->imageLabel->width(), ui->imageLabel->height())));
} else {
ui->imageLabel->setPixmap(QPixmap::fromImage(image.scaled(ui->imageLabel->width(), ui->imageLabel->height()).convertToFormat(QImage::Format_Mono)));
} }
ui->PatchFWCB->setEnabled(true);
} }
updateUI();
} }
void burnDialog::on_BurnFlashButton_clicked() void burnDialog::on_BurnFlashButton_clicked()
{ {
if (hexType==2) { if (hexType==FLASH_FILE_TYPE) {
QString fileName=ui->FWFileName->text(); QString fileName=ui->FWFileName->text();
if (!fileName.isEmpty()) { if (!fileName.isEmpty()) {
g.flashDir( QFileInfo(fileName).dir().absolutePath() ); g.flashDir( QFileInfo(fileName).dir().absolutePath() );
g.lastFw( fileName ); if (!ui->useFwImageCB->isChecked()) {
if (ui->PatchFWCB->isChecked()) {
g.profile[g.id()].patchImage( true );
QImage image = ui->imageLabel->pixmap()->toImage().scaled(ui->imageLabel->width(), ui->imageLabel->height()); QImage image = ui->imageLabel->pixmap()->toImage().scaled(ui->imageLabel->width(), ui->imageLabel->height());
if (!image.isNull()) { if (!image.isNull()) {
QString tempDir = QDir::tempPath(); QString tempDir = QDir::tempPath();
QString tempFile; QString tempFile;
if (getFileType(fileName) == FILE_TYPE_HEX) if (getFileType(fileName) == FILE_TYPE_HEX)
tempFile = tempDir + "/flash.hex"; tempFile = tempDir + "/flash.hex";
@@ -452,7 +430,6 @@ void burnDialog::on_BurnFlashButton_clicked()
QMessageBox::critical(this, tr("Warning"), tr("Custom image not found")); QMessageBox::critical(this, tr("Warning"), tr("Custom image not found"));
} }
} else { } else {
g.profile[g.id()].patchImage( false );
hexfileName->clear(); hexfileName->clear();
hexfileName->append(fileName); hexfileName->append(fileName);
} }
@@ -461,7 +438,7 @@ void burnDialog::on_BurnFlashButton_clicked()
hexfileName->clear(); hexfileName->clear();
} }
} }
if (hexType==1) { if (hexType==EEPROM_FILE_TYPE) {
QString calib = g.profile[g.id()].stickPotCalib(); QString calib = g.profile[g.id()].stickPotCalib();
QString trainercalib = g.profile[g.id()].trainerCalib(); QString trainercalib = g.profile[g.id()].trainerCalib();
int potsnum=GetEepromInterface()->getCapability(Pots); int potsnum=GetEepromInterface()->getCapability(Pots);
@@ -610,99 +587,9 @@ void burnDialog::on_cancelButton_clicked()
this->close(); this->close();
} }
void burnDialog::on_InvertColorButton_clicked()
{
if (ui->imageLabel->pixmap()) {
QImage image = ui->imageLabel->pixmap()->toImage();
image.invertPixels();
ui->imageLabel->setPixmap(QPixmap::fromImage(image));
}
}
void burnDialog::on_EEpromCB_toggled(bool checked) void burnDialog::on_EEpromCB_toggled(bool checked)
{ {
if (ui->EEpromCB->isChecked()) { *backup = ui->EEpromCB->isChecked();
*backup=true;
} else {
*backup=false;
}
}
void burnDialog::on_PreferredImageCB_toggled(bool checked)
{
QString tmpFileName;
if (checked) {
QString ImageStr = g.profile[g.id()].splashFile();
if (!ImageStr.isEmpty()) {
QImage Image;
Image.load( ImageStr );
if (ui->imageLabel->width()!=128) {
Image=Image.convertToFormat(QImage::Format_RGB32);
QRgb col;
int gray;
int width = Image.width();
int height = Image.height();
for (int i = 0; i < width; ++i)
{
for (int j = 0; j < height; ++j)
{
col = Image.pixel(i, j);
gray = qGray(col);
Image.setPixel(i, j, qRgb(gray, gray, gray));
}
}
} else {
Image=Image.convertToFormat(QImage::Format_Mono);
}
ui->imageLabel->setPixmap(QPixmap::fromImage(Image));
ui->InvertColorButton->setEnabled(true);
ui->PreferredImageCB->setChecked(true);
ui->ImageFileName->setDisabled(true);
ui->ImageLoadButton->setDisabled(true);
ui->libraryButton->setDisabled(true);
ui->PatchFWCB->setEnabled(true);
}
} else {
ui->imageLabel->clear();
ui->ImageLoadButton->setEnabled(true);
ui->libraryButton->setEnabled(true);
tmpFileName = ui->ImageFileName->text();
if (!tmpFileName.isEmpty()) {
QImage image(tmpFileName);
if (!image.isNull()) {
if (ui->imageLabel->width()!=128) {
image=image.convertToFormat(QImage::Format_RGB32);
QRgb col;
int gray;
int width = image.width();
int height = image.height();
for (int i = 0; i < width; ++i)
{
for (int j = 0; j < height; ++j)
{
col = image.pixel(i, j);
gray = qGray(col);
image.setPixel(i, j, qRgb(gray, gray, gray));
}
}
} else {
image=image.convertToFormat(QImage::Format_Mono);
}
ui->imageLabel->setPixmap(QPixmap::fromImage(image.scaled(ui->imageLabel->width(), ui->imageLabel->height())));
ui->InvertColorButton->setEnabled(true);
ui->ImageFileName->setEnabled(true);
ui->PatchFWCB->setDisabled(false);
} else {
ui->InvertColorButton->setDisabled(true);
ui->PatchFWCB->setDisabled(true);
ui->PatchFWCB->setChecked(false);
}
} else {
ui->InvertColorButton->setDisabled(true);
ui->PatchFWCB->setDisabled(true);
ui->PatchFWCB->setChecked(false);
}
}
} }
void burnDialog::shrink() void burnDialog::shrink()
@@ -712,9 +599,5 @@ void burnDialog::shrink()
void burnDialog::on_EEbackupCB_clicked() void burnDialog::on_EEbackupCB_clicked()
{ {
if (ui->EEbackupCB->isChecked()) { *backup = ui->EEbackupCB->isChecked();
*backup=true;
} else {
*backup=false;
}
} }
+15 -6
View File
@@ -19,6 +19,8 @@
#define ER9X_EEPROM_FILE_TYPE "ER9X_EEPROM_FILE" #define ER9X_EEPROM_FILE_TYPE "ER9X_EEPROM_FILE"
#define EEPE_EEPROM_FILE_HEADER "EEPE EEPROM FILE" #define EEPE_EEPROM_FILE_HEADER "EEPE EEPROM FILE"
#define EEPE_MODEL_FILE_HEADER "EEPE MODEL FILE" #define EEPE_MODEL_FILE_HEADER "EEPE MODEL FILE"
#define EEPROM_FILE_TYPE 1
#define FLASH_FILE_TYPE 2
namespace Ui namespace Ui
@@ -36,18 +38,22 @@ public:
private slots: private slots:
void on_FlashLoadButton_clicked(); void on_FlashLoadButton_clicked();
void on_ImageLoadButton_clicked();
void on_libraryButton_clicked();
void on_BurnFlashButton_clicked(); void on_BurnFlashButton_clicked();
void on_cancelButton_clicked(); void on_cancelButton_clicked();
void on_InvertColorButton_clicked();
void on_EEbackupCB_clicked(); void on_EEbackupCB_clicked();
void on_PreferredImageCB_toggled(bool checked); void on_EEpromCB_toggled(bool checked);
void on_EEpromCB_toggled(bool checked);
void checkFw(QString fileName);
bool checkeEprom(QString fileName); bool checkeEprom(QString fileName);
void on_useProfileImageCB_clicked();
void on_useFwImageCB_clicked();
void on_useLibraryImageCB_clicked();
void on_useAnotherImageCB_clicked();
void checkFw(QString fileName);
void displaySplash();
void updateUI();
void shrink(); void shrink();
private: private:
Ui::burnDialog *ui; Ui::burnDialog *ui;
QString * hexfileName; QString * hexfileName;
@@ -55,6 +61,9 @@ private:
int hexType; int hexType;
RadioData radioData; RadioData radioData;
bool burnraw; bool burnraw;
enum ImageSource {FIRMWARE, PROFILE, LIBRARY, ANOTHER};
ImageSource imageSource;
QString imageFile;
}; };
#endif // BURNDIALOG_H #endif // BURNDIALOG_H
+89 -182
View File
@@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>440</width> <width>440</width>
<height>418</height> <height>423</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@@ -30,21 +30,8 @@
<normaloff>:/icon.png</normaloff>:/icon.png</iconset> <normaloff>:/icon.png</normaloff>:/icon.png</iconset>
</property> </property>
<layout class="QGridLayout" name="gridLayout_7"> <layout class="QGridLayout" name="gridLayout_7">
<item row="1" column="0"> <item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<spacer name="hs2"> <spacer name="hs2">
<property name="orientation"> <property name="orientation">
@@ -71,19 +58,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<widget class="QPushButton" name="BurnFlashButton"> <widget class="QPushButton" name="BurnFlashButton">
<property name="enabled"> <property name="enabled">
@@ -100,19 +74,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<spacer name="hs2_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>48</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</item> </item>
<item row="0" column="0"> <item row="0" column="0">
@@ -152,56 +113,22 @@
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout_5"> <layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="2" rowspan="3"> <item row="1" column="1">
<widget class="QLabel" name="FwImage"> <widget class="QLineEdit" name="SVNField">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>128</width>
<height>64</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>212</width>
<height>64</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<property name="text">
<string/>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="DateField">
<property name="readOnly"> <property name="readOnly">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0"> <item row="2" column="0">
<widget class="QLabel" name="dateLabel"> <widget class="QLabel" name="buildLabel">
<property name="text"> <property name="text">
<string>Date &amp; Time</string> <string>Variant</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="2" column="1">
<widget class="QLineEdit" name="SVNField"> <widget class="QLineEdit" name="ModField">
<property name="readOnly"> <property name="readOnly">
<bool>true</bool> <bool>true</bool>
</property> </property>
@@ -214,17 +141,17 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="0" column="0">
<widget class="QLineEdit" name="ModField"> <widget class="QLabel" name="dateLabel">
<property name="readOnly"> <property name="text">
<bool>true</bool> <string>Date &amp; Time</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="0" column="1">
<widget class="QLabel" name="buildLabel"> <widget class="QLineEdit" name="DateField">
<property name="text"> <property name="readOnly">
<string>Variant</string> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
@@ -325,17 +252,10 @@
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="0" column="0">
<layout class="QGridLayout" name="SplashLayout" rowstretch="0,0,0,1"> <layout class="QGridLayout" name="SplashLayout" rowstretch="0,0,0,0,0,0,0">
<item row="0" column="1" rowspan="4"> <item row="0" column="1" rowspan="7">
<layout class="QGridLayout" name="gridLayout_2" rowstretch="1,0"> <layout class="QGridLayout" name="gridLayout_2" rowstretch="1">
<item row="1" column="0"> <item row="0" column="1">
<widget class="QPushButton" name="InvertColorButton">
<property name="text">
<string>Invert Color</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="imageLabel"> <widget class="QLabel" name="imageLabel">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
@@ -359,7 +279,7 @@
<enum>QFrame::Panel</enum> <enum>QFrame::Panel</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Plain</enum>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
@@ -369,10 +289,50 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QCheckBox" name="PreferredImageCB"> <widget class="QCheckBox" name="useFwImageCB">
<property name="text">
<string>Use firmware start screen</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="useAnotherImageCB">
<property name="text">
<string>Use another start screen</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="useProfileImageCB">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@@ -380,86 +340,14 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>Use image in settings</string> <string>Use profile start screen</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="PatchFWCB">
<property name="text">
<string>Substitute image in firmware</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="3" column="0">
<spacer name="verticalSpacer_3"> <widget class="QCheckBox" name="useLibraryImageCB">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>13</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>13</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLineEdit" name="ImageFileName">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="ImageLoadButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text"> <property name="text">
<string>Load Image</string> <string>Use library start screen</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="libraryButton">
<property name="toolTip">
<string>Open Splash Library</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property> </property>
</widget> </widget>
</item> </item>
@@ -470,18 +358,37 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="1" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
<tabstops> <tabstops>
<tabstop>BurnFlashButton</tabstop>
<tabstop>FWFileName</tabstop> <tabstop>FWFileName</tabstop>
<tabstop>FlashLoadButton</tabstop> <tabstop>FlashLoadButton</tabstop>
<tabstop>ImageFileName</tabstop> <tabstop>DateField</tabstop>
<tabstop>ImageLoadButton</tabstop> <tabstop>SVNField</tabstop>
<tabstop>libraryButton</tabstop> <tabstop>ModField</tabstop>
<tabstop>useProfileImageCB</tabstop>
<tabstop>useFwImageCB</tabstop>
<tabstop>useLibraryImageCB</tabstop>
<tabstop>useAnotherImageCB</tabstop>
<tabstop>EEbackupCB</tabstop> <tabstop>EEbackupCB</tabstop>
<tabstop>patchcalib_CB</tabstop>
<tabstop>patchhw_CB</tabstop>
<tabstop>EEpromCB</tabstop> <tabstop>EEpromCB</tabstop>
<tabstop>cancelButton</tabstop> <tabstop>cancelButton</tabstop>
<tabstop>BurnFlashButton</tabstop>
</tabstops> </tabstops>
<resources> <resources>
<include location="companion.qrc"/> <include location="companion.qrc"/>
+7 -4
View File
@@ -95,15 +95,18 @@ int main(int argc, char *argv[])
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
if (g.profile[g.id()].firmware().isEmpty()) if (g.profile[g.id()].fwType().isEmpty()){
g.profile[g.id()].firmware(default_firmware_variant.id); g.profile[g.id()].fwType(default_firmware_variant.id);
g.profile[g.id()].fwName("");
}
QPixmap pixmap = QPixmap(g.profile[g.id()].firmware().contains("taranis") ? ":/images/splasht.png" : ":/images/splash.png"); QPixmap pixmap = QPixmap(g.profile[g.id()].fwType().contains("taranis") ? ":/images/splasht.png" : ":/images/splash.png");
QSplashScreen *splash = new QSplashScreen(pixmap); QSplashScreen *splash = new QSplashScreen(pixmap);
RegisterFirmwares(); RegisterFirmwares();
current_firmware_variant = GetFirmwareVariant(g.profile[g.id()].firmware()); current_firmware_variant = GetFirmwareVariant(g.profile[g.id()].fwType());
MainWindow *mainWin = new MainWindow(); MainWindow *mainWin = new MainWindow();
if (g.showSplash()) { if (g.showSplash()) {
+28 -42
View File
@@ -41,7 +41,7 @@ bool Side::displayImage( QString fileName, Source pictSource )
if (fileName.isEmpty()) if (fileName.isEmpty())
return false; return false;
// Determine which picture format to use // Determine which picture format to use
if (pictSource == FW ){ if (pictSource == FW ){
FlashInterface flash(fileName); FlashInterface flash(fileName);
@@ -49,60 +49,46 @@ bool Side::displayImage( QString fileName, Source pictSource )
return false; return false;
else else
image = flash.getSplash(); image = flash.getSplash();
*format = (flash.getSplashWidth()==WIDTH_TARANIS ? LCDTARANIS : LCD9X); *format = (flash.getSplashWidth()==WIDTH_TARANIS ? LCDTARANIS : LCD9X);
} }
else { else {
image.load(fileName); image.load(fileName);
if (pictSource== PICT) if (pictSource== PICT)
*format = image.width()>WIDTH_9X ? LCDTARANIS : LCD9X; *format = image.width()>WIDTH_9X ? LCDTARANIS : LCD9X;
else if (pictSource == PROFILE) else if (pictSource == PROFILE)
*format = (g.profile[g.id()].firmware().contains("taranis")) ? LCDTARANIS : LCD9X; *format = (g.profile[g.id()].fwType().contains("taranis")) ? LCDTARANIS : LCD9X;
} }
if (image.isNull()) { if (image.isNull()) {
return false; return false;
} }
// Prepare and display image // Load image
if (*format==LCDTARANIS) { if (*format==LCDTARANIS) {
image=image.convertToFormat(QImage::Format_RGB32); imageLabel->setPixmap( makePixMap( image, "taranis" ));
QRgb col; imageLabel->setFixedSize(WIDTH_TARANIS*2, HEIGHT_TARANIS*2);
int gray;
int width = image.width();
int height = image.height();
for (int i = 0; i < width; ++i) {
for (int j = 0; j < height; ++j) {
col = image.pixel(i, j);
gray = qGray(col);
image.setPixel(i, j, qRgb(gray, gray, gray));
}
}
imageLabel->setPixmap(QPixmap::fromImage(image.scaled(imageLabel->width()/2, imageLabel->height()/2)));
} }
else else {
imageLabel->setPixmap(QPixmap::fromImage(image.scaled(imageLabel->width()/2, imageLabel->height()/2).convertToFormat(QImage::Format_Mono))); imageLabel->setPixmap( makePixMap( image, "9x" ));
imageLabel->setFixedSize(WIDTH_9X*2, HEIGHT_9X*2);
if (*format == LCD9X) }
imageLabel->setFixedSize(WIDTH_9X*2, HEIGHT_9X*2);
else
imageLabel->setFixedSize(WIDTH_TARANIS*2, HEIGHT_TARANIS*2);
switch (pictSource){ switch (pictSource){
case FW: case FW:
fileNameEdit->setText(QObject::tr("FW: %1").arg(fileName)); fileNameEdit->setText(QObject::tr("FW: %1").arg(fileName));
*saveToFileName = fileName; *saveToFileName = fileName;
*source=FW; *source=FW;
break; break;
case PICT: case PICT:
fileNameEdit->setText(QObject::tr("Pict: %1").arg(fileName)); fileNameEdit->setText(QObject::tr("Pict: %1").arg(fileName));
*saveToFileName = fileName; *saveToFileName = fileName;
*source=PICT; *source=PICT;
break; break;
case PROFILE: case PROFILE:
fileNameEdit->setText(QObject::tr("Profile image")); fileNameEdit->setText(QObject::tr("Profile image"));
*saveToFileName = fileName; *saveToFileName = fileName;
*source=PROFILE; *source=PROFILE;
break; break;
default: default:
break; break;
} }
saveButton->setEnabled(true); saveButton->setEnabled(true);
libraryButton->setEnabled(true); libraryButton->setEnabled(true);
+3 -3
View File
@@ -213,7 +213,7 @@ void fwPreferencesDialog::writeValues()
{ {
g.cpuId( ui->CPU_ID_LE->text() ); g.cpuId( ui->CPU_ID_LE->text() );
current_firmware_variant = getFirmwareVariant(); current_firmware_variant = getFirmwareVariant();
g.profile[g.id()].firmware( current_firmware_variant.id ); g.profile[g.id()].fwType( current_firmware_variant.id );
} }
void fwPreferencesDialog::populateFirmwareOptions(const FirmwareInfo * firmware) void fwPreferencesDialog::populateFirmwareOptions(const FirmwareInfo * firmware)
@@ -290,7 +290,7 @@ void fwPreferencesDialog::on_checkFWUpdates_clicked()
FirmwareVariant variant = getFirmwareVariant(); FirmwareVariant variant = getFirmwareVariant();
if (g.profile[g.id()].burnFirmware()) { if (g.profile[g.id()].burnFirmware()) {
current_firmware_variant = variant; current_firmware_variant = variant;
g.profile[g.id()].firmware( variant.id ); g.profile[g.id()].fwType( variant.id );
} }
MainWindow * mw = (MainWindow *)this->parent(); MainWindow * mw = (MainWindow *)this->parent();
mw->checkForUpdates(true, variant.id); mw->checkForUpdates(true, variant.id);
@@ -305,7 +305,7 @@ void fwPreferencesDialog::on_fw_dnld_clicked()
if (!variant.firmware->getUrl(variant.id).isNull()) { if (!variant.firmware->getUrl(variant.id).isNull()) {
if (g.profile[g.id()].burnFirmware()) { if (g.profile[g.id()].burnFirmware()) {
current_firmware_variant = getFirmwareVariant(); current_firmware_variant = getFirmwareVariant();
g.profile[g.id()].firmware( current_firmware_variant.id ); g.profile[g.id()].fwType( current_firmware_variant.id );
} }
mw->downloadLatestFW(current_firmware_variant.firmware, current_firmware_variant.id); mw->downloadLatestFW(current_firmware_variant.firmware, current_firmware_variant.id);
} }
+1 -1
View File
@@ -20,7 +20,7 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) :
ui->setupUi(this); ui->setupUi(this);
this->setWindowIcon(CompanionIcon("open.png")); this->setWindowIcon(CompanionIcon("open.png"));
QString firmware_id = g.profile[g.id()].firmware(); QString firmware_id = g.profile[g.id()].fwType();
ui->tabWidget->setCurrentIndex( g.generalEditTab() ); ui->tabWidget->setCurrentIndex( g.generalEditTab() );
QString name=g.profile[g.id()].name(); QString name=g.profile[g.id()].name();
if (name.isEmpty()) { if (name.isEmpty()) {
+22
View File
@@ -2,6 +2,7 @@
#include "appdata.h" #include "appdata.h"
#include "helpers.h" #include "helpers.h"
#include "simulatordialog.h" #include "simulatordialog.h"
#include "flashinterface.h"
QString getPhaseName(int val, char * phasename) QString getPhaseName(int val, char * phasename)
{ {
@@ -946,3 +947,24 @@ void startSimulation(QWidget * parent, RadioData & radioData, int modelIdx)
QObject::tr("Simulator for this firmware is not yet available")); QObject::tr("Simulator for this firmware is not yet available"));
} }
} }
QPixmap makePixMap( QImage image, QString firmwareType )
{
if (firmwareType.contains( "taranis" )) {
image = image.convertToFormat(QImage::Format_RGB32);
QRgb col;
int gray;
for (int i = 0; i < image.width(); ++i) {
for (int j = 0; j < image.height(); ++j) {
col = image.pixel(i, j);
gray = qGray(col);
image.setPixel(i, j, qRgb(gray, gray, gray));
}
}
image = image.scaled(SPLASHX9D_WIDTH, SPLASHX9D_HEIGHT);
}
else {
image = image.scaled(SPLASH_WIDTH, SPLASH_HEIGHT).convertToFormat(QImage::Format_Mono);
}
return(QPixmap::fromImage(image));
}
+2
View File
@@ -128,4 +128,6 @@ QString getFrSkySrc(int index);
void startSimulation(QWidget * parent, RadioData & radioData, int modelIdx); void startSimulation(QWidget * parent, RadioData & radioData, int modelIdx);
QPixmap makePixMap( QImage image, QString firmwareType );
#endif // HELPERS_H #endif // HELPERS_H
+11 -11
View File
@@ -308,7 +308,7 @@ void MainWindow::downloadLatestFW(FirmwareInfo * firmware, const QString & firmw
if (!fileName.isEmpty()) { if (!fileName.isEmpty()) {
downloadedFW = firmwareId; downloadedFW = firmwareId;
needRename=true; needRename=true;
downloadedFWFilename = fileName; g.profile[g.id()].fwName( fileName );
if (!cpuid.isEmpty()) { if (!cpuid.isEmpty()) {
url.append("&cpuid="); url.append("&cpuid=");
url.append(cpuid); url.append(cpuid);
@@ -323,7 +323,7 @@ void MainWindow::downloadLatestFW(FirmwareInfo * firmware, const QString & firmw
void MainWindow::reply1Accepted() void MainWindow::reply1Accepted()
{ {
QString errormsg; QString errormsg;
if (downloadedFWFilename.isEmpty()) { if (g.profile[g.id()].fwName().isEmpty()) {
if (!(downloadedFW.isEmpty())) { if (!(downloadedFW.isEmpty())) {
QFile file(downloadedFW); QFile file(downloadedFW);
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { //reading HEX TEXT file if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { //reading HEX TEXT file
@@ -364,11 +364,11 @@ void MainWindow::reply1Accepted()
g.fwRev.set(downloadedFW, currentFWrev); g.fwRev.set(downloadedFW, currentFWrev);
} }
} else { } else {
QFile file(downloadedFWFilename); QFile file(g.profile[g.id()].fwName());
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { //reading HEX TEXT file if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { //reading HEX TEXT file
QMessageBox::critical(this, tr("Error"), QMessageBox::critical(this, tr("Error"),
tr("Error opening file %1:\n%2.") tr("Error opening file %1:\n%2.")
.arg(downloadedFWFilename) .arg(g.profile[g.id()].fwName())
.arg(file.errorString())); .arg(file.errorString()));
return; return;
} }
@@ -399,13 +399,13 @@ void MainWindow::reply1Accepted()
return; return;
} }
file.close(); file.close();
FlashInterface flash(downloadedFWFilename); FlashInterface flash(g.profile[g.id()].fwName());
QString rev=flash.getSvn(); QString rev=flash.getSvn();
int pos=rev.lastIndexOf("-r"); int pos=rev.lastIndexOf("-r");
if (pos>0) { if (pos>0) {
currentFWrev=rev.mid(pos+2).toInt(); currentFWrev=rev.mid(pos+2).toInt();
if (g.profile[g.id()].renameFwFiles() && needRename) { if (g.profile[g.id()].renameFwFiles() && needRename) {
QFileInfo fi(downloadedFWFilename); QFileInfo fi(g.profile[g.id()].fwName());
QString path=fi.path()+QDir::separator (); QString path=fi.path()+QDir::separator ();
path.append(fi.completeBaseName()); path.append(fi.completeBaseName());
path.append(rev.mid(pos)); path.append(rev.mid(pos));
@@ -413,14 +413,14 @@ void MainWindow::reply1Accepted()
path.append(fi.suffix()); path.append(fi.suffix());
QDir qd; QDir qd;
qd.remove(path); qd.remove(path);
qd.rename(downloadedFWFilename,path); qd.rename(g.profile[g.id()].fwName(),path);
downloadedFWFilename=path; g.profile[g.id()].fwName(path);
} }
g.fwRev.set(downloadedFW, currentFWrev); g.fwRev.set(downloadedFW, currentFWrev);
if (g.profile[g.id()].burnFirmware()) { if (g.profile[g.id()].burnFirmware()) {
int ret = QMessageBox::question(this, "Companion", tr("Do you want to write the firmware to the transmitter now ?"), QMessageBox::Yes | QMessageBox::No); int ret = QMessageBox::question(this, "Companion", tr("Do you want to write the firmware to the transmitter now ?"), QMessageBox::Yes | QMessageBox::No);
if (ret == QMessageBox::Yes) { if (ret == QMessageBox::Yes) {
writeFlash(downloadedFWFilename); writeFlash(g.profile[g.id()].fwName());
} }
} }
} }
@@ -560,7 +560,7 @@ void MainWindow::reply1Finished(QNetworkReply * reply)
url.append("&cpuid="); url.append("&cpuid=");
url.append(cpuid); url.append(cpuid);
} }
downloadedFWFilename = fileName; g.profile[g.id()].fwName( fileName );
g.flashDir(QFileInfo(fileName).dir().absolutePath()); g.flashDir(QFileInfo(fileName).dir().absolutePath());
downloadDialog * dd = new downloadDialog(this, url, fileName); downloadDialog * dd = new downloadDialog(this, url, fileName);
currentFWrev_temp = NewFwRev; currentFWrev_temp = NewFwRev;
@@ -702,7 +702,7 @@ void MainWindow::loadProfile() //TODO Load all variables - Also HW!
g.id( profnum ); g.id( profnum );
// TODO Get rid of this global variable - The profile.firmware is the real source // TODO Get rid of this global variable - The profile.firmware is the real source
current_firmware_variant = GetFirmwareVariant(g.profile[g.id()].firmware()); current_firmware_variant = GetFirmwareVariant(g.profile[g.id()].fwType());
foreach (QMdiSubWindow *window, mdiArea->subWindowList()) { foreach (QMdiSubWindow *window, mdiArea->subWindowList()) {
MdiChild *mdiChild = qobject_cast<MdiChild *>(window->widget()); MdiChild *mdiChild = qobject_cast<MdiChild *>(window->widget());
-1
View File
@@ -197,7 +197,6 @@ private:
QString installer_fileName; QString installer_fileName;
QString downloadedFW; QString downloadedFW;
QString downloadedFWFilename;
downloadDialog * downloadDialog_forWait; downloadDialog * downloadDialog_forWait;
bool needRename; bool needRename;
+1 -1
View File
@@ -457,7 +457,7 @@ TelemetryPanel::~TelemetryPanel()
void TelemetryPanel::setup() void TelemetryPanel::setup()
{ {
QString firmware_id = g.profile[g.id()].firmware(); QString firmware_id = g.profile[g.id()].fwType();
lock=true; lock=true;
+1 -7
View File
@@ -3,7 +3,6 @@
#include "appdata.h" #include "appdata.h"
#include <QtGui> #include <QtGui>
#include "helpers.h" #include "helpers.h"
//#include "splashlabel.h"
#include "flashinterface.h" #include "flashinterface.h"
#include "helpers.h" #include "helpers.h"
@@ -23,7 +22,6 @@ splashLibrary::splashLibrary(QWidget *parent, QString * fileName) : QDialog(pare
foreach(splashLabel *sl, findChildren<splashLabel *>()) { foreach(splashLabel *sl, findChildren<splashLabel *>()) {
connect(sl, SIGNAL(buttonPressed(int)), this, SLOT(onButtonPressed(int))); connect(sl, SIGNAL(buttonPressed(int)), this, SLOT(onButtonPressed(int)));
} }
resize(0, 0);
} }
splashLibrary::~splashLibrary() { splashLibrary::~splashLibrary() {
@@ -40,7 +38,7 @@ void splashLibrary::setupPage(int page) {
if ((i + 20 * page) < imageList.size()) { if ((i + 20 * page) < imageList.size()) {
QImage image(imageList.at(i + 20 * page)); QImage image(imageList.at(i + 20 * page));
if (!image.isNull()) { if (!image.isNull()) {
sl[i]->setPixmap(QPixmap::fromImage(image.scaled(SPLASH_WIDTH, SPLASH_HEIGHT).convertToFormat(QImage::Format_Mono))); sl[i]->setPixmap(makePixMap(image, g.profile[g.id()].fwType()));
sl[i]->setEnabled(true); sl[i]->setEnabled(true);
sl[i]->setId((i + 20 * page)); sl[i]->setId((i + 20 * page));
sl[i]->setStyleSheet("border:1px solid; border-color:#999999;"); sl[i]->setStyleSheet("border:1px solid; border-color:#999999;");
@@ -104,10 +102,6 @@ void splashLibrary::getFileList() {
} }
} }
void splashLibrary::shrink() {
resize(0, 0);
}
void splashLibrary::dclose() { void splashLibrary::dclose() {
close(); close();
} }
-1
View File
@@ -17,7 +17,6 @@ public:
~splashLibrary(); ~splashLibrary();
private slots: private slots:
void shrink() ;
void dclose(); void dclose();
void onButtonPressed(int button); void onButtonPressed(int button);
void on_nextPage_clicked(); void on_nextPage_clicked();
+130 -167
View File
@@ -6,22 +6,16 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>662</width> <width>650</width>
<height>356</height> <height>374</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="maximumSize">
<size>
<width>662</width>
<height>356</height>
</size>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string/> <string/>
</property> </property>
@@ -39,10 +33,16 @@
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>50</width> <width>34</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="maximumSize">
<size>
<width>34</width>
<height>16777215</height>
</size>
</property>
<property name="text"> <property name="text">
<string>...</string> <string>...</string>
</property> </property>
@@ -54,12 +54,15 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="2">
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<property name="sizeConstraint">
<enum>QLayout::SetNoConstraint</enum>
</property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="splashLabel" name="FwImage_01"> <widget class="splashLabel" name="FwImage_01">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@@ -72,7 +75,7 @@
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>130</width> <width>214</width>
<height>66</height> <height>66</height>
</size> </size>
</property> </property>
@@ -105,7 +108,7 @@
<item row="0" column="1"> <item row="0" column="1">
<widget class="splashLabel" name="FwImage_02"> <widget class="splashLabel" name="FwImage_02">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@@ -113,55 +116,12 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>130</width> <width>130</width>
<height>66</height> <height>0</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>130</width> <width>214</width>
<height>66</height>
</size>
</property>
<property name="mouseTracking">
<bool>true</bool>
</property>
<property name="styleSheet">
<string notr="true">border:1px;</string>
</property>
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<property name="text">
<string/>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="splashLabel" name="FwImage_03">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>130</width>
<height>66</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>130</width>
<height>66</height> <height>66</height>
</size> </size>
</property> </property>
@@ -191,7 +151,7 @@
<item row="0" column="3"> <item row="0" column="3">
<widget class="splashLabel" name="FwImage_04"> <widget class="splashLabel" name="FwImage_04">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@@ -199,12 +159,12 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>130</width> <width>130</width>
<height>66</height> <height>0</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>130</width> <width>214</width>
<height>66</height> <height>66</height>
</size> </size>
</property> </property>
@@ -234,20 +194,20 @@
<item row="1" column="0"> <item row="1" column="0">
<widget class="splashLabel" name="FwImage_05"> <widget class="splashLabel" name="FwImage_05">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>130</width> <width>0</width>
<height>66</height> <height>66</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>130</width> <width>214</width>
<height>66</height> <height>66</height>
</size> </size>
</property> </property>
@@ -277,20 +237,14 @@
<item row="1" column="1"> <item row="1" column="1">
<widget class="splashLabel" name="FwImage_06"> <widget class="splashLabel" name="FwImage_06">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>130</width>
<height>66</height>
</size>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>130</width> <width>214</width>
<height>66</height> <height>66</height>
</size> </size>
</property> </property>
@@ -320,20 +274,14 @@
<item row="1" column="2"> <item row="1" column="2">
<widget class="splashLabel" name="FwImage_07"> <widget class="splashLabel" name="FwImage_07">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>130</width>
<height>66</height>
</size>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>130</width> <width>214</width>
<height>66</height> <height>66</height>
</size> </size>
</property> </property>
@@ -363,20 +311,14 @@
<item row="1" column="3"> <item row="1" column="3">
<widget class="splashLabel" name="FwImage_08"> <widget class="splashLabel" name="FwImage_08">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>130</width>
<height>66</height>
</size>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>130</width> <width>214</width>
<height>66</height> <height>66</height>
</size> </size>
</property> </property>
@@ -406,20 +348,20 @@
<item row="2" column="0"> <item row="2" column="0">
<widget class="splashLabel" name="FwImage_09"> <widget class="splashLabel" name="FwImage_09">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>130</width> <width>0</width>
<height>66</height> <height>66</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>130</width> <width>214</width>
<height>66</height> <height>66</height>
</size> </size>
</property> </property>
@@ -449,20 +391,14 @@
<item row="2" column="1"> <item row="2" column="1">
<widget class="splashLabel" name="FwImage_10"> <widget class="splashLabel" name="FwImage_10">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>130</width>
<height>66</height>
</size>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>130</width> <width>214</width>
<height>66</height> <height>66</height>
</size> </size>
</property> </property>
@@ -492,20 +428,14 @@
<item row="2" column="2"> <item row="2" column="2">
<widget class="splashLabel" name="FwImage_11"> <widget class="splashLabel" name="FwImage_11">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>130</width>
<height>66</height>
</size>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>130</width> <width>214</width>
<height>66</height> <height>66</height>
</size> </size>
</property> </property>
@@ -535,20 +465,14 @@
<item row="2" column="3"> <item row="2" column="3">
<widget class="splashLabel" name="FwImage_12"> <widget class="splashLabel" name="FwImage_12">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>130</width>
<height>66</height>
</size>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>130</width> <width>214</width>
<height>66</height> <height>66</height>
</size> </size>
</property> </property>
@@ -578,20 +502,20 @@
<item row="3" column="0"> <item row="3" column="0">
<widget class="splashLabel" name="FwImage_13"> <widget class="splashLabel" name="FwImage_13">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>130</width> <width>0</width>
<height>66</height> <height>66</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>130</width> <width>214</width>
<height>66</height> <height>66</height>
</size> </size>
</property> </property>
@@ -621,20 +545,14 @@
<item row="3" column="1"> <item row="3" column="1">
<widget class="splashLabel" name="FwImage_14"> <widget class="splashLabel" name="FwImage_14">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>130</width>
<height>66</height>
</size>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>130</width> <width>214</width>
<height>66</height> <height>66</height>
</size> </size>
</property> </property>
@@ -664,20 +582,14 @@
<item row="3" column="2"> <item row="3" column="2">
<widget class="splashLabel" name="FwImage_15"> <widget class="splashLabel" name="FwImage_15">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>130</width>
<height>66</height>
</size>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>130</width> <width>214</width>
<height>66</height> <height>66</height>
</size> </size>
</property> </property>
@@ -707,20 +619,14 @@
<item row="3" column="3"> <item row="3" column="3">
<widget class="splashLabel" name="FwImage_16"> <widget class="splashLabel" name="FwImage_16">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>130</width>
<height>66</height>
</size>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>130</width> <width>214</width>
<height>66</height> <height>66</height>
</size> </size>
</property> </property>
@@ -750,20 +656,20 @@
<item row="4" column="0"> <item row="4" column="0">
<widget class="splashLabel" name="FwImage_17"> <widget class="splashLabel" name="FwImage_17">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>130</width> <width>0</width>
<height>66</height> <height>66</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>130</width> <width>214</width>
<height>66</height> <height>66</height>
</size> </size>
</property> </property>
@@ -793,20 +699,14 @@
<item row="4" column="1"> <item row="4" column="1">
<widget class="splashLabel" name="FwImage_18"> <widget class="splashLabel" name="FwImage_18">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>130</width>
<height>66</height>
</size>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>130</width> <width>214</width>
<height>66</height> <height>66</height>
</size> </size>
</property> </property>
@@ -836,20 +736,14 @@
<item row="4" column="2"> <item row="4" column="2">
<widget class="splashLabel" name="FwImage_19"> <widget class="splashLabel" name="FwImage_19">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>130</width>
<height>66</height>
</size>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>130</width> <width>214</width>
<height>66</height> <height>66</height>
</size> </size>
</property> </property>
@@ -879,7 +773,44 @@
<item row="4" column="3"> <item row="4" column="3">
<widget class="splashLabel" name="FwImage_20"> <widget class="splashLabel" name="FwImage_20">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>214</width>
<height>66</height>
</size>
</property>
<property name="mouseTracking">
<bool>true</bool>
</property>
<property name="styleSheet">
<string notr="true">border:1px;</string>
</property>
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<property name="text">
<string/>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="splashLabel" name="FwImage_03">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Minimum">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@@ -887,12 +818,12 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>130</width> <width>130</width>
<height>66</height> <height>0</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>130</width> <width>214</width>
<height>66</height> <height>66</height>
</size> </size>
</property> </property>
@@ -921,7 +852,7 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="0" column="2"> <item row="0" column="4">
<widget class="QToolButton" name="nextPage"> <widget class="QToolButton" name="nextPage">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
@@ -934,10 +865,16 @@
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>50</width> <width>34</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="maximumSize">
<size>
<width>34</width>
<height>16777215</height>
</size>
</property>
<property name="text"> <property name="text">
<string>...</string> <string>...</string>
</property> </property>
@@ -949,6 +886,32 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="3">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>