1 /***************************************************************************
2                           mainwindowinputothers.cpp  -  description
3                              -------------------
4     begin                : Ago 2016
5     copyright            : (C) 2016 by Jaime Robles
6     email                : jaime@robles.es
7  ***************************************************************************/
8 
9 /*****************************************************************************
10  * This file is part of KLog.                                                *
11  *                                                                           *
12  *    KLog is free software: you can redistribute it and/or modify           *
13  *    it under the terms of the GNU General Public License as published by   *
14  *    the Free Software Foundation, either version 3 of the License, or      *
15  *    (at your option) any later version.                                    *
16  *                                                                           *
17  *    KLog is distributed in the hope that it will be useful,                *
18  *    but WITHOUT ANY WARRANTY; without even the implied warranty of         *
19  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
20  *    GNU General Public License for more details.                           *
21  *                                                                           *
22  *    You should have received a copy of the GNU General Public License      *
23  *    along with KLog.  If not, see <https://www.gnu.org/licenses/>.          *
24  *                                                                           *
25  *****************************************************************************/
26 
27 
28 #include "mainwindowinputothers.h"
29 
MainWindowInputOthers(DataProxy_SQLite * dp,QWidget * parent)30 MainWindowInputOthers::MainWindowInputOthers(DataProxy_SQLite *dp, QWidget *parent) :
31     QWidget(parent)
32 {
33        //qDebug() << "MainWindowInputOthers::MainWindowInputOthers" << QT_ENDL;
34     entitiesList.clear();
35     propModeList.clear();
36     adifValidTypes.clear();
37     autoUpdating = false;
38     dataProxy = dp;
39     propModeList = dataProxy->getPropModeList();
40     sota_ref = QString();
41     age = 0;
42     util = new Utilities;
43     //QLabel *entityPrimLabel, *entitySecLabel, *iotaAwardLabel, *entityNameLabel, *propModeLabel;
44     iotaContinentComboBox = new QComboBox();
45     entityPrimDivComboBox = new QComboBox();
46     entitySecDivComboBox = new QComboBox();
47     entityNameComboBox = new QComboBox();
48     propModeComboBox = new QComboBox();
49     iotaNumberLineEdit = new QLineEdit();
50     keepPropCheckBox = new QCheckBox();
51     userDefinedADIFComboBox = new QComboBox();
52     userDefinedADIFValueLineEdit = new QLineEdit();
53 
54     // TODO: I should find the way to connect the SAT tabwidget's signal to set the propmode in this widget
55     //       Now it is done though the mainwindow but I should avoid depending on that class for that, if possible
56     //connect(satTabWidget, SIGNAL(setPropModeSat(QString)), this, SLOT(slotSetPropMode(QString)) ) ;
57     connect(propModeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(slotPropModeComboBoxChanged() ) ) ;
58     connect(userDefinedADIFComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUSerDefinedADIFComboBoxChanged() ) ) ;
59     connect(userDefinedADIFValueLineEdit, SIGNAL(textChanged(QString)), this, SLOT(slotSetCurrentUSerData() ) );
60 
61     createUI();
62     setInitialADIFValues ();
63        //qDebug() << "MainWindowInputOthers::MainWindowInputOthers - END" << QT_ENDL;
64 }
65 
~MainWindowInputOthers()66 MainWindowInputOthers::~MainWindowInputOthers(){}
67 
createUI()68 void MainWindowInputOthers::createUI()
69 {
70       //qDebug() << "MainWindowInputOthers::createUI" << QT_ENDL;
71 
72     palRed.setColor(QPalette::Text, Qt::red);
73     palBlack.setColor(QPalette::Text, Qt::black);
74     palWhite.setColor(QPalette::Text, Qt::white);
75 
76     QLabel *entityPrimLabel = new QLabel(tr("Primary Div"));
77     QLabel *entitySecLabel = new QLabel(tr("Secondary Div"));
78     QLabel *iotaAwardLabel = new QLabel(tr("IOTA"));
79     QLabel *entityNameLabel = new QLabel(tr("Entity"));
80     QLabel *propModeLabel = new QLabel(tr("Propagation mode"));
81     QLabel *userSelectLabel = new QLabel(tr("Others"));
82 
83     entityPrimLabel->setAlignment(Qt::AlignVCenter| Qt::AlignRight);
84     entitySecLabel->setAlignment(Qt::AlignVCenter| Qt::AlignRight);
85     iotaAwardLabel->setAlignment(Qt::AlignVCenter| Qt::AlignRight);
86     entityNameLabel->setAlignment(Qt::AlignVCenter| Qt::AlignRight);
87     propModeLabel->setAlignment(Qt::AlignVCenter| Qt::AlignRight);
88     userSelectLabel->setAlignment(Qt::AlignVCenter| Qt::AlignRight);
89 
90     keepPropCheckBox->setText(tr("Keep propagation mode"));
91 
92     entityPrimDivComboBox->setToolTip(tr("Select the primary division for this QSO."));
93     entitySecDivComboBox->setToolTip(tr("Select the secondary division for this QSO."));
94     entityNameComboBox->setToolTip(tr("Select the entity for this QSO."));
95     propModeComboBox->setToolTip(tr("Select the propagation mode for this QSO."));
96     iotaContinentComboBox->setToolTip(tr("Select the IOTA continent for this QSO."));
97     iotaNumberLineEdit->setToolTip(tr("Select the IOTA reference number for this QSO."));
98     keepPropCheckBox->setToolTip(tr("Keeps the same propagation mode for next QSO."));
99 
100     userDefinedADIFComboBox->setToolTip(tr("Select the appropriate ADIF field for this QSO."));
101     userDefinedADIFValueLineEdit->setToolTip (tr("Value for the selected ADIF field."));
102 
103     entityPrimDivComboBox->setEnabled(false);
104     entitySecDivComboBox->setEnabled(false);
105     entityNameComboBox->setEnabled(true);
106     propModeComboBox->setEnabled(true);
107     keepPropCheckBox->setEnabled(true);
108 
109     QHBoxLayout *keepLayout = new QHBoxLayout;
110     keepLayout->addWidget(propModeComboBox);
111     //keepLayout->addWidget(keepPropCheckBox);
112     keepLayout->setSizeConstraint(QLayout::SetFixedSize);
113 
114     QGridLayout *tabLayout = new QGridLayout;
115     tabLayout->addWidget(entityNameLabel, 0, 0);
116     tabLayout->addWidget(entityNameComboBox, 0, 1, 1, 2);
117     tabLayout->addWidget(entityPrimLabel, 1, 0);
118     tabLayout->addWidget(entityPrimDivComboBox, 1, 1, 1, 2);
119     tabLayout->addWidget(entitySecLabel, 2, 0);
120     tabLayout->addWidget(entitySecDivComboBox, 2, 1, 1, 2);
121     tabLayout->addWidget(iotaAwardLabel, 3, 0);
122     tabLayout->addWidget(iotaContinentComboBox, 3, 1);
123     tabLayout->addWidget(iotaNumberLineEdit, 3, 2);
124     tabLayout->addWidget(propModeLabel, 4, 0);
125     tabLayout->addLayout(keepLayout, 4, 1, 1, 2);
126     tabLayout->addWidget(entityPrimLabel, 1, 0);
127     tabLayout->addWidget(entityPrimDivComboBox, 1, 1, 1, 2);
128     tabLayout->addWidget(userSelectLabel, 5, 0);
129     tabLayout->addWidget(userDefinedADIFComboBox, 5, 1);
130     tabLayout->addWidget(userDefinedADIFValueLineEdit, 5, 2);
131     tabLayout->addWidget(keepPropCheckBox, 6, 2);
132     //tabLayout->setSizeConstraint(QLayout::SetFixedSize);
133     setLayout(tabLayout);
134 
135     if (entitiesList.size()>1)
136     {
137         entitiesList.prepend("00-" + tr("Not Identified") + " (000)");
138         entityNameComboBox->addItems(entitiesList);
139     }
140 
141     if (propModeList.size()>1)
142     {
143         propModeList.prepend("00 - " + tr("Not - Not Identified"));
144         propModeComboBox->addItems(propModeList);
145     }
146 
147     iotaContinentComboBox->addItems(dataProxy->getContinentShortNames());
148     iotaNumberLineEdit->setInputMask("000");
149     iotaNumberLineEdit->setText("000");
150 
151 
152     //qDebug() << Q_FUNC_INFO << ": (" << QString::number(this->size ().width ()) << "/" << QString::number(this->size ().height ()) << ")" ;
153 }
154 
clear(bool _full)155 void MainWindowInputOthers::clear(bool _full)
156 {
157       //qDebug() << "MainWindowInputOthers::clear" << QT_ENDL;
158     entityNameComboBox->setCurrentIndex(0);
159     userDefinedADIFComboBox->setCurrentIndex (0);
160     userDefinedADIFValueLineEdit->clear ();
161     sota_ref = QString();
162     age = 0;
163 
164     iotaContinentComboBox->setCurrentIndex(0);
165     iotaNumberLineEdit->setText("000");
166     if ((!keepPropCheckBox->isChecked()) || _full)
167     {
168       propModeComboBox->setCurrentIndex(0);
169     }
170     if (_full)
171     {
172         keepPropCheckBox->setChecked (false);
173     }
174 }
175 
setEntitiesList(const QStringList _qs)176 void MainWindowInputOthers::setEntitiesList(const QStringList _qs)
177 {
178       //qDebug() << "MainWindowInputOthers::setEntitiesList: " << QString::number(_qs.length()) << QT_ENDL;
179     entitiesList.clear();
180     entitiesList << _qs;
181     if (entitiesList.size()>1)
182     {
183         entitiesList.prepend("00-" + tr("Not Identified") + " (000)");
184         //entitiesList.prepend("00-Not Identified (000)");
185         entityNameComboBox->addItems(entitiesList);
186     }
187 }
188 
setEntity(const int _ent)189 void MainWindowInputOthers::setEntity(const int _ent)
190 {// Select the appropriate entity in the ComboBox
191        //qDebug() << "MainWindowInputOthers::setEntity: " << QString::number(_ent) << QT_ENDL;
192     if (_ent<=0)
193     {
194         entityNameComboBox->setCurrentIndex(0);
195         return;
196     }
197     QString aux = QString();
198     aux = QString::number(_ent);
199     if (_ent > 1000)
200     {
201         aux = (QString::number(_ent)).right(3);
202     }
203 
204     //QString pref = dataProxy->getEntityNameFromId(_ent);
205 
206     //int indexC = entityNameComboBox->f
207     int indexC = entityNameComboBox->findText("(" + aux + ")", Qt::MatchEndsWith);
208 
209        //qDebug() << "MainWindow::selectCorrectEntity: " << pref << "/" << QString::number(indexC) << QT_ENDL;
210     entityNameComboBox->setCurrentIndex(indexC);
211     setIOTAContinentFromEntity(_ent);
212 
213 }
214 
getEntity()215 int MainWindowInputOthers::getEntity()
216 {
217     QString aux = entityNameComboBox->currentText();
218     if (!aux.contains ('('))
219     {
220         return -1;
221     }
222     return (aux.split('(').at(1).chopped (1)).toInt ();
223 }
224 
getEntityPrefix()225 QString MainWindowInputOthers::getEntityPrefix()
226 {
227     //qDebug() << "MainWindowInputOthers::getEntityPrefix: " << (entityNameComboBox->currentText()).split('-').at(0) << QT_ENDL;
228     return (entityNameComboBox->currentText()).split('-').at(0);
229     //return world->getQRZARRLId(pref);
230 }
231 
setPropMode(const QString & _qs,bool _keep)232 void MainWindowInputOthers::setPropMode(const QString &_qs, bool _keep)
233 {
234       //qDebug() << "MainWindowInputOthers::setPropMode: " << _qs << QT_ENDL;
235     autoUpdating = true;
236     if(( propModeComboBox->findText(_qs+" -", Qt::MatchContains))>0)
237     {
238         propModeComboBox->setCurrentIndex( propModeComboBox->findText(_qs+" -", Qt::MatchContains));
239         keepPropCheckBox->setChecked(_keep);
240     }
241     else
242     {
243         propModeComboBox->setCurrentIndex(0);
244         keepPropCheckBox->setChecked(false);
245     }
246     autoUpdating = false;
247 }
248 
getPropModeFromComboBox()249 QString MainWindowInputOthers::getPropModeFromComboBox()
250 {
251     QString _pm = QString();
252       //qDebug() << "MainWindow::getPropModeFromComboBox:" << propModeComboBox->currentText() << QT_ENDL;
253     _pm = (((propModeComboBox->currentText()).split('-')).at(1)).simplified();
254     QString _n = (((propModeComboBox->currentText()).split('-')).at(0)).simplified();
255       //qDebug() << "MainWindow::getPropModeFromComboBox: " << _pm << QT_ENDL;
256 
257     if (_n == "00")
258     {
259         return QString();
260     }
261     return _pm;
262 }
263 
isSATPropagation()264 bool MainWindowInputOthers::isSATPropagation()
265 {
266     if (getPropModeFromComboBox() == "SAT")
267     {
268         return true;
269     }
270     else
271     {
272         return false;
273     }
274 }
275 
276 
clearIOTA()277 void MainWindowInputOthers::clearIOTA()
278 {
279     iotaContinentComboBox->setCurrentIndex(0);
280     iotaNumberLineEdit->setText("000");
281     //iotaNumberLineEdit->setPalette(palBlack);
282 }
283 
isIOTAModified()284 bool MainWindowInputOthers::isIOTAModified()
285 {
286     if ((iotaContinentComboBox->currentIndex()>0) || (iotaNumberLineEdit->text()).toInt()>0)
287     {
288         return true;
289     }
290     else
291     {
292         return false;
293     }
294 
295 }
296 
setIOTA(const QString & _qs)297 void MainWindowInputOthers::setIOTA(const QString &_qs)
298 {//TODO: Seems to be better to send the color info like in: (it is much more flexible as I can send any color!)
299 
300     //void MainWindowInputQSL::setQSLVia(const QString &_qs, QColor qColor)
301       //qDebug() << "MainWindow::setIOTA: " << _qs << QT_ENDL;
302     if ( (checkIfValidIOTA(_qs)).length() !=6 )
303     {
304         iotaNumberLineEdit->setPalette(palRed);
305         return;
306     }
307     else
308     {
309         QStringList values = _qs.split("-", QT_SKIP);
310           //qDebug() << "MainWindowInputOthers::setIOTA: IOTA " << _qs << QT_ENDL;
311         iotaContinentComboBox->setCurrentIndex( iotaContinentComboBox->findText(values.at(0) ) );
312         iotaNumberLineEdit->setText(values.at(1));
313         if (getDarkMode())
314         {
315             iotaNumberLineEdit->setPalette(palWhite);
316         }
317         else
318         {
319             iotaNumberLineEdit->setPalette(palBlack);
320         }
321     }
322 }
323 
getIOTA()324 QString MainWindowInputOthers::getIOTA()
325 {
326     return (checkIfValidIOTA(iotaContinentComboBox->currentText() + "-" + iotaNumberLineEdit->text()));
327 }
328 
329 
setIOTAContinentFromEntity(const int _n)330 void MainWindowInputOthers::setIOTAContinentFromEntity(const int _n)
331 {
332       //qDebug() << "MainWindow::setIOTAContinentFromEntity:" << QString::number(_n) << QT_ENDL;
333     setIOTAContinent(dataProxy->getContinentShortNameFromEntity(_n)) ;
334 }
335 
setIOTAContinent(const QString & _qs)336 void MainWindowInputOthers::setIOTAContinent(const QString &_qs)
337 {
338        //qDebug() << "MainWindowInputOthers::setIOTAContinent: " << _qs << QT_ENDL;
339        //qDebug() << "MainWindowInputOthers::setIOTAContinent: setting to index(a): " << QString::number(iotaContinentComboBox->findText(_qs, Qt::MatchContains)) << QT_ENDL;
340     if(( iotaContinentComboBox->findText(_qs, Qt::MatchContains))>0)
341     {
342           //qDebug() << "MainWindowInputOthers::setIOTAContinent: setting to index: " << QString::number(iotaContinentComboBox->findText(_qs, Qt::MatchContains)) << QT_ENDL;
343         iotaContinentComboBox->setCurrentIndex( iotaContinentComboBox->findText(_qs, Qt::MatchContains));
344     }
345     else
346     {
347            //qDebug() << "MainWindowInputOthers::setIOTAContinent: setting to index: 00" << QT_ENDL;
348         iotaContinentComboBox->setCurrentIndex(0);
349     }
350 }
351 
checkIfValidIOTA(const QString & _tiota)352 QString MainWindowInputOthers::checkIfValidIOTA(const QString &_tiota)
353 {
354 /**********************************
355   IOTA should be always with this format: CC-NNN
356   being:
357      - CC the shortname of the continent
358      - NNN Number of the reference.
359        NNN has ALWAYS to include THREE(3) characters.
360        ADIF Specs says:
361             CC is the continent designator {NA, SA, EU , AF, OC, AS, AN}
362             XXX is the island designator, where 0 <= XXX ,<= 999 [use leading zeroes]
363 
364 Returns a valid format IOTA if possible and "" in other cases.
365 
366 ************************************/
367       //qDebug() << "MainWindowInputOthers::checkIfValidIOTA: " << _tiota << QT_ENDL;
368     //bool _valid = false;
369     QString _continent;
370     QString _number;
371 
372     if (_tiota.count("-") == 1)
373     {
374         QStringList _values = _tiota.split("-", QT_SKIP);
375         _continent = _values.at(0);
376         _number = _values.at(1);
377     }
378     else
379     {
380         return "";
381     }
382 
383       //qDebug() << "MainWindowInputOthers::checkIfValidIOTA (cont) " << _continent << QT_ENDL;
384       //qDebug() << "MainWindowInputOthers::checkIfValidIOTA (numb): " << _number << QT_ENDL;
385 
386     // Check if continent is valid
387 
388     if (dataProxy->isValidContinentShortName(_continent))
389     {
390         if ( (_number.toInt() >0 ) && ((_number.toInt()) < 1000 ))
391         {
392             if ((_number.length()) == 3)
393             {
394                 return _continent + "-" + _number ;
395             }
396             else if ((_number.length()) == 2)
397             {
398                 return _continent + "-0" + QString::number((_number).toInt());
399             }
400             else if ((_number.length()) == 1)
401             {
402                 return _continent + "-00" + QString::number((_number).toInt());
403             }
404             else
405             {
406                 return "";
407             }
408         }
409         else
410         {
411             return "";
412         }
413     }
414     else
415     {
416         return QString();
417     }
418 }
419 
slotPropModeComboBoxChanged()420 void MainWindowInputOthers::slotPropModeComboBoxChanged()
421 {
422     if (autoUpdating)
423     {
424         return;
425     }
426     emit setPropMode(getPropModeFromComboBox());
427 
428 }
429 
430 
setKeep(const bool _b)431 void MainWindowInputOthers::setKeep(const bool _b)
432 {
433     keepPropCheckBox->setChecked (_b);
434 }
435 
getKeep()436 bool MainWindowInputOthers::getKeep()
437 {
438     return keepPropCheckBox->isChecked ();
439 }
440 
setUserADIFTypeComboBox(const QString & _value)441 bool MainWindowInputOthers::setUserADIFTypeComboBox(const QString &_value)
442 {
443     if (_value == "SOTA_REF")
444     {
445         userDefinedADIFComboBox->setCurrentIndex (0);
446     }
447     else if (_value == "AGE")
448     {
449         userDefinedADIFComboBox->setCurrentIndex (1);
450     }
451     else
452     {
453         return false;
454     }
455     return true;
456 }
457 
getUserADIFTypeComboBox()458 QString MainWindowInputOthers::getUserADIFTypeComboBox()
459 {
460     int value = (((userDefinedADIFComboBox->currentText ()).split('-')).at(0)).toInt ();
461     //qDebug() << Q_FUNC_INFO << ": " << QString::number(value);
462     //qDebug() << Q_FUNC_INFO << ": " << QString::number(value);
463     switch (value)
464     {
465     case 1:
466         return "SOTA_REF";
467     case 2:
468         return "AGE";
469     case 3:
470         return "VUCC_GRIDS";
471     default:
472         return QString();
473     }
474 }
475 
setUserADIFValue(const QString & _adifValue)476 bool MainWindowInputOthers::setUserADIFValue(const QString &_adifValue)
477 {
478     userDefinedADIFValueLineEdit->setText (_adifValue);
479     return true;
480 }
481 
getUserADIFValue()482 QString MainWindowInputOthers::getUserADIFValue()
483 {
484     return userDefinedADIFValueLineEdit->text();
485 
486 }
487 
setInitialADIFValues()488 bool MainWindowInputOthers::setInitialADIFValues()
489 {
490     adifValidTypes << "01-" + tr("SOTA Ref") << "02-" + tr ("Age") << "03-" + tr ("VUCC grids");
491     userDefinedADIFComboBox->clear ();
492     userDefinedADIFComboBox->addItems (adifValidTypes);
493     return true;
494 }
495 
slotUSerDefinedADIFComboBoxChanged()496 void MainWindowInputOthers::slotUSerDefinedADIFComboBoxChanged()
497 {
498     //qDebug() << Q_FUNC_INFO << ": " << getUserADIFTypeComboBox ();
499     QString currentTag = getUserADIFTypeComboBox ();
500 
501     setColorsForUserDefinedADIFValueLineEdit();
502 
503     if (currentTag == "SOTA_REF")
504     {
505         userDefinedADIFValueLineEdit->setText (sota_ref);
506     }
507     else if (currentTag == "AGE")
508     {
509         userDefinedADIFValueLineEdit->setText (QString::number(age));
510     }
511     else if (currentTag == "VUCC_GRIDS")
512     {
513         userDefinedADIFValueLineEdit->setText (vucc_grids);
514     }
515 }
516 
setVUCCGrids(const QString & _op)517 bool MainWindowInputOthers::setVUCCGrids(const QString &_op)
518 {
519     //qDebug() << Q_FUNC_INFO << ": " << _op;
520     if (checkVUCC_GRIDS(_op))
521     {
522         vucc_grids = _op;
523         slotUSerDefinedADIFComboBoxChanged();
524         return true;
525     }
526     return false;
527 }
528 
checkVUCC_GRIDS(const QString & _string)529 bool MainWindowInputOthers::checkVUCC_GRIDS(const QString &_string)
530 {
531     //qDebug() << Q_FUNC_INFO << ": " << _string;
532 
533     if (util->isValidVUCCGrids (_string))
534     {
535         setColorsForUserDefinedADIFValueLineEdit();
536         return true;
537     }
538     else
539     {
540         userDefinedADIFValueLineEdit->setPalette (palRed);
541         return false;
542     }
543 
544 }
545 
getVUCCGrids()546 QString MainWindowInputOthers::getVUCCGrids()
547 {
548     if (checkVUCC_GRIDS (vucc_grids))
549     {
550         return vucc_grids;
551     }
552     else
553     {
554         return QString();
555     }
556 }
557 
setColorsForUserDefinedADIFValueLineEdit()558 void MainWindowInputOthers::setColorsForUserDefinedADIFValueLineEdit()
559 {
560     if (getDarkMode())
561     {
562         userDefinedADIFValueLineEdit->setPalette(palWhite);
563     }
564     else
565     {
566         userDefinedADIFValueLineEdit->setPalette(palBlack);
567     }
568 }
569 
570 
setSOTA(const QString & _op)571 bool MainWindowInputOthers::setSOTA(const QString &_op)
572 {
573     //qDebug() << Q_FUNC_INFO << ": " << _op;
574     sota_ref = _op;
575     slotUSerDefinedADIFComboBoxChanged();
576     return true;
577 }
578 
getSOTA()579 QString MainWindowInputOthers::getSOTA()
580 {
581     //qDebug() << Q_FUNC_INFO;
582     return sota_ref;
583 }
setAge(const double _op)584 bool MainWindowInputOthers::setAge(const double _op)
585 {
586     //qDebug() << Q_FUNC_INFO << ": " << _op;
587     age = _op;
588     slotUSerDefinedADIFComboBoxChanged();
589     return true;
590 }
591 
getAge()592 double MainWindowInputOthers::getAge()
593 {
594     return age;
595 }
596 
slotSetCurrentUSerData()597 void MainWindowInputOthers::slotSetCurrentUSerData()
598 {
599     QString currentTag = getUserADIFTypeComboBox ();
600 
601     if (currentTag == "SOTA_REF")
602     {
603        sota_ref = userDefinedADIFValueLineEdit->text();
604     }
605     else if (currentTag == "AGE")
606     {
607         age = userDefinedADIFValueLineEdit->text().toDouble();
608     }
609     else if (currentTag == "VUCC_GRIDS")
610     {
611         //if (checkVUCC_GRIDS(userDefinedADIFValueLineEdit->text()))
612         //{}
613         vucc_grids = userDefinedADIFValueLineEdit->text().toUpper();
614         userDefinedADIFValueLineEdit->setText (vucc_grids);
615     }
616 }
617 
getDarkMode()618 bool MainWindowInputOthers::getDarkMode()
619 {
620     if ( iotaNumberLineEdit->palette().color (QPalette::Base) == "#646464")
621     {
622         return true;
623     }
624     else
625     {
626         return false;
627     }
628 }
629