~ea4k/klog/trunk

« back to all changes in this revision

Viewing changes to branches/1.3/setuppages/setuppagesatsnew.h

  • Committer: jaime
  • Date: 2020-10-03 09:19:54 UTC
  • Revision ID: svn-v4:5834a56a-7829-0410-841d-b57922c102d6::782
KLogĀ 1.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef SETUPPAGESATSNEW_H
 
2
#define SETUPPAGESATSNEW_H
 
3
/***************************************************************************
 
4
                          setuppagesatsnew.h  -  description
 
5
                             -------------------
 
6
    begin                : dec 2018
 
7
    copyright            : (C) 2018 by Jaime Robles
 
8
    email                : jaime@robles.es
 
9
 ***************************************************************************/
 
10
 
 
11
/*****************************************************************************
 
12
 * This file is part of KLog.                                             *
 
13
 *                                                                           *
 
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.                                    *
 
18
 *                                                                           *
 
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.                           *
 
23
 *                                                                           *
 
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/>.       *
 
26
 *                                                                           *
 
27
 *****************************************************************************/
 
28
//
 
29
// This class implements the Dialog to add a new satellite
 
30
//
 
31
#include "dataproxy_sqlite.h"
 
32
 
 
33
#include <QDialog>
 
34
#include <QtWidgets>
 
35
#include <QSqlQuery>
 
36
 
 
37
//TODO: Read the data when the user clicks the OK button
 
38
//TODO: Fill the data from the list of sats when the user wants to edit a sat
 
39
 
 
40
class SetupPageSatsNew : public QDialog
 
41
{
 
42
    Q_OBJECT
 
43
 
 
44
public:
 
45
    SetupPageSatsNew(DataProxy_SQLite *dp, QWidget *parent = nullptr);
 
46
 
 
47
    void setEditing(const bool b);
 
48
 
 
49
    void setShortName(const QString st);
 
50
    void setName(const QString st);
 
51
    void setUpLink(const QString st);
 
52
    void setDownLink(const QString st);
 
53
    void setModes(const QString st);
 
54
 
 
55
    void clear();
 
56
 
 
57
 
 
58
private slots:
 
59
    void slotOKButtonClicked();
 
60
    void slotCancelButtonClicked();
 
61
 
 
62
    void slotShortNameTextChanged();
 
63
    void slotNameTextChanged();
 
64
    void slotUpLinkTextChanged();
 
65
    void slotDownLinkTextChanged();
 
66
    void slotModesTextChanged();
 
67
 
 
68
signals:
 
69
    void newSatData(const QStringList _qs); //
 
70
    void cancelled(const bool _c); // Cancel button is clicked
 
71
 
 
72
private:
 
73
 
 
74
    //bool isThereAnyNotManagedSat();
 
75
    void createUI();
 
76
    void gatherAndSend();
 
77
    bool isItAFreq(const QString _st);
 
78
 
 
79
    //void fillWithType(const int _n);
 
80
    //void updateAllCats();
 
81
    //void showOK();
 
82
    //void showNOK();
 
83
    //void clear();
 
84
 
 
85
 
 
86
    DataProxy_SQLite *dataProxy;
 
87
 
 
88
    QLineEdit *shortNameLineEdit, *nameLineEdit;
 
89
    QLineEdit *uplinkLineEdit, *downlinkLineEdit;
 
90
    QLineEdit *modesLineEdit;
 
91
 
 
92
    QLabel *shortNameLabel, *nameLabel;
 
93
    QLabel *uplinkLabel, *downlinkLabel;
 
94
    QLabel *modesLabel;
 
95
 
 
96
 
 
97
    QString shortName, name, uplink, downlink, modes;
 
98
    bool hasShortName, hasName, hasUplink, hasDownlink, hasModes;
 
99
 
 
100
    QPushButton *okButton, *cancelButton;
 
101
 
 
102
    QStringList satData;
 
103
    bool editing;
 
104
 
 
105
};
 
106
 
 
107
#endif // SETUPPAGESATSNEW_H