2015-01-14 18:51:30 +00:00
|
|
|
#ifndef SETUPDIALOG_H
|
|
|
|
#define SETUPDIALOG_H
|
|
|
|
/***************************************************************************
|
|
|
|
setupdialog.h - description
|
|
|
|
-------------------
|
|
|
|
begin : sept 2011
|
|
|
|
copyright : (C) 2011 by Jaime Robles
|
|
|
|
email : jaime@robles.es
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* 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/>. *
|
|
|
|
* *
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
//#include <QtWidgets>
|
|
|
|
#include <QDialog>
|
|
|
|
|
|
|
|
#include "setuppageuserdata.h"
|
2017-06-25 16:59:42 +00:00
|
|
|
#include "setuppagebandmode.h"
|
2015-01-14 18:51:30 +00:00
|
|
|
#include "setuppagemisc.h"
|
|
|
|
#include "setuppagedxcluster.h"
|
|
|
|
#include "setuppagecolors.h"
|
|
|
|
#include "setuppagelogs.h"
|
|
|
|
#include "setuppageworldeditor.h"
|
2015-05-02 19:00:48 +00:00
|
|
|
#include "setuppageclublog.h"
|
2018-07-23 16:15:01 +00:00
|
|
|
#include "setuppageudp.h"
|
2018-12-27 18:45:22 +00:00
|
|
|
#include "setuppagesats.h"
|
2015-11-06 19:47:52 +00:00
|
|
|
#include "utilities.h"
|
2015-03-01 11:17:47 +00:00
|
|
|
|
2015-01-14 18:51:30 +00:00
|
|
|
|
|
|
|
#include "locator.h"
|
|
|
|
|
|
|
|
|
|
|
|
class QListWidget;
|
|
|
|
class QListWidgetItem;
|
|
|
|
class QStackedWidget;
|
|
|
|
|
|
|
|
class SetupDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2017-10-18 20:12:31 +00:00
|
|
|
SetupDialog(DataProxy *dp, const bool _firstTime=true);
|
|
|
|
SetupDialog(DataProxy *dp, const QString _configFile, const QString _softwareVersion, const int _page=0, const bool _firstTime = true);
|
2015-01-14 18:51:30 +00:00
|
|
|
~SetupDialog();
|
|
|
|
|
|
|
|
void setData(const QString _configFile, const QString _softwareVersion, const int _page, const bool _firstTime=true);
|
2015-06-07 11:50:34 +00:00
|
|
|
void setClubLogActive(const bool _b);
|
2015-11-09 07:50:38 +00:00
|
|
|
void checkIfNewBandOrMode();
|
2015-01-14 18:51:30 +00:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void exitSignal(const int status); // 1 = OK, -1 = NOK, 2 = Cancel clicked
|
2017-10-31 17:10:03 +00:00
|
|
|
void queryError(QString functionFailed, QString errorCodeS, int errorCodeN, QString failedQuery); // To alert about any failed query execution
|
2016-08-11 17:37:59 +00:00
|
|
|
//void newLogRequested(const bool _s); // true show new log
|
2015-01-14 18:51:30 +00:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void changePage(QListWidgetItem *current, QListWidgetItem *previous);
|
|
|
|
void slotReadConfigData();
|
|
|
|
void slotOkButtonClicked();
|
|
|
|
void slotCancelButtonClicked();
|
2017-05-06 17:27:18 +00:00
|
|
|
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
|
2017-10-31 17:10:03 +00:00
|
|
|
void slotQueryErrorManagement(QString functionFailed, QString errorCodeS, int errorCodeN, QString failedQuery);
|
2015-01-14 18:51:30 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
void setConfigFile(const QString _configFile);
|
|
|
|
void setSoftVersion(const QString _softwareVersion);
|
|
|
|
void setConfigured(const bool _configured);
|
|
|
|
void setPage(const int _page);
|
2017-05-06 17:27:18 +00:00
|
|
|
void connectActions();
|
2015-01-14 18:51:30 +00:00
|
|
|
|
|
|
|
void createIcons();
|
|
|
|
bool processConfigLine(const QString _line);
|
|
|
|
|
|
|
|
void setDefaults();
|
|
|
|
|
|
|
|
void readActiveBands (const QString actives);
|
|
|
|
void readActiveModes (const QString actives);
|
|
|
|
bool isValidBand (const QString b);
|
|
|
|
bool isValidMode (const QString b);
|
2015-11-09 07:50:38 +00:00
|
|
|
|
2015-01-14 18:51:30 +00:00
|
|
|
QString checkAndFixASCIIinADIF(const QString _data);
|
2015-03-01 11:17:47 +00:00
|
|
|
bool haveAtleastOneLog();
|
2015-01-14 18:51:30 +00:00
|
|
|
|
|
|
|
bool firstTime; // To know if we are calling it from the Start wizard or not
|
2015-03-01 19:32:29 +00:00
|
|
|
bool nolog; // If there is no log being managed
|
2015-01-14 18:51:30 +00:00
|
|
|
QString dxClusterServerToUse;
|
|
|
|
QStringList dxClusterServers;
|
|
|
|
|
|
|
|
QTabWidget *tabWidget;
|
2015-02-15 20:07:35 +00:00
|
|
|
int logsPageTabN;
|
2015-01-14 18:51:30 +00:00
|
|
|
|
|
|
|
QListWidget *contentsWidget;
|
|
|
|
QStackedWidget *pagesWidget;
|
|
|
|
|
|
|
|
SetupPageUserDataPage *userDataPage;
|
2017-06-25 16:59:42 +00:00
|
|
|
SetupPageBandMode *bandModePage;
|
2015-01-14 18:51:30 +00:00
|
|
|
SetupPageDxCluster *dxClusterPage;
|
|
|
|
SetupPageMisc *miscPage;
|
|
|
|
SetupPageColors *colorsPage;
|
|
|
|
SetupPageLogs *logsPage;
|
|
|
|
SetupPageWorldEditor *worldEditorPage;
|
2015-05-02 19:00:48 +00:00
|
|
|
SetupPageClubLog *clubLogPage;
|
2018-07-23 16:15:01 +00:00
|
|
|
SetupPageUDP *UDPPage;
|
2018-12-27 18:45:22 +00:00
|
|
|
SetupPageSats *satsPage;
|
2015-01-14 18:51:30 +00:00
|
|
|
|
|
|
|
int pageRequested; // The page on the Dialog that is requested to be shown when you call it
|
2017-08-07 11:31:13 +00:00
|
|
|
//QString klogDir;
|
2015-01-14 18:51:30 +00:00
|
|
|
QString configFileName, version;
|
|
|
|
|
|
|
|
QStringList bands, modes;
|
|
|
|
Locator *locator;
|
2015-03-01 11:17:47 +00:00
|
|
|
DataProxy *dataProxy;
|
2015-01-14 18:51:30 +00:00
|
|
|
|
2015-11-06 19:47:52 +00:00
|
|
|
Utilities *util;
|
2017-12-31 16:23:23 +00:00
|
|
|
|
|
|
|
int constrid; // Just an id for the constructor to check who is being executed at one specific time
|
2015-01-14 18:51:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // SETUPDIALOG_H
|