Going for 0.9.2.6 RC1

This commit is contained in:
jaime 2017-05-06 17:27:18 +00:00
parent bb2cebc7c5
commit 13c68c6750
35 changed files with 3312 additions and 2613 deletions

View File

@ -1,11 +1,15 @@
TBD - 0.9.2.6 May 2017 - 0.9.2.6
- Check updates feature added. On start or when user desires KLog checks if there is one updated version available. - Check updates feature added. On start or when user desires KLog checks if there is one updated version available.
- The user can select to help KLog team sending his call to developers when cheking for updates. - Simplified the way new logs are added, importing the general StationCallsign & Operators as default for new logs.
- Improved the way first start was managed when no entity information was loaded.
- GUI: Application icon is now shown in the application windows. - GUI: Application icon is now shown in the application windows.
- GUI: Updated some messages & tips.
- GUI: DXCluster offers the Station Callsign as default value to connect.
- Changed the World class to be able to import files from any folder. - Changed the World class to be able to import files from any folder.
- Changed how some non ARRL valid entities are managed to show the common name (Sicily / Italy) - Changed how some non ARRL valid entities are managed to show the common name (Sicily / Italy)
- BugFix: Bands & Modes where not properly exported. - BugFix: When manually importing a new CTY.CSV, although data was updated, it was not shown until next KLog start.
- Several minor changes on source code to optimize and improve. - BugFix: In the others tab, the DXCC was sometime not correctly identified.
- Some minor changes on source code to optimize and improve.
November 2016 - 0.9.2.5 November 2016 - 0.9.2.5
- BugFix: ADIF export function was not exporting the correct BAND & MODE data. - BugFix: ADIF export function was not exporting the correct BAND & MODE data.

15
TODO
View File

@ -4,19 +4,18 @@ Feel free to request any roadmap change if you have any suggestion.
Check: Check:
If there is a sat seleted, the prop-mode should be satellite! Test and release!
Working on Working on
RC-BUGS: None identified today. RC-BUGS: None identified today.
TODO: Change the Setup band/mode selection to checklist instead of the current widget. It will be easier.
TODO: To add the possibility to move the DB to another path, with the idea to use dropbox or whatever. TODO: To add the possibility to move the DB to another path, with the idea to use dropbox or whatever.
TODO: Define band limits for CW/SSB/RTTY... so when a click on the cluster is done, the right mode is proposed.
TODO: Add some "returnPressed" actions to some qlineedit to make usage quicker.
TODO: TODO:
The softwateupdate class can also be used to track how many KLog installations are around the world. The softwateupdate class can also be used to track how many KLog installations are around the world.
It can't add a privacy concern for the users so a configuration tab must be created. It can't add a privacy concern for the users so a configuration tab must be created.
@ -27,6 +26,12 @@ The softwateupdate class can also be used to track how many KLog installations a
Call will be used to track the number of users are usin KLog Call will be used to track the number of users are usin KLog
Connection will be done on KLog start. Connection will be done on KLog start.
BUG: Potential bug
Double click on a QSO in the log on the Mode/Band... you can modifify the value. As it is a double click, the QSO goes to edit and ...
Check if:
- Only selected modes can be shown there.
- If double click on the log we only "quick modify" directly in the log, without editing.
BUG: (TNX JL3OXR) BUG: (TNX JL3OXR)
The DB is not storing if the time is stored in UTC or local so that info is lost. The DB is not storing if the time is stored in UTC or local so that info is lost.
If a user changes the configuration from time to time, the user will loose the real time when the QSO was made. If a user changes the configuration from time to time, the user will loose the real time when the QSO was made.

View File

@ -31,7 +31,7 @@ AboutDialog::AboutDialog(const QString tversion, QWidget *parent)
const QString br = QLatin1String("<br/>"); const QString br = QLatin1String("<br/>");
const QString description = "<center><h2>KLog " + tversion + "</h2><h4>" +tr("By")+ "<a href=\"https://www.qrz.com/db/ea4tv\">EA4TV</a> - 2002-2017</h4></center><br>" + tr("KLog is a free logging software for hamradio operators.<br><br><b>Please know that this is an BETA release and it may contain many bugs.<br>Backup your data before using this software!</b><br><br>KLog has been fully rewritten from the 0.6.2 to be able to provide a cross-platform application that runs in the main operating systems (Linux, OSX & Windows) and provide new functionalities that KLog was not providing. <br><br>Find more information and latest release at<br>") + "<a href=http://jaime.robles.es/klog>http://jaime.robles.es/klog</a><br><br>" + tr("Author") + ": Jaime Robles, <a href=\"https://www.qrz.com/db/ea4tv\">EA4TV</a><br><a href=mailto:jaime@robles.es>jaime@robles.es</a>"; const QString description = "<center><h2>KLog " + tversion + "</h2><h4> " +tr("By")+ " <a href=\"https://www.qrz.com/db/ea4tv\">EA4TV</a> - 2002-2017</h4></center><br>" + tr("KLog is a free logging software for hamradio operators.") +"<br><br><b>" + tr("Please know that this is an BETA release and it may contain many bugs.<br>Backup your data before using this software!") + "</b><br><br>" + tr("KLog has been fully rewritten from the 0.6.2 to be able to provide a cross-platform application that runs in the main operating systems (Linux, OSX & Windows) and provide new functionalities that KLog was not providing.") + "<br><br>" + tr("Find more information and latest release at<br>") + "<a href=http://www.klog.xyz>http://www.klog.xyz</a><br><br>" + tr("Author") + ": <a href=http://jaime.robles.es/klog>Jaime Robles</a>, <a href=\"https://www.qrz.com/db/ea4tv\">EA4TV</a><br><a href=mailto:jaime@robles.es>jaime@robles.es</a>";
QLabel *copyRightLabel = new QLabel(description); QLabel *copyRightLabel = new QLabel(description);
@ -54,11 +54,11 @@ AboutDialog::AboutDialog(const QString tversion, QWidget *parent)
QLabel *logoLabel4 = new QLabel; QLabel *logoLabel4 = new QLabel;
logoLabel4->setPixmap(pixmap); logoLabel4->setPixmap(pixmap);
QString author1 = QString("<tr><td>Jaime Robles</td>") + QString("<td><a href=\"https://www.qrz.com/db/ea4tv\">EA4TV</a></td>") + tr("<td>(2002-today) Main developer</td></tr>"); QString author1 = QString("<tr><td>Jaime Robles</td>") + QString("<td><a href=\"https://www.qrz.com/db/ea4tv\">EA4TV</a></td>") + "<td>(2002-" + tr("today") +")" +tr("Main developer") + "</td></tr>";
QString author2 = QString("<tr><td>Akihiro Koda</td>") + QString("<td><a href=\"https://www.qrz.com/db/jl3oxr\">JL3OXR</a></td>") + tr("<td>(2016)</td></tr>"); QString author2 = QString("<tr><td>Akihiro Koda</td>") + QString("<td><a href=\"https://www.qrz.com/db/jl3oxr\">JL3OXR</a></td>") + tr("<td>(2016)</td></tr>");
QString author3 = QString("<tr><td>Andrew Goldie</td>") + QString("<td><a href=\"https://www.qrz.com/db/zl2agc\">ZL2ACG</a></td>") + tr("<td>(2009-2010)</td></tr>"); QString author3 = QString("<tr><td>Andrew Goldie</td>") + QString("<td><a href=\"https://www.qrz.com/db/zl2agc\">ZL2ACG</a></td>") + tr("<td>(2009-2010)</td></tr>");
QString authorText = tr("KLog is developed by a very small team and you are invited to join!<br><br>If you want to support you can join the <a href=\"https://lists.nongnu.org/mailman/listinfo/klog-devel\">KLog's development mailing list</a> and you will be welcome!<br><br>You can also help us sending bug reports or small code contributions, ideas or whatever you think it may improve KLog."); QString authorText = tr("KLog is developed by a very small team and you are invited to join!") + "<br><br>" + tr("If you want to support you can join the <a href=\"https://lists.nongnu.org/mailman/listinfo/klog-devel\">KLog's development mailing list</a> and you will be welcome!") + "<br><br>" + tr("You can also help us sending bug reports or small code contributions, ideas or whatever you think it may improve KLog.");
QString authors = "<center><h2>" + tr("Authors") + "</h2></center><br>" + authorText + "<br><table>" + author1 + author2 + author3 + "</table>"; QString authors = "<center><h2>" + tr("Authors") + "</h2></center><br>" + authorText + "<br><table>" + author1 + author2 + author3 + "</table>";
@ -68,15 +68,8 @@ AboutDialog::AboutDialog(const QString tversion, QWidget *parent)
QString translator4 = QString("<tr><td>Spanish</td>") + QString("<td>Jaime Robles</td>") + QString("<td><a href=\"https://www.qrz.com/db/ea4tv\">EA4TV</a></td></tr>"); QString translator4 = QString("<tr><td>Spanish</td>") + QString("<td>Jaime Robles</td>") + QString("<td><a href=\"https://www.qrz.com/db/ea4tv\">EA4TV</a></td></tr>");
QString translatorsText = tr("Translators bring KLog into your language. They are really an important part of the KLog development team.<br><br>If KLog is still not in your language and you want to help us, please contact us through the <a href=\"https://lists.nongnu.org/mailman/listinfo/klog-devel\">KLog's development mailing list</a> and you will be welcome!"); QString translatorsText = tr("Translators bring KLog into your language. They are really an important part of the KLog development team.") + "<br><br>" + tr("If KLog is still not in your language and you want to help us, please contact us through the <a href=\"https://lists.nongnu.org/mailman/listinfo/klog-devel\">KLog's development mailing list</a> and you will be welcome!");
QString translators = "<center><h2>" + tr("Translators") + "</h2></center><br>" + translatorsText + "<br><table>" + translator1 + translator2 + translator3 + "</table>"; QString translators = "<center><h2>" + tr("Translators") + "</h2></center><br>" + translatorsText + "<br><table>" + translator1 + translator2 + translator3 + translator4 + "</table>";
//<h4><ul><li>" + author1 + "</li><li>"+ author2 + "</li><li>" + author3 + "</li></ul></h4>";
//QString authors = "<center><h2>" + tr("Authors") + "</center><br><h4><ul><li>" + author1 + "</li><li>"+ author2 + "</li><li>" + author3 + "</li></ul></h4>";
//Estoy trabajando para poner los autores y traductores
QLabel *authorsLabel = new QLabel(authors); QLabel *authorsLabel = new QLabel(authors);
authorsLabel->setWordWrap(true); authorsLabel->setWordWrap(true);

View File

