mirror of
https://github.com/ea4k/klog.git
synced 2024-09-21 10:28:06 +00:00
MyData widget created
This commit is contained in:
parent
bff22dc9f9
commit
3fd1b10375
@ -5,6 +5,7 @@
|
||||
- BugFix: Preferences->Misc: It was not possible to edit the default filename. (TNX K6XT).
|
||||
- BugFix: Added the Power unit (W) to the power box. Debian bug #654332.
|
||||
- BugFix: When editing a QSO in some text boxes text was reused from previous QSO and data could be corrupted.
|
||||
- Created a widget to manage all "My Data" and simply the main widget.
|
||||
|
||||
January 2016 - 0.9.2.3
|
||||
- Improved the way translations are managed (Specially in Linux).
|
||||
|
@ -1003,9 +1003,9 @@ bool DataBase::updateIfNeeded()
|
||||
float aux = 0.0;
|
||||
|
||||
int nameCol;
|
||||
int errorCode = -1;
|
||||
//int errorCode = -1;
|
||||
bool toBeUpdated = false;
|
||||
bool sqlOK;
|
||||
//bool sqlOK;
|
||||
QString dateString;
|
||||
QString SQLString, auxs;
|
||||
QStringList SQLStrings;
|
||||
@ -1504,7 +1504,7 @@ bool DataBase::updateTo005()
|
||||
QString text = (QInputDialog::getText(0, QObject::tr("KLog: Enter Station callsign"),
|
||||
QObject::tr("Enter the station callsign used in this log"), QLineEdit::Normal,
|
||||
QObject::tr("Station Callsign"), &ok)).toUpper();
|
||||
text.toUpper();
|
||||
text = text.toUpper();
|
||||
if (ok && !text.isEmpty())
|
||||
{
|
||||
callToUse = text;
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <QWidget>
|
||||
#include <QTableView>
|
||||
|
||||
//Estoy creando el widget que muestra el estado del DXCC
|
||||
//TODO: Creating the widget to show the DXCC status
|
||||
|
||||
class DXCCStatusWidget : public QWidget
|
||||
{
|
||||
|
6
klog.pro
6
klog.pro
@ -64,7 +64,8 @@ SOURCES += main.cpp \
|
||||
setuppageclublog.cpp \
|
||||
elogclublog.cpp \
|
||||
utilities.cpp \
|
||||
dxccstatuswidget.cpp
|
||||
dxccstatuswidget.cpp \
|
||||
mainwindowmydatatab.cpp
|
||||
HEADERS += setupdialog.h \
|
||||
mainwindow.h \
|
||||
world.h \
|
||||
@ -96,7 +97,8 @@ HEADERS += setupdialog.h \
|
||||
setuppageclublog.h \
|
||||
elogclublog.h \
|
||||
utilities.h \
|
||||
dxccstatuswidget.h
|
||||
dxccstatuswidget.h \
|
||||
mainwindowmydatatab.h
|
||||
OTHER_FILES += TODO \
|
||||
README-DEVEL \
|
||||
tips-for-devel.txt \
|
||||
|
@ -32,6 +32,7 @@ LogWindow::LogWindow()
|
||||
|
||||
LogWindow::~LogWindow()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void LogWindow::createlogPanel()
|
||||
|
8
main.cpp
8
main.cpp
@ -1,17 +1,17 @@
|
||||
/* This file is part of KLog. *
|
||||
/* This file is part of KLog. *
|
||||
* *
|
||||
* KLog is free software: you can redistribute it and/or modify *
|
||||
* KLog is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* KLog is distributed in the hope that it will be useful, *
|
||||
* KLog is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with KLog. If not, see <http://www.gnu.org/licenses/>. *
|
||||
* along with KLog. If not, see <http://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -84,10 +84,13 @@ MainWindow::MainWindow(const QString _kontestDir, const QString tversion)
|
||||
myLocator = "";
|
||||
dxLocator ="";
|
||||
myPower = 0.0;
|
||||
lastPower = myPower;
|
||||
lastOperatorQRZ = operatorQRZ;
|
||||
lastStationQRZ = stationQRZ;
|
||||
lastMyLocator = myLocator;
|
||||
|
||||
//lastPower = myPower;
|
||||
//lastOperatorQRZ = operatorQRZ;
|
||||
//lastStationQRZ = stationQRZ;
|
||||
//lastMyLocator = myLocator;
|
||||
|
||||
|
||||
|
||||
entitiesList.clear();
|
||||
propModeList.clear();
|
||||
@ -243,6 +246,8 @@ MainWindow::MainWindow(const QString _kontestDir, const QString tversion)
|
||||
setupDialog = new SetupDialog(configFileName, softwareVersion, 0, !configured);
|
||||
//qDebug() << "MainWindow::MainWindow: satTabWidget to be created" << endl;
|
||||
satTabWidget = new MainWindowSatTab();
|
||||
myDataTabWidget = new MainWindowMyDataTab();
|
||||
|
||||
//qDebug() << "MainWindow::MainWindow: fileManager to be created" << endl;
|
||||
filemanager = new FileManager(kontestDir, softwareVersion, *db);
|
||||
|
||||
@ -957,27 +962,30 @@ QString MainWindow::readDataFromUIDX()
|
||||
stringData = stringData + ", '" + aux1 + "'";
|
||||
}
|
||||
|
||||
|
||||
aux1 = operatorLineEdit->text();
|
||||
aux1 = myDataTabWidget->getOperator();
|
||||
//aux1 = operatorLineEdit->text();
|
||||
if (aux1.length()>2)
|
||||
{
|
||||
lastOperatorQRZ = aux1.toUpper();
|
||||
//lastOperatorQRZ = aux1.toUpper();
|
||||
stringFields = stringFields + ", operator";
|
||||
stringData = stringData + ", '" + aux1 + "'";
|
||||
}
|
||||
|
||||
aux1 = (stationCallSignLineEdit->text()).toUpper();
|
||||
aux1 = myDataTabWidget->getStationQRZ();
|
||||
//aux1 = (stationCallSignLineEdit->text()).toUpper();
|
||||
if (aux1.length()>2)
|
||||
{
|
||||
lastStationQRZ = aux1.toUpper();
|
||||
//lastStationQRZ = aux1.toUpper();
|
||||
stringFields = stringFields + ", station_callsign";
|
||||
stringData = stringData + ", '" + aux1 + "'";
|
||||
}
|
||||
|
||||
aux1 = myLocatorLineEdit->text();
|
||||
aux1 = myDataTabWidget->getMyLocator();
|
||||
//aux1 = myLocatorLineEdit->text();
|
||||
if (aux1.length()>2)
|
||||
{
|
||||
lastMyLocator = aux1.toUpper();
|
||||
|
||||
//lastMyLocator = aux1.toUpper();
|
||||
stringFields = stringFields + ", my_gridsquare";
|
||||
stringData = stringData + ", '" + aux1 + "'";
|
||||
}
|
||||
@ -1033,10 +1041,10 @@ QString MainWindow::readDataFromUIDX()
|
||||
stringData = stringData + ", '" + aux1 + "'";
|
||||
}
|
||||
|
||||
aux1 = QString::number(myPowerSpinBox->value());
|
||||
aux1 = QString::number(myDataTabWidget->getMyPower());
|
||||
if ((aux1.toDouble())>0.0)
|
||||
{
|
||||
lastPower = aux1.toDouble();
|
||||
//lastPower = aux1.toDouble();
|
||||
stringFields = stringFields + ", tx_pwr";
|
||||
stringData = stringData + ", '" + aux1 + "'";
|
||||
}
|
||||
@ -3583,9 +3591,10 @@ void MainWindow::slotClearButtonClicked()
|
||||
prefixLabel->setText("");
|
||||
cqzLabel->setText("0");
|
||||
ituzLabel->setText("0");
|
||||
/*
|
||||
if (!keepMyData)
|
||||
{
|
||||
myPowerSpinBox->setValue(lastPower);
|
||||
//myPowerSpinBox->setValue(lastPower);
|
||||
operatorLineEdit->setText(lastOperatorQRZ.toUpper());
|
||||
stationCallSignLineEdit->setText(lastStationQRZ.toUpper());
|
||||
myLocatorLineEdit->setText(lastMyLocator);
|
||||
@ -3598,10 +3607,10 @@ void MainWindow::slotClearButtonClicked()
|
||||
myLocatorLineEdit->setText(myLocator);
|
||||
}
|
||||
|
||||
if (!satTabWidget->getRepeatThis())
|
||||
{
|
||||
satTabWidget->clear();
|
||||
}
|
||||
*/
|
||||
satTabWidget->clear();
|
||||
myDataTabWidget->clear(keepMyData);
|
||||
|
||||
|
||||
clearInfoFromLocators();
|
||||
clearBandLabels();
|
||||
@ -3964,9 +3973,9 @@ void MainWindow::slotSetup(const int _page)
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
defineStationCallsign();
|
||||
|
||||
//checkIfNewBandOrMode();
|
||||
}
|
||||
|
||||
@ -4993,11 +5002,10 @@ void MainWindow::readConfigData()
|
||||
}
|
||||
showEntityInfo(currentEntity);
|
||||
|
||||
lastPower = myPower;
|
||||
defineStationCallsign();
|
||||
lastOperatorQRZ = operatorQRZ;
|
||||
lastStationQRZ = stationQRZ;
|
||||
lastMyLocator = myLocator;
|
||||
//lastPower = myPower;
|
||||
//lastOperatorQRZ = operatorQRZ;
|
||||
//lastStationQRZ = stationQRZ;
|
||||
//lastMyLocator = myLocator;
|
||||
|
||||
configured = true;
|
||||
awards->setColors (newOneColor.name(), neededColor.name(), workedColor.name(), confirmedColor.name(), defaultColor.name());
|
||||
@ -5829,7 +5837,8 @@ void MainWindow::createUIDX()
|
||||
myDataInputTabWidgetLayout->addWidget(myLocatorLineEdit, 3, 1);
|
||||
|
||||
myDataInputTabWidget->setLayout(myDataInputTabWidgetLayout);
|
||||
i = dxUpLeftTab->addTab(myDataInputTabWidget, tr("My Data"));
|
||||
//i = dxUpLeftTab->addTab(myDataInputTabWidget, tr("My Data"));
|
||||
i = dxUpLeftTab->addTab(myDataTabWidget, tr("My Data"));
|
||||
|
||||
// MyData Tab finishes here
|
||||
|
||||
@ -6782,21 +6791,32 @@ void MainWindow::qsoToEdit (const int _qso)
|
||||
aux1 = (query.value(nameCol)).toString();
|
||||
locatorLineEdit->setText(aux1);
|
||||
|
||||
|
||||
nameCol = rec.indexOf("operator");
|
||||
aux1 = (query.value(nameCol)).toString();
|
||||
operatorLineEdit->setText(aux1.toUpper());
|
||||
aux1 = (query.value(nameCol)).toString();
|
||||
//operatorLineEdit->setText(aux1.toUpper());
|
||||
|
||||
myDataTabWidget->setOperator(aux1);
|
||||
|
||||
nameCol = rec.indexOf("station_callsign");
|
||||
aux1 = (query.value(nameCol)).toString();
|
||||
stationCallSignLineEdit->setText(aux1.toUpper());
|
||||
aux1 = (query.value(nameCol)).toString();
|
||||
//stationCallSignLineEdit->setText(aux1.toUpper());
|
||||
|
||||
myDataTabWidget->setStationQRZ(aux1);
|
||||
|
||||
nameCol = rec.indexOf("my_gridsquare");
|
||||
aux1 = (query.value(nameCol)).toString();
|
||||
myLocatorLineEdit->setText(aux1);
|
||||
//myLocatorLineEdit->setText(aux1);
|
||||
|
||||
myDataTabWidget->setMyLocator(aux1);
|
||||
|
||||
nameCol = rec.indexOf("tx_pwr");
|
||||
aux1 = (query.value(nameCol)).toString();
|
||||
testValueDouble = aux1.toDouble();
|
||||
//aux1 = (query.value(nameCol)).toString();
|
||||
//testValueDouble = aux1.toDouble();
|
||||
|
||||
myDataTabWidget->setMyPower((query.value(nameCol)).toDouble());
|
||||
myDataTabWidget->show();
|
||||
/*
|
||||
if (testValueDouble >=0)
|
||||
{
|
||||
myPowerSpinBox->setValue(testValueDouble);
|
||||
@ -6805,7 +6825,7 @@ void MainWindow::qsoToEdit (const int _qso)
|
||||
{
|
||||
myPowerSpinBox->setValue(0.0);
|
||||
}
|
||||
|
||||
*/
|
||||
nameCol = rec.indexOf("rx_pwr");
|
||||
aux1 = (query.value(nameCol)).toString();
|
||||
testValueDouble = aux1.toDouble();
|
||||
@ -8752,7 +8772,7 @@ void MainWindow::defineStationCallsign()
|
||||
{
|
||||
stationQRZ = mainQRZ;
|
||||
}
|
||||
lastStationQRZ = stationQRZ;
|
||||
myDataTabWidget->setData(myPower, stationQRZ, operatorQRZ, myLocator);
|
||||
|
||||
//qDebug() << "MainWindow::defineStationCallsign: " << stationQRZ << endl;
|
||||
|
||||
|
@ -48,6 +48,7 @@
|
||||
#include "dxcluster.h"
|
||||
#include "awards.h"
|
||||
#include "mainwindowsattab.h"
|
||||
#include "mainwindowmydatatab.h"
|
||||
#include "elogclublog.h"
|
||||
#include "utilities.h"
|
||||
#include "downloadcty.h"
|
||||
@ -495,6 +496,7 @@ private:
|
||||
bool qslingNeeded;
|
||||
|
||||
MainWindowSatTab *satTabWidget;
|
||||
MainWindowMyDataTab *myDataTabWidget;
|
||||
bool keepSatPage;
|
||||
|
||||
// UI DX
|
||||
|
@ -86,8 +86,8 @@ void MainWindowSatTab::createUI()
|
||||
tabLayout->addWidget(satOtherLabel, 2, 0);
|
||||
tabLayout->addWidget(satNameLineEdit, 2, 1);
|
||||
|
||||
tabLayout->addWidget(keepLabel, 3, 2);
|
||||
tabLayout->addWidget(keepThisDataForNextQSORadiobutton, 3, 3);
|
||||
tabLayout->addWidget(keepLabel, 3, 1);
|
||||
tabLayout->addWidget(keepThisDataForNextQSORadiobutton, 3, 2);
|
||||
|
||||
setLayout(tabLayout);
|
||||
|
||||
@ -244,11 +244,19 @@ void MainWindowSatTab::setRepeatThis(const bool _t)
|
||||
{
|
||||
keepThisDataForNextQSORadiobutton->setChecked(_t);
|
||||
}
|
||||
|
||||
void MainWindowSatTab::clear()
|
||||
{
|
||||
satModeLineEdit->clear();
|
||||
//satNameLineEdit->clear();
|
||||
satNameComboBox->setCurrentIndex(0);
|
||||
if (keepThisDataForNextQSORadiobutton->isChecked())
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
satModeLineEdit->clear();
|
||||
satNameComboBox->setCurrentIndex(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MainWindowSatTab::populateSatComboBox()
|
||||
|
@ -708,7 +708,7 @@ QStringList SetupPageLogsNew::getValidCatOptions(const int _currentCat, const in
|
||||
|
||||
//qDebug() << "SetupPageLogsNew::getValidCatOptions: " << QString::number(_currentCat) <<"/"<< QString::number(_higherCat) << endl;
|
||||
//return dataProxy->getValidCatOptions(_currentCat, _higherCat);
|
||||
|
||||
return QStringList();
|
||||
}
|
||||
|
||||
bool SetupPageLogsNew::isThereAnyNotManagedLog()
|
||||
@ -735,6 +735,7 @@ bool SetupPageLogsNew::isThereAnyNotManagedLog()
|
||||
//qDebug() << "SetupPageLogsNew::isThereAnyNotManagedLog tras el while" << endl;
|
||||
}
|
||||
//qDebug() << "SetupPageLogsNew::isThereAnyNotManagedLog END" << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
void SetupPageLogsNew::setStationCallSign(const QString _st)
|
||||
|
Loading…
Reference in New Issue
Block a user