mirror of
https://github.com/ea4k/klog.git
synced 2024-09-21 10:28:06 +00:00
issue-563-start
This commit is contained in:
parent
41901137bc
commit
f0a5105061
@ -31,10 +31,10 @@ email : jaime@robles.es
|
||||
#include <QtWidgets>
|
||||
#include <QTcpSocket>
|
||||
#include <QObject>
|
||||
#include "awards.h"
|
||||
#include "world.h"
|
||||
#include "utilities.h"
|
||||
#include "dataproxy_sqlite.h"
|
||||
#include "../awards.h"
|
||||
#include "../world.h"
|
||||
#include "../utilities.h"
|
||||
#include "../dataproxy_sqlite.h"
|
||||
|
||||
class QWidget;
|
||||
class QTcpSocket;
|
||||
|
@ -25,6 +25,48 @@ email : jaime@robles.es
|
||||
*****************************************************************************/
|
||||
#include "dxclusterassistant.h"
|
||||
|
||||
DXClusterAssistant::DXClusterAssistant(QWidget *parent)
|
||||
DXClusterAssistant::DXClusterAssistant(const QString &_parentFunction, QWidget *parent)
|
||||
: QWidget{parent}
|
||||
{}
|
||||
{
|
||||
#ifdef QT_DEBUG
|
||||
//qDebug() << ": " << _parentFunction;
|
||||
#else
|
||||
#endif
|
||||
(void)_parentFunction;
|
||||
//qDebug() << Q_FUNC_INFO << " - Start: " + _parentFunction;
|
||||
|
||||
tableWidget = new QTableWidget;
|
||||
}
|
||||
|
||||
DXClusterAssistant::~DXClusterAssistant(){};
|
||||
|
||||
bool DXClusterAssistant::init()
|
||||
{
|
||||
return createUI();
|
||||
}
|
||||
|
||||
bool DXClusterAssistant::createUI()
|
||||
{
|
||||
//qDebug() << Q_FUNC_INFO << " - Start";
|
||||
tableWidget->setSortingEnabled (true);
|
||||
|
||||
hv = tableWidget->verticalHeader();
|
||||
hv->hide();
|
||||
hv->setStretchLastSection(true);
|
||||
hh = tableWidget->horizontalHeader();
|
||||
|
||||
QStringList header;
|
||||
header.clear();
|
||||
header << tr("DX") << tr("Freq") << tr("Priority"); // tr("Mode");
|
||||
tableWidget->setColumnCount(header.length());
|
||||
tableWidget->setHorizontalHeaderLabels(header);
|
||||
|
||||
QGridLayout *mainLayout = new QGridLayout;
|
||||
mainLayout->addWidget(tableWidget, 3, 0, 1, -1);
|
||||
|
||||
setLayout(mainLayout);
|
||||
return true;
|
||||
|
||||
//connect(cancelButton, SIGNAL(clicked()), this, SLOT(slotCancelPushButtonClicked() ) );
|
||||
//qDebug() << Q_FUNC_INFO << " - END";
|
||||
}
|
||||
|
@ -25,15 +25,34 @@ email : jaime@robles.es
|
||||
* along with KLog. If not, see <https://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
*****************************************************************************/
|
||||
#include <QWidget>
|
||||
|
||||
|
||||
|
||||
// This widget will show the DX-Cluster assistant
|
||||
// The class shows an ordered list of available spots that are available now and the
|
||||
// associated freq/mode.
|
||||
// Info is coming from the cluster and ordered taking into account dxcc status:
|
||||
// confirmed/worked/needed/ATNO or even other factors TBD.
|
||||
|
||||
#include <QtWidgets>
|
||||
#include "../global.h"
|
||||
|
||||
class DXClusterAssistant : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DXClusterAssistant(QWidget *parent = nullptr);
|
||||
|
||||
explicit DXClusterAssistant(const QString &_parentFunction, QWidget *parent = nullptr);
|
||||
~DXClusterAssistant();
|
||||
bool init();
|
||||
signals:
|
||||
|
||||
private:
|
||||
bool createUI();
|
||||
|
||||
QTableWidget *tableWidget;
|
||||
QHeaderView *hv, *hh;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // DXCLUSTERASSISTANT_H
|
||||
|
@ -201,6 +201,7 @@ MainWindow::MainWindow(const QString &tversion)
|
||||
//qDebug() << Q_FUNC_INFO << ": dxclusterwidget to be created " << QTime::currentTime().toString("hh:mm:ss") ;
|
||||
//dxClusterWidget = new DXClusterWidget(dataProxy, dxclusterServerToConnect , dxclusterServerPort, this);
|
||||
dxClusterWidget = new DXClusterWidget(dataProxy, this);
|
||||
dxClusterAssistant = new DXClusterAssistant(Q_FUNC_INFO);
|
||||
|
||||
//qDebug() << Q_FUNC_INFO << ": Awards to be created " << QTime::currentTime().toString("hh:mm:ss") ;
|
||||
awards = new Awards(dataProxy, Q_FUNC_INFO);
|
||||
@ -888,6 +889,10 @@ void MainWindow::slotShowMap()
|
||||
//mapWindow->addLocators(a, QColor(0, 0, 255, 127));
|
||||
}
|
||||
|
||||
void MainWindow::slotShowDXClusterAssistant()
|
||||
{
|
||||
dxClusterAssistant->show();
|
||||
}
|
||||
void MainWindow::setMainWindowTitle()
|
||||
{
|
||||
QString aux = dataProxy->getCommentsFromLog(currentLog);
|
||||
@ -2574,6 +2579,12 @@ void MainWindow::createMenusCommon()
|
||||
connect(showMapAct, SIGNAL(triggered()), this, SLOT(slotShowMap()));
|
||||
showMapAct->setToolTip(tr("Show the statistics of your radio activity."));
|
||||
|
||||
dxClusterAssistantAct = new QAction (tr("DXCluster Assistant"), this);
|
||||
toolMenu->addAction(dxClusterAssistantAct);
|
||||
connect(dxClusterAssistantAct, SIGNAL(triggered()), this, SLOT(slotShowDXClusterAssistant()));
|
||||
dxClusterAssistantAct->setToolTip(tr("Show the statistics of your radio activity."));
|
||||
|
||||
|
||||
//qDebug() << "MainWindow::createMenusCommon before" ;
|
||||
//toolMenu->addSeparator();
|
||||
//showRotatorAct = new QAction (tr("Rotator"), this);
|
||||
|
@ -43,7 +43,8 @@
|
||||
#include "fileawardmanager.h"
|
||||
#include "dataproxy_sqlite.h"
|
||||
#include "locator.h"
|
||||
#include "dxcluster.h"
|
||||
#include "dxcluster/dxcluster.h"
|
||||
#include "dxcluster/dxclusterassistant.h"
|
||||
#include "awards.h"
|
||||
#include "inputwidgets/mainwindowsattab.h"
|
||||
#include "inputwidgets/mainwindowmydatatab.h"
|
||||
@ -303,6 +304,9 @@ private slots:
|
||||
//void slotShowQSOFromDXCCWidget(const int _q);
|
||||
void slotShowQSOsFromDXCCWidget(QList<int> _qsos);
|
||||
|
||||
// DXCLUSTER ASSISTANT
|
||||
void slotShowDXClusterAssistant();
|
||||
|
||||
//UDP Server (WXJT-x)
|
||||
void slotWSJXstatusFromUDPServer(const int _type, const QString &_dxcall, const double _freq, const QString &_mode,
|
||||
const QString &_report, const QString &_de_call, const QString &_de_grid,
|
||||
@ -563,6 +567,7 @@ private:
|
||||
QAction *qslSentRequestedAct;
|
||||
QAction *qslRecRequestedAct;
|
||||
QAction *showMapAct;
|
||||
QAction *dxClusterAssistantAct;
|
||||
|
||||
QStringList bands;
|
||||
QStringList modes;
|
||||
@ -611,6 +616,8 @@ private:
|
||||
bool dxClusterShowHF, dxClusterShowVHF, dxClusterShowWARC, dxClusterShowWorked, dxClusterShowConfirmed, dxClusterShowAnn, dxClusterShowWWV, dxClusterShowWCY;
|
||||
// </CLUSTER>
|
||||
|
||||
DXClusterAssistant *dxClusterAssistant;
|
||||
|
||||
// </UI>
|
||||
int infoTimeout; // timeout that temporary info will stay in the infobars
|
||||
QTimer *timer, *timerInfoBars;
|
||||
|
@ -43,7 +43,8 @@ HEADERS += ../../src/setupdialog.h \
|
||||
../../src/database.h \
|
||||
../../src/dataproxy_sqlite.h \
|
||||
../../src/downloadcty.h \
|
||||
../../src/dxcluster.h \
|
||||
../../src/dxcluster/dxcluster.h \
|
||||
../../src/dxcluster/dxclusterassistant.h \
|
||||
../../src/dxccstatuswidget.h \
|
||||
../../src/elogqrzlog.h \
|
||||
../../src/eqslutilities.h \
|
||||
|
@ -40,7 +40,8 @@
|
||||
#include "../../src/filemanager.h"
|
||||
#include "../../src/fileawardmanager.h"
|
||||
#include "../../src/locator.h"
|
||||
#include "../../src/dxcluster.h"
|
||||
#include "../../src/dxcluster/dxcluster.h"
|
||||
#include "../../src/dxcluster/dxclusterassistant.h"
|
||||
#include "../../src/awards.h"
|
||||
#include "../../src/awarddxmarathon.h"
|
||||
#include "../../src/inputwidgets/mainwindowsattab.h"
|
||||
|
@ -42,7 +42,8 @@ HEADERS += \
|
||||
../../src/filemanager.h \
|
||||
../../src/fileawardmanager.h \
|
||||
../../src/locator.h \
|
||||
../../src/dxcluster.h \
|
||||
../../src/dxcluster/dxcluster.h \
|
||||
../../src/dxcluster/dxclusterassistant.h \
|
||||
../../src/awards.h \
|
||||
../../src/awarddxmarathon.h \
|
||||
../../src/inputwidgets/mainwindowsattab.h \
|
||||
|
Loading…
Reference in New Issue
Block a user