@ -3765,7 +3765,7 @@ bool DataBase::updateTheModeTableAndSyncLog()
bool DataBase::updateTheEntityTableISONames() bool DataBase::updateTheEntityTableISONames()
{ {
qDebug() << "DataBase::updateTheEntityTableISONames" << endl; //qDebug() << "DataBase::updateTheEntityTableISONames" << endl;
QSqlQuery query; QSqlQuery query;
QString sq; QString sq;
bool sqlOK; bool sqlOK;

View File

@ -1389,6 +1389,7 @@ bool DataProxy_SQLite::deleteQSO(const int _qsoId)
int DataProxy_SQLite::isWorkedB4(const QString _qrz, const int _currentLog) int DataProxy_SQLite::isWorkedB4(const QString _qrz, const int _currentLog)
{ {
//qDebug() << "DataProxy_SQLite::isWorkedB4" << endl; //qDebug() << "DataProxy_SQLite::isWorkedB4" << endl;
//Returns the QSO id
QSqlQuery query; QSqlQuery query;
QString queryString; QString queryString;
if (_currentLog < 0) if (_currentLog < 0)
@ -2853,7 +2854,7 @@ QStringList DataProxy_SQLite::getEntitiesNames()
* The following code was showing in the Entities prefixes and entities like Sicily, African Italy... and they are not officially an entity in the DXCC * The following code was showing in the Entities prefixes and entities like Sicily, African Italy... and they are not officially an entity in the DXCC
QStringList DataProxy_SQLite::getEntitiesNames() QStringList DataProxy_SQLite::getEntitiesNames()
{ {
qDebug() << "DataProxy_SQLite::getEntitiesNames" << endl; //qDebug() << "DataProxy_SQLite::getEntitiesNames" << endl;
QString aux = QString(); QString aux = QString();
QStringList qs; QStringList qs;
qs.clear(); qs.clear();
@ -2868,14 +2869,14 @@ QStringList DataProxy_SQLite::getEntitiesNames()
if (query.isValid()) if (query.isValid())
{ {
dxcc = query.value(2).toInt(); dxcc = query.value(2).toInt();
qDebug() << "DataProxy_SQLite::getEntitiesNames - DXCC: " << QString::number(dxcc) << endl; //qDebug() << "DataProxy_SQLite::getEntitiesNames - DXCC: " << QString::number(dxcc) << endl;
if (dxcc > 1000) if (dxcc > 1000)
{ {
qDebug() << "DataProxy_SQLite::getEntitiesNames - DXCC>1000 going in details: " << endl; //qDebug() << "DataProxy_SQLite::getEntitiesNames - DXCC>1000 going in details: " << endl;
aux2 = QString::number(dxcc); aux2 = QString::number(dxcc);
aux2 = aux2.right(3); aux2 = aux2.right(3);
qDebug() << "DataProxy_SQLite::getEntitiesNames - aux2: " << aux2 << endl; //qDebug() << "DataProxy_SQLite::getEntitiesNames - aux2: " << aux2 << endl;
stringQuery = QString("SELECT mainprefix, name FROM entity WHERE dxcc ='%1'").arg(aux2); stringQuery = QString("SELECT mainprefix, name FROM entity WHERE dxcc ='%1'").arg(aux2);
if (query2.exec(stringQuery)) if (query2.exec(stringQuery))
@ -2901,13 +2902,13 @@ QStringList DataProxy_SQLite::getEntitiesNames()
} }
else else
{ {
qDebug() << "DataProxy_SQLite::getEntitiesNames - DXCC<1000 quick! " << endl; //qDebug() << "DataProxy_SQLite::getEntitiesNames - DXCC<1000 quick! " << endl;
aux.clear(); aux.clear();
aux = (query.value(0)).toString() + "-" + (query.value(1)).toString()+" ("+QString::number(dxcc)+")"; aux = (query.value(0)).toString() + "-" + (query.value(1)).toString()+" ("+QString::number(dxcc)+")";
} }
qDebug() << "DataProxy_SQLite::getEntitiesNames - AUX: " << aux << endl; //qDebug() << "DataProxy_SQLite::getEntitiesNames - AUX: " << aux << endl;
//result = result + ", " + (query.value(0)).toString(); //result = result + ", " + (query.value(0)).toString();
qs << aux; qs << aux;
} }
@ -2951,7 +2952,7 @@ int DataProxy_SQLite::getHowManyEntities()
bool DataProxy_SQLite::updateISONames() bool DataProxy_SQLite::updateISONames()
{ {
qDebug() << "DataProxy_SQLite::updateISONames" << endl; //qDebug() << "DataProxy_SQLite::updateISONames" << endl;
bool result; bool result;
result = db->updateTheEntityTableISONames(); result = db->updateTheEntityTableISONames();

View File

@ -364,6 +364,10 @@ void DXCCStatusWidget::slotRefreshButtonClicked()
//update(); //update();
} }
void DXCCStatusWidget::refresh()
{
slotRefreshButtonClicked();
}
void DXCCStatusWidget::setCurrentLog(const int _logN) void DXCCStatusWidget::setCurrentLog(const int _logN)
{ {

View File

@ -23,6 +23,7 @@ public:
void update(); void update();
void setBands(const QStringList _ent, const bool _creating = false); // Receives the list of bandIDs void setBands(const QStringList _ent, const bool _creating = false); // Receives the list of bandIDs
void setCurrentLog(const int _logN); void setCurrentLog(const int _logN);
void refresh();
signals: signals:

View File

@ -28,9 +28,10 @@ email : jaime@robles.es
DXClusterWidget::DXClusterWidget(QWidget *parent) DXClusterWidget::DXClusterWidget(QWidget *parent)
: QWidget(parent) : QWidget(parent)
{ {
qDebug() << "DXClusterWidget::DXClusterWidget" << endl; //qDebug() << "DXClusterWidget::DXClusterWidget" << endl;
awards = new Awards(); awards = new Awards();
dataProxy = new DataProxy(); dataProxy = new DataProxy();
initClass(); initClass();
//TESTADDSPOT(); //TESTADDSPOT();
} }
@ -48,10 +49,18 @@ void DXClusterWidget::initClass()
showann = true; showann = true;
showwwv = true; showwwv = true;
showwcy = true; showwcy = true;
myQrz = QString();
currentLog = 0; currentLog = 0;
} }
void DXClusterWidget::setMyQRZ(const QString _qrz)
{
if (_qrz.length()>2)
{
myQrz = _qrz;
}
}
DXClusterWidget::DXClusterWidget(const QString &clusterToConnect, const int portToConnect, QWidget *parent) DXClusterWidget::DXClusterWidget(const QString &clusterToConnect, const int portToConnect, QWidget *parent)
: QWidget(parent) : QWidget(parent)
{ {
@ -129,7 +138,7 @@ DXClusterWidget::~DXClusterWidget()
void DXClusterWidget::slotClusterDXClusterWidgetItemDoubleClicked( QListWidgetItem * item ) void DXClusterWidget::slotClusterDXClusterWidgetItemDoubleClicked( QListWidgetItem * item )
{ {
qDebug() << "DXClusterWidget::slotClusterDXClusterWidgetItemDoubleClicked: " << item->text() << endl; //qDebug() << "DXClusterWidget::slotClusterDXClusterWidgetItemDoubleClicked: " << item->text() << endl;
QStringList ql; QStringList ql;
ql.clear(); ql.clear();
@ -137,21 +146,21 @@ void DXClusterWidget::slotClusterDXClusterWidgetItemDoubleClicked( QListWidgetIt
if (item) if (item)
{ {
ql = readItem(item); ql = readItem(item);
qDebug() << "DXClusterWidget::slotClusterDXClusterWidgetItemDoubleClicked: Length: " << QString::number(ql.length()) << endl; //qDebug() << "DXClusterWidget::slotClusterDXClusterWidgetItemDoubleClicked: Length: " << QString::number(ql.length()) << endl;
if (ql.length()==2) if (ql.length()==2)
{ {
ql << "double"; ql << "double";
qDebug() << "DXClusterWidget::slotClusterDXClusterWidgetItemDoubleClicked: EMMITED" << endl; //qDebug() << "DXClusterWidget::slotClusterDXClusterWidgetItemDoubleClicked: EMMITED" << endl;
emit dxspotclicked(ql); emit dxspotclicked(ql);
} }
else else
{ {
qDebug() << "DXClusterWidget::slotClusterDXClusterWidgetItemDoubleClicked: NOT EMMITED-1" << endl; //qDebug() << "DXClusterWidget::slotClusterDXClusterWidgetItemDoubleClicked: NOT EMMITED-1" << endl;
} }
} }
else else
{ {
qDebug() << "DXClusterWidget::slotClusterDXClusterWidgetItemDoubleClicked: NOT EMMITED-2 (no item)" << endl; //qDebug() << "DXClusterWidget::slotClusterDXClusterWidgetItemDoubleClicked: NOT EMMITED-2 (no item)" << endl;
} }
} }
@ -451,7 +460,17 @@ void DXClusterWidget::slotClusterSocketConnected()
if (( dxClusterConnected ) && (!dxClusterAlreadyConnected) ){ if (( dxClusterConnected ) && (!dxClusterAlreadyConnected) ){
bool ok; bool ok;
QString callsignText = QInputDialog::getText(this, tr("KLog message"), tr("Enter your callsign to connect to the cluster:"), QLineEdit::Normal, "", &ok); QString callsignText;
if (myQrz.length()>2)
{
callsignText = QInputDialog::getText(this, tr("KLog message"), tr("Enter your callsign to connect to the cluster:"), QLineEdit::Normal, myQrz, &ok);
}
else
{
callsignText = QInputDialog::getText(this, tr("KLog message"), tr("Enter your callsign to connect to the cluster:"), QLineEdit::Normal, "", &ok);
}
//QString callsignText = QInputDialog::getText(this, tr("KLog message"), tr("Enter your callsign to connect to the cluster:"), QLineEdit::Normal, "", &ok);
QString passwordText = QInputDialog::getText(this, tr("KLog message"), tr("Enter your password to connect to the cluster:\n(Just hit enter for no password)"), QLineEdit::Normal, "", &ok); QString passwordText = QInputDialog::getText(this, tr("KLog message"), tr("Enter your password to connect to the cluster:\n(Just hit enter for no password)"), QLineEdit::Normal, "", &ok);
QTextStream os(tcpSocket); QTextStream os(tcpSocket);
if ( callsignText.length() > 2 && ok ) { if ( callsignText.length() > 2 && ok ) {
@ -627,7 +646,7 @@ bool DXClusterWidget::isConnected()
QStringList DXClusterWidget::readItem(QListWidgetItem * item) QStringList DXClusterWidget::readItem(QListWidgetItem * item)
{ {
qDebug() << "DXClusterWidget::readItem" << endl; //qDebug() << "DXClusterWidget::readItem" << endl;
QStringList fields; QStringList fields;
QString dxClusterString; QString dxClusterString;
@ -711,7 +730,7 @@ void DXClusterWidget::setDXClusterServer(const QString &clusterToConnect, const
/* /*
void DXClusterWidget::TESTADDSPOT() void DXClusterWidget::TESTADDSPOT()
{ {
qDebug() << "DXClusterWidget::TESTADDSPOT " << endl; //qDebug() << "DXClusterWidget::TESTADDSPOT " << endl;
; // Just a test spot ; // Just a test spot
QListWidgetItem *item = new QListWidgetItem(); QListWidgetItem *item = new QListWidgetItem();
item->setForeground(QBrush(dxSpotColor)); item->setForeground(QBrush(dxSpotColor));

View File

@ -54,6 +54,7 @@ class DXClusterWidget : public QWidget
void setDXClusterServer(const QString &clusterToConnect, const int portToConnect); void setDXClusterServer(const QString &clusterToConnect, const int portToConnect);
void setCurrentLog(const int _log); void setCurrentLog(const int _log);
bool isConnected(); bool isConnected();
void setMyQRZ(const QString _qrz);
//void sendSpotToCluster(const QString _dx, const QString _freq); //void sendSpotToCluster(const QString _dx, const QString _freq);
@ -107,7 +108,7 @@ private:
bool showhf, showvhf, showwarc, showworked, showconfirmed, showann, showwwv, showwcy; bool showhf, showvhf, showwarc, showworked, showconfirmed, showann, showwwv, showwcy;
bool dxClusterShowHF, dxClusterShowVHF, dxClusterShowWARC, dxClusterShowWorked, dxClusterShowConfirmed, dxClusterShowAnn, dxClusterShowWWV, dxClusterShowWCY; bool dxClusterShowHF, dxClusterShowVHF, dxClusterShowWARC, dxClusterShowWorked, dxClusterShowConfirmed, dxClusterShowAnn, dxClusterShowWWV, dxClusterShowWCY;
QString myQrz;
int currentLog; int currentLog;
}; };

View File

@ -153,7 +153,7 @@ bool FileManager::checkADIFValidFormat(const QStringList _qs)
bool FileManager::adifLogExport(const QString& _fileName, const int _logN) bool FileManager::adifLogExport(const QString& _fileName, const int _logN)
{ {
qDebug() << "FileManager::adifLogExport" << endl; //qDebug() << "FileManager::adifLogExport" << endl;
return adifLogExportToFile(_fileName, _logN, false, false); return adifLogExportToFile(_fileName, _logN, false, false);
@ -163,7 +163,7 @@ bool FileManager::adifLogExport(const QString& _fileName, const int _logN)
bool FileManager::adifLogExportToFile(const QString& _fileName, const int _logN, bool justMarked, bool _qslRequested ) bool FileManager::adifLogExportToFile(const QString& _fileName, const int _logN, bool justMarked, bool _qslRequested )
{ {
// If _logN = 0, then we will export ALL the logs. // If _logN = 0, then we will export ALL the logs.
qDebug() << "FileManager::adifLogExportToFile: " << _fileName << endl; //qDebug() << "FileManager::adifLogExportToFile: " << _fileName << endl;
bool exportJustMarkedQSO = justMarked; bool exportJustMarkedQSO = justMarked;
bool marked = false; bool marked = false;
@ -393,8 +393,8 @@ bool FileManager::adifLogExportToFile(const QString& _fileName, const int _logN,
aux2 = dataProxy->getSubModeFromId(aux1.toInt()); aux2 = dataProxy->getSubModeFromId(aux1.toInt());
aux1 = db->getModeNameFromID2(aux1.toInt()); aux1 = db->getModeNameFromID2(aux1.toInt());
qDebug() << "FileManager::adifLogExportToFile - MODE aux2: " << aux2 << endl; //qDebug() << "FileManager::adifLogExportToFile - MODE aux2: " << aux2 << endl;
qDebug() << "FileManager::adifLogExportToFile - MODE aux1: " << aux1 << endl; //qDebug() << "FileManager::adifLogExportToFile - MODE aux1: " << aux1 << endl;
if (aux1.length()>1) if (aux1.length()>1)
{ {
@ -446,15 +446,15 @@ bool FileManager::adifLogExportToFile(const QString& _fileName, const int _logN,
out << "<ITUZ:" << QString::number(aux1.length()) << ">" << aux1 << " "; out << "<ITUZ:" << QString::number(aux1.length()) << ">" << aux1 << " ";
} }
qDebug() << "FileManager::adifLogExportToFile: DXCC - Now..." << endl; //qDebug() << "FileManager::adifLogExportToFile: DXCC - Now..." << endl;
nameCol = rec.indexOf("dxcc"); nameCol = rec.indexOf("dxcc");
aux1 = (query.value(nameCol)).toString(); aux1 = util->checkAndFixASCIIinADIF(aux1); aux1 = (query.value(nameCol)).toString(); aux1 = util->checkAndFixASCIIinADIF(aux1);
if ((aux1.length())>0){ if ((aux1.length())>0){
out << "<DXCC:" << QString::number(aux1.length()) << ">" << aux1 << " "; out << "<DXCC:" << QString::number(aux1.length()) << ">" << aux1 << " ";
qDebug() << "FileManager::adifLogExportToFile: DXCC " << aux1 << endl; //qDebug() << "FileManager::adifLogExportToFile: DXCC " << aux1 << endl;
} }
qDebug() << "FileManager::adifLogExportToFile: DXCC - Exported!" << endl; //qDebug() << "FileManager::adifLogExportToFile: DXCC - Exported!" << endl;
nameCol = rec.indexOf("address"); nameCol = rec.indexOf("address");
aux1 = (query.value(nameCol)).toString(); aux1 = util->checkAndFixASCIIinADIF(aux1); aux1 = (query.value(nameCol)).toString(); aux1 = util->checkAndFixASCIIinADIF(aux1);
@ -1110,12 +1110,12 @@ bool FileManager::adifLogExportToFile(const QString& _fileName, const int _logN,
nameCol = rec.indexOf("bandid"); nameCol = rec.indexOf("bandid");
aux1 = (query.value(nameCol)).toString(); aux1 = util->checkAndFixASCIIinADIF(aux1); aux1 = (query.value(nameCol)).toString(); aux1 = util->checkAndFixASCIIinADIF(aux1);
qDebug() << "FileManager::adifLogExportToFile - BAND2 aux1-1: " << aux1 << endl; //qDebug() << "FileManager::adifLogExportToFile - BAND2 aux1-1: " << aux1 << endl;
//aux1 = db->getBandNameFromID2(aux1.toInt()); //aux1 = db->getBandNameFromID2(aux1.toInt());
aux1 = dataProxy->getNameFromBandId(aux1.toInt()); aux1 = dataProxy->getNameFromBandId(aux1.toInt());
qDebug() << "FileManager::adifLogExportToFile - BAND2 aux1-2: " << aux1 << endl; //qDebug() << "FileManager::adifLogExportToFile - BAND2 aux1-2: " << aux1 << endl;
@ -1210,16 +1210,16 @@ bool FileManager::adifLogExportToFile(const QString& _fileName, const int _logN,
out << "<ITUZ:" << QString::number(aux1.length()) << ">" << aux1 << " "; out << "<ITUZ:" << QString::number(aux1.length()) << ">" << aux1 << " ";
} }
qDebug() << "FileManager::adifLogExportToFile - DXCC to be exported: " << endl; //qDebug() << "FileManager::adifLogExportToFile - DXCC to be exported: " << endl;
nameCol = rec.indexOf("dxcc"); nameCol = rec.indexOf("dxcc");
aux1 = (query.value(nameCol)).toString(); aux1 = util->checkAndFixASCIIinADIF(aux1); aux1 = (query.value(nameCol)).toString(); aux1 = util->checkAndFixASCIIinADIF(aux1);
qDebug() << "FileManager::adifLogExportToFile - DXCC: " << aux1 << endl; //qDebug() << "FileManager::adifLogExportToFile - DXCC: " << aux1 << endl;
//if ((aux1.length())>0){ //if ((aux1.length())>0){
if ( ((aux1.length())>0) && (0 < aux1.toInt()) && (aux1.toInt() < DXCCEntities + 5) ){ if ( ((aux1.length())>0) && (0 < aux1.toInt()) && (aux1.toInt() < DXCCEntities + 5) ){
out << "<DXCC:" << QString::number(aux1.length()) << ">" << aux1 << " "; out << "<DXCC:" << QString::number(aux1.length()) << ">" << aux1 << " ";
qDebug() << "FileManager::adifLogExportToFile - DXCC in the if" << endl; //qDebug() << "FileManager::adifLogExportToFile - DXCC in the if" << endl;
} }
qDebug() << "FileManager::adifLogExportToFile - DXCC alreadyexported: " << endl; //qDebug() << "FileManager::adifLogExportToFile - DXCC alreadyexported: " << endl;
nameCol = rec.indexOf("address"); nameCol = rec.indexOf("address");
aux1 = (query.value(nameCol)).toString(); aux1 = util->checkAndFixASCIIinADIF(aux1); aux1 = (query.value(nameCol)).toString(); aux1 = util->checkAndFixASCIIinADIF(aux1);

View File

@ -131,7 +131,12 @@ RCC_DIR = build/rcc/
# Tell Qt Linguist that we use UTF-8 strings in our sources # Tell Qt Linguist that we use UTF-8 strings in our sources
CODECFORTR = UTF-8 CODECFORTR = UTF-8
CODECFORSRC = UTF-8 CODECFORSRC = UTF-8
include(translations/translations.pri) #include(translations/translations.pri)
TRANSLATIONS = translations/klog_es.ts \
translations/klog_ca.ts \
translations/klog_hr.ts \
translations/klog_it.ts \
translations/klog_ja.ts
# deploy # deploy
DISTFILES += CHANGES COPYING DISTFILES += CHANGES COPYING

View File

@ -56,44 +56,44 @@ int main(int argc, char *argv[])
qDebug() << "Usage: klog [OPTION]... [FILE]..." ; //qDebug() << "Usage: klog [OPTION]... [FILE]..." ;
qDebug() << "Options:" ; //qDebug() << "Options:" ;
qDebug() << " -? Display this help"; //qDebug() << " -? Display this help";
qDebug() << " -h Display this help"; //qDebug() << " -h Display this help";
qDebug() << " -v Display program version"; //qDebug() << " -v Display program version";
//qDebug() << " -e <file> Export Adif file <file>"; //qDebug() << " -e <file> Export Adif file <file>";
} }
else if (arguments.contains("-?")) else if (arguments.contains("-?"))
{ {
qDebug() << "Usage: klog [OPTION]... [FILE]..." ; //qDebug() << "Usage: klog [OPTION]... [FILE]..." ;
qDebug() << "Options:"; //qDebug() << "Options:";
qDebug() << " -? Display this help"; //qDebug() << " -? Display this help";
qDebug() << " -h Display this help"; //qDebug() << " -h Display this help";
qDebug() << " -v Display program version"; //qDebug() << " -v Display program version";
//qDebug() << " -e <file> Export Adif file <file>"; //qDebug() << " -e <file> Export Adif file <file>";
} }
/* /*
else if (arguments.contains("-e")) else if (arguments.contains("-e"))
{ {
qDebug() << "KLog::main: EXPORT ADIF"; //qDebug() << "KLog::main: EXPORT ADIF";
} }
else if (arguments.contains("-u")) else if (arguments.contains("-u"))
{ {
qDebug() << "KLog::main: UPDATE CTY"; //qDebug() << "KLog::main: UPDATE CTY";
} }
*/ */
else if (arguments.contains("-v")) else if (arguments.contains("-v"))
{ {
qDebug() << "Version: KLog-" << app.applicationVersion(); //qDebug() << "Version: KLog-" << app.applicationVersion();
} }
else else
{ {
qDebug() << "Usage: klog [OPTION]... [FILE]..." ; //qDebug() << "Usage: klog [OPTION]... [FILE]..." ;
qDebug() << "Options:"; //qDebug() << "Options:";
qDebug() << " -? Display this help"; //qDebug() << " -? Display this help";
qDebug() << " -h Display this help"; //qDebug() << " -h Display this help";
qDebug() << " -v Display program version"; //qDebug() << " -v Display program version";
qDebug() << " -e <file> Export Adif file <file>"; //qDebug() << " -e <file> Export Adif file <file>";
} }
app.quit(); app.quit();
@ -103,7 +103,7 @@ int main(int argc, char *argv[])
//for (int i=0; i<(app.arguments().length()); i++) //for (int i=0; i<(app.arguments().length()); i++)
//{ //{
// qDebug() << "KLog::main: Arguments: " << arguments.at(i) << endl; // //qDebug() << "KLog::main: Arguments: " << arguments.at(i) << endl;
//} //}
@ -240,7 +240,7 @@ int main(int argc, char *argv[])
//if (!QDir::setCurrent (kontestDir) ) //if (!QDir::setCurrent (kontestDir) )
if (!QDir::setCurrent (kontestDir) ) if (!QDir::setCurrent (kontestDir) )
{ {
qDebug() << "MAIN: KLogDir does not exist.... creating " << endl; //qDebug() << "MAIN: KLogDir does not exist.... creating " << endl;
//QDir d1(kontestDir); //QDir d1(kontestDir);
//d1.setCurrent() //d1.setCurrent()
if (d1.mkdir(kontestDir)) if (d1.mkdir(kontestDir))
@ -268,7 +268,7 @@ int main(int argc, char *argv[])
if(!QFile::exists(configFileName)) if(!QFile::exists(configFileName))
{ {
qDebug() << "MAIN: Starting wizard... " << endl; //qDebug() << "MAIN: Starting wizard... " << endl;
StartWizard *wizard = new StartWizard(kontestDir, version); StartWizard *wizard = new StartWizard(kontestDir, version);
wizard->setModal(true); wizard->setModal(true);
@ -344,7 +344,7 @@ int main(int argc, char *argv[])
return app.exec(); return app.exec();
//qDebug() << "KLog Main-103" << endl; //qDebug() << "KLog Main-103" << endl;
} }
qDebug() << "KLog Main-END" << endl; //qDebug() << "KLog Main-END" << endl;
//return app.exec(); //return app.exec();
} }

View File

@ -655,7 +655,7 @@ void MainWindow::slotModeComboBoxChanged()
//currentBandShown = bandComboBox->currentIndex(); //currentBandShown = bandComboBox->currentIndex();
//currentModeShown = modeComboBox->currentIndex(); //currentModeShown = modeComboBox->currentIndex();
i = checkIfWorkedB4(currentQrz); checkIfWorkedB4(currentQrz);
QStringList _qs; //for the showStatusOfDXCC(const QStringList _qs) QStringList _qs; //for the showStatusOfDXCC(const QStringList _qs)
_qs.clear(); _qs.clear();
@ -696,7 +696,7 @@ void MainWindow::slotBandComboBoxChanged(){
//currentModeShown = modeComboBox->currentIndex(); //currentModeShown = modeComboBox->currentIndex();
i = checkIfWorkedB4(currentQrz); checkIfWorkedB4(currentQrz);
QStringList _qs; //for the showStatusOfDXCC(const QStringList _qs) QStringList _qs; //for the showStatusOfDXCC(const QStringList _qs)
_qs.clear(); _qs.clear();
@ -720,7 +720,7 @@ void MainWindow::slotQRZReturnPressed()
int lastId = -1; int lastId = -1;
int errorCode = 0; int errorCode = 0;
QString aux; QString aux;
int _x; //for clublog management //int _x; //for clublog management
//bool ret = false; //bool ret = false;
QString tqrz = qrzLineEdit->text(); QString tqrz = qrzLineEdit->text();
@ -798,9 +798,9 @@ void MainWindow::slotQRZReturnPressed()
{ {
//qDebug() << "MainWindow::slotQRZReturnPressed: (Modifiying ClubLog) Lastid: "<< QString::number(lastId) << endl; //qDebug() << "MainWindow::slotQRZReturnPressed: (Modifiying ClubLog) Lastid: "<< QString::number(lastId) << endl;
// Delete QSO in CLubLog // Delete QSO in CLubLog
_x = elogClublog->deleteQSO(clublogPrevQSO); elogClublog->deleteQSO(clublogPrevQSO);
// Add modified QSO in ClubLog // Add modified QSO in ClubLog
_x = elogClublog->sendQSO(dataProxy->getClubLogRealTimeFromId(modifyingQSO)); elogClublog->sendQSO(dataProxy->getClubLogRealTimeFromId(modifyingQSO));
} }
else else
@ -845,7 +845,7 @@ void MainWindow::slotQRZReturnPressed()
if ((clublogActive) & (clublogRealTime)) if ((clublogActive) & (clublogRealTime))
{ {
//qDebug() << "MainWindow::slotQRZReturnPressed: (Sending ClubLog) Lastid: "<< QString::number(lastId) << endl; //qDebug() << "MainWindow::slotQRZReturnPressed: (Sending ClubLog) Lastid: "<< QString::number(lastId) << endl;
_x = elogClublog->sendQSO(dataProxy->getClubLogRealTimeFromId(lastId)); elogClublog->sendQSO(dataProxy->getClubLogRealTimeFromId(lastId));
} }
else else
@ -858,6 +858,7 @@ void MainWindow::slotQRZReturnPressed()
logModel->select(); logModel->select();
dxccStatusWidget->refresh();
slotClearButtonClicked(); slotClearButtonClicked();
} }
@ -914,7 +915,7 @@ QString MainWindow::readDataFromUIDX()
/* /*
If you make any change here, please update also readDataFromUIDXModifying to keep data integrity! If you make any change here, please update also readDataFromUIDXModifying to keep data integrity!
*/ */
qDebug() << "MainWindow::readDataFromUIDX:" << endl; //qDebug() << "MainWindow::readDataFromUIDX:" << endl;
QString tqrz = (qrzLineEdit->text()).toUpper(); QString tqrz = (qrzLineEdit->text()).toUpper();
if (tqrz.length()<3) if (tqrz.length()<3)
@ -937,8 +938,8 @@ If you make any change here, please update also readDataFromUIDXModifying to kee
int dxcc = world->getQRZARRLId(tqrz); int dxcc = world->getQRZARRLId(tqrz);
//int dxcc2 = getDXCCFromComboBox(); //int dxcc2 = getDXCCFromComboBox();
int dxcc2 = world->getQRZARRLId(othersTabWidget->getEntityPrefix()); int dxcc2 = world->getQRZARRLId(othersTabWidget->getEntityPrefix());
qDebug() << "MainWindow::readDataFromUIDX - DXCC: " << QString::number(dxcc) << endl; //qDebug() << "MainWindow::readDataFromUIDX - DXCC: " << QString::number(dxcc) << endl;
qDebug() << "MainWindow::readDataFromUIDX - DXCC2: " << QString::number(dxcc2) << endl; //qDebug() << "MainWindow::readDataFromUIDX - DXCC2: " << QString::number(dxcc2) << endl;
dxcc = util->getNormalizedDXCCValue(dxcc); dxcc = util->getNormalizedDXCCValue(dxcc);
dxcc2 = util->getNormalizedDXCCValue(dxcc2); dxcc2 = util->getNormalizedDXCCValue(dxcc2);
@ -1686,8 +1687,8 @@ WHERE [condition];
//int dxcc2 = getDXCCFromComboBox(); //int dxcc2 = getDXCCFromComboBox();
int dxcc2 = world->getQRZARRLId(othersTabWidget->getEntityPrefix()); int dxcc2 = world->getQRZARRLId(othersTabWidget->getEntityPrefix());
qDebug() << "MainWindow::readDataFromUIDXModifying - DXCC: " << QString::number(dxcc) << endl; //qDebug() << "MainWindow::readDataFromUIDXModifying - DXCC: " << QString::number(dxcc) << endl;
qDebug() << "MainWindow::readDataFromUIDXModifying- DXCC2: " << QString::number(dxcc2) << endl; //qDebug() << "MainWindow::readDataFromUIDXModifying- DXCC2: " << QString::number(dxcc2) << endl;
dxcc = util->getNormalizedDXCCValue(dxcc); dxcc = util->getNormalizedDXCCValue(dxcc);
dxcc2 = util->getNormalizedDXCCValue(dxcc2); dxcc2 = util->getNormalizedDXCCValue(dxcc2);
@ -3001,7 +3002,7 @@ void MainWindow::slotQRZTextChanged()
} }
qrzSmallModDontCalculate = true; // A kind of flag to prevent multiple calls to this method. qrzSmallModDontCalculate = true; // A kind of flag to prevent multiple calls to this method.
int i; //int i;
int dx_CQz = -1; int dx_CQz = -1;
int dxE_CQz = -1; int dxE_CQz = -1;
int dx_ITUz = -1; int dx_ITUz = -1;
@ -3033,6 +3034,7 @@ void MainWindow::slotQRZTextChanged()
currentQrz = qrzLineEdit->text(); currentQrz = qrzLineEdit->text();
currentEntity = world->getQRZARRLId(currentQrz); currentEntity = world->getQRZARRLId(currentQrz);
//selectCorrectComboBoxEntity(currentEntity); //selectCorrectComboBoxEntity(currentEntity);
//qDebug() << "MainWindow::slotQRZTextChanged: " << QString::number(currentEntity) << endl;
othersTabWidget->setEntity(currentEntity); othersTabWidget->setEntity(currentEntity);
@ -3093,7 +3095,7 @@ void MainWindow::slotQRZTextChanged()
{ {
updateStatusBar(tr("Ready...")); updateStatusBar(tr("Ready..."));
} }
i = checkIfWorkedB4(currentQrz); checkIfWorkedB4(currentQrz); // Has the QSO id if worked before
checkContest(); checkContest();
break; break;
case CQ_WW_CW: case CQ_WW_CW:
@ -4909,6 +4911,7 @@ void MainWindow::slotQsoDeleteFromLog()
//qDebug() << "MainWindow::slotQsoDeleteFromLog (id):-3 " << endl; //qDebug() << "MainWindow::slotQsoDeleteFromLog (id):-3 " << endl;
slotSearchBoxTextChanged(); slotSearchBoxTextChanged();
awards->recalculateAwards(); awards->recalculateAwards();
dxccStatusWidget->refresh();
showAwards(); showAwards();
break; break;
case QMessageBox::No: case QMessageBox::No:
@ -4926,7 +4929,7 @@ void MainWindow::slotQsoDeleteFromSearch()
//qDebug() << "MainWindow::slotQsoDeleteFromSearch: " << QString::number((logModel->index((delQSOFromSearchAct->data(6)).toInt(), 0)).data(0).toInt()) << endl; //qDebug() << "MainWindow::slotQsoDeleteFromSearch: " << QString::number((logModel->index((delQSOFromSearchAct->data(6)).toInt(), 0)).data(0).toInt()) << endl;
int QSOid = (delQSOFromSearchAct->data()).toInt(); int QSOid = (delQSOFromSearchAct->data()).toInt();
int x = -1; //int x = -1;
QString _qrz = dataProxy->getCallFromId(QSOid); QString _qrz = dataProxy->getCallFromId(QSOid);
if (_qrz.length()>=3) if (_qrz.length()>=3)
@ -4945,7 +4948,7 @@ void MainWindow::slotQsoDeleteFromSearch()
switch (ret) switch (ret)
{ {
case QMessageBox::Yes: case QMessageBox::Yes:
x = elogClublog->deleteQSO(dataProxy->getClubLogRealTimeFromId(QSOid)); elogClublog->deleteQSO(dataProxy->getClubLogRealTimeFromId(QSOid));
if(dataProxy->deleteQSO(QSOid)) if(dataProxy->deleteQSO(QSOid))
{ {
@ -4959,6 +4962,7 @@ void MainWindow::slotQsoDeleteFromSearch()
{ {
slotSearchBoxTextChanged(); slotSearchBoxTextChanged();
} }
dxccStatusWidget->refresh();
awards->recalculateAwards(); awards->recalculateAwards();
showAwards(); showAwards();
@ -5015,11 +5019,11 @@ void MainWindow::keyPressEvent(QKeyEvent *event){
} }
} }
int MainWindow::checkIfWorkedB4(const QString _qrz) void MainWindow::checkIfWorkedB4(const QString _qrz)
{ {
//qDebug() << "MainWindow::checkIfWorkedB4: " << _qrz << endl; //qDebug() << "MainWindow::checkIfWorkedB4: " << _qrz << endl;
int i = dataProxy->isWorkedB4(_qrz, currentLog); int i = dataProxy->isWorkedB4(_qrz, currentLog); // Gets the QSO id if worked before
switch (contestMode) { switch (contestMode) {
@ -5044,12 +5048,16 @@ int MainWindow::checkIfWorkedB4(const QString _qrz)
} }
break; break;
default: default:
//if (i>=0)
//{
//TODO: Change colors?
//}
break; break;
} }
return i; //return i;
} }
@ -5120,6 +5128,7 @@ void MainWindow::readConfigData()
awards->setColors (newOneColor.name(), neededColor.name(), workedColor.name(), confirmedColor.name(), defaultColor.name()); awards->setColors (newOneColor.name(), neededColor.name(), workedColor.name(), confirmedColor.name(), defaultColor.name());
dxClusterWidget->setColors (newOneColor.name(), neededColor.name(), workedColor.name(), confirmedColor.name(), defaultColor.name()); dxClusterWidget->setColors (newOneColor.name(), neededColor.name(), workedColor.name(), confirmedColor.name(), defaultColor.name());
dxClusterWidget->setDXClusterSpotConfig(dxClusterShowHF, dxClusterShowVHF, dxClusterShowWARC, dxClusterShowWorked, dxClusterShowConfirmed, dxClusterShowAnn, dxClusterShowWWV, dxClusterShowWCY ); dxClusterWidget->setDXClusterSpotConfig(dxClusterShowHF, dxClusterShowVHF, dxClusterShowWARC, dxClusterShowWorked, dxClusterShowConfirmed, dxClusterShowAnn, dxClusterShowWWV, dxClusterShowWCY );
dxClusterWidget->setMyQRZ(stationQRZ);
initialContestModeConfiguration(); initialContestModeConfiguration();
@ -5832,7 +5841,7 @@ void MainWindow::createUIDX()
//QWidget *othersInputTabWidget = new QWidget; //QWidget *othersInputTabWidget = new QWidget;
//QWidget *myDataInputTabWidget = new QWidget; //QWidget *myDataInputTabWidget = new QWidget;
int i = dxUpLeftTab->addTab(qsoInputTabWidget, tr("QSO")); dxUpLeftTab->addTab(qsoInputTabWidget, tr("QSO"));
// QSL Tab definition starts here // QSL Tab definition starts here
@ -5876,7 +5885,7 @@ void MainWindow::createUIDX()
qslInputTabWidget->setLayout(QSLLayout); qslInputTabWidget->setLayout(QSLLayout);
i = dxUpLeftTab->addTab(qslInputTabWidget, tr("QSL")); dxUpLeftTab->addTab(qslInputTabWidget, tr("QSL"));
// eQSL Tab definition starts here // eQSL Tab definition starts here
@ -5938,7 +5947,7 @@ void MainWindow::createUIDX()
eqslInputTabWidget->setLayout(eqslInputTabWidgetLayout); eqslInputTabWidget->setLayout(eqslInputTabWidgetLayout);
i = dxUpLeftTab->addTab(eqslInputTabWidget, tr("eQSL")); dxUpLeftTab->addTab(eqslInputTabWidget, tr("eQSL"));
/* /*
// NOTES tab starts here // NOTES tab starts here
QGridLayout *notesInputTabWidgetLayout = new QGridLayout; QGridLayout *notesInputTabWidgetLayout = new QGridLayout;
@ -5948,7 +5957,7 @@ void MainWindow::createUIDX()
*/ */
// COMMENT tab starts here // COMMENT tab starts here
i = dxUpLeftTab->addTab(commentTabWidget, tr("Comment")); dxUpLeftTab->addTab(commentTabWidget, tr("Comment"));
//QGridLayout *commentInputTabWidgetLayout = new QGridLayout; //QGridLayout *commentInputTabWidgetLayout = new QGridLayout;
//commentInputTabWidgetLayout->addWidget(commentLineEdit, 0, 0); //commentInputTabWidgetLayout->addWidget(commentLineEdit, 0, 0);
@ -5980,7 +5989,7 @@ void MainWindow::createUIDX()
*/ */
//i = dxUpLeftTab->addTab(othersInputTabWidget, tr("Others")); //i = dxUpLeftTab->addTab(othersInputTabWidget, tr("Others"));
othersTabWidget->setEntitiesList(world->getEntitiesNames()); othersTabWidget->setEntitiesList(world->getEntitiesNames());
i = dxUpLeftTab->addTab(othersTabWidget, tr("Others")); dxUpLeftTab->addTab(othersTabWidget, tr("Others"));
@ -6014,11 +6023,11 @@ void MainWindow::createUIDX()
myDataInputTabWidget->setLayout(myDataInputTabWidgetLayout); myDataInputTabWidget->setLayout(myDataInputTabWidgetLayout);
i = dxUpLeftTab->addTab(myDataInputTabWidget, tr("My Data")); i = dxUpLeftTab->addTab(myDataInputTabWidget, tr("My Data"));
*/ */
i = dxUpLeftTab->addTab(myDataTabWidget, tr("My Data")); dxUpLeftTab->addTab(myDataTabWidget, tr("My Data"));
// MyData Tab finishes here // MyData Tab finishes here
// Sat Tab starts hre // Sat Tab starts hre
i = dxUpLeftTab->addTab(satTabWidget, tr("Satellite")); dxUpLeftTab->addTab(satTabWidget, tr("Satellite"));
// Sat Tab finishes here // Sat Tab finishes here
@ -6204,7 +6213,7 @@ int rowSpan, int columnSpan, Qt::Alignment alignment = 0 )
dxMarathonLabelN->setAlignment(Qt::AlignVCenter | Qt::AlignCenter); dxMarathonLabelN->setAlignment(Qt::AlignVCenter | Qt::AlignCenter);
QWidget *searchTabWidget = new QWidget; QWidget *searchTabWidget = new QWidget;
i = dxUpRightTab->addTab(infoTabWidget, tr("Info")); dxUpRightTab->addTab(infoTabWidget, tr("Info"));
QWidget *awardsTabWidget = new QWidget; QWidget *awardsTabWidget = new QWidget;
@ -6277,7 +6286,7 @@ int rowSpan, int columnSpan, Qt::Alignment alignment = 0 )
awardsTabWidget->setLayout(dxUpRightAwardsTabLayout); awardsTabWidget->setLayout(dxUpRightAwardsTabLayout);
i = dxUpRightTab->addTab(awardsTabWidget, tr("Awards")); dxUpRightTab->addTab(awardsTabWidget, tr("Awards"));
/* /*
searchgroupBox = new QGroupBox(tr("Search")); searchgroupBox = new QGroupBox(tr("Search"));
@ -6321,7 +6330,7 @@ int rowSpan, int columnSpan, Qt::Alignment alignment = 0 )
//searchTabWidget->setLayout(dxUpRightSearchALLLayout); //searchTabWidget->setLayout(dxUpRightSearchALLLayout);
i = dxUpRightTab->addTab(searchTabWidget, tr("Search")); dxUpRightTab->addTab(searchTabWidget, tr("Search"));
QWidget *logTabWidget = new QWidget; QWidget *logTabWidget = new QWidget;
QWidget *dxClusterTabWidget = new QWidget; QWidget *dxClusterTabWidget = new QWidget;
@ -6338,9 +6347,9 @@ int rowSpan, int columnSpan, Qt::Alignment alignment = 0 )
i = dxBottonTab->addTab(logTabWidget, tr("Log")); dxBottonTab->addTab(logTabWidget, tr("Log"));
i = dxBottonTab->addTab(dxClusterTabWidget, tr("DX-Cluster")); dxBottonTab->addTab(dxClusterTabWidget, tr("DX-Cluster"));
i = dxBottonTab->addTab(dxccStatusWidget, tr("DXCC")); dxBottonTab->addTab(dxccStatusWidget, tr("DXCC"));
QVBoxLayout *dxUpRightLayout = new QVBoxLayout; QVBoxLayout *dxUpRightLayout = new QVBoxLayout;
@ -6736,32 +6745,42 @@ void MainWindow::slotADIFImport(){
} }
else else
{ {
//qDebug() << "MainWindow::slotADIFImport -1" << endl;
filemanager->adifReadLog(fileName, currentLog); filemanager->adifReadLog(fileName, currentLog);
//qDebug() << "MainWindow::slotADIFImport -2" << endl;
logModel->select(); logModel->select();
//qDebug() << "MainWindow::slotADIFImport -3" << endl;
checkIfNewBandOrMode(); checkIfNewBandOrMode();
//qDebug() << "MainWindow::slotADIFImport -4" << endl;
switch (contestMode) { switch (contestMode) {
case CQ_WW_SSB: case CQ_WW_SSB:
break; break;
case CQ_WW_CW: case CQ_WW_CW:
break; break;
default: default:
operatingYearsComboBox->addItems(dataProxy->getOperatingYears(currentLog));
//bandComboBox->setCurrentIndex(bandComboBox->findText(aux1));
operatingYearsComboBox->addItems(dataProxy->getOperatingYears(currentLog));
//bandComboBox->setCurrentIndex(bandComboBox->findText(aux1));
//qDebug() << "MainWindow::slotADIFImport -31" << endl;
awards->recalculateAwards(); awards->recalculateAwards();
//qDebug() << "MainWindow::slotADIFImport -32" << endl;
showAwards(); showAwards();
//qDebug() << "MainWindow::slotADIFImport -33" << endl;
dxccStatusWidget->setBands(bands); dxccStatusWidget->setBands(bands);
dxccStatusWidget->update(); //qDebug() << "MainWindow::slotADIFImport -34" << endl;
dxccStatusWidget->refresh();
//qDebug() << "MainWindow::slotADIFImport -35" << endl;
break; break;
} }
//qDebug() << "MainWindow::slotADIFImport-7" << endl; //qDebug() << "MainWindow::slotADIFImport-7" << endl;
} }
//qDebug() << "MainWindow::slotADIFImport-END" << endl;
} }
void MainWindow::initialContestModeConfiguration() void MainWindow::initialContestModeConfiguration()
@ -6821,7 +6840,7 @@ void MainWindow::initialContestModeConfiguration()
void MainWindow::qsoToEdit (const int _qso) void MainWindow::qsoToEdit (const int _qso)
{ {
qDebug() << "MainWindow::qsoToEdit: " << QString::number(_qso) << endl; //qDebug() << "MainWindow::qsoToEdit: " << QString::number(_qso) << endl;
int nameCol; int nameCol;
@ -6858,7 +6877,7 @@ void MainWindow::qsoToEdit (const int _qso)
currentQrz = aux1; currentQrz = aux1;
currentEntity = world->getQRZARRLId(currentQrz); currentEntity = world->getQRZARRLId(currentQrz);
qDebug() << "MainWindow::qsoToEdit - currentEntity " << QString::number(currentEntity) << endl; //qDebug() << "MainWindow::qsoToEdit - currentEntity " << QString::number(currentEntity) << endl;
nameCol = rec.indexOf("qso_date"); nameCol = rec.indexOf("qso_date");
aux1 = (query.value(nameCol)).toString(); aux1 = (query.value(nameCol)).toString();
@ -7576,12 +7595,12 @@ void MainWindow::qsoToEdit (const int _qso)
satTabWidget->setSatMode("-CLEAR-"); satTabWidget->setSatMode("-CLEAR-");
} }
qDebug() << "MainWindow::qsoToEdit: - in default - 100: " << QString::number(currentEntity) << endl; //qDebug() << "MainWindow::qsoToEdit: - in default - 100: " << QString::number(currentEntity) << endl;
nameCol = rec.indexOf("dxcc"); nameCol = rec.indexOf("dxcc");
aux1 = (query.value(nameCol)).toString(); aux1 = (query.value(nameCol)).toString();
qDebug() << "MainWindow::qsoToEdit: Checking DXCC: " << aux1 << " - " << world->getEntityName(aux1.toInt()) << endl; //qDebug() << "MainWindow::qsoToEdit: Checking DXCC: " << aux1 << " - " << world->getEntityName(aux1.toInt()) << endl;
if (aux1.toInt()>=1) if (aux1.toInt()>=1)
{ {
@ -7595,15 +7614,15 @@ void MainWindow::qsoToEdit (const int _qso)
currentEntity = aux1.toInt(); currentEntity = aux1.toInt();
} }
qDebug() << "MainWindow::qsoToEdit: - in default - 101: " << QString::number(currentEntity) << endl; //qDebug() << "MainWindow::qsoToEdit: - in default - 101: " << QString::number(currentEntity) << endl;
} }
else else
{ {
currentEntity = world->getQRZARRLId(currentQrz); currentEntity = world->getQRZARRLId(currentQrz);
qDebug() << "MainWindow::qsoToEdit: - in default - 103: " << QString::number(currentEntity) << endl; //qDebug() << "MainWindow::qsoToEdit: - in default - 103: " << QString::number(currentEntity) << endl;
} }
qDebug() << "MainWindow::qsoToEdit: - in default - 104: " << QString::number(currentEntity) << endl; //qDebug() << "MainWindow::qsoToEdit: - in default - 104: " << QString::number(currentEntity) << endl;
nameCol = rec.indexOf("prop_mode"); nameCol = rec.indexOf("prop_mode");
aux1 = (query.value(nameCol)).toString(); aux1 = (query.value(nameCol)).toString();
@ -7622,6 +7641,7 @@ void MainWindow::qsoToEdit (const int _qso)
showEntityInfo(currentEntity); showEntityInfo(currentEntity);
//selectCorrectComboBoxEntity(currentEntity); //selectCorrectComboBoxEntity(currentEntity);
//qDebug() << "MainWindow::qsoToEdit: " << QString::number(currentEntity) << endl;
othersTabWidget->setEntity(currentEntity); othersTabWidget->setEntity(currentEntity);
//qDebug() << "MainWindow::qsoToEdit: - in default - 101" << endl; //qDebug() << "MainWindow::qsoToEdit: - in default - 101" << endl;
@ -7956,7 +7976,7 @@ void MainWindow::clearInfoFromLocators()
void MainWindow::showEntityInfo(const int _enti, int _cq, int _itu) void MainWindow::showEntityInfo(const int _enti, int _cq, int _itu)
{ {
qDebug() << "MainWindow::showEntityInfo" << QString::number(_enti) << endl; //qDebug() << "MainWindow::showEntityInfo" << QString::number(_enti) << endl;
if (_enti<=0) if (_enti<=0)
{ {

View File

@ -312,7 +312,7 @@ private:
void setAwardDXCC(const int _qsoId, bool modifying); // Adds or modify the status of a DXCC entity void setAwardDXCC(const int _qsoId, bool modifying); // Adds or modify the status of a DXCC entity
// data << dxcc(id) << band(id) << mode(id) << confirmed(0/1) << qsoid(id) << modify(0/1); // data << dxcc(id) << band(id) << mode(id) << confirmed(0/1) << qsoid(id) << modify(0/1);
int checkIfWorkedB4(const QString _qrz); void checkIfWorkedB4(const QString _qrz);
bool checkContest(); bool checkContest();
void showStatusOfDXCC(const QStringList _qs); void showStatusOfDXCC(const QStringList _qs);
void showDXMarathonNeeded(const int _dxcc, const int _cqz, const int _year, const int _log); void showDXMarathonNeeded(const int _dxcc, const int _cqz, const int _year, const int _log);

View File

@ -76,10 +76,10 @@ void MainWindowInputOthers::createUI()
entityPrimDivComboBox->setToolTip(tr("Select the primary division for this QSO")); entityPrimDivComboBox->setToolTip(tr("Select the primary division for this QSO"));
entitySecDivComboBox->setToolTip(tr("Select the secondary division for this QSO")); entitySecDivComboBox->setToolTip(tr("Select the secondary division for this QSO"));
entityNameComboBox->setToolTip(tr("Select the propagation mode for this current QSO")); entityNameComboBox->setToolTip(tr("Select the entity for this QSO"));
propModeComboBox->setToolTip(tr("Select the propagation mode for this current QSO")); propModeComboBox->setToolTip(tr("Select the propagation mode for this QSO"));
iotaContinentComboBox->setToolTip(tr("Select the IOTA continent for this current QSO")); iotaContinentComboBox->setToolTip(tr("Select the IOTA continent for this QSO"));
iotaNumberLineEdit->setToolTip(tr("Select the IOTA reference number for this current QSO")); iotaNumberLineEdit->setToolTip(tr("Select the IOTA reference number for this QSO"));
entityPrimDivComboBox->setEnabled(false); entityPrimDivComboBox->setEnabled(false);
entitySecDivComboBox->setEnabled(false); entitySecDivComboBox->setEnabled(false);
@ -153,7 +153,7 @@ void MainWindowInputOthers::setEntitiesList(const QStringList _qs)
void MainWindowInputOthers::setEntity(const int _ent) void MainWindowInputOthers::setEntity(const int _ent)
{// Select the appropriate entity in the ComboBox {// Select the appropriate entity in the ComboBox
qDebug() << "MainWindowInputOthers::setEntity: " << QString::number(_ent) << endl; //qDebug() << "MainWindowInputOthers::setEntity: " << QString::number(_ent) << endl;
if (_ent<=0) if (_ent<=0)
{ {
entityNameComboBox->setCurrentIndex(0); entityNameComboBox->setCurrentIndex(0);
@ -172,9 +172,11 @@ void MainWindowInputOthers::setEntity(const int _ent)
pref = dataProxy->getEntityNameFromId(_ent); pref = dataProxy->getEntityNameFromId(_ent);
//int indexC = entityNameComboBox->findText(pref, Qt::MatchContains); //int indexC = entityNameComboBox->findText(pref, Qt::MatchContains);
//qDebug() << "MainWindow::selectCorrectEntity: aux to the findText: " << aux << endl;
//int indexC = entityNameComboBox->findText("(" + aux + ")", Qt::MatchContains);
int indexC = entityNameComboBox->findText("(" + aux + ")", Qt::MatchEndsWith);
int indexC = entityNameComboBox->findText(aux + ")", Qt::MatchContains); //qDebug() << "MainWindow::selectCorrectEntity: " << pref << "/" << QString::number(indexC) << endl;
qDebug() << "MainWindow::selectCorrectEntity: " << pref << "/" << QString::number(indexC) << endl;
entityNameComboBox->setCurrentIndex(indexC); entityNameComboBox->setCurrentIndex(indexC);
setIOTAContinentFromEntity(_ent); setIOTAContinentFromEntity(_ent);

View File

@ -48,6 +48,7 @@ MainWindowMyDataTab::MainWindowMyDataTab(QWidget *parent) :
myPower = 0; myPower = 0;
lastPower = 0; lastPower = 0;
} }
MainWindowMyDataTab::~MainWindowMyDataTab(){} MainWindowMyDataTab::~MainWindowMyDataTab(){}
@ -56,6 +57,7 @@ void MainWindowMyDataTab::createUI()
{ {
myPowerSpinBox->setDecimals(2); myPowerSpinBox->setDecimals(2);
myPowerSpinBox->setMaximum(9999); myPowerSpinBox->setMaximum(9999);
myPowerSpinBox->setSuffix(tr("Watt"));
QLabel *keepLabel = new QLabel(); QLabel *keepLabel = new QLabel();
keepLabel->setText(tr("Keep this data")); keepLabel->setText(tr("Keep this data"));
@ -98,6 +100,7 @@ void MainWindowMyDataTab::createUI()
//myDataInputTabWidget->setLayout(myDataInputTabWidgetLayout); //myDataInputTabWidget->setLayout(myDataInputTabWidgetLayout);
// i = dxUpLeftTab->addTab(myDataInputTabWidget, tr("My Data")); // i = dxUpLeftTab->addTab(myDataInputTabWidget, tr("My Data"));
//connect(stationCallSignLineEdit, SIGNAL(returnPressed()), this, SLOT(slotQRZReturnPressed() ) );
} }

View File

@ -96,7 +96,7 @@ SetupDialog::SetupDialog(const bool _firstTime)
connect(closeButton, SIGNAL(clicked()), this, SLOT(slotCancelButtonClicked())); connect(closeButton, SIGNAL(clicked()), this, SLOT(slotCancelButtonClicked()));
connect(okButton, SIGNAL(clicked()), this, SLOT(slotOkButtonClicked())); connect(okButton, SIGNAL(clicked()), this, SLOT(slotOkButtonClicked()));
connect (logsPage, SIGNAL(newLogData(QStringList)), this, SLOT(slotAnalyzeNewLogData(QStringList))); connectActions();
QHBoxLayout *horizontalLayout = new QHBoxLayout; QHBoxLayout *horizontalLayout = new QHBoxLayout;
@ -126,7 +126,6 @@ SetupDialog::SetupDialog(const bool _firstTime)
} }
SetupDialog::SetupDialog(const QString _configFile, const QString _softwareVersion, const int _page, const bool _firstTime) SetupDialog::SetupDialog(const QString _configFile, const QString _softwareVersion, const int _page, const bool _firstTime)
{ {
//qDebug() << "SetupDialog::SetupDialog 2" << endl; //qDebug() << "SetupDialog::SetupDialog 2" << endl;
@ -166,8 +165,7 @@ SetupDialog::SetupDialog(const QString _configFile, const QString _softwareVersi
QPushButton *closeButton = new QPushButton(tr("Cancel")); QPushButton *closeButton = new QPushButton(tr("Cancel"));
QPushButton *okButton = new QPushButton(tr("OK")); QPushButton *okButton = new QPushButton(tr("OK"));
connect(closeButton, SIGNAL(clicked()), this, SLOT(slotCancelButtonClicked()));
connect(okButton, SIGNAL(clicked()), this, SLOT(slotOkButtonClicked()));
QHBoxLayout *horizontalLayout = new QHBoxLayout; QHBoxLayout *horizontalLayout = new QHBoxLayout;
horizontalLayout->addWidget(tabWidget); horizontalLayout->addWidget(tabWidget);
@ -200,13 +198,26 @@ SetupDialog::SetupDialog(const QString _configFile, const QString _softwareVersi
//qDebug() << "SetupDialog::SetupDialog 05.3" << endl; //qDebug() << "SetupDialog::SetupDialog 05.3" << endl;
nolog = !(haveAtleastOneLog()); nolog = !(haveAtleastOneLog());
//qDebug() << "SetupDialog::SetupDialog 2 - END" << endl; //qDebug() << "SetupDialog::SetupDialog 2 - END" << endl;
connect(closeButton, SIGNAL(clicked()), this, SLOT(slotCancelButtonClicked()));
connect(okButton, SIGNAL(clicked()), this, SLOT(slotOkButtonClicked()));
connectActions();
} }
SetupDialog::~SetupDialog() SetupDialog::~SetupDialog()
{ {
//qDebug() << "SetupDialog::~SetupDialog " << endl; //qDebug() << "SetupDialog::~SetupDialog " << endl;
} }
void SetupDialog::connectActions()
{
connect (logsPage, SIGNAL(newLogData(QStringList)), this, SLOT(slotAnalyzeNewLogData(QStringList)));
connect (userDataPage, SIGNAL(stationCallSignal(QString)), this, SLOT(slotSetStationCallSign(QString)));
connect (userDataPage, SIGNAL(operatorsSignal(QString)), this, SLOT(slotSetOperators(QString)));
}
void SetupDialog::setData(const QString _configFile, const QString _softwareVersion, const int _page, const bool _firstTime) void SetupDialog::setData(const QString _configFile, const QString _softwareVersion, const int _page, const bool _firstTime)
{ {
//qDebug() << "SetupDialog::setData: " << QString::number(_page) << endl; //qDebug() << "SetupDialog::setData: " << QString::number(_page) << endl;
@ -343,6 +354,7 @@ void SetupDialog::slotOkButtonClicked()
QMessageBox msgBox; QMessageBox msgBox;
msgBox.setIcon(QMessageBox::Information); msgBox.setIcon(QMessageBox::Information);
msgBox.setText(tr("You need to enter at least a valid QRZ.")); msgBox.setText(tr("You need to enter at least a valid QRZ."));
msgBox.setInformativeText(tr("Go to the") + " " + tr("User tab") + " " + tr("and enter valid QRZ."));
msgBox.exec(); msgBox.exec();
return; return;
} }
@ -353,7 +365,8 @@ void SetupDialog::slotOkButtonClicked()
QMessageBox msgBox; QMessageBox msgBox;
msgBox.setIcon(QMessageBox::Information); msgBox.setIcon(QMessageBox::Information);
msgBox.setText(tr("You have not selected the kind of log you want.\nYou will be redirected to the Log tab.\nPlease add and select the kind of log you want to use.")); msgBox.setText(tr("You have not selected the kind of log you want."));
msgBox.setInformativeText(tr("You will be redirected to the Log tab.\nPlease add and select the kind of log you want to use."));
msgBox.exec(); msgBox.exec();
tabWidget->setCurrentIndex(tabWidget->indexOf(logsPage)); tabWidget->setCurrentIndex(tabWidget->indexOf(logsPage));
@ -581,10 +594,10 @@ void SetupDialog::slotReadConfigData()
bands << "10M" << "12M" << "15M" << "17M" << "20M" << "40M" << "80M" << "160M"; bands << "10M" << "12M" << "15M" << "17M" << "20M" << "40M" << "80M" << "160M";
} }
int a = modes.removeDuplicates(); modes.removeDuplicates();
//qDebug() << "SetupDialog::slotReadConfigData - duplicate modes: " << QString::number(a) << endl; //qDebug() << "SetupDialog::slotReadConfigData - duplicate modes: " << QString::number(a) << endl;
bandsModesPage->setActiveModes(modes); bandsModesPage->setActiveModes(modes);
a = bands.removeDuplicates(); bands.removeDuplicates();
//qDebug() << "SetupDialog::slotReadConfigData - duplicate bands: " << QString::number(a) << endl; //qDebug() << "SetupDialog::slotReadConfigData - duplicate bands: " << QString::number(a) << endl;
bandsModesPage->setActiveBands(bands); bandsModesPage->setActiveBands(bands);
//qDebug() << "SetupDialog::slotReadConfigData - END" << endl; //qDebug() << "SetupDialog::slotReadConfigData - END" << endl;
@ -1035,3 +1048,16 @@ void SetupDialog::slotAnalyzeNewLogData(const QStringList _qs)
userDataPage->setStationQrz(_qs.at(0)); userDataPage->setStationQrz(_qs.at(0));
userDataPage->setOperators(_qs.at(1)); userDataPage->setOperators(_qs.at(1));
} }
void SetupDialog::slotSetStationCallSign(const QString _p)
{
//qDebug() << "SetupDialog::slotSetStationCallSign: " << _p << endl;
logsPage->setDefaultStationCallsign(_p);
}
void SetupDialog::slotSetOperators(const QString _p)
{
//qDebug() << "SetupDialog::slotSetOperators: " << _p << endl;
logsPage->setDefaultOperators(_p);
}

View File

@ -74,6 +74,8 @@ private slots:
void slotOkButtonClicked(); void slotOkButtonClicked();
void slotCancelButtonClicked(); void slotCancelButtonClicked();
void slotAnalyzeNewLogData(const QStringList _qs); // We receive the station callsign and operators from the logs tab void slotAnalyzeNewLogData(const QStringList _qs); // We receive the station callsign and operators from the logs tab
void slotSetStationCallSign(const QString _p); // We receive te station callsign from the userData tab to fill the new log
void slotSetOperators(const QString _p); // We receive te station operators from the userData tab to fill the new log
private: private:
@ -81,6 +83,7 @@ private:
void setSoftVersion(const QString _softwareVersion); void setSoftVersion(const QString _softwareVersion);
void setConfigured(const bool _configured); void setConfigured(const bool _configured);
void setPage(const int _page); void setPage(const int _page);
void connectActions();
void createIcons(); void createIcons();
bool processConfigLine(const QString _line); bool processConfigLine(const QString _line);

View File

@ -24,7 +24,7 @@
* * * *
*****************************************************************************/ *****************************************************************************/
//#include <QDebug> #include <QDebug>
#include "setuppagelogs.h" #include "setuppagelogs.h"
@ -45,6 +45,7 @@ SetupPageLogs::SetupPageLogs(QWidget *parent) : QWidget(parent){
typeContestN = -1; typeContestN = -1;
selectedLog = -1; selectedLog = -1;
defaultStationCallSign.clear();
//setupD = new SetupDialog(); //setupD = new SetupDialog();
@ -118,6 +119,15 @@ void SetupPageLogs::createNewLog()
selectedLog = -1; selectedLog = -1;
//newLog->clear(); //newLog->clear();
newLog->setEditing(false); newLog->setEditing(false);
if (defaultStationCallSign.length()>2)
{
newLog->setStationCallSign(defaultStationCallSign);
}
if (defaultOperators.length()>2)
{
newLog->setOperators(defaultOperators);
}
newLog->exec(); newLog->exec();
} }
@ -599,3 +609,16 @@ void SetupPageLogs::showError(const QString _errorC)
QMessageBox::Ok); QMessageBox::Ok);
} }
void SetupPageLogs::setDefaultStationCallsign(const QString _p)
{
//qDebug() << "SetupPageLogs::setDefaultStationCallsign: " << _p << endl;
defaultStationCallSign = _p;
}
void SetupPageLogs::setDefaultOperators(const QString _p)
{
//qDebug() << "SetupPageLogs::setDefaultOperators: " << _p << endl;
defaultOperators = _p;
}

View File

@ -49,6 +49,8 @@ public:
int getSelectedLog(); int getSelectedLog();
void setSelectedLog(const int _i); void setSelectedLog(const int _i);
void createNewLog(); void createNewLog();
void setDefaultStationCallsign (const QString _p);
void setDefaultOperators(const QString _p);
/* /*
QString getBands(); // 10m, 12m, 15m QString getBands(); // 10m, 12m, 15m
QString getModes(); //ssb, CW QString getModes(); //ssb, CW
@ -128,6 +130,8 @@ private:
DataProxy *dataProxy; DataProxy *dataProxy;
int selectedLog; int selectedLog;
QString defaultStationCallSign, defaultOperators;
}; };

View File

@ -865,10 +865,10 @@ void SetupPageLogsNew::setEditing(const bool b)
int SetupPageLogsNew::getSelectedTypeContest() int SetupPageLogsNew::getSelectedTypeContest()
{ {
qDebug() << "SetupPageLogsNew::getSelectedTypeContest: " << endl; //qDebug() << "SetupPageLogsNew::getSelectedTypeContest: " << endl;
//is/contest/catoperator/catassisted/catpower/catband/catoverlay/catmode //is/contest/catoperator/catassisted/catpower/catband/catoverlay/catmode
int i = dataProxy->getContestTypeN(typeContestSelected, contestCatOperators, contestCatAssisted, contestCatPower, contestCatBands, contestCatOverlay, contestCatMode); int i = dataProxy->getContestTypeN(typeContestSelected, contestCatOperators, contestCatAssisted, contestCatPower, contestCatBands, contestCatOverlay, contestCatMode);
qDebug() << "SetupPageLogsNew::getSelectedTypeContest: " << QString::number(i) << endl; //qDebug() << "SetupPageLogsNew::getSelectedTypeContest: " << QString::number(i) << endl;
return i; return i;
} }

View File

@ -295,6 +295,9 @@ void SetupPageUserDataPage::slotQRZTextChanged()
qrzLineEdit->setCursorPosition(i); qrzLineEdit->setCursorPosition(i);
emit stationCallSignal(qrzLineEdit->text());
//emit stationCallSignal("TEST");
/* /*
if (!locator->isValidLocator(myLocatorLineEdit->text()) ) if (!locator->isValidLocator(myLocatorLineEdit->text()) )
{ {
@ -649,6 +652,8 @@ void SetupPageUserDataPage::slotOperatorsChanged()
operatorsLineEdit->setPalette(*defaultPalette); operatorsLineEdit->setPalette(*defaultPalette);
emit operatorsSignal(operatorsLineEdit->text());
} }
else else
{ {

View File

@ -98,6 +98,10 @@ public:
bool setAntenna2 (const QString _aux); bool setAntenna2 (const QString _aux);
bool setAntenna3 (const QString _aux); bool setAntenna3 (const QString _aux);
signals:
void stationCallSignal (const QString _p);
void operatorsSignal (const QString _p);
private slots: private slots:
void slotMyLocatorTextChanged(); void slotMyLocatorTextChanged();

View File

@ -76,6 +76,31 @@ SetupPageWorldEditor::SetupPageWorldEditor(QWidget *parent) : QWidget(parent)
createActions(); createActions();
if (isWorldEmpty())
{
QString ctyfile = util->getCTYFile();
QMessageBox msgBox;
if (QFile::exists(ctyfile))
{
msgBox.setIcon(QMessageBox::Information);
msgBox.setText(tr("An entities information file (CTY.CSV) has been detected in your KLog folder and will be loaded."));
msgBox.exec();
world->recreate(ctyfile);
worldModel->select();
//slotImportWorldButtonClicked();
}
else
{
msgBox.setIcon(QMessageBox::Warning);
msgBox.setText(tr("No entities information file (CTY.CSV) has been detected in your KLog folder."));
msgBox.setInformativeText(tr("KLog will not be able to show entities information."));
msgBox.exec();
}
}
} }
SetupPageWorldEditor::~SetupPageWorldEditor() SetupPageWorldEditor::~SetupPageWorldEditor()
@ -223,6 +248,20 @@ void SetupPageWorldEditor::slotAnalyzeEntityAddedSignal(const QStringList _qs)
*/ */
} }
bool SetupPageWorldEditor::isWorldEmpty()
{
// I need to check if the world is empty and I have the CTY.CSV file
if (world->getHowManyEntities()<1)
{
return true;
}
else
{
return false;
}
return true;
}
void SetupPageWorldEditor::slotAddButtonClicked() void SetupPageWorldEditor::slotAddButtonClicked()
{ {
//qDebug() << "SetupPageWorldEditor::slotAddButtonClicked" << endl; //qDebug() << "SetupPageWorldEditor::slotAddButtonClicked" << endl;
@ -258,7 +297,7 @@ void SetupPageWorldEditor::slotDoubleClickEntity( const QModelIndex & index)
void SetupPageWorldEditor::slotImportWorldButtonClicked() void SetupPageWorldEditor::slotImportWorldButtonClicked()
{ {
qDebug() << "SetupPageWorldEditor::slotImportWorldButtonClicked" << endl; //qDebug() << "SetupPageWorldEditor::slotImportWorldButtonClicked" << endl;
QString klogDir; QString klogDir;
klogDir = util->getHomeDir(); klogDir = util->getHomeDir();
QString worldFile; QString worldFile;
@ -266,11 +305,14 @@ void SetupPageWorldEditor::slotImportWorldButtonClicked()
worldFile = QFileDialog::getOpenFileName(this, tr("Open File"), klogDir, tr("BigCTY (*.csv)")); worldFile = QFileDialog::getOpenFileName(this, tr("Open File"), klogDir, tr("BigCTY (*.csv)"));
QMessageBox msgBox; QMessageBox msgBox;
//qDebug() << "SetupPageWorldEditor::slotImportWorldButtonClicked: " << worldFile << endl;
if (world->recreate(worldFile) ) if (world->recreate(worldFile) )
{ {
msgBox.setIcon(QMessageBox::Information); msgBox.setIcon(QMessageBox::Information);
msgBox.setText(tr("Entities information has been updated.")); msgBox.setText(tr("Entities information has been updated."));
worldModel->select();
} }
else else
{ {
@ -280,7 +322,7 @@ void SetupPageWorldEditor::slotImportWorldButtonClicked()
msgBox.exec(); msgBox.exec();
qDebug() << "SetupPageWorldEditor::slotImportWorldButtonClicked - END" << endl; //qDebug() << "SetupPageWorldEditor::slotImportWorldButtonClicked - END" << endl;
} }

View File

@ -69,6 +69,7 @@ private:
void createWorldPanel(); void createWorldPanel();
void createWorldModel(); void createWorldModel();
void createActions(); void createActions();
bool isWorldEmpty();
QSqlRelationalTableModel *worldModel; QSqlRelationalTableModel *worldModel;
QWidget *worldPanel; QWidget *worldPanel;

View File

@ -10,15 +10,16 @@ SoftwareUpdate::SoftwareUpdate(const QString _klogVersion) : QObject(0)
url = new QUrl; url = new QUrl;
//klogDir = _klogDir; //klogDir = _klogDir;
klogVersion = _klogVersion; klogVersion = _klogVersion;
latestVersion = klogVersion; //latestVersion = klogVersion;
latestVersion = "0.0";
callsign = QString(); callsign = QString();
result = -1; // Error unknown result = -1; // Error unknown
//reply = new QNetworkReply; //reply = new QNetworkReply;
manager = new QNetworkAccessManager(this); manager = new QNetworkAccessManager(this);
//request = new QNetworkRequest(this); //request = new QNetworkRequest(this);
//request.setUrl(QUrl("http://localhost")); //request.setUrl(QUrl("http://localhost"));
//request.setUrl(QUrl("https://download.savannah.gnu.org/releases/klog/")); request.setUrl(QUrl("https://download.savannah.gnu.org/releases/klog/"));
request.setUrl(QUrl("http://download.klog.xyz/redirect")); //request.setUrl(QUrl("http://www.klog.xyz/download"));
setHeader(); setHeader();
@ -54,6 +55,7 @@ void SoftwareUpdate::slotDownloadFinished(QNetworkReply *reply)
aux.clear(); aux.clear();
if (reply->error()) { if (reply->error()) {
//qDebug() << "SoftwareUpdate::slotDownloadFinished: reply error" << endl;
/* /*
fprintf(stderr, "Updates %s failed: %s\n", fprintf(stderr, "Updates %s failed: %s\n",
url.toEncoded().constData(), url.toEncoded().constData(),
@ -68,12 +70,14 @@ void SoftwareUpdate::slotDownloadFinished(QNetworkReply *reply)
msgBox.setStandardButtons(QMessageBox::Ok); msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.setDefaultButton(QMessageBox::Ok); msgBox.setDefaultButton(QMessageBox::Ok);
int ret = msgBox.exec(); int ret = msgBox.exec();
*/
*/
} else { } else {
//qDebug() << "SoftwareUpdate::slotDownloadFinished: no reply error" << endl;
//QString filename = saveFileName(url); //QString filename = saveFileName(url);
if (checkUpdates(reply)) if (checkUpdates(reply))
{ {
//qDebug() << "SoftwareUpdate::slotDownloadFinished checkupdates true" << endl;
updateDialog->setVersion(latestVersion); updateDialog->setVersion(latestVersion);
updateDialog->show(); updateDialog->show();
latestVersion = klogVersion; latestVersion = klogVersion;
@ -88,6 +92,7 @@ void SoftwareUpdate::slotDownloadFinished(QNetworkReply *reply)
} }
else else
{ {
//qDebug() << "SoftwareUpdate::slotDownloadFinished: checkupdates false" << endl;
/* /*
msgBox.setIcon(QMessageBox::Information); msgBox.setIcon(QMessageBox::Information);
aux = tr("You already have the latest version of KLog!"); aux = tr("You already have the latest version of KLog!");
@ -104,14 +109,14 @@ void SoftwareUpdate::slotDownloadFinished(QNetworkReply *reply)
reply->deleteLater(); reply->deleteLater();
//manager->deleteResource(request); //manager->deleteResource(request);
//qDebug() << "SoftwareUpdate::slotDownloadFinished end" << endl;
//emit done(); //emit done();
} }
bool SoftwareUpdate::checkUpdates(QIODevice *data) bool SoftwareUpdate::checkUpdates(QIODevice *data)
{ {
//qDebug() << "SoftwareUpdate::checkUpdates: " << endl; //qDebug() << "SoftwareUpdate::checkUpdates: " << QString::number(data->size()) << endl;
QString line, release; QString line, release;
QStringList stringList, klogStringList; QStringList stringList, klogStringList;
@ -125,13 +130,15 @@ bool SoftwareUpdate::checkUpdates(QIODevice *data)
{ {
//qDebug() << "SoftwareUpdate::checkUpdates: RX is NOT VALID"<< endl; //qDebug() << "SoftwareUpdate::checkUpdates: RX is NOT VALID"<< endl;
} }
//qDebug() << "SoftwareUpdate::checkUpdates: Before entering the while"<< endl;
while (!data->atEnd()) while (!data->atEnd())
{ {
//qDebug() << "SoftwareUpdate::checkUpdates: In the while"<< endl;
stringList.clear(); stringList.clear();
klogStringList.clear(); klogStringList.clear();
line.clear(); line.clear();
line = data->readLine(); line = data->readLine();
//qDebug() << "SoftwareUpdate::checkUpdates: line: " << line << endl;
if (line.contains("klog-")) if (line.contains("klog-"))
{ {
stringList << line.split(">", QString::SkipEmptyParts); stringList << line.split(">", QString::SkipEmptyParts);
@ -141,6 +148,7 @@ bool SoftwareUpdate::checkUpdates(QIODevice *data)
//qDebug() << "SoftwareUpdate::checkUpdates klog: " << str << endl; //qDebug() << "SoftwareUpdate::checkUpdates klog: " << str << endl;
if (rx.match(str).hasMatch()) if (rx.match(str).hasMatch())
{ {
//qDebug() << "SoftwareUpdate::checkUpdates: MATCH: " << str << endl;
release = str.section("-",1); release = str.section("-",1);
release = release.section("\.tar.gz", 0, 0); release = release.section("\.tar.gz", 0, 0);
updateNeeded(release); updateNeeded(release);
@ -153,6 +161,7 @@ bool SoftwareUpdate::checkUpdates(QIODevice *data)
//qDebug() << "SoftwareUpdate::checkUpdates: " << line << endl; //qDebug() << "SoftwareUpdate::checkUpdates: " << line << endl;
} }
} }
//qDebug() << "SoftwareUpdate::checkUpdates:Latest/Actual: " << latestVersion <<"/" << klogVersion << endl;
if (latestVersion > klogVersion) if (latestVersion > klogVersion)
{ {
emit updateNeededSignal (true); emit updateNeededSignal (true);

View File

@ -10,7 +10,6 @@
#include <QLocale> #include <QLocale>
#include <QLibraryInfo> #include <QLibraryInfo>
#include <QProgressDialog> #include <QProgressDialog>
#include "downloadcty.h" #include "downloadcty.h"
@ -35,11 +34,9 @@ class CTYPage;
void slotRunInMemory(bool checked); void slotRunInMemory(bool checked);
void slotButtonFinishedClicked(); void slotButtonFinishedClicked();
//void fin();
private: private:
FileOrMemoryPage *fileOrMemoryPage; FileOrMemoryPage *fileOrMemoryPage;
CTYPage *ctyPage; CTYPage *ctyPage;
QString version; QString version;
@ -73,6 +70,7 @@ class LicPage : public QWizardPage
QTextEdit *licenseBrowser; QTextEdit *licenseBrowser;
QCheckBox *aceptLicCheckBox; QCheckBox *aceptLicCheckBox;
}; };
/* /*
class FileOrMemoryPage : public QWizardPage class FileOrMemoryPage : public QWizardPage

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -140,11 +140,11 @@ QString Utilities::getCfgFile()
{ {
//TODO: To be removed when the defaultDir is saved in the config file //TODO: To be removed when the defaultDir is saved in the config file
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
qDebug() << "WINDOWS DETECTED!: " << getHomeDir() + "\klogrc.cfg" << endl; //qDebug() << "WINDOWS DETECTED!: " << getHomeDir() + "\klogrc.cfg" << endl;
return getHomeDir() + "\klogrc.cfg"; return getHomeDir() + "\klogrc.cfg";
#else #else
qDebug() << "NO WINDOWS DETECTED!: " << getHomeDir() + "/klogrc.cfg" << endl; //qDebug() << "NO WINDOWS DETECTED!: " << getHomeDir() + "/klogrc.cfg" << endl;
return getHomeDir() + "/klogrc"; return getHomeDir() + "/klogrc";
#endif #endif

View File

@ -50,6 +50,7 @@ public:
QString getHomeDir(); QString getHomeDir();
QString getCfgFile(); QString getCfgFile();
QString getCTYFile(); QString getCTYFile();
int getNormalizedDXCCValue(const int _dxcc); int getNormalizedDXCCValue(const int _dxcc);
}; };

View File

@ -99,29 +99,29 @@ World::~World()
bool World::recreate(const QString _worldFile) bool World::recreate(const QString _worldFile)
{ {
qDebug() << "World::recreate: " << _worldFile << endl; //qDebug() << "World::recreate: " << _worldFile << endl;
QSqlQuery query; QSqlQuery query;
if (query.exec("DELETE FROM entity")) if (query.exec("DELETE FROM entity"))
{ {
qDebug() << "World::recreate: EMPTY entity" << endl; //qDebug() << "World::recreate: EMPTY entity" << endl;
if (query.exec("DELETE FROM prefixesofentity")) if (query.exec("DELETE FROM prefixesofentity"))
{ {
qDebug() << "World::recreate: EMPTY prefixesofentity" << endl; //qDebug() << "World::recreate: EMPTY prefixesofentity" << endl;
return create(_worldFile); return create(_worldFile);
} }
else else
{//TODO: Manage the query error {//TODO: Manage the query error
qDebug() << "World::recreate: FAILED TO EMPTY prefixesofentity" << endl; //qDebug() << "World::recreate: FAILED TO EMPTY prefixesofentity" << endl;
return false; return false;
} }
} }
else else
{//TODO: Manage the query error {//TODO: Manage the query error
qDebug() << "World::recreate: FAILED TO EMPTY entity" << endl; //qDebug() << "World::recreate: FAILED TO EMPTY entity" << endl;
return false; return false;
} }
qDebug() << "World::recreate: END..." << endl; //qDebug() << "World::recreate: END..." << endl;
return false; return false;
} }
@ -135,12 +135,12 @@ bool World::create(const QString _worldFile)
if (readCTYCSV(_worldFile)) if (readCTYCSV(_worldFile))
{ {
created = true; created = true;
qDebug() << "World::create: TRUE" << endl; //qDebug() << "World::create: TRUE" << endl;
}else }else
{ {
created = false; created = false;
qDebug() << "World::create: FALSE" << endl; //qDebug() << "World::create: FALSE" << endl;
} }
if (created) if (created)
@ -148,7 +148,7 @@ bool World::create(const QString _worldFile)
dataProxy->updateISONames(); dataProxy->updateISONames();
} }
qDebug() << "World::create: END" << endl; //qDebug() << "World::create: END" << endl;
return created; return created;
} }