3
/***************************************************************************
4
dxcluster.h - description
7
copyright : (C) 2011 by Jaime Robles
8
email : jaime@robles.es
9
***************************************************************************/
11
/*****************************************************************************
12
* This file is part of KLog. *
14
* KLog is free software: you can redistribute it and/or modify *
15
* it under the terms of the GNU General Public License as published by *
16
* the Free Software Foundation, either version 3 of the License, or *
17
* (at your option) any later version. *
19
* KLog is distributed in the hope that it will be useful, *
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
22
* GNU General Public License for more details. *
24
* You should have received a copy of the GNU General Public License *
25
* along with KLog. If not, see <https://www.gnu.org/licenses/>. *
27
*****************************************************************************/
30
//#include <QtWidgets>
36
#include "utilities.h"
37
#include "dataproxy_sqlite.h"
42
class DXClusterWidget : public QWidget
47
DXClusterWidget(DataProxy_SQLite *dp, QWidget *parent );
48
DXClusterWidget(DataProxy_SQLite *dp, const QString &clusterToConnect, const int portToConnect, QWidget *parent );
50
void setColors (const QString &_newOne, const QString &_needed, const QString &_worked, const QString &_confirmed, const QString &_default);
51
void setDXClusterSpotConfig(bool _showhf, bool _showvhf, bool _showwarc, bool _showworked, bool _showconfirmed, bool _showann, bool _showwwv, bool _showwcy );
52
void setDXClusterServer(const QString &clusterToConnect, const int portToConnect);
53
void setCurrentLog(const int _log);
55
void setMyQRZ(const QString &_qrz);
56
void setDXMarathon (const bool _enable);
57
void setSaveSpots (const bool _enable);
58
//void sendSpotToCluster(const QString &_dx, const QString &_freq);
65
void slotClusterDisplayError(QAbstractSocket::SocketError socketError);
66
void slotClusterDataArrived();
67
void slotClusterSocketConnected();
68
void slotClusterSocketConnectionClosed();
69
void slotClusterSendToServer();
70
void slotClusterClearLineInput();
71
void slotClusterInputTextChanged();
73
void slotClusterDXClusterWidgetItemDoubleClicked( QListWidgetItem * item );
74
void slotClusterDXClusterWidgetItemEntered( QListWidgetItem * item);
75
void slotClusterDXClusterWidgetItemSelected();
78
void dxspotclicked(const QStringList &_qs); // DXSpotCall, DX-Freq, doubleClicked
79
//void dxspot(const QString &_spot); // The text string to be saved
83
//void TESTADDSPOT(); // Just a test spot
86
void connectToDXCluster();
87
QStringList readItem(QListWidgetItem * item);
88
bool checkIfNeedsToBePrinted(const QString &_DXEntity, const int _band, const int _mode);
89
void saveSpot (const QString &_spot);
91
void addData(); //TO BE DELETED, JUST FOR TESTING PURPOSES
94
QTcpSocket *tcpSocket;
95
QListWidget *dxClusterListWidget;
96
QLineEdit *inputCommand;
97
QPushButton *sendButton;
98
QPushButton *clearButton;
100
bool dxClusterConnected;
101
bool dxClusterAlreadyConnected;
110
DataProxy_SQLite *dataProxy;
113
bool showhf, showvhf, showwarc, showworked, showconfirmed, showann, showwwv, showwcy;
114
bool dxClusterShowHF, dxClusterShowVHF, dxClusterShowWARC, dxClusterShowWorked, dxClusterShowConfirmed, dxClusterShowAnn, dxClusterShowWWV, dxClusterShowWCY;
119
int constrid; // Just an id for the constructor to check who is being executed at one specific time
121
QFile *saveSpotsFile;
122
bool saveSpots; // write/save the spots to a file
126
class dxClusterSpotItem : public QListWidgetItem {
130
dxClusterSpotItem( QListWidget* parent, const QString& spot, const QColor& color );
131
~dxClusterSpotItem();
139
#endif // DXCLUSTER_H