klog/dxccstatuswidget.h

86 lines
3.3 KiB
C
Raw Permalink Normal View History

2015-12-24 14:14:14 +00:00
#ifndef DXCCSTATUSWIDGET_H
#define DXCCSTATUSWIDGET_H
2017-05-07 09:50:35 +00:00
/***************************************************************************
dxccstatuswidget.h - description
-------------------
begin : feb 2016
copyright : (C) 2016 by Jaime Robles
email : jaime@robles.es
***************************************************************************/
2015-12-24 14:14:14 +00:00
2017-05-07 09:50:35 +00:00
/*****************************************************************************
* This file is part of KLog. *
* *
* 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, *
* 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/>. *
* *
*****************************************************************************/
2015-12-24 14:14:14 +00:00
#include <QWidget>
2016-08-04 13:49:51 +00:00
#include <QtWidgets>
#include <QString>
2016-08-04 13:49:51 +00:00
//#include <QTableView>
#include "awards.h"
#include "world.h"
#include "dataproxy.h"
2015-12-24 14:14:14 +00:00
2016-08-02 11:33:28 +00:00
//TODO: Creating the widget to show the DXCC status
2015-12-24 14:14:14 +00:00
class DXCCStatusWidget : public QWidget
{
Q_OBJECT
public:
2017-10-18 20:12:31 +00:00
explicit DXCCStatusWidget(DataProxy *dp, QWidget *parent = 0);
2016-08-04 13:49:51 +00:00
~DXCCStatusWidget();
void update();
2016-08-16 15:21:15 +00:00
void setBands(const QStringList _ent, const bool _creating = false); // Receives the list of bandIDs
void setCurrentLog(const int _logN);
2017-05-06 17:27:18 +00:00
void refresh();
2015-12-24 14:14:14 +00:00
signals:
2018-02-03 13:26:51 +00:00
void showQso(const int _qsoid); // identified QSO double clicking on DXCC
2018-02-28 16:26:03 +00:00
void showQsos(QList<int> _qsos);
2018-02-03 13:26:51 +00:00
//void updateAwards();
2015-12-24 14:14:14 +00:00
public slots:
2016-08-18 08:55:48 +00:00
//void slotSearchLineEditTextChanged();
2016-08-04 13:49:51 +00:00
void slotRefreshButtonClicked();
2018-02-03 13:26:51 +00:00
void slotItemEntered(QTableWidgetItem * item );
void slotItemDoubleClicked(QTableWidgetItem * item );
2015-12-24 14:14:14 +00:00
private:
2016-08-04 13:49:51 +00:00
void createUI();
void setDefaultBands();
void addEntity(QStringList const _ent); // DXCC id, bandid, bandid, ...
//QStringList sortBandNamesBottonUp(const QStringList _qs);
2016-08-04 13:49:51 +00:00
QTableWidget *dxccView;
Awards *awards;
World *world;
DataProxy *dataProxy;
QHeaderView *hv, *hh;
2016-08-18 08:55:48 +00:00
//QLineEdit *searchLineEdit;
2016-08-04 13:49:51 +00:00
QPushButton *refreshButton;
2016-08-18 08:55:48 +00:00
//QRadioButton *showAllLogsButton;
2016-08-04 13:49:51 +00:00
2016-08-04 13:49:51 +00:00
int numberOfColumns; // Columns will be number Of Bands + 2 (Id + Name)
QStringList bandNames, validBands;
2016-08-16 15:21:15 +00:00
int logNumber, tempLog; // log in use in the log / log to be used in the widget
2015-12-24 14:14:14 +00:00
};
#endif // DXCCSTATUSWIDGET_H