├── .github ├── ISSUE_TEMPLATE │ ├── 01-Bug Report.yml │ ├── 02-Feature Request.yml │ └── config.yml └── workflows │ ├── c-cpp.yml │ └── macOSBuild.yml ├── .gitignore ├── .gitmodules ├── AUTHORS ├── CONTRIBUTING.md ├── Changelog ├── LICENSE ├── QLog.pro ├── README.md ├── core ├── AlertEvaluator.cpp ├── AlertEvaluator.h ├── AppGuard.cpp ├── AppGuard.h ├── CallbookManager.cpp ├── CallbookManager.h ├── Callsign.cpp ├── Callsign.h ├── ClubLog.cpp ├── ClubLog.h ├── CredentialStore.cpp ├── CredentialStore.h ├── DxServerString.cpp ├── DxServerString.h ├── Eqsl.cpp ├── Eqsl.h ├── Fldigi.cpp ├── Fldigi.h ├── GenericCallbook.cpp ├── GenericCallbook.h ├── Gridsquare.cpp ├── Gridsquare.h ├── HRDLog.cpp ├── HRDLog.h ├── HamQTH.cpp ├── HamQTH.h ├── HostsPortString.cpp ├── HostsPortString.h ├── KSTChat.cpp ├── KSTChat.h ├── LOVDownloader.cpp ├── LOVDownloader.h ├── LogLocale.cpp ├── LogLocale.h ├── LogParam.cpp ├── LogParam.h ├── Lotw.cpp ├── Lotw.h ├── MembershipQE.cpp ├── MembershipQE.h ├── Migration.cpp ├── Migration.h ├── MultiselectCompleter.cpp ├── MultiselectCompleter.h ├── NetworkNotification.cpp ├── NetworkNotification.h ├── PropConditions.cpp ├── PropConditions.h ├── QRZ.cpp ├── QRZ.h ├── QSLStorage.cpp ├── QSLStorage.h ├── QSOFilterManager.cpp ├── QSOFilterManager.h ├── QuadKeyCache.h ├── SerialPort.cpp ├── SerialPort.h ├── UpdatableSQLRecord.cpp ├── UpdatableSQLRecord.h ├── Wsjtx.cpp ├── Wsjtx.h ├── debug.cpp ├── debug.h ├── main.cpp ├── zonedetect.c └── zonedetect.h ├── cwkey ├── CWKeyer.cpp ├── CWKeyer.h └── drivers │ ├── CWCatKey.cpp │ ├── CWCatKey.h │ ├── CWDaemonKey.cpp │ ├── CWDaemonKey.h │ ├── CWDummyKey.cpp │ ├── CWDummyKey.h │ ├── CWFldigiKey.cpp │ ├── CWFldigiKey.h │ ├── CWKey.cpp │ ├── CWKey.h │ ├── CWWinKey.cpp │ └── CWWinKey.h ├── data ├── ActivityProfile.cpp ├── ActivityProfile.h ├── AntProfile.cpp ├── AntProfile.h ├── Band.h ├── BandPlan.cpp ├── BandPlan.h ├── CWKeyProfile.cpp ├── CWKeyProfile.h ├── CWShortcutProfile.cpp ├── CWShortcutProfile.h ├── Data.cpp ├── Data.h ├── DxSpot.h ├── Dxcc.h ├── MainLayoutProfile.cpp ├── MainLayoutProfile.h ├── POTAEntity.h ├── ProfileManager.h ├── RigProfile.cpp ├── RigProfile.h ├── RotProfile.cpp ├── RotProfile.h ├── RotUsrButtonsProfile.cpp ├── RotUsrButtonsProfile.h ├── SOTAEntity.h ├── SpotAlert.h ├── StationProfile.cpp ├── StationProfile.h ├── ToAllSpot.h ├── WCYSpot.h ├── WWFFEntity.h ├── WWVSpot.h └── WsjtxEntry.h ├── debian ├── changelog ├── compat ├── control ├── copyright ├── rules └── source │ └── format ├── devtools ├── ADIF │ ├── all_ADIF_fields_example.adi │ ├── min_ADIF_fields_example.adi │ └── test_intl.adi ├── TCISimulator │ ├── client.html │ └── server.py ├── deployment │ └── finalize_release.sh ├── timezones │ ├── README.md │ ├── builder │ │ ├── builder.cpp │ │ ├── buildspec.yml │ │ ├── makedb.sh │ │ └── zoneToAlpha.h │ ├── country_DATA_LICENSE │ └── timezone_DATA_LICENSE └── translit │ └── generate.py ├── doc └── UDP_Notifications.txt ├── i18n ├── datastrings.tri ├── dbstrings.tri ├── i18n.qrc ├── qlog_cs.qm ├── qlog_cs.ts ├── qlog_de.qm ├── qlog_de.ts ├── qlog_es.qm ├── qlog_es.ts ├── qlog_it.qm ├── qlog_it.ts ├── qlog_zh_CN.qm └── qlog_zh_CN.ts ├── installer ├── config │ └── config.xml └── packages │ └── de.dl2ic.qlog │ ├── data │ ├── .gitkeep │ └── qlog │ └── meta │ ├── installscript.qs │ ├── package.xml │ └── targetwidget.ui ├── logformat ├── AdiFormat.cpp ├── AdiFormat.h ├── AdxFormat.cpp ├── AdxFormat.h ├── CSVFormat.cpp ├── CSVFormat.h ├── JsonFormat.cpp ├── JsonFormat.h ├── LogFormat.cpp ├── LogFormat.h ├── PotaAdiFormat.cpp └── PotaAdiFormat.h ├── models ├── AlertTableModel.cpp ├── AlertTableModel.h ├── AwardsTableModel.cpp ├── AwardsTableModel.h ├── DxccTableModel.cpp ├── DxccTableModel.h ├── LogbookModel.cpp ├── LogbookModel.h ├── RigTypeModel.cpp ├── RigTypeModel.h ├── RotTypeModel.cpp ├── RotTypeModel.h ├── SearchFilterProxyModel.cpp ├── SearchFilterProxyModel.h ├── ShortcutEditorModel.cpp ├── ShortcutEditorModel.h ├── SqlListModel.cpp ├── SqlListModel.h ├── WsjtxTableModel.cpp └── WsjtxTableModel.h ├── res ├── data │ ├── contests.json │ ├── dxcc.json │ ├── legacy_modes.json │ ├── propagation_modes.json │ ├── sat_modes.json │ └── timezone21.bin ├── icons │ ├── alert.svg │ ├── baseline-pause-24px.svg │ ├── baseline-play_arrow-24px.svg │ ├── baseline-play_back-24px.svg │ ├── baseline-play_down-24px.svg │ ├── baseline-play_up-24px.svg │ ├── baseline-search-24px.svg │ ├── baseline-stop-24px.svg │ ├── cancel-24px.svg │ ├── check_circle-24px.svg │ ├── clear-button.svg │ ├── close-24px.svg │ ├── cloud_download-24px.svg │ ├── cloud_upload-24px.svg │ ├── connect.svg │ ├── delete-button.svg │ ├── disconnect.svg │ ├── done-24px.svg │ ├── filter_list-24px.svg │ ├── help-24px.svg │ ├── icons.qrc │ ├── info-24px.svg │ ├── light-dark-24px.svg │ ├── loading.gif │ ├── menu.svg │ ├── new-window.svg │ ├── password.png │ ├── search-globe.svg │ ├── search-globe_green.svg │ ├── search-globe_orange.svg │ ├── search-globe_red.svg │ ├── skip_next-24px.svg │ ├── skip_previous-24px.svg │ ├── warning.svg │ ├── zoom_in-24px.svg │ └── zoom_out-24px.svg ├── io.github.foldynl.QLog.metainfo.xml ├── map │ ├── nasabluemarble.jpg │ ├── nasaearthlights.jpg │ └── onlinemap.html ├── qlog.desktop ├── qlog.icns ├── qlog.ico ├── qlog.png ├── qlog_screen.png ├── res.qrc ├── sql │ ├── contests.sql │ ├── migration_001.sql │ ├── migration_002.sql │ ├── migration_003.sql │ ├── migration_004.sql │ ├── migration_005.sql │ ├── migration_006.sql │ ├── migration_007.sql │ ├── migration_008.sql │ ├── migration_009.sql │ ├── migration_010.sql │ ├── migration_011.sql │ ├── migration_012.sql │ ├── migration_013.sql │ ├── migration_014.sql │ ├── migration_015.sql │ ├── migration_016.sql │ ├── migration_017.sql │ ├── migration_018.sql │ ├── migration_019.sql │ ├── migration_020.sql │ ├── migration_021.sql │ ├── migration_022.sql │ ├── migration_023.sql │ ├── migration_024.sql │ ├── migration_025.sql │ ├── migration_026.sql │ ├── migration_027.sql │ ├── migration_028.sql │ ├── migration_029.sql │ ├── migration_030.sql │ ├── migration_031.sql │ ├── migration_032.sql │ └── migration_033.sql └── stylesheet.css ├── rig ├── Rig.cpp ├── Rig.h ├── RigCaps.cpp ├── RigCaps.h ├── drivers │ ├── GenericRigDrv.cpp │ ├── GenericRigDrv.h │ ├── HamlibRigDrv.cpp │ ├── HamlibRigDrv.h │ ├── OmnirigRigDrv.cpp │ ├── OmnirigRigDrv.h │ ├── Omnirigv2RigDrv.cpp │ ├── Omnirigv2RigDrv.h │ ├── TCIRigDrv.cpp │ └── TCIRigDrv.h └── macros.h ├── rotator ├── RotCaps.cpp ├── RotCaps.h ├── Rotator.cpp ├── Rotator.h └── drivers │ ├── GenericRotDrv.cpp │ ├── GenericRotDrv.h │ ├── HamlibRotDrv.cpp │ ├── HamlibRotDrv.h │ ├── PSTRotDrv.cpp │ └── PSTRotDrv.h ├── rpm_spec └── qlog.spec └── ui ├── ActivityEditor.cpp ├── ActivityEditor.h ├── ActivityEditor.ui ├── AlertRuleDetail.cpp ├── AlertRuleDetail.h ├── AlertRuleDetail.ui ├── AlertSettingDialog.cpp ├── AlertSettingDialog.h ├── AlertSettingDialog.ui ├── AlertWidget.cpp ├── AlertWidget.h ├── AlertWidget.ui ├── AwardsDialog.cpp ├── AwardsDialog.h ├── AwardsDialog.ui ├── BandmapWidget.cpp ├── BandmapWidget.h ├── BandmapWidget.ui ├── ButtonStyle.h ├── CWConsoleWidget.cpp ├── CWConsoleWidget.h ├── CWConsoleWidget.ui ├── ChatWidget.cpp ├── ChatWidget.h ├── ChatWidget.ui ├── ClockWidget.cpp ├── ClockWidget.h ├── ClockWidget.ui ├── ClublogDialog.cpp ├── ClublogDialog.h ├── ClublogDialog.ui ├── ColumnSettingDialog.cpp ├── ColumnSettingDialog.h ├── ColumnSettingDialog.ui ├── ColumnSettingSimpleDialog.ui ├── DxFilterDialog.cpp ├── DxFilterDialog.h ├── DxFilterDialog.ui ├── DxWidget.cpp ├── DxWidget.h ├── DxWidget.ui ├── DxccTableWidget.cpp ├── DxccTableWidget.h ├── EditActivitiesDialog.cpp ├── EditActivitiesDialog.h ├── EditActivitiesDialog.ui ├── EditLine.cpp ├── EditLine.h ├── Eqsldialog.cpp ├── Eqsldialog.h ├── Eqsldialog.ui ├── ExportDialog.cpp ├── ExportDialog.h ├── ExportDialog.ui ├── FreqQSpinBox.cpp ├── FreqQSpinBox.h ├── HRDLogDialog.cpp ├── HRDLogDialog.h ├── HRDLogDialog.ui ├── ImportDialog.cpp ├── ImportDialog.h ├── ImportDialog.ui ├── InputPasswordDialog.cpp ├── InputPasswordDialog.h ├── InputPasswordDialog.ui ├── KSTChatWidget.cpp ├── KSTChatWidget.h ├── KSTChatWidget.ui ├── KSTHighlightRuleDetail.cpp ├── KSTHighlightRuleDetail.h ├── KSTHighlightRuleDetail.ui ├── KSTHighlighterSettingDialog.cpp ├── KSTHighlighterSettingDialog.h ├── KSTHighlighterSettingDialog.ui ├── KSTWidget.cpp ├── KSTWidget.h ├── KSTWidget.ui ├── LogbookWidget.cpp ├── LogbookWidget.h ├── LogbookWidget.ui ├── LotwDialog.cpp ├── LotwDialog.h ├── LotwDialog.ui ├── MainWindow.cpp ├── MainWindow.h ├── MainWindow.ui ├── MapWebChannelHandler.cpp ├── MapWebChannelHandler.h ├── MapWidget.cpp ├── MapWidget.h ├── NewContactWidget.cpp ├── NewContactWidget.h ├── NewContactWidget.ui ├── OnlineMapWidget.cpp ├── OnlineMapWidget.h ├── PaperQSLDialog.cpp ├── PaperQSLDialog.h ├── PaperQSLDialog.ui ├── ProfileImageWidget.cpp ├── ProfileImageWidget.h ├── ProfileImageWidget.ui ├── QSLImportStatDialog.cpp ├── QSLImportStatDialog.h ├── QSLImportStatDialog.ui ├── QSODetailDialog.cpp ├── QSODetailDialog.h ├── QSODetailDialog.ui ├── QSOFilterDetail.cpp ├── QSOFilterDetail.h ├── QSOFilterDetail.ui ├── QSOFilterDialog.cpp ├── QSOFilterDialog.h ├── QSOFilterDialog.ui ├── QTableQSOView.cpp ├── QTableQSOView.h ├── QrzDialog.cpp ├── QrzDialog.h ├── QrzDialog.ui ├── RigWidget.cpp ├── RigWidget.h ├── RigWidget.ui ├── RotatorWidget.cpp ├── RotatorWidget.h ├── RotatorWidget.ui ├── SettingsDialog.cpp ├── SettingsDialog.h ├── SettingsDialog.ui ├── ShowUploadDialog.cpp ├── ShowUploadDialog.h ├── ShowUploadDialog.ui ├── SplashScreen.h ├── StatisticsWidget.cpp ├── StatisticsWidget.h ├── StatisticsWidget.ui ├── StyleItemDelegate.h ├── SwitchButton.cpp ├── SwitchButton.h ├── WebEnginePage.cpp ├── WebEnginePage.h ├── WsjtxFilterDialog.cpp ├── WsjtxFilterDialog.h ├── WsjtxFilterDialog.ui ├── WsjtxWidget.cpp ├── WsjtxWidget.h └── WsjtxWidget.ui /.github/ISSUE_TEMPLATE/01-Bug Report.yml: -------------------------------------------------------------------------------- 1 | name: Bug Report 2 | description: File a bug report 3 | labels: ["bug", "triage"] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Please reserve the issue tracker for reporting presumed bugs in QLog. If you have a question about usage or installation, please use the [QLog Discussions](https://github.com/foldynl/QLog/discussions) 9 | 10 | - type: textarea 11 | id: what-happened 12 | attributes: 13 | label: What happened? How can it be reproduced? Provide as much information as possible. 14 | description: Also, what did you expect to happen? 15 | validations: 16 | required: true 17 | 18 | - type: input 19 | id: specific-version 20 | attributes: 21 | label: QLog Version 22 | description: "Version reported in **Main Menu → Help → About**" 23 | value: "0.0.0" 24 | validations: 25 | required: true 26 | 27 | - type: dropdown 28 | id: ostype 29 | attributes: 30 | label: Which OS are you using? 31 | options: 32 | - Linux 33 | - macOS 34 | - Windows 35 | validations: 36 | required: true 37 | 38 | - type: dropdown 39 | id: osinstallation 40 | attributes: 41 | label: 'QLog Installation Method' 42 | description: 'Select the installation method' 43 | options: 44 | - DEB/RPM 45 | - Flatpak 46 | - EXE 47 | - DMG 48 | - Self-Compiled 49 | - I don't know 50 | validations: 51 | required: true 52 | 53 | - type: textarea 54 | id: system-information 55 | attributes: 56 | label: Installation Details 57 | description: | 58 | If you're not familiar with the QLog Installation Method mentioned above, please attach a screenshot of Main Menu → Help → About or provide more details about your OS. 59 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/02-Feature Request.yml: -------------------------------------------------------------------------------- 1 | name: Feature Request 2 | description: Request a new feature or enhancement for QLog 3 | labels: ["enhancement"] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Please describe the feature you would like to see and why it would be beneficial. 9 | 10 | Before submitting a request, check if a similar feature has already been suggested in the [existing issues](https://github.com/foldynl/QLog/issues). 11 | 12 | - type: textarea 13 | id: feature-description 14 | attributes: 15 | label: Feature Description 16 | description: Describe the feature or enhancement in detail. How should it work? Why is this feature useful? 17 | validations: 18 | required: true 19 | 20 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: "📖 Find documentation" 4 | url: https://github.com/foldynl/QLog/wiki 5 | about: "Most documentation is on the QLog wiki" 6 | - name: "📨 Ask a question — Discussions" 7 | url: https://github.com/foldynl/QLog/discussions 8 | about: "Please use GitHub Discussions for general questions" 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # C++ objects and libs 2 | *.slo 3 | *.lo 4 | *.o 5 | *.a 6 | *.la 7 | *.lai 8 | *.so 9 | *.dll 10 | *.dylib 11 | 12 | *.patch 13 | 14 | # Qt-es 15 | object_script.*.Release 16 | object_script.*.Debug 17 | *_plugin_import.cpp 18 | /.qmake.cache 19 | /.qmake.stash 20 | *.pro.user 21 | *.pro.user.* 22 | *.qbs.user 23 | *.qbs.user.* 24 | *.moc 25 | moc_*.cpp 26 | moc_*.h 27 | qrc_*.cpp 28 | ui_*.h 29 | *.qmlc 30 | *.jsc 31 | Makefile* 32 | *build-* 33 | 34 | # Qt unit tests 35 | target_wrapper.* 36 | 37 | # QtCreator 38 | *.autosave 39 | 40 | # QtCreator Qml 41 | *.qmlproject.user 42 | *.qmlproject.user.* 43 | 44 | # QtCreator CMake 45 | CMakeLists.txt.user* 46 | 47 | # QtCreator 4.8< compilation database 48 | compile_commands.json 49 | 50 | # QtCreator local machine specific files for imported projects 51 | *creator.user* 52 | .DS_Store 53 | /build 54 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "res/flags"] 2 | path = res/flags 3 | url = https://github.com/foldynl/QLog-Flags.git 4 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | MAINTAINERS: 2 | Ladislav Foldyna OK1MLG 3 | 4 | PAST MAINTAINERS: 5 | Thomas Gatzweiler DL2IC 6 | 7 | CONTRIBUTORS: 8 | Wolfgang DL2KI 9 | Fabian Kurz DJ5CW 10 | gerbert 11 | Florian Thienel 12 | AsciiWolf 13 | Maciej Krüger 14 | BG7JAF 15 | Juan Carlos EA5WA 16 | Diego LU1IDC 17 | Alfredo IK1VQY 18 | Michael AA5SH 19 | Emilio EA7QL 20 | Kyle Boyle VE9KZ 21 | -------------------------------------------------------------------------------- /core/AlertEvaluator.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CORE_ALERTEVALUATOR_H 2 | #define QLOG_CORE_ALERTEVALUATOR_H 3 | 4 | #include 5 | #include "data/DxSpot.h" 6 | #include "data/WsjtxEntry.h" 7 | #include "data/SpotAlert.h" 8 | #include 9 | 10 | class AlertRule : public QObject 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit AlertRule(QObject *parent = nullptr); 16 | ~AlertRule() {}; 17 | 18 | bool save(); 19 | bool load(const QString &); 20 | bool match(const WsjtxEntry &wsjtx) const; 21 | bool match(const DxSpot & spot) const; 22 | bool isValid() const; 23 | operator QString() const; 24 | public: 25 | QString ruleName; 26 | bool enabled; 27 | int sourceMap; 28 | QString dxCallsign; 29 | int dxCountry; 30 | int dxLogStatusMap; 31 | QString dxContinent; 32 | QString dxComment; 33 | QStringList dxMember; 34 | QString mode; 35 | QString band; 36 | int spotterCountry; 37 | QString spotterContinent; 38 | int ituz; 39 | int cqz; 40 | bool pota; 41 | bool sota; 42 | bool iota; 43 | bool wwff; 44 | 45 | private: 46 | bool ruleValid; 47 | QRegularExpression callsignRE; 48 | QRegularExpression commentRE; 49 | QSet dxMemberSet; 50 | 51 | }; 52 | 53 | class AlertEvaluator : public QObject 54 | { 55 | Q_OBJECT 56 | public: 57 | explicit AlertEvaluator(QObject *parent = nullptr); 58 | ~AlertEvaluator() {clearRules();} 59 | 60 | void clearRules(); 61 | 62 | public slots: 63 | void dxSpot(const DxSpot&); 64 | void WSJTXCQSpot(const WsjtxEntry&); 65 | void loadRules(); 66 | 67 | signals: 68 | void spotAlert(SpotAlert alert); 69 | 70 | private: 71 | QListruleList; 72 | }; 73 | 74 | #endif // QLOG_CORE_ALERTEVALUATOR_H 75 | -------------------------------------------------------------------------------- /core/AppGuard.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CORE_APPGUARD_H 2 | #define QLOG_CORE_APPGUARD_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class AppGuard 9 | { 10 | 11 | public: 12 | explicit AppGuard( const QString& key ); 13 | ~AppGuard(); 14 | 15 | bool isAnotherRunning(void); 16 | bool tryToRun(void); 17 | void release(void); 18 | 19 | private: 20 | const QString key; 21 | const QString memLockKey; 22 | const QString sharedmemKey; 23 | 24 | QSharedMemory sharedMem; 25 | QSystemSemaphore memLock; 26 | 27 | Q_DISABLE_COPY( AppGuard ) 28 | }; 29 | 30 | #endif // QLOG_CORE_APPGUARD_H 31 | -------------------------------------------------------------------------------- /core/CallbookManager.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CORE_CALLBOOKMANAGER_H 2 | #define QLOG_CORE_CALLBOOKMANAGER_H 3 | 4 | #include 5 | #include 6 | #include "core/GenericCallbook.h" 7 | 8 | class CallbookManager : public QObject 9 | { 10 | Q_OBJECT 11 | public: 12 | explicit CallbookManager(QObject *parent = nullptr); 13 | 14 | void queryCallsign(const QString &callsign); 15 | bool isActive(); 16 | 17 | signals: 18 | void loginFailed(QString); 19 | void callsignResult(const QMap& data); 20 | void callsignNotFound(QString); 21 | void lookupError(QString); 22 | 23 | public slots: 24 | void initCallbooks(); 25 | void abortQuery(); 26 | 27 | private slots: 28 | void primaryCallbookCallsignNotFound(const QString&); 29 | void secondaryCallbookCallsignNotFound(const QString&); 30 | void processCallsignResult(const QMap& data); 31 | 32 | private: 33 | GenericCallbook *createCallbook(const QString&); 34 | 35 | private: 36 | QPointer primaryCallbook; 37 | bool primaryCallbookAuthSuccess; 38 | QPointer secondaryCallbook; 39 | bool secondaryCallbookAuthSuccess; 40 | QString currentQueryCallsign; 41 | static QCache> queryCache; 42 | 43 | }; 44 | 45 | #endif // QLOG_CORE_CALLBOOKMANAGER_H 46 | -------------------------------------------------------------------------------- /core/Callsign.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CORE_CALLSIGN_H 2 | #define QLOG_CORE_CALLSIGN_H 3 | 4 | #include 5 | #include 6 | 7 | class Callsign : public QObject 8 | { 9 | Q_OBJECT 10 | public: 11 | explicit Callsign(const QString &callsign, 12 | QObject *parent = nullptr); 13 | static const QRegularExpression callsignRegEx(); 14 | static const QString callsignRegExString(); 15 | static const QStringList secondarySpecialSuffixes; 16 | 17 | const QString getCallsign() const; 18 | const QString getHostPrefix() const; 19 | const QString getHostPrefixWithDelimiter() const; 20 | const QString getBase() const; 21 | const QString getBasePrefix() const; 22 | const QString getBasePrefixNumber() const; 23 | const QString getSuffix() const; 24 | const QString getSuffixWithDelimiter() const; 25 | const QString getWPXPrefix() const; 26 | bool isValid() const; 27 | 28 | private: 29 | QString fullCallsign; 30 | QString hostPrefix; 31 | QString hostPrefixWithDelimiter; 32 | QString base; 33 | QString basePrefix; 34 | QString basePrefixNumber; 35 | QString suffix; 36 | QString suffixWithDelimiter; 37 | bool valid; 38 | }; 39 | 40 | #endif // QLOG_CORE_CALLSIGN_H 41 | -------------------------------------------------------------------------------- /core/ClubLog.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CORE_CLUBLOG_H 2 | #define QLOG_CORE_CLUBLOG_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | class QNetworkReply; 10 | class QNetworkAccessManager; 11 | 12 | class ClubLog : public QObject 13 | { 14 | Q_OBJECT 15 | public: 16 | enum OnlineCommand 17 | { 18 | INSERT_QSO, 19 | UPDATE_QSO, 20 | DELETE_QSO 21 | }; 22 | explicit ClubLog(QObject *parent = nullptr); 23 | ~ClubLog(); 24 | 25 | static const QString getEmail(); 26 | static bool isUploadImmediatelyEnabled(); 27 | static const QString getPassword(); 28 | 29 | static void saveUsernamePassword(const QString &, const QString &); 30 | static void saveUploadImmediatelyConfig(bool value); 31 | 32 | static QStringList supportedDBFields; 33 | 34 | void uploadAdif(QByteArray &data, 35 | const QString &uploadCallsign, 36 | bool clearFlag = false); 37 | void sendRealtimeRequest(const OnlineCommand command, 38 | const QSqlRecord &record, 39 | const QString &uploadCallsign); 40 | 41 | signals: 42 | void uploadFileOK(QString); 43 | void QSOUploaded(); 44 | void uploadError(QString); 45 | 46 | public slots: 47 | void processReply(QNetworkReply* reply); 48 | void abortRequest(); 49 | void insertQSOImmediately(const QSqlRecord &record); 50 | void updateQSOImmediately(const QSqlRecord &record); 51 | void deleteQSOImmediately(const QSqlRecord &record); 52 | 53 | private: 54 | QNetworkAccessManager* nam; 55 | QList activeReplies; 56 | const QString generateUploadCallsign(const QSqlRecord &record) const; 57 | QSqlRecord stripRecord(const QSqlRecord&); 58 | QSqlQuery query_updateRT; 59 | QHash RTupdatesInProgress; 60 | 61 | const static QString SECURE_STORAGE_KEY; 62 | const static QString CONFIG_EMAIL_KEY; 63 | const static QString CONFIG_UPLOAD_IMMEDIATELY_KEY; 64 | }; 65 | 66 | #endif // QLOG_CORE_CLUBLOG_H 67 | -------------------------------------------------------------------------------- /core/CredentialStore.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CORE_CREDENTIALSTORE_H 2 | #define QLOG_CORE_CREDENTIALSTORE_H 3 | 4 | #include 5 | #include 6 | 7 | class CredentialStore : public QObject 8 | { 9 | Q_OBJECT 10 | public: 11 | explicit CredentialStore(QObject *parent = nullptr); 12 | static CredentialStore* instance() 13 | { 14 | static CredentialStore instance; 15 | return &instance; 16 | }; 17 | 18 | int savePassword(const QString &storage_key, const QString &user, const QString &pass); 19 | QString getPassword(const QString &storage_key, const QString &user); 20 | void deletePassword(const QString &storage_key, const QString &user); 21 | 22 | }; 23 | 24 | #endif // QLOG_CORE_CREDENTIALSTORE_H 25 | -------------------------------------------------------------------------------- /core/DxServerString.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CORE_DXSERVERSTRING_H 2 | #define QLOG_CORE_DXSERVERSTRING_H 3 | 4 | #include 5 | 6 | class DxServerString 7 | { 8 | public: 9 | explicit DxServerString(const QString &string, 10 | const QString &defaultUsername = QString()); 11 | 12 | static bool isValidServerString(const QString &); 13 | bool isValid() const {return valid;}; 14 | QString getUsername() const {return username;}; 15 | QString getHostname() const {return hostname;}; 16 | int getPort() const {return port;}; 17 | const QString getPasswordStorageKey() const; 18 | 19 | private: 20 | static const QRegularExpression serverStringRegEx(); 21 | 22 | QString username, hostname; 23 | int port; 24 | bool valid; 25 | }; 26 | 27 | #endif // QLOG_CORE_DXSERVERSTRING_H 28 | -------------------------------------------------------------------------------- /core/Eqsl.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CORE_EQSL_H 2 | #define QLOG_CORE_EQSL_H 3 | 4 | #include 5 | #include 6 | 7 | #include "QSLStorage.h" 8 | 9 | class QNetworkAccessManager; 10 | class QNetworkReply; 11 | 12 | class EQSL : public QObject 13 | { 14 | Q_OBJECT 15 | public: 16 | explicit EQSL(QObject *parent = nullptr); 17 | ~EQSL(); 18 | 19 | void update(const QDate&, bool, const QString&); 20 | void uploadAdif(const QByteArray&); 21 | void getQSLImage(const QSqlRecord&); 22 | 23 | static const QString getUsername(); 24 | static const QString getPassword(); 25 | static void saveUsernamePassword(const QString&, const QString&); 26 | 27 | signals: 28 | void updateProgress(int value); 29 | void updateStarted(); 30 | void updateComplete(QSLMergeStat); 31 | void updateFailed(QString); 32 | void uploadOK(QString); 33 | void uploadError(QString); 34 | void QSLImageFound(QString); 35 | void QSLImageError(QString); 36 | 37 | public slots: 38 | void processReply(QNetworkReply*); 39 | void abortRequest(); 40 | 41 | private: 42 | QNetworkAccessManager* nam; 43 | QSLStorage *qslStorage; 44 | 45 | void get(const QList > &); 46 | void downloadADIF(const QString &); 47 | void downloadImage(const QString &, const QString &, const qulonglong); 48 | QString QSLImageFilename(const QSqlRecord &); 49 | bool isQSLImageInCache(const QSqlRecord &, QString &); 50 | QNetworkReply *currentReply; 51 | 52 | static const QString SECURE_STORAGE_KEY; 53 | static const QString CONFIG_USERNAME_KEY; 54 | 55 | }; 56 | 57 | #endif // QLOG_CORE_EQSL_H 58 | -------------------------------------------------------------------------------- /core/Fldigi.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CORE_FLDIGI_H 2 | #define QLOG_CORE_FLDIGI_H 3 | 4 | #include 5 | #include 6 | 7 | class QXmlStreamReader; 8 | 9 | class Fldigi : public QTcpServer { 10 | Q_OBJECT 11 | 12 | public: 13 | explicit Fldigi(QObject *parent = nullptr); 14 | 15 | signals: 16 | void addContact(QSqlRecord); 17 | 18 | public slots: 19 | void readClient(); 20 | void discardClient(); 21 | 22 | private: 23 | void processMethodCall(QTcpSocket* sock, QXmlStreamReader& xml); 24 | QString parseParam(QXmlStreamReader& xml); 25 | QByteArray listMethods(); 26 | QByteArray addRecord(QString data); 27 | 28 | void incomingConnection(qintptr socket) override; 29 | }; 30 | 31 | #endif // QLOG_CORE_FLDIGI_H 32 | -------------------------------------------------------------------------------- /core/GenericCallbook.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "GenericCallbook.h" 3 | 4 | GenericCallbook::GenericCallbook(QObject *parent) : 5 | QObject(parent) 6 | { 7 | 8 | } 9 | 10 | const QString GenericCallbook::getWebLookupURL(const QString &callsign, 11 | const QString &URL, 12 | const bool replaceMacro ) 13 | { 14 | QSettings setting; 15 | QString url; 16 | 17 | if ( URL.isEmpty() ) 18 | { 19 | url = setting.value(GenericCallbook::CONFIG_WEB_LOOKUP_URL, "https://www.qrz.com/lookup/").toString(); 20 | } 21 | else 22 | { 23 | url = URL; 24 | } 25 | 26 | if ( replaceMacro ) 27 | url.replace("", callsign); 28 | return url; 29 | } 30 | 31 | const QString GenericCallbook::SECURE_STORAGE_KEY = "Callbook"; 32 | const QString GenericCallbook::CONFIG_USERNAME_KEY = "genericcallbook/username"; 33 | const QString GenericCallbook::CONFIG_PRIMARY_CALLBOOK_KEY = "callbook/primary"; 34 | const QString GenericCallbook::CONFIG_SECONDARY_CALLBOOK_KEY = "callbook/secondary"; 35 | const QString GenericCallbook::CONFIG_WEB_LOOKUP_URL = "callbook/weblookupurl"; 36 | const QString GenericCallbook::CALLBOOK_NAME = "none"; 37 | -------------------------------------------------------------------------------- /core/GenericCallbook.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CORE_GENERICCALLBOOK_H 2 | #define QLOG_CORE_GENERICCALLBOOK_H 3 | 4 | #include 5 | #include 6 | 7 | class GenericCallbook : public QObject 8 | { 9 | Q_OBJECT 10 | public: 11 | explicit GenericCallbook(QObject *parent = nullptr); 12 | ~GenericCallbook() {}; 13 | const static QString SECURE_STORAGE_KEY; 14 | const static QString CONFIG_USERNAME_KEY; 15 | const static QString CONFIG_PRIMARY_CALLBOOK_KEY; 16 | const static QString CONFIG_SECONDARY_CALLBOOK_KEY; 17 | const static QString CALLBOOK_NAME; 18 | const static QString CONFIG_WEB_LOOKUP_URL; 19 | static const QString getWebLookupURL(const QString &callsign, 20 | const QString &URL = QString(), 21 | const bool replaceMacros = true); 22 | 23 | virtual QString getDisplayName() = 0; 24 | 25 | signals: 26 | void callsignResult(const QMap& data); 27 | void lookupError(const QString); 28 | void loginFailed(); 29 | void callsignNotFound(QString); 30 | 31 | public slots: 32 | virtual void queryCallsign(const QString &callsign) = 0; 33 | virtual void abortQuery() = 0; 34 | 35 | }; 36 | #endif // QLOG_CORE_GENERICCALLBOOK_H 37 | -------------------------------------------------------------------------------- /core/Gridsquare.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CORE_GRIDSQUARE_H 2 | #define QLOG_CORE_GRIDSQUARE_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class Gridsquare 9 | { 10 | public: 11 | explicit Gridsquare(const QString &in_grid = QString()); 12 | explicit Gridsquare(const double lat,const double lon); 13 | ~Gridsquare() {}; 14 | static const QRegularExpression gridRegEx(); 15 | static const QRegularExpression gridVUCCRegEx(); 16 | static const QRegularExpression gridExtRegEx(); 17 | static double distance2localeUnitDistance(double km, QString &unit); 18 | static double localeDistanceCoef(); 19 | 20 | bool isValid() const; 21 | double getLongitude() const {return lon;}; 22 | double getLatitude() const {return lat;}; 23 | const QString getGrid() const { return grid;}; 24 | bool distanceTo(const Gridsquare &in_grid, double &distance) const; 25 | bool distanceTo(double lat, double lon, double &distance) const; 26 | bool bearingTo(const Gridsquare &in_grid, double &bearing) const; 27 | bool bearingTo(double lat, double lon, double &bearing) const ; 28 | operator QString() const { return QString("Gridsquare: grid[%1]; valid[%2]; lat[%3]; lon[%4]") 29 | .arg(grid).arg(validGrid).arg(lat).arg(lon);}; 30 | 31 | private: 32 | QString grid; 33 | bool validGrid; 34 | double lat, lon; 35 | }; 36 | 37 | #endif // QLOG_CORE_GRIDSQUARE_H 38 | -------------------------------------------------------------------------------- /core/HRDLog.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CORE_HRDLOG_H 2 | #define QLOG_CORE_HRDLOG_H 3 | 4 | #include 5 | #include 6 | 7 | class QNetworkReply; 8 | class QNetworkAccessManager; 9 | 10 | 11 | class HRDLog : public QObject 12 | { 13 | Q_OBJECT 14 | public: 15 | explicit HRDLog(QObject *parent = nullptr); 16 | ~HRDLog(); 17 | 18 | static const QString getRegisteredCallsign(); 19 | static const QString getUploadCode(); 20 | static bool getOnAirEnabled(); 21 | 22 | static void saveUploadCode(const QString &newUsername, const QString &newPassword); 23 | static void saveOnAirEnabled(bool state); 24 | 25 | void uploadAdif(const QByteArray &data, 26 | const QVariant &contactID, 27 | bool update = false); 28 | void uploadContact(QSqlRecord record); 29 | void uploadContacts(const QList&); 30 | void sendOnAir(double freq, const QString &mode); 31 | 32 | public slots: 33 | void abortRequest(); 34 | 35 | signals: 36 | void uploadFinished(bool result); 37 | void uploadedQSO(int); 38 | void uploadError(QString); 39 | 40 | private slots: 41 | void processReply(QNetworkReply* reply); 42 | 43 | 44 | private: 45 | QNetworkAccessManager* nam; 46 | QNetworkReply *currentReply; 47 | QList queuedContacts4Upload; 48 | bool cancelUpload; 49 | 50 | const static QString SECURE_STORAGE_KEY; 51 | const static QString CONFIG_CALLSIGN_KEY; 52 | const static QString CONFIG_ONAIR_ENABLED_KEY; 53 | }; 54 | 55 | #endif // QLOG_CORE_HRDLOG_H 56 | -------------------------------------------------------------------------------- /core/HamQTH.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CORE_HAMQTH_H 2 | #define QLOG_CORE_HAMQTH_H 3 | 4 | #include 5 | #include 6 | #include "core/GenericCallbook.h" 7 | 8 | class QNetworkAccessManager; 9 | class QNetworkReply; 10 | 11 | class HamQTH : public GenericCallbook 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit HamQTH(QObject *parent = nullptr); 17 | ~HamQTH(); 18 | 19 | const static QString CALLBOOK_NAME; 20 | static const QString getUsername(); 21 | static const QString getPassword(); 22 | 23 | static void saveUsernamePassword(const QString&, const QString&); 24 | 25 | QString getDisplayName() override; 26 | 27 | public slots: 28 | void queryCallsign(const QString &callsign) override; 29 | void abortQuery() override; 30 | 31 | private slots: 32 | void processReply(QNetworkReply* reply); 33 | 34 | private: 35 | QNetworkAccessManager* nam; 36 | QString sessionId; 37 | QString queuedCallsign; 38 | bool incorrectLogin; 39 | QString lastSeenPassword; 40 | QNetworkReply *currentReply; 41 | 42 | void authenticate(); 43 | 44 | const static QString SECURE_STORAGE_KEY; 45 | const static QString CONFIG_USERNAME_KEY; 46 | }; 47 | 48 | #endif // QLOG_CORE_HAMQTH_H 49 | -------------------------------------------------------------------------------- /core/HostsPortString.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CORE_HOSTSPORTSTRING_H 2 | #define QLOG_CORE_HOSTSPORTSTRING_H 3 | 4 | #include 5 | #include 6 | 7 | class HostPortAddress : public QHostAddress 8 | { 9 | public: 10 | explicit HostPortAddress( const QString &, quint16); 11 | void setPort(quint16); 12 | quint16 getPort() const; 13 | 14 | private: 15 | quint16 port; 16 | }; 17 | 18 | class HostsPortString : public QObject 19 | { 20 | Q_OBJECT 21 | public: 22 | static const QRegularExpression hostsPortRegEx(); 23 | 24 | explicit HostsPortString(const QString &, QObject *parent=nullptr); 25 | 26 | QList getAddrList() const; 27 | 28 | private: 29 | 30 | QList addressList; 31 | 32 | }; 33 | 34 | #endif // QLOG_CORE_HOSTSPORTSTRING_H 35 | -------------------------------------------------------------------------------- /core/LogLocale.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CORE_LOGLOCALE_H 2 | #define QLOG_CORE_LOGLOCALE_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class LogLocale : public QLocale 9 | { 10 | public: 11 | LogLocale(); 12 | 13 | const QString formatTimeLongWithoutTZ() const; 14 | const QString formatTimeShort() const; 15 | const QString formatTimeLong() const; 16 | const QString formatDateShortWithYYYY() const; 17 | const QString formatDateTimeShortWithYYYY() const; 18 | bool getSettingUse24hformat() const; 19 | void setSettingUse24hformat(bool value); 20 | 21 | bool getSettingUseSystemDateFormat() const; 22 | void setSettingUseSystemDateFormat(bool value); 23 | 24 | const QString getSettingDateFormat() const; 25 | void setSettingDateFormat(const QString &value); 26 | 27 | private: 28 | const QRegularExpression regexp; 29 | bool is24hUsed; 30 | QSettings settings; 31 | QString systemDateFormat; 32 | 33 | void changeTime12_24Format(QString &formatString) const; 34 | }; 35 | 36 | #endif // QLOG_CORE_LOGLOCALE_H 37 | -------------------------------------------------------------------------------- /core/Lotw.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CORE_LOTW_H 2 | #define QLOG_CORE_LOTW_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class QNetworkAccessManager; 9 | class QNetworkReply; 10 | 11 | class Lotw : public QObject 12 | { 13 | Q_OBJECT 14 | public: 15 | explicit Lotw(QObject *parent = nullptr); 16 | ~Lotw(); 17 | 18 | void update(const QDate &, bool, const QString &); 19 | void uploadAdif(const QByteArray &); 20 | 21 | static const QString getUsername(); 22 | static const QString getPassword(); 23 | static const QString getTQSLPath(const QString &defaultPath = QDir::rootPath()); 24 | 25 | static void saveUsernamePassword(const QString&, const QString&); 26 | static void saveTQSLPath(const QString&); 27 | 28 | signals: 29 | void updateProgress(int value); 30 | void updateStarted(); 31 | void updateComplete(QSLMergeStat update); 32 | void updateFailed(QString); 33 | 34 | void uploadFinished(); 35 | void uploadError(QString); 36 | 37 | public slots: 38 | void processReply(QNetworkReply* reply); 39 | void abortRequest(); 40 | 41 | private: 42 | QNetworkAccessManager* nam; 43 | QNetworkReply *currentReply; 44 | QTemporaryFile file; 45 | 46 | static const QString SECURE_STORAGE_KEY; 47 | static const QString CONFIG_USERNAME_KEY; 48 | 49 | void get(QList> params); 50 | }; 51 | 52 | #endif // QLOG_CORE_LOTW_H 53 | -------------------------------------------------------------------------------- /core/Migration.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CORE_MIGRATION_H 2 | #define QLOG_CORE_MIGRATION_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include "core/LOVDownloader.h" 8 | 9 | class QString; 10 | 11 | class Migration : public QObject 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | Migration(QObject *parent = nullptr) : QObject(parent) {} 17 | 18 | bool run(); 19 | static bool backupDatabase(bool force = false); 20 | 21 | private: 22 | bool functionMigration(int version); 23 | bool migrate(int toVersion); 24 | int getVersion(); 25 | bool setVersion(int version); 26 | bool runSqlFile(QString filename); 27 | int tableRows(QString name); 28 | bool updateExternalResource(); 29 | void updateExternalResourceProgress(QProgressDialog&, 30 | LOVDownloader&, 31 | const LOVDownloader::SourceType & sourceType, 32 | const QString &counter); 33 | bool fixIntlFields(); 34 | bool insertUUID(); 35 | bool fillMyDXCC(); 36 | bool createTriggers(); 37 | bool importQSLCards2DB(); 38 | bool fillCQITUZStationProfiles(); 39 | bool resetConfigs(); 40 | bool profiles2DB(); 41 | bool setSelectedProfile(const QString &tablename, const QString &profileName); 42 | QString fixIntlField(QSqlQuery &query, const QString &columName, const QString &columnNameIntl); 43 | bool refreshUploadStatusTrigger(); 44 | 45 | static const int latestVersion = 33; 46 | }; 47 | 48 | #endif // QLOG_CORE_MIGRATION_H 49 | -------------------------------------------------------------------------------- /core/MultiselectCompleter.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "MultiselectCompleter.h" 3 | 4 | MultiselectCompleter::MultiselectCompleter(const QStringList& items, QObject* parent) 5 | : QCompleter(items, parent) 6 | { 7 | } 8 | 9 | QString MultiselectCompleter::pathFromIndex( const QModelIndex& index ) const 10 | { 11 | QString path = QCompleter::pathFromIndex(index); 12 | const QString &text = static_cast(widget())->text(); 13 | 14 | int pos = text.lastIndexOf(','); 15 | if ( pos >= 0 ) 16 | path = text.left(pos) + ", " + path; 17 | 18 | return path; 19 | } 20 | 21 | QStringList MultiselectCompleter::splitPath( const QString& path ) const 22 | { 23 | int pos = path.lastIndexOf(',') + 1; 24 | while ( pos < path.length() && path.at(pos) == QLatin1Char(' ') ) 25 | pos++; 26 | 27 | return QStringList(path.mid(pos)); 28 | } 29 | -------------------------------------------------------------------------------- /core/MultiselectCompleter.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CORE_MULTISELECTCOMPLETER_H 2 | #define QLOG_CORE_MULTISELECTCOMPLETER_H 3 | 4 | #include 5 | 6 | class MultiselectCompleter : public QCompleter 7 | { 8 | Q_OBJECT 9 | 10 | public: 11 | explicit MultiselectCompleter(const QStringList &items, 12 | QObject *parent = nullptr); 13 | ~MultiselectCompleter() {}; 14 | 15 | public: 16 | QString pathFromIndex( const QModelIndex& index ) const; 17 | QStringList splitPath( const QString& path ) const; 18 | }; 19 | 20 | #endif // QLOG_CORE_MULTISELECTCOMPLETER_H 21 | -------------------------------------------------------------------------------- /core/QRZ.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CORE_QRZ_H 2 | #define QLOG_CORE_QRZ_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include "core/GenericCallbook.h" 8 | 9 | class QNetworkAccessManager; 10 | class QNetworkReply; 11 | 12 | class QRZ : public GenericCallbook 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit QRZ(QObject *parent = nullptr); 18 | ~QRZ(); 19 | 20 | void uploadContact(const QSqlRecord &record); 21 | void uploadContacts(const QList&); 22 | 23 | static const QString getUsername(); 24 | static const QString getPassword(); 25 | static const QString getLogbookAPIKey(); 26 | 27 | static void saveUsernamePassword(const QString&, const QString&); 28 | static void saveLogbookAPI(const QString&); 29 | 30 | QString getDisplayName() override; 31 | 32 | const static QString CALLBOOK_NAME; 33 | 34 | signals: 35 | void uploadFinished(bool result); 36 | void uploadedQSO(int); 37 | void uploadError(QString); 38 | 39 | public slots: 40 | void queryCallsign(const QString &callsign) override; 41 | void abortQuery() override; 42 | 43 | private slots: 44 | void processReply(QNetworkReply* reply); 45 | 46 | private: 47 | QNetworkAccessManager* nam; 48 | QString sessionId; 49 | QString queuedCallsign; 50 | bool incorrectLogin; 51 | QString lastSeenPassword; 52 | QList queuedContacts4Upload; 53 | bool cancelUpload; 54 | QNetworkReply *currentReply; 55 | 56 | void authenticate(); 57 | void actionInsert(QByteArray& data, const QString &insertPolicy); 58 | QMap parseActionResponse(const QString&) const; 59 | 60 | const static QString SECURE_STORAGE_KEY; 61 | const static QString SECURE_STORAGE_API_KEY; 62 | const static QString CONFIG_USERNAME_KEY; 63 | const static QString CONFIG_USERNAME_API_KEY; 64 | const static QString CONFIG_USERNAME_API_CONST; 65 | 66 | }; 67 | 68 | #endif // QLOG_CORE_QRZ_H 69 | -------------------------------------------------------------------------------- /core/QuadKeyCache.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CORE_QUADKEYCACHE_H 2 | #define QLOG_CORE_QUADKEYCACHE_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | template 10 | class QuadKeyCache : public QCache, QPair>, Value> 11 | { 12 | public: 13 | using Key = QPair, QPair>; 14 | 15 | void insert(const int keyA, const int keyB, const QString& keyC, const QString& keyD, Value* value) 16 | { 17 | Key key = qMakePair(qMakePair(keyA, keyB), qMakePair(keyC, keyD)); 18 | QCache::insert(key, value); 19 | } 20 | 21 | Value* value(const int keyA, const int keyB, const QString& keyC, const QString& keyD) const 22 | { 23 | Key key = qMakePair(qMakePair(keyA, keyB), qMakePair(keyC, keyD)); 24 | return QCache::object(key); 25 | } 26 | 27 | bool contains(const int keyA, const int keyB, const QString& keyC, const QString& keyD) const 28 | { 29 | Key key = qMakePair(qMakePair(keyA, keyB), qMakePair(keyC, keyD)); 30 | return QCache::contains(key); 31 | } 32 | 33 | int size() const 34 | { 35 | return QCache::size(); 36 | } 37 | 38 | void invalidate(const int keyA, const int keyB) 39 | { 40 | QList keysToRemove; 41 | 42 | for( const Key& key : QCache::keys() ) 43 | { 44 | if (key.first.first == keyA && key.first.second == keyB) 45 | keysToRemove.append(key); 46 | } 47 | 48 | for( const Key& key : keysToRemove ) 49 | QCache::remove(key); 50 | } 51 | }; 52 | 53 | 54 | #endif // QLOG_CORE_QUADKEYCACHE_H 55 | -------------------------------------------------------------------------------- /core/SerialPort.cpp: -------------------------------------------------------------------------------- 1 | #include "SerialPort.h" 2 | #include "core/debug.h" 3 | 4 | MODULE_IDENTIFICATION("qlog.core.serialport"); 5 | 6 | SerialPort::SerialPort(QObject *parent) 7 | : QObject{parent} 8 | { 9 | FCT_IDENTIFICATION; 10 | 11 | } 12 | 13 | const QString SerialPort::SERIAL_FLOWCONTROL_NONE = "none"; 14 | const QString SerialPort::SERIAL_FLOWCONTROL_HARDWARE = "hardware"; 15 | const QString SerialPort::SERIAL_FLOWCONTROL_SOFTWARE = "software"; 16 | const QString SerialPort::SERIAL_PARITY_EVEN = "even"; 17 | const QString SerialPort::SERIAL_PARITY_ODD = "odd"; 18 | const QString SerialPort::SERIAL_PARITY_MARK = "mark"; 19 | const QString SerialPort::SERIAL_PARITY_SPACE = "space"; 20 | const QString SerialPort::SERIAL_PARITY_NO = "no"; 21 | -------------------------------------------------------------------------------- /core/SerialPort.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CORE_SERIALPORT_H 2 | #define QLOG_CORE_SERIALPORT_H 3 | 4 | #include 5 | #include 6 | 7 | class SerialPort : public QObject 8 | { 9 | Q_OBJECT 10 | public: 11 | explicit SerialPort(QObject *parent = nullptr); 12 | 13 | static const QString SERIAL_FLOWCONTROL_NONE; 14 | static const QString SERIAL_FLOWCONTROL_SOFTWARE; 15 | static const QString SERIAL_FLOWCONTROL_HARDWARE; 16 | static const QString SERIAL_PARITY_EVEN; 17 | static const QString SERIAL_PARITY_ODD; 18 | static const QString SERIAL_PARITY_MARK; 19 | static const QString SERIAL_PARITY_SPACE; 20 | static const QString SERIAL_PARITY_NO; 21 | }; 22 | 23 | #endif // QLOG_CORE_SERIALPORT_H 24 | -------------------------------------------------------------------------------- /core/UpdatableSQLRecord.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CORE_UPDATABLESQLRECORD_H 2 | #define QLOG_CORE_UPDATABLESQLRECORD_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | class UpdatableSQLRecord : public QObject 10 | { 11 | Q_OBJECT 12 | 13 | public: 14 | explicit UpdatableSQLRecord(int interval = 500, 15 | QObject *parent = nullptr); 16 | 17 | ~UpdatableSQLRecord(); 18 | void updateRecord(const QSqlRecord &record); 19 | 20 | signals: 21 | void recordReady( QSqlRecord ); 22 | 23 | private slots: 24 | void emitStoreRecord(); 25 | 26 | private: 27 | 28 | enum MatchingType{ 29 | QSOMatchingType 30 | }; 31 | 32 | QHash matchingFields 33 | { 34 | {QSOMatchingType, {"callsign", "mode", "submode"}} 35 | }; 36 | 37 | bool matchQSO(const MatchingType, 38 | const QSqlRecord &); 39 | 40 | QSqlRecord internalRecord; 41 | QTimer timer; 42 | int interval; 43 | }; 44 | 45 | #endif // QLOG_CORE_UPDATABLESQLRECORD_H 46 | -------------------------------------------------------------------------------- /core/debug.cpp: -------------------------------------------------------------------------------- 1 | #include "debug.h" 2 | 3 | void set_debug_level(DEBUG_LEVEL_TYPE type) 4 | { 5 | switch ( type ) 6 | { 7 | case LEVEL_DEBUG_MAX: 8 | QLoggingCategory::setFilterRules("*.debug=true \n" 9 | "*.function.parameters=true \n" 10 | "*.function.entered=true\n"); 11 | break; 12 | case LEVEL_DEBUG_FUNCTION_PARAMETERS: 13 | QLoggingCategory::setFilterRules("*.function.parameters=true \n" 14 | "*.function.entered=true\n"); 15 | break; 16 | case LEVEL_DEBUG_FUNCTION_CALLS: 17 | QLoggingCategory::setFilterRules("*.function.parameters=false\n"); 18 | break; 19 | case LEVEL_DEBUG_RUNTIME: 20 | QLoggingCategory::setFilterRules("*.function.*=false\n"); 21 | break; 22 | case LEVEL_PRODUCTION: 23 | default: 24 | QLoggingCategory::setFilterRules("*.debug=false\n"); 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /core/debug.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CORE_DEBUG_LOG_H 2 | #define QLOG_CORE_DEBUG_LOG_H 3 | 4 | #include 5 | #include 6 | 7 | Q_DECLARE_LOGGING_CATEGORY(logGraphics) 8 | Q_DECLARE_LOGGING_CATEGORY(logPlugin) 9 | 10 | #define MODULE_IDENTIFICATION(m) static const char *mod_name = m; \ 11 | static const QLoggingCategory function_parameters(m".function.parameters"); \ 12 | static const QLoggingCategory runtime(m".runtime"); \ 13 | 14 | #define FCT_IDENTIFICATION QString logging_cat(mod_name); \ 15 | logging_cat.append(".function.entered"); \ 16 | QByteArray logging_cat_latin1 = logging_cat.toLatin1(); \ 17 | const char* category_name = logging_cat_latin1.isEmpty() ? "default_category" : logging_cat_latin1.constData(); \ 18 | QLoggingCategory log_category(category_name); \ 19 | qCDebug(log_category)<<"***" 20 | 21 | typedef enum debug_level 22 | { 23 | LEVEL_DEBUG_MAX, 24 | LEVEL_DEBUG_FUNCTION_PARAMETERS, LEVEL_DEBUG_FUNCTION_CALLS, 25 | LEVEL_DEBUG_RUNTIME, 26 | LEVEL_PRODUCTION 27 | } DEBUG_LEVEL_TYPE; 28 | 29 | void set_debug_level(DEBUG_LEVEL_TYPE); 30 | 31 | #endif // QLOG_CORE_DEBUG_LOG_H 32 | -------------------------------------------------------------------------------- /cwkey/CWKeyer.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CWKEY_CWKEYER_H 2 | #define QLOG_CWKEY_CWKEYER_H 3 | 4 | #include 5 | 6 | #include "cwkey/drivers/CWKey.h" 7 | #include "data/CWKeyProfile.h" 8 | 9 | class CWKeyer : public QObject 10 | { 11 | Q_OBJECT 12 | 13 | public: 14 | static CWKeyer* instance() 15 | { 16 | static CWKeyer instance; 17 | return &instance; 18 | }; 19 | void stopTimer(); 20 | 21 | signals: 22 | void cwKeyerError(QString, QString); 23 | void cwKeyConnected(QString); 24 | void cwKeyDisconnected(); 25 | void cwKeyWPMChanged(qint32); 26 | void cwKeyEchoText(QString); 27 | 28 | public slots: 29 | void start(); 30 | void update(); 31 | void open(); 32 | void close(); 33 | bool canStopSending(); 34 | bool canEchoChar(); 35 | bool rigMustConnected(); 36 | bool canSetSpeed(); 37 | 38 | void setSpeed(const qint16 wpm); 39 | void sendText(const QString&); 40 | void imediatellyStop(); 41 | 42 | private slots: 43 | void openImpl(); 44 | void closeImpl(); 45 | void setSpeedImpl(const qint16 wpm); 46 | void sendTextImpl(const QString&); 47 | void immediatellyStopImpl(); 48 | void stopTimerImplt(); 49 | void keyErrorHandler(const QString&, const QString&); 50 | void cwKeyWPMChangedHandler(qint32); 51 | void cwKeyEchoTextHandler(const QString&); 52 | 53 | private: 54 | explicit CWKeyer(QObject *parent = nullptr); 55 | ~CWKeyer(); 56 | 57 | void __closeCWKey(); 58 | void __openCWKey(); 59 | 60 | CWKey *cwKey; 61 | CWKeyProfile connectedCWKeyProfile; 62 | QMutex cwKeyLock; 63 | QTimer* timer; 64 | }; 65 | 66 | #endif // QLOG_CWKEY_CWKEYER_H 67 | -------------------------------------------------------------------------------- /cwkey/drivers/CWCatKey.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CWKEY_DRIVERS_CWCATKEY_H 2 | #define QLOG_CWKEY_DRIVERS_CWCATKEY_H 3 | 4 | #include 5 | #include 6 | #include "CWKey.h" 7 | #include "rig/Rig.h" 8 | 9 | class CWCatKey : public CWKey 10 | { 11 | 12 | Q_OBJECT 13 | 14 | public: 15 | explicit CWCatKey(const CWKey::CWKeyModeID mode, 16 | const qint32 defaultSpeed, 17 | QObject *parent = nullptr); 18 | virtual ~CWCatKey(); 19 | 20 | virtual bool open() override; 21 | virtual bool close() override; 22 | virtual QString lastError() override; 23 | 24 | virtual bool sendText(const QString &text) override; 25 | virtual bool setWPM(const qint16 wpm) override; 26 | virtual bool imediatellyStop() override; 27 | 28 | private: 29 | QMutex commandMutex; 30 | bool isKeyConnected; 31 | QString lastErrorText; //user only in open part of communication 32 | 33 | void __close(); 34 | 35 | private slots: 36 | void rigKeySpeedChanged(VFOID, unsigned int); 37 | }; 38 | 39 | #endif // QLOG_CWKEY_DRIVERS_CWCATKEY_H 40 | -------------------------------------------------------------------------------- /cwkey/drivers/CWDaemonKey.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CWKEY_DRIVERS_CWDAEMONKEY_H 2 | #define QLOG_CWKEY_DRIVERS_CWDAEMONKEY_H 3 | 4 | #include 5 | #include "CWKey.h" 6 | 7 | class CWDaemonKey : public CWKey, 8 | protected CWKeyUDPInterface 9 | { 10 | Q_OBJECT 11 | 12 | public: 13 | explicit CWDaemonKey(const QString &hostname, 14 | const quint16 port, 15 | const CWKey::CWKeyModeID mode, 16 | const qint32 defaultSpeed, 17 | QObject *parent = nullptr); 18 | virtual ~CWDaemonKey(){}; 19 | 20 | virtual bool open() override; 21 | virtual bool close() override; 22 | virtual QString lastError() override; 23 | 24 | virtual bool sendText(const QString &text) override; 25 | virtual bool setWPM(const qint16 wpm) override; 26 | virtual bool imediatellyStop() override; 27 | 28 | protected: 29 | QString lastLogicalError; 30 | bool isOpen; 31 | const QChar ESCChar; 32 | }; 33 | 34 | #endif // QLOG_CWKEY_DRIVER_CWDAEMONKEY_H 35 | -------------------------------------------------------------------------------- /cwkey/drivers/CWDummyKey.cpp: -------------------------------------------------------------------------------- 1 | #include "CWDummyKey.h" 2 | #include "core/debug.h" 3 | 4 | MODULE_IDENTIFICATION("qlog.cwkey.driver.cwdummykey"); 5 | 6 | CWDummyKey::CWDummyKey(QObject *parent) 7 | : CWKey(CWKey::IAMBIC_B, 25, parent), 8 | isUsed(false) 9 | { 10 | FCT_IDENTIFICATION; 11 | canSetKeySpeed = true; 12 | } 13 | 14 | bool CWDummyKey::open() 15 | { 16 | FCT_IDENTIFICATION; 17 | 18 | qInfo() << "Key is Connected"; 19 | 20 | isUsed = true; 21 | 22 | setWPM(defaultWPMSpeed); 23 | return true; 24 | } 25 | 26 | bool CWDummyKey::close() 27 | { 28 | FCT_IDENTIFICATION; 29 | 30 | qInfo() << "Key is Disconnected"; 31 | 32 | isUsed = false; 33 | 34 | return true; 35 | } 36 | 37 | bool CWDummyKey::sendText(const QString &text) 38 | { 39 | FCT_IDENTIFICATION; 40 | 41 | if ( isUsed ) 42 | { 43 | qInfo() << "Sending " << text; 44 | } 45 | 46 | return true; 47 | } 48 | 49 | bool CWDummyKey::setWPM(const qint16 wpm) 50 | { 51 | FCT_IDENTIFICATION; 52 | 53 | if ( !isUsed ) 54 | return true; 55 | 56 | qInfo() << "Setting Speed " << wpm; 57 | 58 | emit keyChangedWPMSpeed(wpm); // dummy does not echo a new Speed 59 | //therefore keyChangedWPMSpeed informs the rest for QLog that 60 | //Key speed has been changed 61 | return true; 62 | } 63 | 64 | QString CWDummyKey::lastError() 65 | { 66 | FCT_IDENTIFICATION; 67 | 68 | return QString(); 69 | } 70 | 71 | bool CWDummyKey::imediatellyStop() 72 | { 73 | FCT_IDENTIFICATION; 74 | 75 | if ( isUsed ) 76 | { 77 | qInfo() << "imediatelly Stop"; 78 | } 79 | 80 | return true; 81 | } 82 | 83 | -------------------------------------------------------------------------------- /cwkey/drivers/CWDummyKey.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CWKEY_DRIVERS_CWDUMMYKEY_H 2 | #define QLOG_CWKEY_DRIVERS_CWDUMMYKEY_H 3 | 4 | #include "CWKey.h" 5 | 6 | class CWDummyKey : public CWKey 7 | { 8 | Q_OBJECT 9 | 10 | public: 11 | explicit CWDummyKey(QObject *parent = nullptr); 12 | 13 | virtual bool open() override; 14 | virtual bool close() override; 15 | virtual bool sendText(const QString &text) override; 16 | virtual bool setWPM(const qint16 wpm) override; 17 | virtual QString lastError() override; 18 | virtual bool imediatellyStop() override; 19 | 20 | private: 21 | bool isUsed; 22 | }; 23 | 24 | #endif // QLOG_CWKEY_DRIVER_CWDUMMYKEY_H 25 | -------------------------------------------------------------------------------- /cwkey/drivers/CWFldigiKey.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CWKEY_DRIVERS_CWFLDIGIKEY_H 2 | #define QLOG_CWKEY_DRIVERS_CWFLDIGIKEY_H 3 | 4 | #include 5 | #include 6 | #include "CWKey.h" 7 | 8 | class CWFldigiKey : public CWKey 9 | { 10 | 11 | public: 12 | CWFldigiKey(const QString &hostname, 13 | const quint16 port, 14 | const CWKey::CWKeyModeID mode, 15 | const qint32 defaultSpeed, 16 | QObject *parent = nullptr); 17 | virtual ~CWFldigiKey(){ nam->deleteLater();}; 18 | 19 | virtual bool open() override; 20 | virtual bool close() override; 21 | virtual QString lastError() override; 22 | 23 | virtual bool sendText(const QString &text) override; 24 | virtual bool setWPM(const qint16 wpm) override; 25 | virtual bool imediatellyStop() override; 26 | 27 | 28 | protected: 29 | 30 | QString lastLogicalError; 31 | bool isOpen; 32 | QNetworkAccessManager *nam; 33 | QString hostname; 34 | quint16 port; 35 | 36 | const QString RXString; 37 | bool transmittingText; 38 | 39 | private: 40 | bool sendXMLRPCCall(const QString&, 41 | QByteArray &, 42 | const QList>* = nullptr); 43 | private slots: 44 | void getEcho(); 45 | }; 46 | 47 | #endif // QLOG_CWKEY_DRIVERS_CWFLDIGIKEY_H 48 | -------------------------------------------------------------------------------- /cwkey/drivers/CWWinKey.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_CWKEY_DRIVERS_CWWINKEY_H 2 | #define QLOG_CWKEY_DRIVERS_CWWINKEY_H 3 | 4 | #include 5 | #include "CWKey.h" 6 | 7 | class CWWinKey : public CWKey, 8 | protected CWKeySerialInterface 9 | { 10 | Q_OBJECT 11 | 12 | public: 13 | explicit CWWinKey(const QString &portName, 14 | const qint32 baudrate, 15 | const CWKey::CWKeyModeID mode, 16 | const qint32 defaultSpeed, 17 | QObject *parent = nullptr); 18 | virtual ~CWWinKey(); 19 | 20 | virtual bool open() override; 21 | virtual bool close() override; 22 | virtual QString lastError() override; 23 | 24 | virtual bool sendText(const QString &text) override; 25 | virtual bool setWPM(const qint16 wpm) override; 26 | virtual bool imediatellyStop() override; 27 | 28 | private: 29 | 30 | bool isInHostMode; 31 | bool xoff; 32 | 33 | QMutex writeBufferMutex; 34 | QMutex commandMutex; 35 | QByteArray writeBuffer; 36 | qint32 minWPMRange; 37 | QString lastLogicalError; 38 | 39 | void tryAsyncWrite(); 40 | unsigned char buildWKModeByte() const; 41 | bool __sendStatusRequest(); 42 | bool __setPOTRange(); 43 | bool __setWPM(const qint16 wpm); 44 | void __close(); 45 | 46 | private slots: 47 | void handleBytesWritten(qint64 bytes); 48 | void handleError(QSerialPort::SerialPortError serialPortError); 49 | void handleReadyRead(); 50 | }; 51 | 52 | #endif // QLOG_CWKEY_DRIVERS_CWWINKEY_H 53 | -------------------------------------------------------------------------------- /data/AntProfile.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_DATA_ANTPROFILE_H 2 | #define QLOG_DATA_ANTPROFILE_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "data/ProfileManager.h" 9 | 10 | 11 | #define DEFAULT_ROT_MODEL 1 12 | 13 | class AntProfile 14 | { 15 | public: 16 | AntProfile() : azimuthBeamWidth(0.0), azimuthOffset(0.0) {}; 17 | QString profileName; 18 | QString description; 19 | double azimuthBeamWidth; 20 | double azimuthOffset; 21 | 22 | bool operator== (const AntProfile &profile); 23 | bool operator!= (const AntProfile &profile); 24 | 25 | private: 26 | friend QDataStream& operator<<(QDataStream& out, const AntProfile& v); 27 | friend QDataStream& operator>>(QDataStream& in, AntProfile& v); 28 | }; 29 | 30 | Q_DECLARE_METATYPE(AntProfile) 31 | 32 | class AntProfilesManager : public ProfileManagerSQL 33 | { 34 | Q_OBJECT 35 | 36 | public: 37 | 38 | explicit AntProfilesManager(); 39 | ~AntProfilesManager() { }; 40 | 41 | static AntProfilesManager *instance() 42 | { 43 | static AntProfilesManager instance; 44 | return &instance; 45 | }; 46 | void save(); 47 | 48 | }; 49 | 50 | 51 | #endif // QLOG_DATA_ANTPROFILE_H 52 | -------------------------------------------------------------------------------- /data/Band.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_DATA_BAND_H 2 | #define QLOG_DATA_BAND_H 3 | 4 | #include 5 | 6 | class Band { 7 | public: 8 | QString name; 9 | double start; 10 | double end; 11 | QString satDesignator; 12 | bool operator==(const Band &band) const 13 | { 14 | return ( this->name == band.name 15 | && this->start == band.start 16 | && this->end == band.end 17 | && this->satDesignator == band.satDesignator ); 18 | } 19 | }; 20 | 21 | Q_DECLARE_METATYPE(Band); 22 | 23 | #endif // QLOG_DATA_BAND_H 24 | -------------------------------------------------------------------------------- /data/BandPlan.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_DATA_BANDPLAN_H 2 | #define QLOG_DATA_BANDPLAN_H 3 | 4 | #include 5 | #include "Band.h" 6 | 7 | class BandPlan 8 | { 9 | public: 10 | 11 | static const QString MODE_GROUP_STRING_CW; 12 | static const QString MODE_GROUP_STRING_DIGITAL; 13 | static const QString MODE_GROUP_STRING_FT8; 14 | static const QString MODE_GROUP_STRING_PHONE; 15 | 16 | enum BandPlanMode 17 | { 18 | BAND_MODE_UNKNOWN, 19 | BAND_MODE_CW, 20 | BAND_MODE_DIGITAL, 21 | BAND_MODE_FT8, 22 | BAND_MODE_LSB, 23 | BAND_MODE_USB, 24 | BAND_MODE_PHONE 25 | }; 26 | 27 | static BandPlanMode freq2BandMode(const double freq); 28 | static const QString bandMode2BandModeGroupString(const BandPlan::BandPlanMode &bandPlanMode); 29 | static const QString freq2BandModeGroupString(const double freq); 30 | static const QString bandPlanMode2ExpectedMode(const BandPlan::BandPlanMode &bandPlanMode, 31 | QString &submode); 32 | static const QString freq2ExpectedMode(const double freq, 33 | QString &submode); 34 | static const Band freq2Band(double freq); 35 | static const Band bandName2Band(const QString& name); 36 | static const QList bandsList(const bool onlyDXCCBands = false, 37 | const bool onlyEnabled = false); 38 | static const QString modeToDXCCModeGroup(const QString &mode); 39 | static const QString modeToModeGroup(const QString &mode); 40 | BandPlan(); 41 | }; 42 | 43 | Q_DECLARE_METATYPE(BandPlan::BandPlanMode); 44 | 45 | #endif // QLOG_DATA_BANDPLAN_H 46 | -------------------------------------------------------------------------------- /data/CWKeyProfile.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_DATA_CWKEYPROFILE_H 2 | #define QLOG_DATA_CWKEYPROFILE_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "data/ProfileManager.h" 9 | #include "cwkey/drivers/CWKey.h" 10 | 11 | #define DEFAULT_CWKEY_MODEL 0 12 | 13 | // this is a hack. We have non-empty text to set empty value in Setting dialog->Rig's Assigned CW Key combo 14 | // therefore QLog use one space as a profile that meams no CW is assigned to Rig 15 | #define EMPTY_PROFILE_NAME " " 16 | 17 | class CWKeyProfile 18 | { 19 | public: 20 | CWKeyProfile() : model(CWKey::DUMMY_KEYER), 21 | keyMode(CWKey::IAMBIC_B) 22 | { 23 | defaultSpeed = 0; 24 | baudrate = 0; 25 | netport = 0; 26 | }; 27 | 28 | QString profileName; 29 | CWKey::CWKeyTypeID model; 30 | qint32 defaultSpeed; 31 | CWKey::CWKeyModeID keyMode; 32 | QString portPath; 33 | quint32 baudrate; 34 | QString hostname; 35 | quint16 netport; 36 | 37 | bool operator== (const CWKeyProfile &profile); 38 | bool operator!= (const CWKeyProfile &profile); 39 | 40 | private: 41 | friend QDataStream& operator<<(QDataStream& out, const CWKeyProfile& v); 42 | friend QDataStream& operator>>(QDataStream& in, CWKeyProfile& v); 43 | 44 | }; 45 | 46 | Q_DECLARE_METATYPE(CWKeyProfile); 47 | 48 | class CWKeyProfilesManager : public ProfileManagerSQL 49 | { 50 | Q_OBJECT 51 | 52 | public: 53 | 54 | explicit CWKeyProfilesManager(); 55 | ~CWKeyProfilesManager() { }; 56 | 57 | static CWKeyProfilesManager* instance() 58 | { 59 | static CWKeyProfilesManager instance; 60 | return &instance; 61 | }; 62 | void save(); 63 | 64 | }; 65 | #endif // QLOG_DATA_CWKEYPROFILE_H 66 | -------------------------------------------------------------------------------- /data/CWShortcutProfile.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_DATA_CWSHORTCUTPROFILE_H 2 | #define QLOG_DATA_CWSHORTCUTPROFILE_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "data/ProfileManager.h" 9 | 10 | #define MAX_SHORTCUT_KEYS 7 11 | 12 | class CWShortcutProfile 13 | { 14 | public: 15 | CWShortcutProfile() 16 | { 17 | shortDescs.resize(MAX_SHORTCUT_KEYS); 18 | macros.resize(MAX_SHORTCUT_KEYS); 19 | }; 20 | 21 | QString profileName; 22 | QVector shortDescs; 23 | QVector macros; 24 | 25 | bool operator== (const CWShortcutProfile &profile); 26 | bool operator!= (const CWShortcutProfile &profile); 27 | 28 | private: 29 | friend QDataStream& operator<<(QDataStream& out, const CWShortcutProfile& v); 30 | friend QDataStream& operator>>(QDataStream& in, CWShortcutProfile& v); 31 | }; 32 | 33 | Q_DECLARE_METATYPE(CWShortcutProfile); 34 | 35 | class CWShortcutProfilesManager : public ProfileManagerSQL 36 | { 37 | Q_OBJECT 38 | 39 | public: 40 | 41 | explicit CWShortcutProfilesManager(); 42 | ~CWShortcutProfilesManager() { }; 43 | 44 | static CWShortcutProfilesManager* instance() 45 | { 46 | static CWShortcutProfilesManager instance; 47 | return &instance; 48 | }; 49 | void save(); 50 | 51 | }; 52 | 53 | #endif // QLOG_DATA_CWSHORTCUTPROFILE_H 54 | -------------------------------------------------------------------------------- /data/Dxcc.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_DATA_DXCC_H 2 | #define QLOG_DATA_DXCC_H 3 | 4 | #include 5 | 6 | enum DxccStatus { 7 | NewEntity = 0b1, 8 | NewBand = 0b10, 9 | NewMode = 0b100, 10 | NewBandMode = 0b110, 11 | NewSlot = 0b1000, 12 | Worked = 0b10000, 13 | Confirmed = 0b100000, 14 | UnknownStatus = 0b1000000, 15 | All = 0b1111111 16 | }; 17 | 18 | class DxccEntity { 19 | public: 20 | QString country; 21 | QString prefix; 22 | qint32 dxcc; 23 | QString cont; 24 | qint32 cqz; 25 | qint32 ituz; 26 | double latlon[2]; 27 | float tz; 28 | QString flag; 29 | }; 30 | 31 | struct DxccPrefix { 32 | public: 33 | QString prefix; 34 | bool exact; 35 | qint32 dxcc; 36 | qint32 cqz; 37 | qint32 ituz; 38 | QString cont; 39 | double latlon[2]; 40 | }; 41 | 42 | #endif // QLOG_DATA_DXCC_H 43 | -------------------------------------------------------------------------------- /data/MainLayoutProfile.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_DATA_MAINLAYOUTPROFILE_H 2 | #define QLOG_DATA_MAINLAYOUTPROFILE_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "data/ProfileManager.h" 9 | 10 | class MainLayoutProfile 11 | { 12 | 13 | public: 14 | MainLayoutProfile(){darkMode = false; tabsexpanded = true;}; 15 | 16 | QString profileName; 17 | QList rowA; 18 | QList rowB; 19 | QList detailColA; 20 | QList detailColB; 21 | QList detailColC; 22 | QByteArray mainGeometry; 23 | QByteArray mainState; 24 | bool darkMode; 25 | bool tabsexpanded; 26 | QList> addlBandmaps; 27 | 28 | bool operator== (const MainLayoutProfile &profile); 29 | bool operator!= (const MainLayoutProfile &profile); 30 | static MainLayoutProfile getClassicLayout(); 31 | 32 | private: 33 | friend QDataStream& operator<<(QDataStream& out, const MainLayoutProfile& v); 34 | friend QDataStream& operator>>(QDataStream& in, MainLayoutProfile& v); 35 | 36 | }; 37 | 38 | Q_DECLARE_METATYPE(MainLayoutProfile); 39 | 40 | class MainLayoutProfilesManager : public ProfileManagerSQL 41 | { 42 | Q_OBJECT 43 | 44 | public: 45 | 46 | explicit MainLayoutProfilesManager(); 47 | ~MainLayoutProfilesManager() { }; 48 | 49 | static MainLayoutProfilesManager* instance() 50 | { 51 | static MainLayoutProfilesManager instance; 52 | return &instance; 53 | }; 54 | void save(); 55 | 56 | static QString toDBStringList(const QList &list); 57 | static QString toDBStringList(const QList> &list); 58 | QList toIntList(const QString &list) const; 59 | static QList> toPairStringList(const QString &list); 60 | }; 61 | 62 | 63 | #endif // QLOG_DATA_MAINLAYOUTPROFILE_H 64 | -------------------------------------------------------------------------------- /data/POTAEntity.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_DATA_POTAENTITY_H 2 | #define QLOG_DATA_POTAENTITY_H 3 | 4 | #include 5 | 6 | class POTAEntity { 7 | public: 8 | QString reference; 9 | QString name; 10 | bool active; 11 | qint16 entityID; 12 | QString locationDesc; 13 | double longitude; 14 | double latitude; 15 | QString grid; 16 | }; 17 | 18 | #endif // QLOG_DATA_POTAENTITY_H 19 | -------------------------------------------------------------------------------- /data/RotProfile.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_DATA_ROTPROFILE_H 2 | #define QLOG_DATA_ROTPROFILE_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "data/ProfileManager.h" 10 | 11 | #define DEFAULT_ROT_MODEL 1 12 | 13 | class RotProfile 14 | { 15 | public: 16 | enum rotPortType 17 | { 18 | SERIAL_ATTACHED, 19 | NETWORK_ATTACHED 20 | }; 21 | 22 | RotProfile() { model = DEFAULT_ROT_MODEL; netport = 0; 23 | baudrate = 0; databits = 0; stopbits = 0.0; 24 | driver = 0;}; 25 | 26 | QString profileName; 27 | qint32 model; 28 | QString portPath; 29 | QString hostname; 30 | quint16 netport; 31 | quint32 baudrate; 32 | quint8 databits; 33 | float stopbits; 34 | QString flowcontrol; 35 | QString parity; 36 | qint32 driver; 37 | 38 | bool operator== (const RotProfile &profile); 39 | bool operator!= (const RotProfile &profile); 40 | 41 | rotPortType getPortType() const; 42 | 43 | 44 | private: 45 | friend QDataStream& operator<<(QDataStream& out, const RotProfile& v); 46 | friend QDataStream& operator>>(QDataStream& in, RotProfile& v); 47 | 48 | }; 49 | 50 | Q_DECLARE_METATYPE(RotProfile); 51 | 52 | class RotProfilesManager : public ProfileManagerSQL 53 | { 54 | Q_OBJECT 55 | 56 | public: 57 | 58 | explicit RotProfilesManager(); 59 | ~RotProfilesManager() { }; 60 | 61 | static RotProfilesManager* instance(); 62 | void save(); 63 | 64 | }; 65 | 66 | #endif // QLOG_DATA_ROTPROFILE_H 67 | -------------------------------------------------------------------------------- /data/RotUsrButtonsProfile.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_DATA_ROTUSRBUTTONSPROFILE_H 2 | #define QLOG_DATA_ROTUSRBUTTONSPROFILE_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "data/ProfileManager.h" 9 | 10 | #define MAX_ROT_USER_BUTTONS 4 11 | 12 | class RotUsrButtonsProfile 13 | { 14 | public: 15 | RotUsrButtonsProfile() 16 | { 17 | shortDescs.resize(MAX_ROT_USER_BUTTONS); 18 | bearings.resize(MAX_ROT_USER_BUTTONS); 19 | } 20 | 21 | QString profileName; 22 | QVector shortDescs; 23 | QVector bearings; 24 | 25 | bool operator== (const RotUsrButtonsProfile &profile); 26 | bool operator!= (const RotUsrButtonsProfile &profile); 27 | 28 | private: 29 | friend QDataStream& operator<<(QDataStream& out, const RotUsrButtonsProfile& v); 30 | friend QDataStream& operator>>(QDataStream& in, RotUsrButtonsProfile& v); 31 | 32 | }; 33 | 34 | Q_DECLARE_METATYPE(RotUsrButtonsProfile); 35 | 36 | class RotUsrButtonsProfilesManager : public ProfileManagerSQL 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | 42 | explicit RotUsrButtonsProfilesManager(); 43 | ~RotUsrButtonsProfilesManager() { }; 44 | 45 | static RotUsrButtonsProfilesManager* instance() 46 | { 47 | static RotUsrButtonsProfilesManager instance; 48 | return &instance; 49 | }; 50 | void save(); 51 | 52 | }; 53 | 54 | #endif // QLOG_DATA_ROTUSRBUTTONSPROFILE_H 55 | -------------------------------------------------------------------------------- /data/SOTAEntity.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_DATA_SOTAENTITY_H 2 | #define QLOG_DATA_SOTAENTITY_H 3 | 4 | #include 5 | 6 | class SOTAEntity { 7 | public: 8 | QString summitCode; 9 | QString associationName; 10 | QString regionName; 11 | QString summitName; 12 | qint32 altm; 13 | qint32 altft; 14 | double gridref1; 15 | double gridref2; 16 | double longitude; 17 | double latitude; 18 | qint16 points; 19 | qint16 bonusPoints; 20 | QDate validFrom; 21 | QDate validTo; 22 | }; 23 | 24 | #endif // QLOG_DATA_SOTAENTITY_H 25 | -------------------------------------------------------------------------------- /data/SpotAlert.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_DATA_SPOTALERT_H 2 | #define QLOG_DATA_SPOTALERT_H 3 | 4 | #include 5 | #include "data/WsjtxEntry.h" 6 | #include "data/DxSpot.h" 7 | 8 | class SpotAlert 9 | { 10 | 11 | public: 12 | 13 | enum ALERTSOURCETYPE 14 | { 15 | DXSPOT = 0b1, 16 | WSJTXCQSPOT = 0b10 17 | }; 18 | 19 | ALERTSOURCETYPE source; 20 | QStringList ruleNameList; 21 | WsjtxEntry spot; 22 | 23 | SpotAlert() : source(DXSPOT) {}; 24 | 25 | SpotAlert(const QStringList &ruleList, const DxSpot &sourceSpot) : 26 | spot(sourceSpot) 27 | { 28 | source = SpotAlert::ALERTSOURCETYPE::DXSPOT; 29 | ruleNameList = ruleList; 30 | }; 31 | 32 | SpotAlert(const QStringList &ruleList, const WsjtxEntry &sourceWsjtx) : 33 | spot(sourceWsjtx) 34 | { 35 | source = SpotAlert::ALERTSOURCETYPE::WSJTXCQSPOT; 36 | ruleNameList = ruleList; 37 | }; 38 | 39 | const DxSpot& getDxSpot() const {return spot;}; 40 | 41 | private: 42 | 43 | }; 44 | 45 | Q_DECLARE_METATYPE(SpotAlert); 46 | 47 | #endif // QLOG_DATA_SPOTALERT_H 48 | -------------------------------------------------------------------------------- /data/StationProfile.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_DATA_STATIONPROFILE_H 2 | #define QLOG_DATA_STATIONPROFILE_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "data/ProfileManager.h" 12 | 13 | class StationProfile 14 | { 15 | 16 | public: 17 | StationProfile() : ituz(0), cqz(0), dxcc(0) {}; 18 | 19 | QString profileName; 20 | QString callsign; 21 | QString locator; 22 | QString operatorName; 23 | QString operatorCallsign; 24 | QString qthName; 25 | QString iota; 26 | QString pota; 27 | QString sota; 28 | QString sig; 29 | QString sigInfo; 30 | QString vucc; 31 | QString wwff; 32 | int ituz; 33 | int cqz; 34 | int dxcc; 35 | QString country; 36 | QString county; 37 | QString darcDOK; 38 | 39 | bool operator== (const StationProfile &profile); 40 | bool operator!= (const StationProfile &profile); 41 | 42 | QString toHTMLString() const; 43 | 44 | private: 45 | friend QDataStream& operator<<(QDataStream& out, const StationProfile& v); 46 | friend QDataStream& operator>>(QDataStream& in, StationProfile& v); 47 | }; 48 | 49 | Q_DECLARE_METATYPE(StationProfile) 50 | 51 | class StationProfilesManager : public ProfileManagerSQL 52 | { 53 | Q_OBJECT 54 | 55 | public: 56 | 57 | explicit StationProfilesManager(); 58 | ~StationProfilesManager() {}; 59 | 60 | static StationProfilesManager* instance() 61 | { 62 | static StationProfilesManager instance; 63 | return &instance; 64 | }; 65 | void save(); 66 | }; 67 | 68 | 69 | #endif // QLOG_DATA_STATIONPROFILE_H 70 | -------------------------------------------------------------------------------- /data/ToAllSpot.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_DATA_TOALLSPOT_H 2 | #define QLOG_DATA_TOALLSPOT_H 3 | 4 | #include 5 | #include "data/Dxcc.h" 6 | 7 | class ToAllSpot { 8 | public: 9 | QDateTime time; 10 | 11 | DxccEntity dxcc_spotter; 12 | QString spotter; 13 | QString message; 14 | }; 15 | 16 | #endif // QLOG_DATA_TOALLSPOT_H 17 | -------------------------------------------------------------------------------- /data/WCYSpot.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_DATA_WCYSPOT_H 2 | #define QLOG_DATA_WCYSPOT_H 3 | 4 | #include 5 | 6 | class WCYSpot { 7 | public: 8 | QDateTime time; 9 | quint16 KIndex; 10 | quint16 expK; 11 | quint16 AIndex; 12 | quint16 RIndex; 13 | quint16 SFI; 14 | QString SA; 15 | QString GMF; 16 | QString Au; 17 | }; 18 | 19 | #endif // QLOG_DATA_WCYSPOT_H 20 | -------------------------------------------------------------------------------- /data/WWFFEntity.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_DATA_WWFFENTITY_H 2 | #define QLOG_DATA_WWFFENTITY_H 3 | 4 | #include 5 | 6 | class WWFFEntity { 7 | public: 8 | QString reference; 9 | QString status; 10 | QString name; 11 | QString program; 12 | QString dxcc; 13 | QString state; 14 | QString county; 15 | QString continent; 16 | QString iota; 17 | QString iaruLocator; 18 | double latitude; 19 | double longitude; 20 | QString iucncat; 21 | QDate validFrom; 22 | QDate validTo; 23 | }; 24 | 25 | 26 | #endif // QLOG_DATA_WWFFENTITY_H 27 | -------------------------------------------------------------------------------- /data/WWVSpot.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_DATA_WWVSPOT_H 2 | #define QLOG_DATA_WWVSPOT_H 3 | 4 | #include 5 | 6 | class WWVSpot { 7 | public: 8 | QDateTime time; 9 | quint16 SFI; 10 | quint16 AIndex; 11 | quint16 KIndex; 12 | QString info1; 13 | QString info2; 14 | }; 15 | 16 | #endif // QLOG_DATA_WWVSPOT_H 17 | -------------------------------------------------------------------------------- /data/WsjtxEntry.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_DATA_WSJTXENTRY_H 2 | #define QLOG_DATA_WSJTXENTRY_H 3 | 4 | #include "core/Wsjtx.h" 5 | #include "data/DxSpot.h" 6 | 7 | class WsjtxEntry : public DxSpot 8 | { 9 | 10 | public: 11 | 12 | WsjtxDecode decode; 13 | QString grid; 14 | double distance; 15 | QDateTime receivedTime; 16 | QString decodedMode; 17 | 18 | WsjtxEntry() : DxSpot(), distance(0.0){}; 19 | 20 | WsjtxEntry(const DxSpot &other) : 21 | DxSpot(other), distance(0.0) {}; 22 | 23 | operator QString() const 24 | { 25 | return QString("WsjtxEntry ") 26 | + "Country: " + QString::number(dxcc.dxcc) + " " 27 | + "CQZ" + QString::number(dxcc.cqz) + " " 28 | + "ITUZ" + QString::number(dxcc.ituz) + " " 29 | + "Status: " + QString::number(status) + " " 30 | + "Band: " + band + " " 31 | + "ModeGroup: " + ((decodedMode == "FT8") ? BandPlan::MODE_GROUP_STRING_FT8 32 | : BandPlan::MODE_GROUP_STRING_DIGITAL ) + " " 33 | + "spotter Country: " + QString::number(dxcc_spotter.dxcc) + " " 34 | + "Continent: " + dxcc.cont + " " 35 | + "Spotter Continent: " + dxcc_spotter.cont + " " 36 | + "Callsign: " + callsign + " " 37 | + "Message: " + decode.message + " " 38 | + "DX Member: " + memberList2StringList().join(", "); 39 | }; 40 | }; 41 | 42 | #endif // QLOG_DATA_WSJTXENTRY_H 43 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: qlog 2 | Section: hamradio 3 | Priority: optional 4 | Maintainer: Ladislav Foldyna 5 | Uploaders: Ladislav Foldyna 6 | Build-Depends: debhelper (>= 10.0.0), qtbase5-dev, libsqlite3-dev, libhamlib-dev, libqt5charts5-dev, qtchooser, qttools5-dev-tools, libqt5keychain1, qt5keychain-dev, qtwebengine5-dev, libqt5serialport5-dev, pkg-config, libqt5websockets5-dev 7 | Standards-Version: 4.5.0 8 | 9 | Package: qlog 10 | Architecture: any 11 | Depends: ${shlibs:Depends}, ${misc:Depends} 12 | Description: Qt Logging program for hamradio operators 13 | QLog is an Amateur Radio logging application for Linux, Windows and Mac OS. It 14 | is based on the Qt 5 framework and uses SQLite as database backend. 15 | 16 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=428 2 | Upstream-Name: qlog 3 | Upstream-Maintainer: Ladislav Foldyna 4 | 5 | Files: debian/* 6 | Copyright: Copyright 2021-2025, Ladislav Foldyna 7 | License: GPL-3+ 8 | The package for qlog was put together first by Ladislav Foldyna 9 | 10 | 11 | Files: * 12 | Copyright: 2020 Thomas Gatzweiler 13 | Copyright: 2021-2025 Ladislav Foldyna 14 | Copyright: 2025 Michael Morgan AA5SH 15 | Copyright: 2025 Kyle Boyle 16 | License: GPL-3+ 17 | 18 | License: GPL-3+ 19 | This program is free software: you can redistribute it and/or modify 20 | it under the terms of the GNU General Public License as published by 21 | the Free Software Foundation, either version 3 of the License, or 22 | (at your option) any later version. 23 | . 24 | This program is distributed in the hope that it will be useful, 25 | but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | GNU General Public License for more details. 28 | . 29 | You should have received a copy of the GNU General Public License 30 | along with this program. If not, see . 31 | . 32 | On Debian systems, the full text of the GNU General Public License 33 | version 3 can be found in the file /usr/share/common-licenses/GPL-3. 34 | 35 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | %: 3 | dh $@ --parallel 4 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /devtools/ADIF/min_ADIF_fields_example.adi: -------------------------------------------------------------------------------- 1 | ### QLog ADIF Export 2 | 3.1.4 3 | QLog 4 | 0.20.0 5 | 20230324 081527 6 | 7 | 8 | SO1TEST 9 | 20230101 10 | 132300 11 | 40m 12 | CW 13 | 14 | -------------------------------------------------------------------------------- /devtools/ADIF/test_intl.adi: -------------------------------------------------------------------------------- 1 | ### QLog ADIF Export 2 | 3.1.4 3 | QLog 4 | 0.20.0 5 | 20230324 081527 6 | 7 | 8 | SO1TEST 9 | 20230501 10 | 132300 11 | 40m 12 | CW 13 | com 14 | Rig from 15 | GP 16 | GP_INTL 17 | 18 | 19 | SO1TESTT 20 | 20230501 21 | 132300 22 | 40m 23 | CW 24 | com 25 | com_intl 26 | 27 | 28 | SO1TESTS 29 | 20230501 30 | 132300 31 | 40m 32 | CW 33 | 34 | -------------------------------------------------------------------------------- /devtools/timezones/README.md: -------------------------------------------------------------------------------- 1 | # Database files 2 | 3 | Please download the database files [here](https://cdn.bertold.org/zonedetect/db/db.zip) or create them using the builder. 4 | 5 | To use the builder, first install [shapelib](https://github.com/OSGeo/shapelib), then: 6 | 7 | cd builder 8 | ./makedb.sh 9 | 10 | This will create database files in `out` and `out_v1`, as well as a `db.zip` containing both directories. 11 | 12 | The files in the folder out\_v1/ use a newer format and use less space to encode the same information. 13 | 14 | QLog uses out\_v1/timezone21.bin 15 | -------------------------------------------------------------------------------- /devtools/timezones/builder/buildspec.yml: -------------------------------------------------------------------------------- 1 | version: 0.2 2 | 3 | phases: 4 | build: 5 | commands: 6 | - apt update 7 | - apt install -y libshp-dev 8 | - cd database/builder 9 | - ./makedb.sh 10 | 11 | artifacts: 12 | files: 13 | - database/builder/db.zip 14 | discard-paths: yes 15 | -------------------------------------------------------------------------------- /devtools/timezones/country_DATA_LICENSE: -------------------------------------------------------------------------------- 1 | Source: http://www.naturalearthdata.com/ 2 | 3 | All versions of Natural Earth raster + vector map data found on this website are in the public domain. You may use the maps in any manner, including modifying the content and design, electronic dissemination, and offset printing. The primary authors, Tom Patterson and Nathaniel Vaughn Kelso, and all other contributors renounce all financial claim to the maps and invites you to use them for personal, educational, and commercial purposes. 4 | 5 | No permission is needed to use Natural Earth. Crediting the authors is unnecessary. 6 | -------------------------------------------------------------------------------- /devtools/translit/generate.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This script generates a Unicode character transliteration 4 | # table into sequences of individual characters. 5 | 6 | # For each Unicode character from decimal value 128 to 0xffff, 7 | # its transliteration is obtained using the `unidecode` library. 8 | 9 | from unidecode import unidecode 10 | 11 | def unicode_table(): 12 | chars = [] 13 | mapChar = [] 14 | elementCnt = 0 15 | pos = 0 16 | for i in range(128, 0xffff): 17 | try: 18 | char = chr(i) 19 | charU = unidecode(char) 20 | if charU != "" : 21 | charField = [] 22 | for element in charU: 23 | charField.append("'" + element.replace('\\', '\\\\').replace('\'', '\\\'').replace('\"', '\\\"') + "'") 24 | 25 | stringlen = len(charU) 26 | print (f"{stringlen}, " + ", ".join(charField) + ",", end = " " ) 27 | elementCnt = elementCnt + 1 28 | mapChar.append(pos); 29 | pos = pos + stringlen + 1 30 | if elementCnt % 6 == 0: 31 | print("") 32 | else : 33 | mapChar.append(-1) 34 | except ValueError: 35 | mapChar.append(-1) 36 | return mapChar 37 | 38 | print ('const char Data::translitTab[] = {') 39 | l = unicode_table() 40 | print ('};') 41 | 42 | print('const int Data::tranlitIndexMap[] = {') 43 | count = 0 44 | for charMap in l: 45 | print(f"{charMap}, ", end = "") 46 | count = count + 1; 47 | if count % 10 == 0: 48 | print("") 49 | print('};') 50 | -------------------------------------------------------------------------------- /doc/UDP_Notifications.txt: -------------------------------------------------------------------------------- 1 | see details https://github.com/foldynl/QLog/wiki/Notifications 2 | -------------------------------------------------------------------------------- /i18n/datastrings.tri: -------------------------------------------------------------------------------- 1 | QT_TRANSLATE_NOOP("Data", "Aircraft Scatter"); 2 | QT_TRANSLATE_NOOP("Data", "Aurora-E"); 3 | QT_TRANSLATE_NOOP("Data", "Aurora"); 4 | QT_TRANSLATE_NOOP("Data", "Back scatter"); 5 | QT_TRANSLATE_NOOP("Data", "EchoLink"); 6 | QT_TRANSLATE_NOOP("Data", "Earth-Moon-Earth"); 7 | QT_TRANSLATE_NOOP("Data", "Sporadic E"); 8 | QT_TRANSLATE_NOOP("Data", "F2 Reflection"); 9 | QT_TRANSLATE_NOOP("Data", "Field Aligned Irregularities"); 10 | QT_TRANSLATE_NOOP("Data", "Ground Wave"); 11 | QT_TRANSLATE_NOOP("Data", "Internet-assisted"); 12 | QT_TRANSLATE_NOOP("Data", "Ionoscatter"); 13 | QT_TRANSLATE_NOOP("Data", "IRLP"); 14 | QT_TRANSLATE_NOOP("Data", "Line of Sight"); 15 | QT_TRANSLATE_NOOP("Data", "Meteor scatter"); 16 | QT_TRANSLATE_NOOP("Data", "Terrestrial or atmospheric repeater or transponder"); 17 | QT_TRANSLATE_NOOP("Data", "Rain scatter"); 18 | QT_TRANSLATE_NOOP("Data", "Satellite"); 19 | QT_TRANSLATE_NOOP("Data", "Trans-equatorial"); 20 | QT_TRANSLATE_NOOP("Data", "Tropospheric ducting"); 21 | -------------------------------------------------------------------------------- /i18n/i18n.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | qlog_de.qm 4 | qlog_cs.qm 5 | qlog_zh_CN.qm 6 | datastrings.tri 7 | qlog_es.qm 8 | qlog_it.qm 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /i18n/qlog_cs.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foldynl/QLog/79625cf162434dec9d0fc4e862c819bd49102fe4/i18n/qlog_cs.qm -------------------------------------------------------------------------------- /i18n/qlog_de.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foldynl/QLog/79625cf162434dec9d0fc4e862c819bd49102fe4/i18n/qlog_de.qm -------------------------------------------------------------------------------- /i18n/qlog_es.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foldynl/QLog/79625cf162434dec9d0fc4e862c819bd49102fe4/i18n/qlog_es.qm -------------------------------------------------------------------------------- /i18n/qlog_it.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foldynl/QLog/79625cf162434dec9d0fc4e862c819bd49102fe4/i18n/qlog_it.qm -------------------------------------------------------------------------------- /i18n/qlog_zh_CN.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foldynl/QLog/79625cf162434dec9d0fc4e862c819bd49102fe4/i18n/qlog_zh_CN.qm -------------------------------------------------------------------------------- /installer/config/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | QLog 4 | 0.44.1 5 | QLog 6 | OK1MLG 7 | QLog 8 | @ApplicationsDir@/QLog 9 | 10 | -------------------------------------------------------------------------------- /installer/packages/de.dl2ic.qlog/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foldynl/QLog/79625cf162434dec9d0fc4e862c819bd49102fe4/installer/packages/de.dl2ic.qlog/data/.gitkeep -------------------------------------------------------------------------------- /installer/packages/de.dl2ic.qlog/data/qlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foldynl/QLog/79625cf162434dec9d0fc4e862c819bd49102fe4/installer/packages/de.dl2ic.qlog/data/qlog -------------------------------------------------------------------------------- /installer/packages/de.dl2ic.qlog/meta/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | QLog 4 | The QLog main application. 5 | 0.44.1-1 6 | 2025-05-11 7 | true 8 | true 9 | 10 | 11 | targetwidget.ui 12 | 13 | 14 | -------------------------------------------------------------------------------- /logformat/AdxFormat.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_LOGFORMAT_ADXFORMAT_H 2 | #define QLOG_LOGFORMAT_ADXFORMAT_H 3 | 4 | #include 5 | 6 | #include "AdiFormat.h" 7 | 8 | class AdxFormat : public AdiFormat 9 | { 10 | public: 11 | explicit AdxFormat(QTextStream& stream); 12 | 13 | virtual void importStart() override; 14 | virtual void importEnd() override; 15 | 16 | virtual void exportContact(const QSqlRecord& record, 17 | QMap *applTags = nullptr) override; 18 | virtual void exportStart() override; 19 | virtual void exportEnd() override; 20 | 21 | protected: 22 | virtual void writeField(const QString &name, 23 | bool presenceCondition, 24 | const QString &value, 25 | const QString &type="") override; 26 | virtual void writeSQLRecord(const QSqlRecord& record, 27 | QMap *applTags) override; 28 | virtual bool readContact(QVariantMap& ) override; 29 | 30 | private: 31 | QXmlStreamWriter *writer; 32 | QXmlStreamReader *reader; 33 | }; 34 | 35 | #endif // QLOG_LOGFORMAT_ADXFORMAT_H 36 | -------------------------------------------------------------------------------- /logformat/CSVFormat.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_LOGFORMAT_CSVFORMAT_H 2 | #define QLOG_LOGFORMAT_CSVFORMAT_H 3 | 4 | #include "LogFormat.h" 5 | #include "logformat/AdxFormat.h" 6 | 7 | // derived from ADX because ADX format contains non-intl and intl fields 8 | class CSVFormat : public AdxFormat 9 | { 10 | public: 11 | explicit CSVFormat(QTextStream& stream); 12 | 13 | virtual void exportStart() override; 14 | virtual void exportContact(const QSqlRecord& record, QMap *) override; 15 | virtual void exportEnd() override; 16 | 17 | virtual void importStart() override {}; 18 | virtual void importEnd() override {}; 19 | void setDelimiter(const QChar&); 20 | 21 | protected: 22 | virtual void writeField(const QString &name, 23 | bool presenceCondition, 24 | const QString &value, 25 | const QString &type="") override; 26 | const QString toDate(const QVariant &) override; 27 | const QString toTime(const QVariant &) override; 28 | 29 | private: 30 | QMap header; 31 | QList> exportedRecords; 32 | QHash currectRecord; 33 | 34 | QString csvStringValue(const QString&); 35 | QChar delimiter; 36 | }; 37 | 38 | #endif // QLOG_LOGFORMAT_CSVFORMAT_H 39 | -------------------------------------------------------------------------------- /logformat/JsonFormat.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "JsonFormat.h" 4 | #include "core/debug.h" 5 | 6 | MODULE_IDENTIFICATION("qlog.logformat.jsonformat"); 7 | 8 | void JsonFormat::exportStart() 9 | { 10 | FCT_IDENTIFICATION; 11 | 12 | data = QJsonArray(); 13 | } 14 | 15 | void JsonFormat::exportContact(const QSqlRecord& record, QMap*applTags) 16 | { 17 | FCT_IDENTIFICATION; 18 | 19 | qCDebug(function_parameters)< 5 | #include "AdxFormat.h" 6 | 7 | class JsonFormat : public AdxFormat 8 | { 9 | public: 10 | explicit JsonFormat(QTextStream& stream) : AdxFormat(stream) {} 11 | 12 | virtual bool importNext(QSqlRecord& contact) override; 13 | virtual void importStart() override {}; 14 | virtual void importEnd() override {}; 15 | 16 | virtual void exportStart() override; 17 | virtual void exportContact(const QSqlRecord& record, QMap *) override; 18 | virtual void exportEnd() override; 19 | 20 | protected: 21 | virtual void writeField(const QString &name, 22 | bool presenceCondition, 23 | const QString &value, 24 | const QString &type="") override; 25 | 26 | private: 27 | QJsonArray data; 28 | QJsonObject contact; 29 | }; 30 | 31 | #endif // QLOG_LOGFORMAT_JSONFORMAT_H 32 | -------------------------------------------------------------------------------- /logformat/PotaAdiFormat.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_LOGFORMAT_POTALOGFORMAT_H 2 | #define QLOG_LOGFORMAT_POTALOGFORMAT_H 3 | #include "AdiFormat.h" 4 | 5 | /* 6 | * A specialized case of ADI export, where each activated park gets T'd into its 7 | * own file with some denormalization and values set to satisfy the pota.app 8 | * upload processes. 9 | */ 10 | class PotaAdiFormat : public AdiFormat 11 | { 12 | public: 13 | explicit PotaAdiFormat(QTextStream &stream); 14 | 15 | virtual void exportContact(const QSqlRecord &, 16 | QMap *applTags = nullptr) override; 17 | virtual void exportEnd() override; 18 | 19 | virtual bool importNext(QSqlRecord &) override { return false; } 20 | 21 | void setExportDirectory(const QString &dir); 22 | ~PotaAdiFormat(); 23 | 24 | private: 25 | QString exportDir; 26 | QDateTime currentDate; 27 | 28 | struct ParkFormatter 29 | { 30 | AdiFormat *formatter = nullptr; 31 | QFile *file = nullptr; 32 | QTextStream *stream = nullptr; 33 | 34 | ~ParkFormatter() 35 | { 36 | if ( formatter ) delete formatter; 37 | if ( stream ) delete stream; 38 | if ( file ) delete file; 39 | } 40 | }; 41 | 42 | QHash parkFormatters; 43 | 44 | AdiFormat *getActivatorParkFormatter(const QSqlRecord &record); 45 | void moveFieldValue(QSqlRecord &record, 46 | const QString &fromFieldName, 47 | const QString &toFieldName); 48 | bool isValidPotaRecord(const QSqlRecord &record) const; 49 | void preparePotaField(QSqlRecord &record, const QString &refField, 50 | const QString &infoField, const QString &sigField); 51 | void expandParkRecord(QList &inputList, const QString &columnName); 52 | }; 53 | 54 | #endif // QLOG_LOGFORMAT_POTALOGFORMAT_H 55 | -------------------------------------------------------------------------------- /models/AlertTableModel.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_MODELS_ALERTTABLEMODEL_H 2 | #define QLOG_MODELS_ALERTTABLEMODEL_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include "core/LogLocale.h" 8 | 9 | class AlertTableModel : public QAbstractTableModel 10 | { 11 | Q_OBJECT 12 | 13 | 14 | public: 15 | 16 | enum column_id 17 | { 18 | COLUMN_RULENAME = 0, 19 | COLUMN_CALLSIGN = 1, 20 | COLUMN_FREQ = 2, 21 | COLUMN_MODE = 3, 22 | COLUMN_UPDATED = 4, 23 | COLUMN_LAST_UPDATE = 5, 24 | COLUMN_LAST_COMMENT = 6, 25 | COLUMN_MEMBER = 7, 26 | }; 27 | 28 | struct AlertTableRecord 29 | { 30 | QStringList ruleName; 31 | long long counter; 32 | SpotAlert alert; 33 | 34 | AlertTableRecord() : counter(0){}; 35 | 36 | bool operator==(const AlertTableRecord &) const; 37 | explicit AlertTableRecord(const SpotAlert&); 38 | }; 39 | 40 | AlertTableModel(QObject* parent = nullptr) : QAbstractTableModel(parent){}; 41 | int rowCount(const QModelIndex& parent = QModelIndex()) const; 42 | int columnCount(const QModelIndex& parent = QModelIndex()) const; 43 | QVariant data(const QModelIndex& index, int role) const; 44 | QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; 45 | void addAlert(const SpotAlert &entry); 46 | void clear(); 47 | const AlertTableRecord getTableRecord(const QModelIndex& index); 48 | void aging(const int clear_interval_sec); 49 | void resetDupe(); 50 | void recalculateDupe(); 51 | void updateSpotsStatusWhenQSOAdded(const QSqlRecord &record); 52 | void updateSpotsStatusWhenQSOUpdated(const QSqlRecord &); 53 | void updateSpotsStatusWhenQSODeleted(const QSqlRecord &record); 54 | void updateSpotsDxccStatusWhenQSODeleted(const QSet &entities); 55 | void recalculateDxccStatus(); 56 | 57 | private: 58 | LogLocale locale; 59 | QList alertList; 60 | QMutex alertListMutex; 61 | }; 62 | 63 | #endif // QLOG_MODELS_ALERTTABLEMODEL_H 64 | -------------------------------------------------------------------------------- /models/AwardsTableModel.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_MODELS_AWARDSTABLEMODEL_H 2 | #define QLOG_MODELS_AWARDSTABLEMODEL_H 3 | 4 | #include 5 | #include 6 | 7 | class AwardsTableModel : public QSqlQueryModel 8 | { 9 | Q_OBJECT 10 | 11 | public: 12 | explicit AwardsTableModel(QObject *parent = nullptr); 13 | 14 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; 15 | 16 | private: 17 | }; 18 | 19 | #endif // QLOG_MODELS_AWARDSTABLEMODEL_H 20 | -------------------------------------------------------------------------------- /models/DxccTableModel.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_MODELS_DXCCTABLEMODEL_H 2 | #define QLOG_MODELS_DXCCTABLEMODEL_H 3 | 4 | #include 5 | #include 6 | 7 | class DxccTableModel : public QSqlQueryModel 8 | { 9 | public: 10 | explicit DxccTableModel(QObject* parent = nullptr); 11 | 12 | QVariant data(const QModelIndex &, int role = Qt::DisplayRole) const; 13 | }; 14 | 15 | #endif // QLOG_MODELS_DXCCTABLEMODEL_H 16 | -------------------------------------------------------------------------------- /models/RigTypeModel.cpp: -------------------------------------------------------------------------------- 1 | #include "RigTypeModel.h" 2 | #include "rig/Rig.h" 3 | 4 | RigTypeModel::RigTypeModel(QObject* parent) 5 | : QAbstractListModel(parent) 6 | { 7 | 8 | } 9 | 10 | int RigTypeModel::rowCount(const QModelIndex&) const { 11 | return rigList.count(); 12 | } 13 | 14 | QVariant RigTypeModel::data(const QModelIndex& index, int role) const { 15 | if (role == Qt::DisplayRole) { 16 | return rigList.value(index.row()); 17 | } 18 | 19 | if (role == Qt::UserRole ) 20 | { 21 | return rigIds[rigList.value(index.row())]; 22 | } 23 | return QVariant(); 24 | } 25 | 26 | QModelIndex RigTypeModel::index(int row, int column, const QModelIndex& parent) const { 27 | if (!hasIndex(row, column, parent)) { 28 | return QModelIndex(); 29 | } 30 | 31 | int rigId = rigIds[rigList.value(row)]; 32 | if (rigId) 33 | return createIndex(row, column, rigId); 34 | else 35 | return QModelIndex(); 36 | } 37 | 38 | void RigTypeModel::select(int driverID) 39 | { 40 | beginResetModel(); 41 | rigIds.clear(); 42 | rigList.clear(); 43 | 44 | if ( driverID == 0 ) 45 | return; 46 | 47 | const QList> models = Rig::instance()->getModelList(static_cast(driverID)); 48 | for ( const QPair &model : models ) 49 | { 50 | const QString &name = model.second; 51 | rigIds[name] = model.first; 52 | rigList.append(name); 53 | } 54 | rigList.sort(); 55 | endResetModel(); 56 | } 57 | -------------------------------------------------------------------------------- /models/RigTypeModel.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_MODELS_RIGTYPEMODEL_H 2 | #define QLOG_MODELS_RIGTYPEMODEL_H 3 | 4 | #include 5 | #include 6 | 7 | class RigTypeModel : public QAbstractListModel { 8 | Q_OBJECT 9 | 10 | public: 11 | RigTypeModel(QObject* parent = 0); 12 | int rowCount(const QModelIndex& parent = QModelIndex()) const; 13 | QVariant data(const QModelIndex& index, int role) const; 14 | QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const; 15 | void select(int driverID); 16 | 17 | private: 18 | QStringList rigList; 19 | QMap rigIds; 20 | }; 21 | 22 | #endif // QLOG_MODELS_RIGTYPEMODEL_H 23 | -------------------------------------------------------------------------------- /models/RotTypeModel.cpp: -------------------------------------------------------------------------------- 1 | #include "rotator/Rotator.h" 2 | #include "RotTypeModel.h" 3 | 4 | RotTypeModel::RotTypeModel(QObject* parent) 5 | : QAbstractListModel(parent) 6 | { 7 | 8 | } 9 | 10 | int RotTypeModel::rowCount(const QModelIndex&) const { 11 | return rotList.count(); 12 | } 13 | 14 | QVariant RotTypeModel::data(const QModelIndex& index, int role) const { 15 | if (role == Qt::DisplayRole) { 16 | return rotList.value(index.row()); 17 | } 18 | 19 | if (role == Qt::UserRole ) 20 | { 21 | return rotIds[rotList.value(index.row())]; 22 | } 23 | return QVariant(); 24 | } 25 | 26 | QModelIndex RotTypeModel::index(int row, int column, const QModelIndex& parent) const { 27 | if (!hasIndex(row, column, parent)) { 28 | return QModelIndex(); 29 | } 30 | 31 | int rotId = rotIds[rotList.value(row)]; 32 | if (rotId) 33 | return createIndex(row, column, rotId); 34 | else 35 | return QModelIndex(); 36 | } 37 | 38 | void RotTypeModel::select(int driverID) 39 | { 40 | beginResetModel(); 41 | rotIds.clear(); 42 | rotList.clear(); 43 | 44 | if ( driverID == 0 ) 45 | return; 46 | 47 | const QList> models = Rotator::instance()->getModelList(static_cast(driverID)); 48 | for ( const QPair &model : models ) 49 | { 50 | const QString &name = model.second; 51 | rotIds[name] = model.first; 52 | rotList.append(name); 53 | } 54 | rotList.sort(); 55 | endResetModel(); 56 | } 57 | 58 | -------------------------------------------------------------------------------- /models/RotTypeModel.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_MODELS_ROTTYPEMODEL_H 2 | #define QLOG_MODELS_ROTTYPEMODEL_H 3 | 4 | #include 5 | #include 6 | 7 | class RotTypeModel : public QAbstractListModel { 8 | Q_OBJECT 9 | 10 | public: 11 | RotTypeModel(QObject* parent = 0); 12 | int rowCount(const QModelIndex& parent = QModelIndex()) const; 13 | QVariant data(const QModelIndex& index, int role) const; 14 | QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const; 15 | void select(int driverID); 16 | 17 | private: 18 | QStringList rotList; 19 | QMap rotIds; 20 | }; 21 | 22 | #endif // QLOG_MODELS_RIGTYPEMODEL_H 23 | -------------------------------------------------------------------------------- /models/SearchFilterProxyModel.cpp: -------------------------------------------------------------------------------- 1 | #include "SearchFilterProxyModel.h" 2 | 3 | SearchFilterProxyModel::SearchFilterProxyModel(QObject *parent) 4 | : QSortFilterProxyModel{parent} 5 | {} 6 | 7 | void SearchFilterProxyModel::setSearchString(const QString &searchString) 8 | { 9 | this->searchString = searchString; 10 | invalidateFilter(); 11 | } 12 | 13 | void SearchFilterProxyModel::setSearchSkippedCols(const QVector &columns) 14 | { 15 | searchSkippedCols = columns; 16 | invalidateFilter(); 17 | } 18 | 19 | bool SearchFilterProxyModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const 20 | { 21 | // full-text search 22 | for ( int col = 0; col < sourceModel()->columnCount(); ++col ) 23 | { 24 | if (searchSkippedCols.contains(col) ) 25 | continue; 26 | 27 | QModelIndex index = sourceModel()->index(source_row, col, source_parent); 28 | QString data = index.data(Qt::DisplayRole).toString(); 29 | 30 | if ( data.contains(searchString, Qt::CaseInsensitive) ) 31 | return true; 32 | } 33 | return false; 34 | } 35 | -------------------------------------------------------------------------------- /models/SearchFilterProxyModel.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_MODELS_SEARCHFILTERPROXYMODEL_H 2 | #define QLOG_MODELS_SEARCHFILTERPROXYMODEL_H 3 | 4 | #include 5 | 6 | class SearchFilterProxyModel : public QSortFilterProxyModel 7 | { 8 | Q_OBJECT 9 | 10 | public: 11 | SearchFilterProxyModel(QObject* parent = nullptr); 12 | void setSearchString(const QString& searchString); 13 | void setSearchSkippedCols(const QVector &columns); 14 | 15 | protected: 16 | bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const override; 17 | 18 | private: 19 | QString searchString; 20 | QVector searchSkippedCols; 21 | }; 22 | 23 | #endif // QLOG_MODELS_SEARCHFILTERPROXYMODEL_H 24 | -------------------------------------------------------------------------------- /models/ShortcutEditorModel.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_MODELS_SHORTCUTEDITORMODEL_H 2 | #define QLOG_MODELS_SHORTCUTEDITORMODEL_H 3 | 4 | #include 5 | #include 6 | 7 | class ShortcutEditorModel : public QAbstractTableModel 8 | { 9 | Q_OBJECT 10 | public: 11 | explicit ShortcutEditorModel(const QList &actions, 12 | const QStringList &builtInStaticActions, 13 | QObject *parent = nullptr); 14 | int rowCount(const QModelIndex& parent = QModelIndex()) const override; 15 | int columnCount(const QModelIndex& = QModelIndex()) const override; 16 | QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; 17 | QVariant data(const QModelIndex& index, int role) const override; 18 | bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; 19 | Qt::ItemFlags flags(const QModelIndex &index) const override; 20 | 21 | enum column_id 22 | { 23 | COLUMN_DESCRIPTION = 0, 24 | COLUMN_SHORTCUT = 1, 25 | }; 26 | 27 | signals: 28 | void conflictDetected(const QString &); 29 | 30 | private: 31 | QList actionList; 32 | QStringList builtInStaticActionList; 33 | 34 | const QAction *findShortcut(const QList &list, 35 | const QAction *currAction, 36 | const QString&) const; 37 | }; 38 | 39 | #endif // QLOG_MODELS_SHORTCUTEDITORMODEL_H 40 | -------------------------------------------------------------------------------- /models/SqlListModel.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "SqlListModel.h" 5 | 6 | SqlListModel::SqlListModel(const QString &query, const QString &placeholder, QObject *parent) 7 | : QSqlQueryModel(parent), 8 | placeholder(placeholder), 9 | stmt(query) 10 | { 11 | 12 | this->setQuery(stmt); 13 | } 14 | 15 | QVariant SqlListModel::headerData(int section, Qt::Orientation orientation, int role) const 16 | { 17 | Q_UNUSED(section) 18 | Q_UNUSED(orientation) 19 | Q_UNUSED(role) 20 | return QVariant(); 21 | } 22 | 23 | int SqlListModel::rowCount(const QModelIndex &parent) const 24 | { 25 | // For list models only the root node (an invalid parent) should return the list's size. For all 26 | // other (valid) parents, rowCount() should return 0 so that it does not become a tree model. 27 | if (parent.isValid()) 28 | return 0; 29 | 30 | return QSqlQueryModel::rowCount(parent) + (!placeholder.isEmpty() ? 1 : 0); 31 | } 32 | 33 | QVariant SqlListModel::data(const QModelIndex &index, int role) const 34 | { 35 | if (!index.isValid()) 36 | return QVariant(); 37 | 38 | if (role == Qt::DisplayRole && (index.column() == 0 || index.column() == 1 || index.column() == 2)) { 39 | if (!placeholder.isEmpty() && index.row() == 0) { 40 | return placeholder; 41 | } 42 | else { 43 | QModelIndex sqlIndex = this->index(index.row() - (!placeholder.isEmpty() ? 1 : 0), index.column()); 44 | return QSqlQueryModel::data(sqlIndex, role); 45 | } 46 | } 47 | else if (role == Qt::UserRole && (index.column() == 0 || index.column() == 1 || index.column() == 2)) { 48 | return index.row() - (placeholder.isEmpty() ? 1 : 0); 49 | } 50 | else { 51 | return QVariant(); 52 | } 53 | } 54 | 55 | void SqlListModel::refresh() 56 | { 57 | setQuery(stmt); 58 | } 59 | -------------------------------------------------------------------------------- /models/SqlListModel.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_MODELS_SQLLISTMODEL_H 2 | #define QLOG_MODELS_SQLLISTMODEL_H 3 | 4 | #include 5 | 6 | class SqlListModel : public QSqlQueryModel 7 | { 8 | Q_OBJECT 9 | 10 | public: 11 | explicit SqlListModel(const QString &, const QString &, QObject *parent = nullptr); 12 | 13 | // Header: 14 | QVariant headerData(int, Qt::Orientation, int role = Qt::DisplayRole) const override; 15 | 16 | // Basic functionality: 17 | int rowCount(const QModelIndex &parent = QModelIndex()) const override; 18 | 19 | QVariant data(const QModelIndex &, int role = Qt::DisplayRole) const override; 20 | 21 | void refresh(); 22 | private: 23 | QString placeholder; 24 | QString stmt; 25 | }; 26 | 27 | #endif // QLOG_MODELS_SQLLISTMODEL_H 28 | -------------------------------------------------------------------------------- /models/WsjtxTableModel.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_MODELS_WSJTXTABLEMODEL_H 2 | #define QLOG_MODELS_WSJTXTABLEMODEL_H 3 | 4 | #include 5 | #include "data/WsjtxEntry.h" 6 | 7 | class WsjtxTableModel : public QAbstractTableModel { 8 | Q_OBJECT 9 | 10 | public: 11 | enum column_id 12 | { 13 | COLUMN_CALLSIGN = 0, 14 | COLUMN_GRID = 1, 15 | COLUMN_DISTANCE = 2, 16 | COLUMN_SNR = 3, 17 | COLUMN_LAST_ACTIVITY = 4, 18 | COLUMN_LAST_MESSAGE = 5, 19 | COLUMN_MEMBER = 6, 20 | }; 21 | 22 | WsjtxTableModel(QObject* parent = nullptr) : QAbstractTableModel(parent) {spotPeriod = 120;} 23 | int rowCount(const QModelIndex& parent = QModelIndex()) const; 24 | int columnCount(const QModelIndex& parent = QModelIndex()) const; 25 | QVariant data(const QModelIndex& index, int role) const; 26 | QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; 27 | void addOrReplaceEntry(WsjtxEntry entry); 28 | void spotAging(); 29 | bool callsignExists(const WsjtxEntry &); 30 | const WsjtxEntry getEntry(const QString &callsign) const; 31 | const WsjtxEntry getEntry(QModelIndex idx) const; 32 | void setCurrentSpotPeriod(float); 33 | void clear(); 34 | void removeSpot(const QString &callsign); 35 | 36 | private: 37 | QList wsjtxData; 38 | float spotPeriod; 39 | }; 40 | 41 | #endif // QLOG_MODELS_WSJTXTABLEMODEL_H 42 | -------------------------------------------------------------------------------- /res/data/propagation_modes.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"id": "AS", "name": "Aircraft Scatter"}, 3 | {"id": "AUE", "name": "Aurora-E"}, 4 | {"id": "AUR", "name": "Aurora"}, 5 | {"id": "BS", "name": "Back scatter"}, 6 | {"id": "ECH", "name": "EchoLink"}, 7 | {"id": "EME", "name": "Earth-Moon-Earth"}, 8 | {"id": "ES", "name": "Sporadic E"}, 9 | {"id": "F2", "name": "F2 Reflection"}, 10 | {"id": "FAI", "name": "Field Aligned Irregularities"}, 11 | {"id": "GWAVE", "name": "Ground Wave"}, 12 | {"id": "INTERNET", "name": "Internet-assisted"}, 13 | {"id": "ION", "name": "Ionoscatter"}, 14 | {"id": "IRL", "name": "IRLP"}, 15 | {"id": "LOS", "name": "Line of Sight"}, 16 | {"id": "MS", "name": "Meteor scatter"}, 17 | {"id": "RPT", "name": "Terrestrial or atmospheric repeater or transponder"}, 18 | {"id": "RS", "name": "Rain scatter"}, 19 | {"id": "SAT", "name": "Satellite"}, 20 | {"id": "TEP", "name": "Trans-equatorial"}, 21 | {"id": "TR", "name": "Tropospheric ducting"} 22 | ] 23 | -------------------------------------------------------------------------------- /res/data/sat_modes.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"id": "HU", "name": "H/U (21 / 435)"}, 3 | {"id": "AU", "name": "A/U (29 / 435)"}, 4 | {"id": "VV", "name": "V/V (145 / 145)"}, 5 | {"id": "VU", "name": "V/U (145 / 435)"}, 6 | {"id": "VS", "name": "V/S (145 / 2400)"}, 7 | {"id": "UV", "name": "U/V (435 / 145)"}, 8 | {"id": "UU", "name": "U/U (435 / 435)"}, 9 | {"id": "US", "name": "U/S (435 / 2400)"}, 10 | {"id": "LV", "name": "L/V (1268 / 145)"}, 11 | {"id": "LU", "name": "L/U (1268 / 435)"}, 12 | {"id": "LS", "name": "L/S (1268 / 2400)"}, 13 | {"id": "LX", "name": "L/X (1268 / 10450)"}, 14 | {"id": "SX", "name": "S/X (2400 / 10450)"} 15 | ] 16 | -------------------------------------------------------------------------------- /res/data/timezone21.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foldynl/QLog/79625cf162434dec9d0fc4e862c819bd49102fe4/res/data/timezone21.bin -------------------------------------------------------------------------------- /res/icons/alert.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /res/icons/baseline-pause-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /res/icons/baseline-play_arrow-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /res/icons/baseline-play_back-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /res/icons/baseline-play_down-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /res/icons/baseline-play_up-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /res/icons/baseline-search-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /res/icons/baseline-stop-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /res/icons/cancel-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /res/icons/check_circle-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /res/icons/clear-button.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/icons/close-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /res/icons/cloud_download-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /res/icons/cloud_upload-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /res/icons/delete-button.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 13 | 15 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /res/icons/done-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /res/icons/filter_list-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /res/icons/help-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /res/icons/icons.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | baseline-play_arrow-24px.svg 4 | baseline-pause-24px.svg 5 | baseline-search-24px.svg 6 | baseline-stop-24px.svg 7 | skip_next-24px.svg 8 | skip_previous-24px.svg 9 | cloud_upload-24px.svg 10 | cloud_download-24px.svg 11 | filter_list-24px.svg 12 | zoom_out-24px.svg 13 | zoom_in-24px.svg 14 | done-24px.svg 15 | check_circle-24px.svg 16 | help-24px.svg 17 | cancel-24px.svg 18 | info-24px.svg 19 | close-24px.svg 20 | light-dark-24px.svg 21 | alert.svg 22 | connect.svg 23 | disconnect.svg 24 | warning.svg 25 | loading.gif 26 | baseline-play_back-24px.svg 27 | baseline-play_down-24px.svg 28 | baseline-play_up-24px.svg 29 | password.png 30 | menu.svg 31 | search-globe.svg 32 | search-globe_red.svg 33 | search-globe_green.svg 34 | search-globe_orange.svg 35 | delete-button.svg 36 | new-window.svg 37 | clear-button.svg 38 | 39 | 40 | -------------------------------------------------------------------------------- /res/icons/info-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /res/icons/light-dark-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /res/icons/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foldynl/QLog/79625cf162434dec9d0fc4e862c819bd49102fe4/res/icons/loading.gif -------------------------------------------------------------------------------- /res/icons/menu.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /res/icons/new-window.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/icons/password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foldynl/QLog/79625cf162434dec9d0fc4e862c819bd49102fe4/res/icons/password.png -------------------------------------------------------------------------------- /res/icons/search-globe_red.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/icons/skip_next-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /res/icons/skip_previous-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /res/icons/warning.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | alert 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /res/icons/zoom_in-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /res/icons/zoom_out-24px.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /res/map/nasabluemarble.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foldynl/QLog/79625cf162434dec9d0fc4e862c819bd49102fe4/res/map/nasabluemarble.jpg -------------------------------------------------------------------------------- /res/map/nasaearthlights.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foldynl/QLog/79625cf162434dec9d0fc4e862c819bd49102fe4/res/map/nasaearthlights.jpg -------------------------------------------------------------------------------- /res/qlog.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Type=Application 4 | Name=QLog 5 | Comment=Amateur Radio Logbook 6 | Exec=qlog 7 | Icon=qlog 8 | Categories=Utility;HamRadio; 9 | -------------------------------------------------------------------------------- /res/qlog.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foldynl/QLog/79625cf162434dec9d0fc4e862c819bd49102fe4/res/qlog.icns -------------------------------------------------------------------------------- /res/qlog.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foldynl/QLog/79625cf162434dec9d0fc4e862c819bd49102fe4/res/qlog.ico -------------------------------------------------------------------------------- /res/qlog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foldynl/QLog/79625cf162434dec9d0fc4e862c819bd49102fe4/res/qlog.png -------------------------------------------------------------------------------- /res/qlog_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foldynl/QLog/79625cf162434dec9d0fc4e862c819bd49102fe4/res/qlog_screen.png -------------------------------------------------------------------------------- /res/res.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | map/nasabluemarble.jpg 4 | map/nasaearthlights.jpg 5 | stylesheet.css 6 | qlog.png 7 | data/dxcc.json 8 | data/legacy_modes.json 9 | data/contests.json 10 | data/propagation_modes.json 11 | sql/migration_001.sql 12 | sql/contests.sql 13 | sql/migration_002.sql 14 | data/sat_modes.json 15 | qlog_screen.png 16 | map/onlinemap.html 17 | sql/migration_003.sql 18 | sql/migration_004.sql 19 | sql/migration_005.sql 20 | sql/migration_006.sql 21 | sql/migration_007.sql 22 | data/timezone21.bin 23 | sql/migration_008.sql 24 | sql/migration_009.sql 25 | sql/migration_010.sql 26 | sql/migration_011.sql 27 | sql/migration_012.sql 28 | sql/migration_013.sql 29 | sql/migration_014.sql 30 | sql/migration_015.sql 31 | sql/migration_016.sql 32 | sql/migration_017.sql 33 | sql/migration_018.sql 34 | sql/migration_019.sql 35 | sql/migration_020.sql 36 | sql/migration_021.sql 37 | sql/migration_022.sql 38 | sql/migration_023.sql 39 | sql/migration_024.sql 40 | sql/migration_025.sql 41 | sql/migration_026.sql 42 | sql/migration_027.sql 43 | sql/migration_028.sql 44 | sql/migration_029.sql 45 | sql/migration_030.sql 46 | sql/migration_031.sql 47 | sql/migration_032.sql 48 | sql/migration_033.sql 49 | 50 | 51 | -------------------------------------------------------------------------------- /res/sql/migration_003.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS station_profiles ( 2 | profile_name TEXT PRIMARY KEY, 3 | callsign TEXT NOT NULL, 4 | locator TEXT NOT NULL, 5 | operator_name TEXT, 6 | qth_name TEXT, 7 | iota TEXT, 8 | sota TEXT, 9 | sig TEXT, 10 | sig_info TEXT, 11 | vucc TEXT 12 | ); 13 | -------------------------------------------------------------------------------- /res/sql/migration_005.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO modes (name, rprt, dxcc, enabled, submodes) VALUES 2 | ('CW', '599', 'CW', true, NULL), 3 | ('SSB', '59', 'PHONE', true, '["LSB", "USB"]'), 4 | ('AM', '59', 'PHONE', true, NULL), 5 | ('FM', '59', 'PHONE', true, NULL), 6 | ('PSK', '599', 'DIGITAL', true, '[ 7 | "PSK31", 8 | "PSK63", 9 | "PSK63F", 10 | "PSK125", 11 | "PSK250", 12 | "PSK500", 13 | "PSK1000", 14 | "QPSK31", 15 | "QPSK63", 16 | "QPSK125", 17 | "QPSK250", 18 | "QPSK500" 19 | ]'), 20 | ('RTTY', '599', 'DIGITAL', true, NULL), 21 | ('MFSK', '599', 'DIGITAL', true, '[ 22 | "FT4", 23 | "MFSK4", 24 | "MFSK8", 25 | "MFSK11", 26 | "MFSK16", 27 | "MFSK22", 28 | "MFSK31", 29 | "MFSK32" 30 | ]'), 31 | ('OLIVIA', NULL, 'DIGITAL', true, '[ 32 | "OLIVIA 4/125", 33 | "OLIVIA 4/250", 34 | "OLIVIA 8/250", 35 | "OLIVIA 8/500", 36 | "OLIVIA 16/500", 37 | "OLIVIA 16/1000", 38 | "OLIVIA 32/1000" 39 | ]'), 40 | ('JT65', '-1', 'DIGITAL', true, '[ 41 | "JT65A", 42 | "JT65B", 43 | "JT65B2", 44 | "JT65C", 45 | "JT65C2" 46 | ]'), 47 | ('JT9', '-1', 'DIGITAL', true, '[ 48 | "JT9-1", 49 | "JT9-2", 50 | "JT9-5", 51 | "JT9-10", 52 | "JT9-30" 53 | ]'), 54 | ('FT8', '-1', 'DIGITAL', true, NULL), 55 | ('HELL', NULL, 'DIGITAL', true, '[ 56 | "FMHELL", 57 | "FSKHELL", 58 | "HELL80", 59 | "HFSK", 60 | "PSKHELL" 61 | ]'), 62 | ('CONTESTIA', NULL, 'DIGITAL', true, NULL), 63 | ('DOMINO', NULL, 'DIGITAL', true, '[ 64 | "DOMINOEX", 65 | "DOMINOF" 66 | ]'), 67 | ('MT63', NULL, 'DIGITAL', true, NULL), 68 | ('JT6M', '26', 'DIGITAL', true, NULL), 69 | ('JTMSK', '-1', 'DIGITAL', true, NULL), 70 | ('MSK144', '0', 'DIGITAL', true, NULL), 71 | ('FSK441', '26', 'DIGITAL', true, NULL), 72 | ('DIGITALVOICE', '59', 'PHONE', true, NULL), 73 | ('DSTAR', '59', 'PHONE', true, NULL), 74 | ('PKT', NULL, 'DIGITAL', true, NULL), 75 | ('ATV', NULL, 'DIGITAL', true, NULL), 76 | ('SSTV', NULL, 'DIGITAL', true, NULL) 77 | ON CONFLICT DO NOTHING; 78 | -------------------------------------------------------------------------------- /res/sql/migration_006.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS log_param ( 2 | name TEXT PRIMARY KEY, 3 | value TEXT 4 | ); 5 | 6 | CREATE TABLE IF NOT EXISTS rig_profiles ( 7 | profile_name TEXT PRIMARY KEY, 8 | model NUMBER NOT NULL, 9 | port_pathname TEXT, 10 | hostname TEXT, 11 | netport NUMBER, 12 | baudrate NUMBER, 13 | databits NUMBER, 14 | stopbits REAL, 15 | flowcontrol TEXT, 16 | parity TEXT, 17 | pollinterval INTEGER, 18 | txfreq_start REAL, 19 | txfreq_end REAL, 20 | get_freq INTEGER, 21 | get_mode INTEGER, 22 | get_vfo INTEGER, 23 | get_pwr INTEGER, 24 | rit_offset REAL, 25 | xit_offset REAL, 26 | get_rit INTEGER, 27 | get_xit INTEGER 28 | ); 29 | 30 | CREATE TABLE IF NOT EXISTS rot_profiles ( 31 | profile_name TEXT PRIMARY KEY, 32 | model NUMBER NOT NULL, 33 | port_pathname TEXT, 34 | hostname TEXT, 35 | netport NUMBER, 36 | baudrate NUMBER, 37 | databits NUMBER, 38 | stopbits REAL, 39 | flowcontrol TEXT, 40 | parity TEXT 41 | ); 42 | 43 | CREATE TABLE IF NOT EXISTS ant_profiles ( 44 | profile_name TEXT PRIMARY KEY, 45 | desc TEXT 46 | ); 47 | -------------------------------------------------------------------------------- /res/sql/migration_008.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS alert_rules 2 | ( 3 | rule_name text PRIMARY KEY, 4 | enabled INTEGER, 5 | source INTEGER, 6 | dx_callsign TEXT, 7 | dx_country INTEGER, 8 | dx_logstatus INTEGER, 9 | dx_continent TEXT, 10 | spot_comment TEXT, 11 | mode TEXT, 12 | band TEXT, 13 | spotter_country INTEGER, 14 | spotter_continent TEXT 15 | ); 16 | 17 | CREATE INDEX "dxcc_idx" ON "contacts" ( 18 | "dxcc" 19 | ); 20 | 21 | INSERT INTO qso_filter_operators VALUES(6, "starts with"); 22 | -------------------------------------------------------------------------------- /res/sql/migration_009.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE rig_profiles ADD get_ptt INTEGER DEFAULT 0; 2 | -------------------------------------------------------------------------------- /res/sql/migration_010.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE bands ADD last_seen_freq FLOAT; 2 | 3 | DELETE FROM modes WHERE name IN ('C4FM', 'DMR', 'DSTAR'); 4 | UPDATE modes SET submodes = '["C4FM", "DMR", "DSTAR"]' WHERE name = 'DIGITALVOICE'; 5 | 6 | INSERT INTO modes (name, rprt, dxcc, enabled, submodes) VALUES 7 | ('DYNAMIC', NULL, 'DIGITAL', false, '["VARA HF", "VARA SATELLITE", "VARA FM 1200", "VARA FM 9600"]') 8 | ON CONFLICT DO NOTHING; 9 | 10 | ALTER TABLE contacts ADD my_arrl_sect TEXT; 11 | ALTER TABLE contacts ADD my_wwff_ref TEXT; 12 | ALTER TABLE contacts ADD wwff_ref TEXT; 13 | ALTER TABLE station_profiles ADD wwff TEXT; 14 | -------------------------------------------------------------------------------- /res/sql/migration_011.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE rig_profiles ADD qsy_wiping INTEGER DEFAULT 0; 2 | 3 | UPDATE rig_profiles SET qsy_wiping = get_freq; 4 | -------------------------------------------------------------------------------- /res/sql/migration_012.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS cwkey_profiles( 2 | profile_name TEXT PRIMARY KEY, 3 | model NUMBER NOT NULL, 4 | default_speed NUMBER NOT NULL, 5 | key_mode NUMBER, 6 | port_pathname TEXT, 7 | baudrate NUMBER 8 | ); 9 | 10 | CREATE TABLE IF NOT EXISTS cwshortcut_profiles( 11 | profile_name TEXT PRIMARY KEY, 12 | f1_short TEXT, 13 | f1_macro TEXT, 14 | f2_short TEXT, 15 | f2_macro TEXT, 16 | f3_short TEXT, 17 | f3_macro TEXT, 18 | f4_short TEXT, 19 | f4_macro TEXT, 20 | f5_short TEXT, 21 | f5_macro TEXT, 22 | f6_short TEXT, 23 | f6_macro TEXT, 24 | f7_short TEXT, 25 | f7_macro TEXT 26 | ); 27 | 28 | INSERT INTO cwshortcut_profiles( 29 | profile_name, 30 | f1_short, f1_macro, 31 | f2_short, f2_macro, 32 | f3_short, f3_macro, 33 | f4_short, f4_macro, 34 | f5_short, f5_macro 35 | ) 36 | VALUES ( 37 | "Run", 38 | "CQ", "CQ CQ CQ DE K", 39 | "QRZ?", "QRZ?", 40 | "AGN?", "AGN?", 41 | "Text", " DE OM TNX FER CALL UR RST NAME QTH HW CPY? DE K", 42 | "End", " DE TNX FER QSO GL 73 DE " 43 | ); 44 | 45 | 46 | ALTER TABLE rig_profiles ADD get_key_speed INTEGER DEFAULT 1; 47 | ALTER TABLE rig_profiles ADD assigned_cw_key TEXT DEFAULT ' '; 48 | -------------------------------------------------------------------------------- /res/sql/migration_013.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS sota_summits( 2 | summit_code TEXT PRIMARY KEY, 3 | association_name TEXT, 4 | region_name TEXT, 5 | summit_name TEXT, 6 | altm INTEGER, 7 | altft INTEGER, 8 | gridref1 REAL, 9 | gridref2 REAL, 10 | longitude REAL, 11 | latitude REAL, 12 | points INTEGER, 13 | bonus_points INTEGER, 14 | valid_from TEXT, 15 | valid_to TEXT 16 | ); 17 | 18 | CREATE TABLE IF NOT EXISTS wwff_directory( 19 | reference TEXT PRIMARY KEY, 20 | status TEXT, 21 | name TEXT, 22 | program TEXT, 23 | dxcc TEXT, 24 | state TEXT, 25 | county TEXT, 26 | continent TEXT, 27 | iota TEXT, 28 | iaruLocator TEXT, 29 | latitude REAL, 30 | longitude REAL, 31 | iucncat TEXT, 32 | valid_from TEXT, 33 | valid_to TEXT 34 | ); 35 | 36 | CREATE TABLE IF NOT EXISTS iota( 37 | iotaid TEXT PRIMARY KEY, 38 | islandname TEXT 39 | ); 40 | 41 | -------------------------------------------------------------------------------- /res/sql/migration_014.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE rig_profiles ADD key_speed_sync INTEGER DEFAULT 0; 2 | 3 | -------------------------------------------------------------------------------- /res/sql/migration_015.sql: -------------------------------------------------------------------------------- 1 | UPDATE modes SET submodes = '["C4FM", "DMR", "DSTAR", "FREEDV", "M17" ]' WHERE name = 'DIGITALVOICE'; 2 | 3 | INSERT INTO bands (name, start_freq, end_freq, enabled) VALUES 4 | ('submm',300000.0, 7500000.0, 0); 5 | 6 | ALTER TABLE contacts ADD altitude REAL; 7 | ALTER TABLE contacts ADD gridsquare_ext TEXT; 8 | ALTER TABLE contacts ADD hamlogeu_qso_upload_date TEXT; 9 | ALTER TABLE contacts ADD hamlogeu_qso_upload_status CHECK(clublog_qso_upload_status IN ('N', 'Y', 'M')) DEFAULT 'N'; 10 | ALTER TABLE contacts ADD hamqth_qso_upload_date TEXT; 11 | ALTER TABLE contacts ADD hamqth_qso_upload_status CHECK(clublog_qso_upload_status IN ('N', 'Y', 'M')) DEFAULT 'N'; 12 | ALTER TABLE contacts ADD my_altitude REAL; 13 | ALTER TABLE contacts ADD my_gridsquare_ext TEXT; 14 | ALTER TABLE contacts ADD my_pota_ref TEXT; 15 | ALTER TABLE contacts ADD pota_ref TEXT; 16 | 17 | CREATE TABLE IF NOT EXISTS pota_directory( 18 | reference TEXT PRIMARY KEY, 19 | name TEXT, 20 | active INTEGER, 21 | entityID INTEGER, 22 | locationDesc TEXT, 23 | latitude REAL, 24 | longitude REAL, 25 | grid TEXT 26 | ); 27 | 28 | ALTER TABLE station_profiles ADD pota TEXT; 29 | -------------------------------------------------------------------------------- /res/sql/migration_018.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE cwkey_profiles ADD hostname TEXT; 2 | ALTER TABLE cwkey_profiles ADD netport NUMBER; 3 | -------------------------------------------------------------------------------- /res/sql/migration_019.sql: -------------------------------------------------------------------------------- 1 | UPDATE contacts SET clublog_qso_upload_status = 'M' WHERE mode IN ('FT4', 'FST4', 'FST4W', 'Q65') AND UPPER(clublog_qso_upload_status) = 'Y'; 2 | UPDATE contacts SET qrzcom_qso_upload_status = 'M' WHERE mode IN ('FT4', 'FST4', 'FST4W', 'Q65') AND UPPER(qrzcom_qso_upload_status) = 'Y'; 3 | 4 | UPDATE contacts SET mode = 'MFSK', submode = 'FT4' WHERE mode = 'FT4'; 5 | UPDATE contacts SET mode = 'MFSK', submode = 'FST4' WHERE mode = 'FST4'; 6 | UPDATE contacts SET mode = 'MFSK', submode = 'FST4W' WHERE mode = 'FST4W'; 7 | UPDATE contacts SET mode = 'MFSK', submode = 'Q65' WHERE mode = 'Q65'; 8 | 9 | UPDATE modes SET name = 'CONTESTI' WHERE name = 'CONTESTIA'; 10 | -------------------------------------------------------------------------------- /res/sql/migration_020.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS newcontact_layout_profiles( 2 | profile_name TEXT PRIMARY KEY, 3 | row_A TEXT, 4 | row_B TEXT 5 | ); 6 | -------------------------------------------------------------------------------- /res/sql/migration_021.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS chat_highlight_rules( 2 | rule_name TEXT PRIMARY KEY, 3 | room_id TEXT, 4 | enabled INTEGER, 5 | rule_definition TEXT 6 | ); 7 | 8 | ALTER TABLE ant_profiles ADD azimuth_beamwidth DOUBLE DEFAULT 0.0; 9 | ALTER TABLE ant_profiles ADD azimuth_offset DOUBLE DEFAULT 0.0; 10 | -------------------------------------------------------------------------------- /res/sql/migration_023.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE contacts_qsl_cards ( 2 | contactid INTEGER REFERENCES contacts("id") ON DELETE CASCADE, 3 | "source" TEXT, 4 | name TEXT, 5 | "data" TEXT); 6 | 7 | CREATE UNIQUE INDEX IF NOT EXISTS contacts_qsl_id_idx ON contacts_qsl_cards(contactid, "source", name); 8 | -------------------------------------------------------------------------------- /res/sql/migration_024.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE rig_profiles ADD driver INTEGER DEFAULT 0; 2 | 3 | UPDATE rig_profiles SET driver = 1; 4 | -------------------------------------------------------------------------------- /res/sql/migration_025.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE rig_profiles ADD dxspot2rig INTEGER DEFAULT 0; 2 | -------------------------------------------------------------------------------- /res/sql/migration_026.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE rot_profiles ADD driver INTEGER DEFAULT 0; 2 | ALTER TABLE station_profiles ADD ituz INTEGER; 3 | ALTER TABLE station_profiles ADD cqz INTEGER; 4 | ALTER TABLE station_profiles ADD dxcc INTEGER; 5 | ALTER TABLE station_profiles ADD country TEXT; 6 | 7 | UPDATE rot_profiles SET driver = 1; 8 | -------------------------------------------------------------------------------- /res/sql/migration_027.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE bands ADD sat_designator TEXT; 2 | 3 | UPDATE bands SET sat_designator='H' WHERE lower(name) = '15m'; 4 | UPDATE bands SET sat_designator='A' WHERE lower(name) = '10m'; 5 | UPDATE bands SET sat_designator='V' WHERE lower(name) = '2m'; 6 | UPDATE bands SET sat_designator='U' WHERE lower(name) = '70cm'; 7 | UPDATE bands SET sat_designator='L' WHERE lower(name) = '23cm'; 8 | UPDATE bands SET sat_designator='S' WHERE lower(name) = '13cm'; 9 | UPDATE bands SET sat_designator='S2' WHERE lower(name) = '9cm'; 10 | UPDATE bands SET sat_designator='C' WHERE lower(name) = '6cm'; 11 | UPDATE bands SET sat_designator='X' WHERE lower(name) = '3cm'; 12 | UPDATE bands SET sat_designator='K' WHERE lower(name) = '1.25cm'; 13 | UPDATE bands SET sat_designator='R' WHERE lower(name) = '6mm'; 14 | -------------------------------------------------------------------------------- /res/sql/migration_028.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE dxcc_prefixes; 2 | 3 | CREATE TABLE "dxcc_prefixes" ( 4 | "prefix" TEXT NOT NULL, 5 | "exact" INTEGER, 6 | "dxcc" INTEGER, 7 | "cqz" INTEGER, 8 | "ituz" INTEGER, 9 | "cont" TEXT, 10 | "lat" REAL, 11 | "lon" REAL, 12 | FOREIGN KEY("dxcc") REFERENCES "dxcc_entities"("id") 13 | ); 14 | 15 | CREATE INDEX prefix_idx ON dxcc_prefixes(prefix); 16 | DELETE FROM dxcc_entities; 17 | -------------------------------------------------------------------------------- /res/sql/migration_029.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE ant_profiles ADD selected INTEGER; 2 | ALTER TABLE cwkey_profiles ADD selected INTEGER; 3 | ALTER TABLE cwshortcut_profiles ADD selected INTEGER; 4 | ALTER TABLE rig_profiles ADD selected INTEGER; 5 | ALTER TABLE rot_profiles ADD selected INTEGER; 6 | ALTER TABLE rot_user_buttons_profiles ADD selected INTEGER; 7 | ALTER TABLE station_profiles ADD selected INTEGER; 8 | ALTER TABLE main_layout_profiles ADD selected INTEGER; 9 | 10 | CREATE INDEX IF NOT EXISTS contacts_pota_idx ON contacts (pota_ref); 11 | CREATE INDEX IF NOT EXISTS contacts_my_pota_idx ON contacts (my_pota_ref); 12 | CREATE INDEX IF NOT EXISTS contacts_sota_idx ON contacts (sota_ref); 13 | CREATE INDEX IF NOT EXISTS contacts_my_sota_idx ON contacts (my_sota_ref); 14 | CREATE INDEX IF NOT EXISTS contacts_wwff_ref_idx ON contacts (wwff_ref); 15 | CREATE INDEX IF NOT EXISTS contacts_my_wwff_ref_idx ON contacts (my_wwff_ref); 16 | CREATE INDEX IF NOT EXISTS contacts_iota_idx ON contacts (iota); 17 | CREATE INDEX IF NOT EXISTS contacts_sig_intl_idx ON contacts (sig_intl); 18 | 19 | DROP INDEX band_idx; 20 | CREATE INDEX IF NOT EXISTS contacts_band_idx ON contacts (band); 21 | 22 | DROP INDEX callsign_idx; 23 | CREATE INDEX IF NOT EXISTS contacts_callsign_idx ON contacts (callsign); 24 | 25 | DROP INDEX dxcc_idx; 26 | CREATE INDEX IF NOT EXISTS contacts_dxcc_idx ON contacts (dxcc); 27 | 28 | DROP INDEX mode_idx; 29 | CREATE INDEX IF NOT EXISTS contacts_mode_idx ON contacts (mode); 30 | 31 | DROP INDEX start_time_idx; 32 | CREATE INDEX IF NOT EXISTS contacts_start_time_idx ON contacts (start_time); 33 | 34 | DROP INDEX prefix_idx; 35 | CREATE INDEX IF NOT EXISTS dxcc_prefixes_prefix_idx ON dxcc_prefixes (prefix); 36 | 37 | ALTER TABLE rig_profiles ADD ptt_type TEXT; 38 | ALTER TABLE rig_profiles ADD ptt_port_pathname TEXT; 39 | 40 | UPDATE rig_profiles SET ptt_type = 'RIG' WHERE driver = 1; 41 | -------------------------------------------------------------------------------- /res/sql/migration_030.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS activity_profiles( 2 | profile_name TEXT PRIMARY KEY, 3 | config TEXT, 4 | selected INTEGER 5 | ); 6 | 7 | INSERT INTO activity_profiles 8 | SELECT profile_name, json_object( 9 | 'activityName', profile_name, 10 | 'profiles', json_array( 11 | json_object( 12 | 'profileType', 4, 13 | 'name', profile_name 14 | ) 15 | ) 16 | ) AS config, 17 | selected 18 | FROM main_layout_profiles; 19 | 20 | 21 | ALTER TABLE alert_rules ADD COLUMN ituz INTEGER; 22 | ALTER TABLE alert_rules ADD COLUMN cqz INTEGER; 23 | 24 | ALTER TABLE main_layout_profiles ADD tabsexpanded INTEGER DEFAULT 1; 25 | 26 | ALTER TABLE station_profiles ADD county TEXT; 27 | ALTER TABLE station_profiles ADD operator_callsign TEXT; 28 | -------------------------------------------------------------------------------- /res/sql/migration_031.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO bands (name, start_freq, end_freq, enabled) VALUES 2 | ('8m',40.0, 45.0, 0); 3 | -------------------------------------------------------------------------------- /res/sql/migration_032.sql: -------------------------------------------------------------------------------- 1 | UPDATE modes SET submodes = '["FMHELL", "FSKHELL", "FSKH105", "FSKH245", "HELL80", "HELLX5", "HELLX9", "HFSK", "PSKHELL", "SLOWHELL"]' WHERE name = 'HELL'; 2 | 3 | ALTER TABLE contacts ADD cnty_alt TEXT; 4 | ALTER TABLE contacts ADD dcl_qslrdate TEXT; 5 | ALTER TABLE contacts ADD dcl_qslsdate TEXT; 6 | ALTER TABLE contacts ADD dcl_qsl_rcvd TEXT NOT NULL DEFAULT 'N'; 7 | ALTER TABLE contacts ADD dcl_qsl_sent TEXT NOT NULL DEFAULT 'N'; 8 | ALTER TABLE contacts ADD morse_key_info TEXT; 9 | ALTER TABLE contacts ADD morse_key_type TEXT; 10 | ALTER TABLE contacts ADD my_cnty_alt TEXT; 11 | ALTER TABLE contacts ADD my_darc_dok TEXT; 12 | ALTER TABLE contacts ADD my_morse_key_info TEXT; 13 | ALTER TABLE contacts ADD my_morse_key_type TEXT; 14 | ALTER TABLE contacts ADD qrzcom_qso_download_date TEXT; 15 | ALTER TABLE contacts ADD qrzcom_qso_download_status TEXT; 16 | ALTER TABLE contacts ADD qslmsg_rcvd TEXT; 17 | 18 | ALTER TABLE station_profiles ADD darc_dok TEXT; 19 | 20 | ALTER TABLE alert_rules ADD pota INTEGER DEFAULT 0; 21 | ALTER TABLE alert_rules ADD sota INTEGER DEFAULT 0; 22 | ALTER TABLE alert_rules ADD iota INTEGER DEFAULT 0; 23 | ALTER TABLE alert_rules ADD wwff INTEGER DEFAULT 0; 24 | -------------------------------------------------------------------------------- /res/sql/migration_033.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE main_layout_profiles ADD addlbandmaps TEXT; 2 | -------------------------------------------------------------------------------- /res/stylesheet.css: -------------------------------------------------------------------------------- 1 | QLineEdit#callsignEdit { 2 | text-transform: uppercase; 3 | } 4 | 5 | QLineEdit#stationCallsignEdit{ 6 | text-transform: uppercase; 7 | } 8 | 9 | QLineEdit#stationOperatorCallsignEdit{ 10 | text-transform: uppercase; 11 | } 12 | 13 | QLineEdit#stationDarcDokEdit{ 14 | text-transform: uppercase; 15 | } 16 | 17 | QLineEdit#stationDarcDokEdit{ 18 | text-transform: uppercase; 19 | } 20 | 21 | QLineEdit#myDOKEdit{ 22 | text-transform: uppercase; 23 | } 24 | 25 | QLineEdit#dokEdit{ 26 | text-transform: uppercase; 27 | } 28 | 29 | QLineEdit#myCallsignEdit{ 30 | text-transform: uppercase; 31 | } 32 | 33 | QLineEdit#myOperatorCallsignEdit{ 34 | text-transform: uppercase; 35 | } 36 | 37 | QLineEdit#gridEdit { 38 | text-transform: uppercase; 39 | } 40 | 41 | QLabel#chatUnread { 42 | padding: 2px; 43 | min-height: 10px; 44 | border-radius: 10px; 45 | background: orange; 46 | } 47 | 48 | QLabel#chatValuableMsg { 49 | padding: 2px; 50 | min-height: 10px; 51 | border-radius: 10px; 52 | background: red; 53 | } 54 | 55 | QLabel.kindex-0, QLabel.kindex-1, QLabel.kindex-2, QLabel.kindex-3 { 56 | color: #0000ff; 57 | } 58 | 59 | QMenu::item:disabled{background-color:transparent; color:palette(disabled);} 60 | -------------------------------------------------------------------------------- /rig/RigCaps.cpp: -------------------------------------------------------------------------------- 1 | #include "RigCaps.h" 2 | 3 | RigCaps::RigCaps(bool canGetFreq, 4 | bool canGetMode, 5 | bool canGetVFO, 6 | bool canGetPWR, 7 | bool canGetRIT, 8 | bool canGetXIT, 9 | bool canGetPTT, 10 | bool canGetKeySpeed, 11 | bool canSendMorse, 12 | bool isNetworkOnly, 13 | bool needPolling, 14 | bool canProcessDXSpot, 15 | int serial_data_bits, 16 | int serial_stop_bits 17 | ) : 18 | canGetFreq(canGetFreq), 19 | canGetMode(canGetMode), 20 | canGetVFO(canGetVFO), 21 | canGetPWR(canGetPWR), 22 | canGetRIT(canGetRIT), 23 | canGetXIT(canGetXIT), 24 | canGetPTT(canGetPTT), 25 | canGetKeySpeed(canGetKeySpeed), 26 | canSendMorse(canSendMorse), 27 | serialDataBits(serial_data_bits), 28 | serialStopBits(serial_stop_bits), 29 | isNetworkOnly(isNetworkOnly), 30 | needPolling(needPolling), 31 | canProcessDXSpot(canProcessDXSpot) 32 | { 33 | 34 | } 35 | -------------------------------------------------------------------------------- /rig/RigCaps.h: -------------------------------------------------------------------------------- 1 | #ifndef RIG_RIGCAPS_H 2 | #define RIG_RIGCAPS_H 3 | 4 | 5 | class RigCaps 6 | { 7 | public: 8 | RigCaps(bool canGetFreq = false, 9 | bool canGetMode = false, 10 | bool canGetVFO = false, 11 | bool canGetPWR = false, 12 | bool canGetRIT = false, 13 | bool canGetXIT = false, 14 | bool canGetPTT = false, 15 | bool canGetKeySpeed = false, 16 | bool canSendMorse = false, 17 | bool isNetworkOnly = false, 18 | bool needPolling = false, 19 | bool canProcessDXSpot = false, 20 | int serial_data_bits = 8, 21 | int serial_stop_bits = 1 22 | ); 23 | 24 | bool canGetFreq; 25 | bool canGetMode; 26 | bool canGetVFO; 27 | bool canGetPWR; 28 | bool canGetRIT; 29 | bool canGetXIT; 30 | bool canGetPTT; 31 | bool canGetKeySpeed; 32 | bool canSendMorse; 33 | int serialDataBits; 34 | int serialStopBits; 35 | bool isNetworkOnly; 36 | bool needPolling; 37 | bool canProcessDXSpot; 38 | }; 39 | 40 | #endif // RIG_RIGCAPS_H 41 | -------------------------------------------------------------------------------- /rig/drivers/GenericRigDrv.cpp: -------------------------------------------------------------------------------- 1 | #include "GenericRigDrv.h" 2 | #include "core/debug.h" 3 | 4 | 5 | MODULE_IDENTIFICATION("qlog.core.rig.driver.genericrigdrv"); 6 | 7 | GenericRigDrv::GenericRigDrv(const RigProfile &profile, QObject *parent) 8 | : QObject{parent}, 9 | rigProfile(profile), 10 | opened(false) 11 | { 12 | FCT_IDENTIFICATION; 13 | 14 | } 15 | 16 | const RigProfile GenericRigDrv::getCurrRigProfile() const 17 | { 18 | FCT_IDENTIFICATION; 19 | 20 | return rigProfile; 21 | } 22 | 23 | const QString GenericRigDrv::lastError() const 24 | { 25 | FCT_IDENTIFICATION; 26 | 27 | return lastErrorText; 28 | } 29 | -------------------------------------------------------------------------------- /rig/drivers/GenericRigDrv.h: -------------------------------------------------------------------------------- 1 | #ifndef RIG_DRIVERS_GENERICRIGDRV_H 2 | #define RIG_DRIVERS_GENERICRIGDRV_H 3 | 4 | #include 5 | #include "data/RigProfile.h" 6 | #include "data/DxSpot.h" 7 | 8 | class GenericRigDrv : public QObject 9 | { 10 | Q_OBJECT 11 | public: 12 | 13 | explicit GenericRigDrv(const RigProfile &profile, 14 | QObject *parent = nullptr); 15 | virtual ~GenericRigDrv() {}; 16 | const RigProfile getCurrRigProfile() const; 17 | const QString lastError() const; 18 | 19 | virtual bool open() = 0; 20 | virtual bool isMorseOverCatSupported() = 0; 21 | virtual QStringList getAvailableModes() = 0; 22 | 23 | virtual void setFrequency(double) = 0; 24 | virtual void setRawMode(const QString &) = 0; 25 | virtual void setMode(const QString &, const QString &, bool) = 0; 26 | virtual void setPTT(bool) = 0; 27 | virtual void setKeySpeed(qint16 wpm) = 0; 28 | virtual void syncKeySpeed(qint16 wpm) = 0; 29 | virtual void sendMorse(const QString &) = 0; 30 | virtual void stopMorse() = 0; 31 | virtual void sendState() = 0; 32 | virtual void stopTimers() = 0; 33 | virtual void sendDXSpot(const DxSpot &spot) = 0; 34 | 35 | signals: 36 | // STATE Signals 37 | void rigIsReady(); 38 | void frequencyChanged(double, double, double); 39 | void pttChanged(bool); 40 | void modeChanged(QString, QString, QString, qint32); 41 | void vfoChanged(QString); 42 | void powerChanged(double); 43 | void ritChanged(double); 44 | void xitChanged(double); 45 | void keySpeedChanged(unsigned int); 46 | 47 | // Error Signal 48 | void errorOccured(QString, QString); 49 | 50 | protected: 51 | RigProfile rigProfile; 52 | QString lastErrorText; 53 | bool opened; 54 | }; 55 | 56 | #endif // RIG_DRIVERS_GENERICRIGDRV_H 57 | -------------------------------------------------------------------------------- /rig/macros.h: -------------------------------------------------------------------------------- 1 | #ifndef RIG_MACROS_H 2 | #define RIG_MACROS_H 3 | 4 | #define BANDWIDTH_UNKNOWN 0 5 | #define QSTRING_FREQ(f) (QString::number((f), 'f', 5)) 6 | #define Hz2MHz(f) ((double)((f)/1e6)) 7 | #define Hz2kHz(f) ((double)((f)/1e3)) 8 | #define mW2W(f) ((double)((f)/1000.0)) 9 | #ifndef MHz 10 | #define MHz(f) ((double)((f)*(double)1000000)) 11 | #endif 12 | #ifndef kHz 13 | #define kHz(f) ((double)((f)*(double)1000)) 14 | #endif 15 | 16 | #endif // RIG_MACROS_H 17 | -------------------------------------------------------------------------------- /rotator/RotCaps.cpp: -------------------------------------------------------------------------------- 1 | #include "RotCaps.h" 2 | 3 | RotCaps::RotCaps(bool isNetworkOnly, 4 | int serial_data_bits, 5 | int serial_stop_bits) : 6 | isNetworkOnly(isNetworkOnly), 7 | serialDataBits(serial_data_bits), 8 | serialStopBits(serial_stop_bits) 9 | { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /rotator/RotCaps.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_ROTATOR_ROTCAPS_H 2 | #define QLOG_ROTATOR_ROTCAPS_H 3 | 4 | 5 | class RotCaps 6 | { 7 | public: 8 | RotCaps(bool isNetworkOnly = false, 9 | int serial_data_bits = 8, 10 | int serial_stop_bits = 1); 11 | 12 | bool isNetworkOnly; 13 | int serialDataBits; 14 | int serialStopBits; 15 | }; 16 | 17 | #endif // QLOG_ROTATOR_ROTCAPS_H 18 | -------------------------------------------------------------------------------- /rotator/drivers/GenericRotDrv.cpp: -------------------------------------------------------------------------------- 1 | #include "GenericRotDrv.h" 2 | #include "core/debug.h" 3 | 4 | MODULE_IDENTIFICATION("qlog.core.rot.driver.genericrotdrv"); 5 | 6 | GenericRotDrv::GenericRotDrv(const RotProfile &profile, 7 | QObject *parent) 8 | : QObject{parent}, 9 | rotProfile(profile), 10 | opened(false), 11 | azimuth(0.0), 12 | elevation(0.0) 13 | { 14 | FCT_IDENTIFICATION; 15 | } 16 | 17 | const RotProfile GenericRotDrv::getCurrRotProfile() const 18 | { 19 | FCT_IDENTIFICATION; 20 | 21 | return rotProfile; 22 | } 23 | 24 | const QString GenericRotDrv::lastError() const 25 | { 26 | FCT_IDENTIFICATION; 27 | 28 | return lastErrorText; 29 | } 30 | -------------------------------------------------------------------------------- /rotator/drivers/GenericRotDrv.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_ROTATOR_DRIVERS_GENERICROTDRV_H 2 | #define QLOG_ROTATOR_DRIVERS_GENERICROTDRV_H 3 | 4 | #include 5 | #include "data/RotProfile.h" 6 | 7 | class GenericRotDrv : public QObject 8 | { 9 | Q_OBJECT 10 | 11 | public: 12 | explicit GenericRotDrv(const RotProfile &profile, 13 | QObject *parent = nullptr); 14 | 15 | virtual ~GenericRotDrv() {}; 16 | const RotProfile getCurrRotProfile() const; 17 | const QString lastError() const; 18 | 19 | virtual bool open() = 0; 20 | virtual void sendState() = 0; 21 | virtual void setPosition(double azimuth, double elevation) = 0; 22 | virtual void stopTimers() = 0; 23 | 24 | signals: 25 | void rotIsReady(); 26 | void positioningChanged(double azimuth, double elevation); 27 | 28 | // Error Signal 29 | void errorOccured(QString, QString); 30 | 31 | protected: 32 | RotProfile rotProfile; 33 | QString lastErrorText; 34 | bool opened; 35 | double azimuth; 36 | double elevation; 37 | }; 38 | 39 | #endif // QLOG_ROTATOR_DRIVERS_GENERICROTDRV_H 40 | -------------------------------------------------------------------------------- /rotator/drivers/HamlibRotDrv.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_ROTATOR_DRIVERS_HAMLIBROTDRV_H 2 | #define QLOG_ROTATOR_DRIVERS_HAMLIBROTDRV_H 3 | 4 | #include 5 | #include 6 | #include "GenericRotDrv.h" 7 | #include "rotator/RotCaps.h" 8 | 9 | class HamlibRotDrv : public GenericRotDrv 10 | { 11 | public: 12 | static QList> getModelList(); 13 | static RotCaps getCaps(int model); 14 | 15 | explicit HamlibRotDrv(const RotProfile &profile, 16 | QObject *parent = nullptr); 17 | 18 | virtual ~HamlibRotDrv(); 19 | 20 | virtual bool open() override; 21 | virtual void sendState() override; 22 | virtual void setPosition(double azimuth, double elevation) override; 23 | virtual void stopTimers() override; 24 | 25 | private slots: 26 | void checkRotStateChange(); 27 | void checkErrorCounter(); 28 | 29 | private: 30 | static int addRig(const struct rot_caps* caps, void* data); 31 | 32 | void checkChanges(); 33 | void checkAzEl(); 34 | bool isRotRespOK(int errorStatus, 35 | const QString errorName, 36 | bool emitError = true); 37 | 38 | serial_handshake_e stringToHamlibFlowControl(const QString &in_flowcontrol); 39 | serial_parity_e stringToHamlibParity(const QString &in_parity); 40 | QString hamlibErrorString(int); 41 | void commandSleep(); 42 | 43 | ROT* rot; 44 | QTimer timer; 45 | QTimer errorTimer; 46 | QMutex drvLock; 47 | 48 | bool forceSendState; 49 | QHashpostponedErrors; 50 | }; 51 | 52 | #endif // QLOG_ROTATOR_DRIVERS_HAMLIBROTDRV_H 53 | -------------------------------------------------------------------------------- /rotator/drivers/PSTRotDrv.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_ROTATOR_DRIVERS_PSTROTDRV_H 2 | #define QLOG_ROTATOR_DRIVERS_PSTROTDRV_H 3 | 4 | #include 5 | #include 6 | #include "GenericRotDrv.h" 7 | #include "rotator/RotCaps.h" 8 | 9 | class PSTRotDrv : public GenericRotDrv 10 | { 11 | Q_OBJECT 12 | 13 | public: 14 | static QList> getModelList(); 15 | static RotCaps getCaps(int); 16 | 17 | explicit PSTRotDrv(const RotProfile &profile, 18 | QObject *parent = nullptr); 19 | 20 | virtual ~PSTRotDrv(); 21 | 22 | virtual bool open() override; 23 | virtual void sendState() override; 24 | virtual void setPosition(double azimuth, double elevation) override; 25 | virtual void stopTimers() override; 26 | 27 | private slots: 28 | void checkRotStateChange(); 29 | 30 | private: 31 | void commandSleep(); 32 | void sendCommand(const QString& cmd); 33 | void readPendingDatagrams(); 34 | 35 | bool forceSendState; 36 | 37 | QTimer refreshTimer; 38 | QTimer timeoutTimer; 39 | QUdpSocket receiveSocket; 40 | QMutex drvLock; 41 | QHostAddress rotatorAddress; 42 | }; 43 | 44 | #endif // QLOG_ROTATOR_DRIVERS_PSTROTDRV_H 45 | -------------------------------------------------------------------------------- /ui/AlertRuleDetail.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_ALERTRULEDETAIL_H 2 | #define QLOG_UI_ALERTRULEDETAIL_H 3 | 4 | #include 5 | #include 6 | 7 | #include "core/AlertEvaluator.h" 8 | 9 | namespace Ui { 10 | class AlertRuleDetail; 11 | } 12 | 13 | class AlertRuleDetail : public QDialog 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | explicit AlertRuleDetail(const QString &ruleName, QWidget *parent); 19 | ~AlertRuleDetail(); 20 | 21 | public slots: 22 | void save(); 23 | void ruleNameChanged(const QString&); 24 | void callsignChanged(const QString&); 25 | void spotCommentChanged(const QString&); 26 | 27 | private: 28 | Ui::AlertRuleDetail *ui; 29 | QString ruleName; 30 | QStringList ruleNamesList; 31 | QList memberListCheckBoxes; 32 | 33 | 34 | private: 35 | bool ruleExists(const QString &ruleName); 36 | void loadRule(const QString &ruleName); 37 | void generateMembershipCheckboxes(const AlertRule * rule = nullptr); 38 | }; 39 | 40 | #endif // QLOG_UI_ALERTRULEDETAIL_H 41 | -------------------------------------------------------------------------------- /ui/AlertSettingDialog.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_ALERTSETTINGDIALOG_H 2 | #define QLOG_UI_ALERTSETTINGDIALOG_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Ui { 8 | class AlertSettingDialog; 9 | } 10 | 11 | class AlertSettingDialog : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit AlertSettingDialog(QWidget *parent = nullptr); 17 | ~AlertSettingDialog(); 18 | 19 | private: 20 | Ui::AlertSettingDialog *ui; 21 | QSqlTableModel* rulesModel; 22 | 23 | public slots: 24 | void addRule(); 25 | void removeRule(); 26 | void editRule(QModelIndex); 27 | void editRuleButton(); 28 | 29 | }; 30 | 31 | #endif // QLOG_UI_ALERTSETTINGDIALOG_H 32 | -------------------------------------------------------------------------------- /ui/AlertWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_ALERTWIDGET_H 2 | #define QLOG_UI_ALERTWIDGET_H 3 | 4 | #include 5 | #include "data/SpotAlert.h" 6 | #include "models/AlertTableModel.h" 7 | #include "data/DxSpot.h" 8 | 9 | namespace Ui { 10 | class AlertWidget; 11 | } 12 | 13 | class AlertWidget : public QWidget 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | explicit AlertWidget(QWidget *parent = nullptr); 19 | ~AlertWidget(); 20 | 21 | int alertCount() const; 22 | 23 | public slots: 24 | void addAlert(const SpotAlert &alert); 25 | void clearAllAlerts(); 26 | void entryDoubleClicked(QModelIndex index); 27 | void alertAgingChanged(int); 28 | void showEditRules(); 29 | void resetDupe(); 30 | void updateSpotsStatusWhenQSOAdded(const QSqlRecord &record); 31 | void updateSpotsStatusWhenQSOUpdated(const QSqlRecord &record); 32 | void updateSpotsDupeWhenQSODeleted(const QSqlRecord &record); 33 | void updateSpotsDxccStatusWhenQSODeleted(const QSet &entities); 34 | void recalculateDupe(); 35 | void recalculateDxccStatus(); 36 | 37 | private slots: 38 | void showColumnVisibility(); 39 | 40 | signals: 41 | void alertsCleared(); 42 | void tuneDx(DxSpot); 43 | void tuneWsjtx(WsjtxDecode); 44 | void rulesChanged(); 45 | 46 | private: 47 | Ui::AlertWidget *ui; 48 | AlertTableModel* alertTableModel; 49 | QSortFilterProxyModel *proxyModel; 50 | QTimer *aging_timer; 51 | QSettings settings; 52 | 53 | private slots: 54 | void alertAging(); 55 | void saveTableHeaderState(); 56 | void restoreTableHeaderState(); 57 | 58 | }; 59 | 60 | #endif // QLOG_UI_ALERTWIDGET_H 61 | -------------------------------------------------------------------------------- /ui/AwardsDialog.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_AWARDSDIALOG_H 2 | #define QLOG_UI_AWARDSDIALOG_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include "models/AwardsTableModel.h" 8 | #include "models/SqlListModel.h" 9 | 10 | namespace Ui { 11 | class AwardsDialog; 12 | } 13 | 14 | class AwardsDialog : public QDialog 15 | { 16 | Q_OBJECT 17 | 18 | public: 19 | explicit AwardsDialog(QWidget *parent = nullptr); 20 | ~AwardsDialog(); 21 | public slots: 22 | void refreshTable(int); 23 | void awardTableDoubleClicked(QModelIndex); 24 | 25 | signals: 26 | void AwardConditionSelected(QString, QString, QString); 27 | 28 | private: 29 | Ui::AwardsDialog *ui; 30 | AwardsTableModel *detailedViewModel; 31 | SqlListModel* entityCallsignModel; 32 | QString selectedAward; 33 | 34 | const QString getSelectedEntity() const; 35 | const QString getSelectedAward() const; 36 | void setEntityInputEnabled(bool); 37 | void setNotWorkedEnabled(bool); 38 | }; 39 | 40 | #endif // QLOG_UI_AWARDSDIALOG_H 41 | -------------------------------------------------------------------------------- /ui/CWConsoleWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_CWCONSOLEWIDGET_H 2 | #define QLOG_UI_CWCONSOLEWIDGET_H 3 | 4 | #include 5 | #include "ui/NewContactWidget.h" 6 | 7 | namespace Ui { 8 | class CWConsoleWidget; 9 | } 10 | 11 | class CWConsoleWidget : public QWidget 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit CWConsoleWidget(QWidget *parent = nullptr); 17 | ~CWConsoleWidget(); 18 | void registerContactWidget(const NewContactWidget*); 19 | 20 | signals: 21 | void cwKeyProfileChanged(); 22 | void cwShortcutProfileChanged(); 23 | 24 | public slots: 25 | void appendCWEchoText(QString); 26 | void reloadSettings(); 27 | void clearConsoles(); 28 | void setWPM(qint32); 29 | void cwKeySpeedIncrease(); 30 | void cwKeySpeedDecrease(); 31 | void cwShortcutProfileIncrease(); 32 | void cwShortcutProfileDecrease(); 33 | void rigDisconnectHandler(); 34 | void rigConnectHandler(); 35 | void cwKeyConnected(QString); 36 | void cwKeyDisconnected(); 37 | 38 | private slots: 39 | void cwKeyProfileComboChanged(QString); 40 | void cwShortcutProfileComboChanged(QString); 41 | void refreshKeyProfileCombo(); 42 | void refreshShortcutProfileCombo(); 43 | void cwKeySpeedChanged(int); 44 | void cwSendButtonPressed(bool insertNewLine = true); 45 | void cwKeyMacroF1(); 46 | void cwKeyMacroF2(); 47 | void cwKeyMacroF3(); 48 | void cwKeyMacroF4(); 49 | void cwKeyMacroF5(); 50 | void cwKeyMacroF6(); 51 | void cwKeyMacroF7(); 52 | void haltButtonPressed(); 53 | 54 | void sendWordSwitched(int); 55 | void cwTextChanged(QString); 56 | 57 | private: 58 | Ui::CWConsoleWidget *ui; 59 | bool cwKeyOnline; 60 | const NewContactWidget *contact; 61 | bool sendWord; 62 | 63 | void sendCWText(const QString &, bool insertNewLine = true); 64 | void expandMacros(QString &); 65 | void shortcutComboMove(int); 66 | void allowMorseSending(bool); 67 | 68 | void saveSendWordConfig(bool); 69 | bool getSendWordConfig(); 70 | 71 | }; 72 | 73 | #endif // QLOG_UI_CWCONSOLEWIDGET_H 74 | -------------------------------------------------------------------------------- /ui/ChatWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_CHATWIDGET_H 2 | #define QLOG_UI_CHATWIDGET_H 3 | 4 | #include 5 | #include "core/KSTChat.h" 6 | #include "ui/NewContactWidget.h" 7 | 8 | namespace Ui { 9 | class ChatWidget; 10 | } 11 | 12 | class ChatWidget : public QWidget 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit ChatWidget(QWidget *parent = nullptr); 18 | ~ChatWidget(); 19 | 20 | void registerContactWidget(const NewContactWidget *contactWidget); 21 | 22 | public slots: 23 | void setChatCallsign(QString); 24 | void reloadStationProfile(); 25 | void resetDupe(); 26 | void recalculateDupe(); 27 | void recalculateDxccStatus(); 28 | void updateSpotsStatusWhenQSOAdded(const QSqlRecord &record); 29 | void updateSpotsDupeWhenQSODeleted(const QSqlRecord &record); 30 | void updateSpotsDxccStatusWhenQSODeleted(const QSet &entities); 31 | 32 | private slots: 33 | void connectChat(); 34 | void closeTab(int); 35 | void tabActive(QWidget *); 36 | void valuableMessageActive(QWidget *); 37 | void chatTabClicked(int); 38 | void processQSOInfo(const QString&, const QString&); 39 | void userListUpdate(QWidget *w); 40 | void beamRequest(double); 41 | 42 | signals: 43 | void prepareQSOInfo(QString, QString); 44 | void userListUpdated(QList); 45 | void beamingRequested(double); 46 | 47 | private: 48 | Ui::ChatWidget *ui; 49 | const NewContactWidget *contact; 50 | 51 | int findTabWidgetIndex(QWidget *); 52 | QString generateTabName(QWidget *); 53 | QString generateTabUnread(QWidget *); 54 | void setTabUnreadInfo(int, QWidget *); 55 | }; 56 | 57 | #endif // QLOG_UI_CHATWIDGET_H 58 | -------------------------------------------------------------------------------- /ui/ClockWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_CLOCKWIDGET_H 2 | #define QLOG_UI_CLOCKWIDGET_H 3 | 4 | #include 5 | #include 6 | #include "core/LogLocale.h" 7 | #include 8 | 9 | namespace Ui { 10 | class ClockWidget; 11 | } 12 | 13 | class QGraphicsScene; 14 | 15 | class ClockWidget : public QWidget 16 | { 17 | Q_OBJECT 18 | 19 | public: 20 | explicit ClockWidget(QWidget *parent = nullptr); 21 | ~ClockWidget(); 22 | 23 | public slots: 24 | void updateClock(); 25 | void updateSun(); 26 | void updateSunGraph(); 27 | 28 | private: 29 | Ui::ClockWidget *ui; 30 | QScopedPointer sunScene; 31 | QScopedPointer clockScene; 32 | QScopedPointer clockItem; 33 | LogLocale locale; 34 | QTime sunrise; 35 | QTime sunset; 36 | }; 37 | 38 | #endif // QLOG_UI_CLOCKWIDGET_H 39 | -------------------------------------------------------------------------------- /ui/ClublogDialog.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_CLUBLOGDIALOG_H 2 | #define QLOG_UI_CLUBLOGDIALOG_H 3 | 4 | #include 5 | #include "core/LogLocale.h" 6 | 7 | namespace Ui { 8 | class ClublogDialog; 9 | } 10 | 11 | class ClublogDialog : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit ClublogDialog(QWidget *parent = nullptr); 17 | ~ClublogDialog(); 18 | 19 | public slots: 20 | void upload(); 21 | void uploadCallsignChanged(const QString&); 22 | 23 | 24 | private: 25 | Ui::ClublogDialog *ui; 26 | 27 | void saveDialogState(); 28 | void loadDialogState(); 29 | LogLocale locale; 30 | }; 31 | 32 | #endif // QLOG_UI_CLUBLOGDIALOG_H 33 | -------------------------------------------------------------------------------- /ui/ColumnSettingSimpleDialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | ColumnSettingSimpleDialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 158 10 | 69 11 | 12 | 13 | 14 | Column Visibility Setting 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | Qt::Horizontal 24 | 25 | 26 | QDialogButtonBox::Ok 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | buttonBox 36 | accepted() 37 | ColumnSettingSimpleDialog 38 | accept() 39 | 40 | 41 | 248 42 | 254 43 | 44 | 45 | 157 46 | 274 47 | 48 | 49 | 50 | 51 | buttonBox 52 | rejected() 53 | ColumnSettingSimpleDialog 54 | reject() 55 | 56 | 57 | 316 58 | 260 59 | 60 | 61 | 286 62 | 274 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /ui/DxFilterDialog.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_DXFILTER_H 2 | #define QLOG_UI_DXFILTER_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Ui { 8 | class DxFilterDialog; 9 | } 10 | 11 | class DxFilterDialog : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit DxFilterDialog(QWidget *parent = nullptr); 17 | ~DxFilterDialog(); 18 | void accept() override; 19 | 20 | private: 21 | Ui::DxFilterDialog *ui; 22 | QList memberListCheckBoxes; 23 | 24 | void generateMembershipCheckboxes(); 25 | 26 | }; 27 | 28 | #endif // QLOG_UI_DXFILTER_H 29 | -------------------------------------------------------------------------------- /ui/DxccTableWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_DXCCTABLEWIDGET_H 2 | #define QLOG_UI_DXCCTABLEWIDGET_H 3 | 4 | #include 5 | #include 6 | #include "data/Band.h" 7 | 8 | class DxccTableModel; 9 | 10 | class DxccTableWidget : public QTableView 11 | { 12 | Q_OBJECT 13 | public: 14 | explicit DxccTableWidget(QWidget *parent = nullptr); 15 | 16 | public slots: 17 | void clear(); 18 | void setDxcc(int dxcc, Band band); 19 | void setDxCallsign(const QString &dxCallsign, Band band); 20 | 21 | private: 22 | void updateDxTable(const QString &condition, 23 | const QVariant &conditionValue, 24 | const Band &highlightedBand); 25 | 26 | DxccTableModel* dxccTableModel; 27 | }; 28 | 29 | #endif // QLOG_UI_DXCCTABLEWIDGET_H 30 | -------------------------------------------------------------------------------- /ui/EditActivitiesDialog.cpp: -------------------------------------------------------------------------------- 1 | #include "EditActivitiesDialog.h" 2 | #include "ui_EditActivitiesDialog.h" 3 | #include "core/debug.h" 4 | #include "ui/EditActivitiesDialog.h" 5 | #include "ui/ActivityEditor.h" 6 | #include "data/ActivityProfile.h" 7 | 8 | MODULE_IDENTIFICATION("qlog.ui.EditLayoutDialog"); 9 | 10 | EditActivitiesDialog::EditActivitiesDialog(QWidget *parent) : 11 | QDialog(parent), 12 | ui(new Ui::EditActivitiesDialog) 13 | { 14 | FCT_IDENTIFICATION; 15 | 16 | ui->setupUi(this); 17 | loadProfiles(); 18 | } 19 | 20 | EditActivitiesDialog::~EditActivitiesDialog() 21 | { 22 | FCT_IDENTIFICATION; 23 | delete ui; 24 | } 25 | 26 | void EditActivitiesDialog::loadProfiles() 27 | { 28 | FCT_IDENTIFICATION; 29 | 30 | ui->listView->setModel(new QStringListModel(ActivityProfilesManager::instance()->profileNameList(), this)); 31 | } 32 | 33 | void EditActivitiesDialog::addButton() 34 | { 35 | FCT_IDENTIFICATION; 36 | 37 | ActivityEditor dialog(QString(), this); 38 | dialog.exec(); 39 | loadProfiles(); 40 | } 41 | 42 | void EditActivitiesDialog::removeButton() 43 | { 44 | FCT_IDENTIFICATION; 45 | 46 | const QString &removeProfileName = ui->listView->currentIndex().data().toString(); 47 | ActivityProfilesManager::instance()->removeProfile(removeProfileName); 48 | ActivityProfilesManager::instance()->save(); 49 | MainLayoutProfilesManager::instance()->removeProfile(removeProfileName); 50 | MainLayoutProfilesManager::instance()->save(); 51 | loadProfiles(); 52 | } 53 | 54 | void EditActivitiesDialog::editEvent(const QModelIndex &idx) 55 | { 56 | FCT_IDENTIFICATION; 57 | 58 | ActivityEditor dialog(ui->listView->model()->data(idx).toString(), this); 59 | dialog.exec(); 60 | } 61 | 62 | void EditActivitiesDialog::editButton() 63 | { 64 | FCT_IDENTIFICATION; 65 | 66 | const QModelIndexList &selected = ui->listView->selectionModel()->selectedIndexes(); 67 | if (!selected.isEmpty()) 68 | editEvent(selected.first()); 69 | } 70 | -------------------------------------------------------------------------------- /ui/EditActivitiesDialog.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_EDITACTIVITIESDIALOG_H 2 | #define QLOG_UI_EDITACTIVITIESDIALOG_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Ui { 8 | class EditActivitiesDialog; 9 | } 10 | 11 | class EditActivitiesDialog : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit EditActivitiesDialog(QWidget *parent = nullptr); 17 | ~EditActivitiesDialog(); 18 | 19 | private: 20 | Ui::EditActivitiesDialog *ui; 21 | 22 | void loadProfiles(); 23 | 24 | public slots: 25 | void addButton(); 26 | void removeButton(); 27 | void editEvent(const QModelIndex &); 28 | void editButton(); 29 | }; 30 | 31 | #endif // QLOG_UI_EDITACTIVITIESDIALOG_H 32 | -------------------------------------------------------------------------------- /ui/EditLine.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_EDITLINE_H 2 | #define QLOG_UI_EDITLINE_H 3 | 4 | #include 5 | #include 6 | 7 | class NewContactEditLine : public QLineEdit 8 | { 9 | Q_OBJECT 10 | 11 | public: 12 | explicit NewContactEditLine(QWidget *parent = nullptr); 13 | void setText(const QString & text); 14 | void spaceForbidden(bool); 15 | 16 | signals: 17 | void focusIn(); 18 | void focusOut(); 19 | 20 | protected: 21 | void focusInEvent(QFocusEvent* event) override; 22 | void focusOutEvent(QFocusEvent* event) override; 23 | void keyPressEvent(QKeyEvent *event) override; 24 | bool spaceForbiddenFlag; 25 | }; 26 | 27 | class NewContactRSTEditLine : public NewContactEditLine 28 | { 29 | Q_OBJECT 30 | 31 | public: 32 | explicit NewContactRSTEditLine(QWidget *parent = nullptr); 33 | void setSelectionBackwardOffset(int offset); 34 | 35 | protected: 36 | void focusInEvent(QFocusEvent* event) override; 37 | int focusInSelectionBackwardOffset; 38 | }; 39 | 40 | class SerialPortEditLine : public QLineEdit 41 | { 42 | Q_OBJECT 43 | 44 | public: 45 | explicit SerialPortEditLine(QWidget *parent = nullptr); 46 | 47 | protected: 48 | void focusInEvent(QFocusEvent* event) override; 49 | }; 50 | 51 | #endif // QLOG_UI_EDITLINE_H 52 | -------------------------------------------------------------------------------- /ui/Eqsldialog.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_EQSLDIALOG_H 2 | #define QLOG_UI_EQSLDIALOG_H 3 | 4 | #include 5 | #include "core/LogLocale.h" 6 | 7 | namespace Ui { 8 | class EqslDialog; 9 | } 10 | 11 | class EqslDialog : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit EqslDialog(QWidget *parent = nullptr); 17 | ~EqslDialog(); 18 | 19 | public slots: 20 | void download(); 21 | void upload(); 22 | void uploadCallsignChanged(const QString&); 23 | 24 | private: 25 | Ui::EqslDialog *ui; 26 | 27 | void saveDialogState(); 28 | void loadDialogState(); 29 | LogLocale locale; 30 | }; 31 | 32 | #endif // QLOG_UI_EQSLDIALOG_H 33 | -------------------------------------------------------------------------------- /ui/FreqQSpinBox.cpp: -------------------------------------------------------------------------------- 1 | #include "FreqQSpinBox.h" 2 | #include 3 | #include "data/BandPlan.h" 4 | 5 | FreqQSpinBox::FreqQSpinBox(QWidget *parent) : 6 | QDoubleSpinBox(parent) 7 | { 8 | loadBands(); 9 | } 10 | 11 | void FreqQSpinBox::loadBands() 12 | { 13 | enabledBands = BandPlan::bandsList(false, true); 14 | } 15 | 16 | void FreqQSpinBox::keyPressEvent(QKeyEvent *event) 17 | { 18 | if ( event->key() == Qt::Key_PageUp ) 19 | { 20 | increaseByBand(); 21 | event->accept(); 22 | return; 23 | } 24 | else if ( event->key() == Qt::Key_PageDown ) 25 | { 26 | decreaseByBand(); 27 | event->accept(); 28 | return; 29 | } 30 | 31 | QDoubleSpinBox::keyPressEvent(event); 32 | } 33 | 34 | void FreqQSpinBox::wheelEvent(QWheelEvent *event) 35 | { 36 | if ( event->modifiers() & Qt::ControlModifier ) 37 | { 38 | if ( event->angleDelta().y() > 0 ) 39 | increaseByBand(); 40 | else 41 | decreaseByBand(); 42 | event->accept(); 43 | return; 44 | } 45 | QDoubleSpinBox::wheelEvent(event); 46 | } 47 | 48 | void FreqQSpinBox::increaseByBand() 49 | { 50 | if ( enabledBands.size() == 0 ) 51 | return; 52 | 53 | for ( const Band &band : static_cast&>(enabledBands) ) 54 | { 55 | if ( band.start > value() ) 56 | { 57 | setValue(band.start); 58 | selectAll(); 59 | return; 60 | } 61 | } 62 | } 63 | 64 | void FreqQSpinBox::decreaseByBand() 65 | { 66 | if ( enabledBands.size() == 0 ) 67 | return; 68 | 69 | double result = enabledBands.at(0).start; 70 | 71 | for ( const Band &band : static_cast&>(enabledBands) ) 72 | { 73 | if ( band.start < value() ) 74 | result = band.start; 75 | } 76 | 77 | setValue(result); 78 | selectAll(); 79 | } 80 | -------------------------------------------------------------------------------- /ui/FreqQSpinBox.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_FREQQSPINBOX_H 2 | #define QLOG_UI_FREQQSPINBOX_H 3 | 4 | #include 5 | #include 6 | 7 | class FreqQSpinBox : public QDoubleSpinBox 8 | { 9 | public: 10 | FreqQSpinBox(QWidget *parent = nullptr); 11 | 12 | public slots: 13 | void loadBands(); 14 | 15 | protected: 16 | void keyPressEvent(QKeyEvent *event); 17 | void wheelEvent(QWheelEvent *event); 18 | 19 | private: 20 | void increaseByBand(); 21 | void decreaseByBand(); 22 | 23 | QList enabledBands; 24 | }; 25 | 26 | #endif // QLOG_UI_FREQQSPINBOX_H 27 | -------------------------------------------------------------------------------- /ui/HRDLogDialog.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_HRDLOGDIALOG_H 2 | #define QLOG_UI_HRDLOGDIALOG_H 3 | 4 | #include 5 | #include "core/LogLocale.h" 6 | 7 | namespace Ui { 8 | class HRDLogDialog; 9 | } 10 | 11 | class HRDLogDialog : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit HRDLogDialog(QWidget *parent = nullptr); 17 | ~HRDLogDialog(); 18 | 19 | public slots: 20 | void upload(); 21 | void uploadCallsignChanged(const QString&); 22 | 23 | private: 24 | Ui::HRDLogDialog *ui; 25 | 26 | void saveDialogState(); 27 | void loadDialogState(); 28 | LogLocale locale; 29 | }; 30 | 31 | #endif // QLOG_UI_HRDLOGDIALOG_H 32 | -------------------------------------------------------------------------------- /ui/ImportDialog.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_IMPORTDIALOG_H 2 | #define QLOG_UI_IMPORTDIALOG_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include "data/StationProfile.h" 8 | #include "core/LogLocale.h" 9 | 10 | namespace Ui { 11 | class ImportDialog; 12 | } 13 | 14 | class ImportDialog : public QDialog 15 | { 16 | Q_OBJECT 17 | 18 | public: 19 | explicit ImportDialog(QWidget *parent = 0); 20 | ~ImportDialog(); 21 | 22 | private slots: 23 | void browse(); 24 | void toggleAll(); 25 | void toggleComment(); 26 | void runImport(); 27 | void computeProgress(qint64 position); 28 | void stationProfileTextChanged(const QString&); 29 | void rigProfileTextChanged(const QString&); 30 | void toggleMyProfile(); 31 | void toggleMyRig(); 32 | void commentChanged(const QString&); 33 | 34 | private: 35 | Ui::ImportDialog *ui; 36 | qint64 size; 37 | StationProfile selectedStationProfile; 38 | LogLocale locale; 39 | 40 | static LogFormat::duplicateQSOBehaviour showDuplicateDialog(QSqlRecord *, QSqlRecord *); 41 | void saveImportDetails(const QString &importDetail, 42 | const QString &filename, 43 | const int count, 44 | const unsigned long warnings, 45 | const unsigned long errors); 46 | }; 47 | 48 | #endif // QLOG_UI_IMPORTDIALOG_H 49 | -------------------------------------------------------------------------------- /ui/InputPasswordDialog.cpp: -------------------------------------------------------------------------------- 1 | #include "InputPasswordDialog.h" 2 | #include "ui_InputPasswordDialog.h" 3 | #include "core/debug.h" 4 | 5 | MODULE_IDENTIFICATION("qlog.ui.dxwidget"); 6 | 7 | InputPasswordDialog::InputPasswordDialog(QString dialogName, 8 | QString comment, 9 | QWidget *parent) : 10 | QDialog(parent), 11 | ui(new Ui::InputPasswordDialog) 12 | { 13 | FCT_IDENTIFICATION; 14 | 15 | ui->setupUi(this); 16 | 17 | setWindowTitle(dialogName); 18 | ui->comment->setText(comment); 19 | } 20 | 21 | InputPasswordDialog::~InputPasswordDialog() 22 | { 23 | FCT_IDENTIFICATION; 24 | 25 | delete ui; 26 | } 27 | 28 | QString InputPasswordDialog::getPassword() const 29 | { 30 | FCT_IDENTIFICATION; 31 | return ui->passwordLineEdit->text(); 32 | } 33 | 34 | bool InputPasswordDialog::getRememberPassword() const 35 | { 36 | FCT_IDENTIFICATION; 37 | return ui->rememberCheckBox->isChecked(); 38 | } 39 | -------------------------------------------------------------------------------- /ui/InputPasswordDialog.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_INPUTPASSWORDDIALOG_H 2 | #define QLOG_UI_INPUTPASSWORDDIALOG_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class InputPasswordDialog; 8 | } 9 | 10 | class InputPasswordDialog : public QDialog 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit InputPasswordDialog(QString dialogName, 16 | QString comment, 17 | QWidget *parent = nullptr); 18 | ~InputPasswordDialog(); 19 | 20 | QString getPassword() const; 21 | bool getRememberPassword() const; 22 | 23 | private: 24 | Ui::InputPasswordDialog *ui; 25 | }; 26 | 27 | #endif // QLOG_UI_INPUTPASSWORDDIALOG_H 28 | -------------------------------------------------------------------------------- /ui/KSTHighlightRuleDetail.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_KSTHIGHLIGHTRULEDETAIL_H 2 | #define QLOG_UI_KSTHIGHLIGHTRULEDETAIL_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class KSTHighlightRuleDetail; 8 | } 9 | 10 | class KSTHighlightRuleDetail : public QDialog 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit KSTHighlightRuleDetail(const QString &ruleName = QString(), 16 | QWidget *parent = nullptr); 17 | ~KSTHighlightRuleDetail(); 18 | 19 | 20 | public slots: 21 | void addCondition(int fieldIdx = -1, int operatorId = -1, QString value = QString()); 22 | void save(); 23 | void ruleNameChanged(const QString&); 24 | 25 | private: 26 | Ui::KSTHighlightRuleDetail *ui; 27 | QStringList ruleNamesList; 28 | int condCount; 29 | 30 | void loadRule(const QString &ruleName); 31 | bool ruleExists(const QString &); 32 | }; 33 | 34 | #endif // QLOG_UI_KSTHIGHLIGHTRULEDETAIL_H 35 | -------------------------------------------------------------------------------- /ui/KSTHighlighterSettingDialog.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_KSTHIGHLIGHTERSETTINGDIALOG_H 2 | #define QLOG_UI_KSTHIGHLIGHTERSETTINGDIALOG_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Ui { 8 | class KSTHighlighterSettingDialog; 9 | } 10 | 11 | class KSTHighlighterSettingDialog : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit KSTHighlighterSettingDialog(QWidget *parent = nullptr); 17 | ~KSTHighlighterSettingDialog(); 18 | 19 | QSqlTableModel* rulesModel; 20 | 21 | public slots: 22 | void addRule(); 23 | void removeRule(); 24 | void editRule(QModelIndex); 25 | void editRuleButton(); 26 | 27 | private: 28 | Ui::KSTHighlighterSettingDialog *ui; 29 | }; 30 | 31 | #endif // QLOG_UI_KSTHIGHLIGHTERSETTINGDIALOG_H 32 | -------------------------------------------------------------------------------- /ui/KSTWidget.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foldynl/QLog/79625cf162434dec9d0fc4e862c819bd49102fe4/ui/KSTWidget.cpp -------------------------------------------------------------------------------- /ui/KSTWidget.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foldynl/QLog/79625cf162434dec9d0fc4e862c819bd49102fe4/ui/KSTWidget.h -------------------------------------------------------------------------------- /ui/KSTWidget.ui: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foldynl/QLog/79625cf162434dec9d0fc4e862c819bd49102fe4/ui/KSTWidget.ui -------------------------------------------------------------------------------- /ui/LotwDialog.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_LOTWDIALOG_H 2 | #define QLOG_UI_LOTWDIALOG_H 3 | 4 | #include 5 | #include "core/LogLocale.h" 6 | 7 | namespace Ui { 8 | class LotwDialog; 9 | } 10 | 11 | class LotwDialog : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit LotwDialog(QWidget *parent = nullptr); 17 | ~LotwDialog(); 18 | 19 | public slots: 20 | void download(); 21 | void upload(); 22 | void uploadCallsignChanged(const QString& ); 23 | 24 | private: 25 | Ui::LotwDialog *ui; 26 | 27 | void saveDialogState(); 28 | void loadDialogState(); 29 | LogLocale locale; 30 | }; 31 | 32 | #endif // QLOG_UI_LOTWDIALOG_H 33 | -------------------------------------------------------------------------------- /ui/MapWebChannelHandler.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_MAPWEBCHANNELHANDLER_H 2 | #define QLOG_UI_MAPWEBCHANNELHANDLER_H 3 | 4 | #include 5 | #include 6 | 7 | class MapWebChannelHandler : public QObject 8 | { 9 | Q_OBJECT 10 | public: 11 | explicit MapWebChannelHandler(const QString &configID, 12 | QObject *parent = nullptr); 13 | void restoreLayerControlStates(QWebEnginePage *page); 14 | QString generateMapMenuJS(bool gridLayer = true, 15 | bool grayline = false, 16 | bool aurora = false, 17 | bool muf = false, 18 | bool ibp = false, 19 | bool antpath = false, 20 | bool chatStations = false, 21 | bool wsjtxStations = false, 22 | bool paths = false); 23 | 24 | signals: 25 | void chatCallsignPressed(QString); 26 | void wsjtxCallsignPressed(QString); 27 | void IBPPressed(QString, double); 28 | 29 | public slots: 30 | void handleLayerSelectionChanged(const QVariant &data, 31 | const QVariant &state); 32 | void chatCallsignClicked(const QVariant &data); 33 | void wsjtxCallsignClicked(const QVariant &data); 34 | void IBPCallsignClicked(const QVariant &callsign, 35 | const QVariant &freq); 36 | private: 37 | QString configID; 38 | 39 | void connectWebChannel(QWebEnginePage *page); 40 | }; 41 | 42 | #endif // QLOG_UI_MAPWEBCHANNELHANDLER_H 43 | -------------------------------------------------------------------------------- /ui/MapWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_MAPWIDGET_H 2 | #define QLOG_UI_MAPWIDGET_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | namespace Ui { 9 | class MapWidget; 10 | } 11 | 12 | class MapWidget : public QGraphicsView 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit MapWidget(QWidget* parent = nullptr); 18 | ~MapWidget(); 19 | 20 | public slots: 21 | void setTarget(double lat, double lon); 22 | void clear(); 23 | void redraw(); 24 | 25 | protected: 26 | void showEvent(QShowEvent* event); 27 | void resizeEvent(QResizeEvent* event); 28 | 29 | private: 30 | void redrawNightOverlay(); 31 | void drawPoint(const QPoint &point); 32 | void drawLine(const QPoint &pointA, const QPoint &pointB); 33 | 34 | void pointToRad(const QPoint &point, double& lat, double& lon); 35 | void pointToCoord(const QPoint &point, double& lat, double& lon); 36 | QPoint radToPoint(const double lat, const double lon); 37 | QPoint coordToPoint(const double lat, const double lon); 38 | 39 | int sunSize = 20; 40 | 41 | QGraphicsPixmapItem* nightOverlay; 42 | QList items; 43 | QGraphicsEllipseItem* sunItem; 44 | QGraphicsPathItem* terminatorItem; 45 | QGraphicsScene* scene; 46 | }; 47 | 48 | #endif // QLOG_UI_MAPWIDGET_H 49 | -------------------------------------------------------------------------------- /ui/OnlineMapWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_ONLINEMAPWIDGET_H 2 | #define QLOG_UI_ONLINEMAPWIDGET_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include "ui/MapWebChannelHandler.h" 8 | #include "core/PropConditions.h" 9 | #include "ui/WebEnginePage.h" 10 | #include "rig/Rig.h" 11 | #include "ui/NewContactWidget.h" 12 | #include "core/KSTChat.h" 13 | #include "data/WsjtxEntry.h" 14 | 15 | namespace Ui { 16 | class OnlineMapWidget; 17 | } 18 | 19 | class OnlineMapWidget : public QWebEngineView 20 | { 21 | Q_OBJECT 22 | 23 | public: 24 | explicit OnlineMapWidget(QWidget* parent = nullptr); 25 | ~OnlineMapWidget(); 26 | 27 | void assignPropConditions(PropConditions *); 28 | void registerContactWidget(const NewContactWidget*); 29 | 30 | signals: 31 | void chatCallsignPressed(QString); 32 | void wsjtxCallsignPressed(QString); 33 | 34 | public slots: 35 | void setTarget(double lat, double lon); 36 | void changeTheme(int); 37 | void auroraDataUpdate(); 38 | void mufDataUpdate(); 39 | void setIBPBand(VFOID, double, double, double); 40 | void antPositionChanged(double in_azimuth, double in_elevation); 41 | void rotConnected(); 42 | void rotDisconnected(); 43 | void flyToMyQTH(); 44 | void drawChatUsers(const QList &list); 45 | void drawWSJTXSpot(const WsjtxEntry &spot); 46 | void clearWSJTXSpots(); 47 | 48 | protected slots: 49 | void finishLoading(bool); 50 | void chatCallsignTrigger(const QString&); 51 | void wsjtxCallsignTrigger(const QString&); 52 | void IBPCallsignTrigger(const QString&, double); 53 | 54 | private: 55 | 56 | WebEnginePage *main_page; 57 | bool isMainPageLoaded; 58 | QString postponedScripts; 59 | QWebChannel channel; 60 | MapWebChannelHandler webChannelHandler; 61 | PropConditions *prop_cond; 62 | const NewContactWidget *contact; 63 | double lastSeenAzimuth, lastSeenElevation; 64 | bool isRotConnected; 65 | 66 | void runJavaScript(const QString &); 67 | }; 68 | 69 | #endif // QLOG_UI_ONLINEMAPWIDGET_H 70 | -------------------------------------------------------------------------------- /ui/PaperQSLDialog.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_PAPERQSLDIALOG_H 2 | #define QLOG_UI_PAPERQSLDIALOG_H 3 | 4 | #include 5 | #include 6 | 7 | #include "core/QSLStorage.h" 8 | 9 | namespace Ui { 10 | class PaperQSLDialog; 11 | } 12 | 13 | class PaperQSLDialog : public QDialog 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | explicit PaperQSLDialog(const QSqlRecord &qso, QWidget *parent = nullptr); 19 | ~PaperQSLDialog(); 20 | 21 | public slots: 22 | void addFileClick(); 23 | 24 | private: 25 | 26 | void showAvailableFiles(); 27 | void addFileToDialog(const QString &); 28 | void addNewFile(const QString &); 29 | 30 | Ui::PaperQSLDialog *ui; 31 | 32 | QSLStorage *qsl; 33 | QSqlRecord dialogQSORecord; 34 | unsigned int fileCount; 35 | QStringList filenameList; 36 | }; 37 | 38 | #endif // QLOG_UI_PAPERQSLDIALOG_H 39 | -------------------------------------------------------------------------------- /ui/ProfileImageWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_PROFILEIMAGEWIDGET_H 2 | #define QLOG_UI_PROFILEIMAGEWIDGET_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | namespace Ui { 11 | class ProfileImageWidget; 12 | } 13 | 14 | class AspectRatioLabel : public QLabel 15 | { 16 | Q_OBJECT 17 | 18 | public: 19 | explicit AspectRatioLabel(QWidget* parent = nullptr, 20 | Qt::WindowFlags f = Qt::WindowFlags()); 21 | ~AspectRatioLabel(); 22 | 23 | public slots: 24 | void setPixmap(const QPixmap& pm); 25 | 26 | protected: 27 | void resizeEvent(QResizeEvent* event) override; 28 | 29 | private: 30 | void updateMargins(); 31 | 32 | int pixmapWidth = 0; 33 | int pixmapHeight = 0; 34 | }; 35 | 36 | class ProfileImageWidget : public QWidget 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | explicit ProfileImageWidget(QWidget *parent = nullptr); 42 | ~ProfileImageWidget(); 43 | 44 | public slots: 45 | void loadImageFromUrl(const QString &url); 46 | 47 | private slots: 48 | void processReply(QNetworkReply* reply); 49 | 50 | private: 51 | Ui::ProfileImageWidget *ui; 52 | AspectRatioLabel *imageLabel; 53 | QNetworkAccessManager *nam; 54 | QNetworkReply *currentReply; 55 | QMimeDatabase mimeDatabase; 56 | QMimeType mimeType; 57 | }; 58 | 59 | #endif // QLOG_UI_PROFILEIMAGEWIDGET_H 60 | -------------------------------------------------------------------------------- /ui/ProfileImageWidget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | ProfileImageWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 300 11 | 12 | 13 | 14 | Profile Image 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /ui/QSLImportStatDialog.cpp: -------------------------------------------------------------------------------- 1 | #include "QSLImportStatDialog.h" 2 | #include "ui_QSLImportStatDialog.h" 3 | #include "core/debug.h" 4 | 5 | MODULE_IDENTIFICATION("qlog.ui.QSLImportStatDialog"); 6 | 7 | QSLImportStatDialog::QSLImportStatDialog(QSLMergeStat stats, QWidget *parent) : 8 | QDialog(parent), 9 | ui(new Ui::QSLImportStatDialog) 10 | { 11 | FCT_IDENTIFICATION; 12 | 13 | ui->setupUi(this); 14 | 15 | ui->updatedNumer->setText(QString::number(stats.updatedQSOs.size() + stats.newQSLs.size())); 16 | ui->downloadedNumber->setText(QString::number(stats.qsosDownloaded)); 17 | ui->unmatchedNumber->setText(QString::number(stats.unmatchedQSLs.size())); 18 | ui->errorsNumber->setText(QString::number(stats.errorQSLs.size())); 19 | 20 | if ( !stats.newQSLs.isEmpty() ) 21 | { 22 | ui->detailsText->moveCursor(QTextCursor::End); 23 | ui->detailsText->insertPlainText("*** " + tr("New QSLs: ") + "\n"); 24 | ui->detailsText->moveCursor(QTextCursor::End); 25 | ui->detailsText->insertPlainText(stats.newQSLs.join("\n")); 26 | ui->detailsText->moveCursor(QTextCursor::End); 27 | ui->detailsText->insertPlainText("\n\n"); 28 | ui->detailsText->moveCursor(QTextCursor::End); 29 | } 30 | 31 | if ( !stats.updatedQSOs.isEmpty() ) 32 | { 33 | ui->detailsText->insertPlainText("*** " + tr("Updated QSOs: ") + "\n"); 34 | ui->detailsText->moveCursor(QTextCursor::End); 35 | ui->detailsText->insertPlainText(stats.updatedQSOs.join("\n")); 36 | ui->detailsText->moveCursor(QTextCursor::End); 37 | ui->detailsText->insertPlainText("\n\n"); 38 | ui->detailsText->moveCursor(QTextCursor::End); 39 | } 40 | 41 | if ( !stats.unmatchedQSLs.isEmpty() ) 42 | { 43 | ui->detailsText->insertPlainText("*** " + tr("Unmatched QSLs: ") + "\n"); 44 | ui->detailsText->moveCursor(QTextCursor::End); 45 | ui->detailsText->insertPlainText (stats.unmatchedQSLs.join("\n")); 46 | ui->detailsText->moveCursor(QTextCursor::End); 47 | } 48 | } 49 | 50 | QSLImportStatDialog::~QSLImportStatDialog() 51 | { 52 | FCT_IDENTIFICATION; 53 | 54 | delete ui; 55 | } 56 | -------------------------------------------------------------------------------- /ui/QSLImportStatDialog.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_QSLIMPORTSTATDIALOG_H 2 | #define QLOG_UI_QSLIMPORTSTATDIALOG_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Ui { 8 | class QSLImportStatDialog; 9 | } 10 | 11 | class QSLImportStatDialog : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit QSLImportStatDialog(QSLMergeStat stats, QWidget *parent = nullptr); 17 | ~QSLImportStatDialog(); 18 | 19 | private: 20 | Ui::QSLImportStatDialog *ui; 21 | }; 22 | 23 | #endif // QLOG_UI_QSLIMPORTSTATDIALOG_H 24 | -------------------------------------------------------------------------------- /ui/QSOFilterDetail.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_QSOFILTERDETAIL_H 2 | #define QLOG_UI_QSOFILTERDETAIL_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include "core/LogLocale.h" 10 | 11 | namespace Ui { 12 | class QSOFilterDetail; 13 | } 14 | 15 | class QSOFilterDetail : public QDialog 16 | { 17 | Q_OBJECT 18 | 19 | public: 20 | explicit QSOFilterDetail(const QString &filterName = QString(), QWidget *parent = nullptr); 21 | ~QSOFilterDetail(); 22 | 23 | public slots: 24 | void addCondition(int fieldIdx = -1, int operatorId = -1, QString value = QString()); 25 | void save(); 26 | void filterNameChanged(const QString&); 27 | 28 | private: 29 | Ui::QSOFilterDetail *ui; 30 | QString filterName; 31 | int condCount; 32 | QStringList filterNamesList; 33 | 34 | private: 35 | void loadFilter(const QString &filterName); 36 | bool filterExists(const QString &filterName); 37 | bool isDateField(int index); 38 | bool isDateTimeField(int index); 39 | bool isQSLSentField(int index); 40 | bool isQSLSentViaField(int index); 41 | bool isQSLRcvdField(int index); 42 | bool isUploadStatusField(int index); 43 | bool isAntPathField(int index); 44 | bool isBoolField(int index); 45 | bool isQSOCompleteField(int index); 46 | bool isDownloadStatusField(int index); 47 | bool isMorseKeyTypeField(int index); 48 | QComboBox* createComboBox(const QMap&, const QString&, 49 | const int identifier, const QSizePolicy&); 50 | QDateEdit* createDateEdit(const QString&, const int, const QSizePolicy&); 51 | QDateTimeEdit* createDateTimeEdit(const QString&, const int, const QSizePolicy&); 52 | QLineEdit* createLineEdit(const QString&, const int, const QSizePolicy&); 53 | 54 | LogLocale locale; 55 | }; 56 | 57 | #endif // QLOG_UI_QSOFILTERDETAIL_H 58 | -------------------------------------------------------------------------------- /ui/QSOFilterDialog.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include "QSOFilterDialog.h" 6 | #include "ui_QSOFilterDialog.h" 7 | #include "core/debug.h" 8 | #include "ui/QSOFilterDetail.h" 9 | 10 | MODULE_IDENTIFICATION("qlog.ui.qsofilterdialog"); 11 | 12 | QSOFilterDialog::QSOFilterDialog(QWidget *parent) : 13 | QDialog(parent), 14 | ui(new Ui::QSOFilterDialog) 15 | { 16 | FCT_IDENTIFICATION; 17 | ui->setupUi(this); 18 | 19 | filterModel = new QSqlTableModel(); 20 | filterModel->setTable("qso_filters"); 21 | ui->filtersListView->setModel(filterModel); 22 | ui->filtersListView->setModelColumn(filterModel->fieldIndex("filter_name")); 23 | ui->filtersListView->setSelectionMode(QAbstractItemView::SingleSelection); 24 | filterModel->select(); 25 | } 26 | 27 | QSOFilterDialog::~QSOFilterDialog() 28 | { 29 | FCT_IDENTIFICATION; 30 | delete ui; 31 | } 32 | 33 | void QSOFilterDialog::addFilter() 34 | { 35 | FCT_IDENTIFICATION; 36 | QSOFilterDetail dialog(QString(), this); 37 | dialog.exec(); 38 | filterModel->select(); 39 | } 40 | 41 | void QSOFilterDialog::removeFilter() 42 | { 43 | FCT_IDENTIFICATION; 44 | 45 | filterModel->removeRow(ui->filtersListView->currentIndex().row()); 46 | ui->filtersListView->clearSelection(); 47 | filterModel->select(); 48 | } 49 | 50 | void QSOFilterDialog::editFilter(QModelIndex idx) 51 | { 52 | FCT_IDENTIFICATION; 53 | 54 | QString filterName = ui->filtersListView->model()->data(idx).toString(); 55 | 56 | QSOFilterDetail dialog(filterName, this); 57 | dialog.exec(); 58 | } 59 | 60 | void QSOFilterDialog::editFilterButton() 61 | { 62 | FCT_IDENTIFICATION; 63 | 64 | const QModelIndexList &list = ui->filtersListView->selectionModel()->selectedIndexes(); 65 | if ( !list.empty() ) 66 | editFilter(list.first()); 67 | } 68 | -------------------------------------------------------------------------------- /ui/QSOFilterDialog.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_QSOFILTERDIALOG_H 2 | #define QLOG_UI_QSOFILTERDIALOG_H 3 | 4 | #include 5 | #include 6 | 7 | 8 | namespace Ui { 9 | class QSOFilterDialog; 10 | } 11 | 12 | class QSOFilterDialog : public QDialog 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit QSOFilterDialog(QWidget *parent = nullptr); 18 | ~QSOFilterDialog(); 19 | 20 | private: 21 | Ui::QSOFilterDialog *ui; 22 | QSqlTableModel* filterModel; 23 | 24 | public slots: 25 | void addFilter(); 26 | void removeFilter(); 27 | void editFilter(QModelIndex); 28 | void editFilterButton(); 29 | }; 30 | 31 | #endif // QLOG_UI_QSOFILTERDIALOG_H 32 | -------------------------------------------------------------------------------- /ui/QTableQSOView.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "QTableQSOView.h" 4 | #include "models/LogbookModel.h" 5 | 6 | QTableQSOView::QTableQSOView(QWidget *parent) : 7 | QTableView(parent) 8 | { } 9 | 10 | void QTableQSOView::commitData(QWidget *editor) 11 | { 12 | QTableView::commitData(editor); 13 | 14 | QAbstractItemModel *model = this->model(); 15 | QVariant value = model->data(this->currentIndex(), Qt::EditRole); 16 | int currRow = this->currentIndex().row(); 17 | int currCol = this->currentIndex().column(); 18 | 19 | /* Group Editing Support */ 20 | /* If rows are selected then update them*/ 21 | const QModelIndexList &selectedRows = this->selectionModel()->selectedRows(); 22 | 23 | for ( const QModelIndex &index : selectedRows ) 24 | { 25 | if ( index.row() != currRow // Do not update the same row again 26 | /* Protect selected columns against group editing */ 27 | && currCol != LogbookModel::COLUMN_CALL 28 | && currCol != LogbookModel::COLUMN_TIME_ON 29 | && currCol != LogbookModel::COLUMN_TIME_OFF ) 30 | { 31 | model->setData(model->index(index.row(),currCol), value, Qt::EditRole); 32 | } 33 | } 34 | 35 | emit dataCommitted(); 36 | } 37 | 38 | void QTableQSOView::keyPressEvent(QKeyEvent *event) 39 | { 40 | if ( event->key() == Qt::Key_F2 ) 41 | { 42 | return; 43 | } 44 | 45 | QTableView::keyPressEvent(event); 46 | }; 47 | 48 | -------------------------------------------------------------------------------- /ui/QTableQSOView.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_QTABLEQSOVIEW_H 2 | #define QLOG_UI_QTABLEQSOVIEW_H 3 | 4 | #include 5 | #include 6 | 7 | class QTableQSOView : public QTableView 8 | { 9 | Q_OBJECT 10 | 11 | signals: 12 | void dataCommitted(); 13 | 14 | public: 15 | explicit QTableQSOView(QWidget *parent = nullptr); 16 | void commitData(QWidget *editor) override; 17 | void keyPressEvent(QKeyEvent *event) override; 18 | }; 19 | 20 | #endif // QLOG_UI_QTABLEQSOVIEW_H 21 | -------------------------------------------------------------------------------- /ui/QrzDialog.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_QRZDIALOG_H 2 | #define QLOG_UI_QRZDIALOG_H 3 | 4 | #include 5 | #include "core/LogLocale.h" 6 | 7 | namespace Ui { 8 | class QRZDialog; 9 | } 10 | 11 | class QRZDialog : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit QRZDialog(QWidget *parent = nullptr); 17 | ~QRZDialog(); 18 | 19 | public slots: 20 | void upload(); 21 | void uploadCallsignChanged(const QString&); 22 | 23 | private: 24 | Ui::QRZDialog *ui; 25 | 26 | void saveDialogState(); 27 | void loadDialogState(); 28 | 29 | LogLocale locale; 30 | }; 31 | 32 | #endif // QLOG_UI_QRZDIALOG_H 33 | -------------------------------------------------------------------------------- /ui/RigWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_RIGWIDGET_H 2 | #define QLOG_UI_RIGWIDGET_H 3 | 4 | #include 5 | #include "rig/Rig.h" 6 | #include "core/HRDLog.h" 7 | 8 | namespace Ui { 9 | class RigWidget; 10 | } 11 | 12 | class RigWidget : public QWidget 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit RigWidget(QWidget *parent = nullptr); 18 | ~RigWidget(); 19 | 20 | signals: 21 | void rigProfileChanged(); 22 | 23 | public slots: 24 | void updateFrequency(VFOID, double, double, double); 25 | void updateMode(VFOID, const QString&, const QString&, 26 | const QString&, qint32); 27 | void updatePWR(VFOID, double); 28 | void updateVFO(VFOID, const QString&); 29 | void updateXIT(VFOID, double); 30 | void updateRIT(VFOID, double); 31 | void updatePTT(VFOID, bool); 32 | void bandComboChanged(const QString&); 33 | void modeComboChanged(const QString&); 34 | void rigProfileComboChanged(const QString&); 35 | void refreshRigProfileCombo(); 36 | void refreshBandCombo(); 37 | void refreshModeCombo(); 38 | void reloadSettings(); 39 | void rigConnected(); 40 | void rigDisconnected(); 41 | void bandUp(); 42 | void bandDown(); 43 | void setBand(const QString &band); 44 | 45 | private slots: 46 | void sendOnAirState(); 47 | 48 | private: 49 | 50 | void resetRigInfo(); 51 | void saveLastSeenFreq(); 52 | double lastSeenFreq; 53 | QString lastSeenMode; 54 | bool rigOnline; 55 | 56 | Ui::RigWidget *ui; 57 | HRDLog *hrdlog; 58 | }; 59 | 60 | #endif // QLOG_UI_RIGWIDGET_H 61 | -------------------------------------------------------------------------------- /ui/ShowUploadDialog.cpp: -------------------------------------------------------------------------------- 1 | #include "ShowUploadDialog.h" 2 | #include "ui_ShowUploadDialog.h" 3 | #include 4 | 5 | ShowUploadDialog::ShowUploadDialog(const QString &qsoList, QWidget *parent) : 6 | QDialog(parent), 7 | ui(new Ui::ShowUploadDialog) 8 | { 9 | ui->setupUi(this); 10 | ui->qsoText->insertPlainText(qsoList); 11 | ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Upload")); 12 | } 13 | 14 | ShowUploadDialog::~ShowUploadDialog() 15 | { 16 | delete ui; 17 | } 18 | -------------------------------------------------------------------------------- /ui/ShowUploadDialog.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_SHOWUPLOADDIALOG_H 2 | #define QLOG_UI_SHOWUPLOADDIALOG_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class ShowUploadDialog; 8 | } 9 | 10 | class ShowUploadDialog : public QDialog 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit ShowUploadDialog(const QString &qsoList, QWidget *parent = nullptr); 16 | ~ShowUploadDialog(); 17 | 18 | private: 19 | Ui::ShowUploadDialog *ui; 20 | }; 21 | 22 | #endif // QLOG_UI_SHOWUPLOADDIALOG_H 23 | -------------------------------------------------------------------------------- /ui/SplashScreen.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_SPLASHSCREEN_H 2 | #define QLOG_UI_SPLASHSCREEN_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class SplashScreen : public QSplashScreen 9 | { 10 | public: 11 | SplashScreen(const QPixmap &pixmap = QPixmap()) : QSplashScreen(pixmap) {} 12 | 13 | private: 14 | bool painted=false; 15 | 16 | 17 | void paintEvent(QPaintEvent* e) override 18 | { 19 | QSplashScreen::paintEvent(e); 20 | painted=true; 21 | } 22 | public: 23 | void ensureFirstPaint() const 24 | { 25 | while(!painted) 26 | { 27 | QThread::usleep(1e3); 28 | qApp->processEvents(); 29 | } 30 | } 31 | }; 32 | 33 | #endif // QLOG_UI_SPLASHSCREEN_H 34 | -------------------------------------------------------------------------------- /ui/StatisticsWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_STATISTICSWIDGET_H 2 | #define QLOG_UI_STATISTICSWIDGET_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include "ui/MapWebChannelHandler.h" 11 | #include "ui/WebEnginePage.h" 12 | #include "core/LogLocale.h" 13 | 14 | namespace Ui { 15 | class StatisticsWidget; 16 | } 17 | 18 | #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) 19 | using namespace QtCharts; 20 | #endif 21 | 22 | class StatisticsWidget : public QWidget 23 | { 24 | Q_OBJECT 25 | 26 | public slots: 27 | void mainStatChanged(int); 28 | void dateRangeCheckBoxChanged(int); 29 | void mapLoaded(bool); 30 | void changeTheme(int); 31 | void refreshWidget(); 32 | 33 | private slots: 34 | void refreshGraph(); 35 | 36 | public: 37 | explicit StatisticsWidget(QWidget *parent = nullptr); 38 | ~StatisticsWidget(); 39 | 40 | protected: 41 | bool event(QEvent *event) override; 42 | 43 | private: 44 | 45 | void drawBarGraphs(const QString &title, QSqlQuery &query); 46 | void drawPieGraph(const QString &title, QPieSeries* series); 47 | void drawMyLocationsOnMap(QSqlQuery &); 48 | void drawPointsOnMap(QSqlQuery&); 49 | void drawFilledGridsOnMap(QSqlQuery&); 50 | void refreshCombos(); 51 | void setSubTypesCombo(int mainTypeIdx); 52 | void refreshCombo(QComboBox * combo, const QString &sqlQeury); 53 | 54 | private: 55 | Ui::StatisticsWidget *ui; 56 | WebEnginePage *main_page; 57 | bool isMainPageLoaded; 58 | QString postponedScripts; 59 | QWebChannel channel; 60 | MapWebChannelHandler layerControlHandler; 61 | LogLocale locale; 62 | }; 63 | 64 | #endif // QLOG_UI_STATISTICSWIDGET_H 65 | -------------------------------------------------------------------------------- /ui/WebEnginePage.cpp: -------------------------------------------------------------------------------- 1 | #include "WebEnginePage.h" 2 | #include "core/debug.h" 3 | 4 | MODULE_IDENTIFICATION("qlog.ui.webenginepage"); 5 | 6 | WebEnginePage::WebEnginePage(QObject *parent) 7 | : QWebEnginePage{parent} 8 | { 9 | 10 | } 11 | 12 | void WebEnginePage::javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, 13 | const QString &message, 14 | int lineNumber, 15 | const QString &sourceID) 16 | { 17 | FCT_IDENTIFICATION; 18 | 19 | Q_UNUSED(lineNumber); 20 | Q_UNUSED(sourceID); 21 | 22 | qCDebug(runtime)<<"level: " << level <<"; message: "< 5 | 6 | class WebEnginePage : public QWebEnginePage 7 | { 8 | public: 9 | explicit WebEnginePage(QObject *parent = nullptr); 10 | 11 | protected: 12 | void javaScriptConsoleMessage(QWebEnginePage::JavaScriptConsoleMessageLevel level, 13 | const QString &message, 14 | int lineNumber, 15 | const QString &sourceID) override; 16 | }; 17 | 18 | #endif // QLOG_UI_WEBENGINEPAGE_H 19 | -------------------------------------------------------------------------------- /ui/WsjtxFilterDialog.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_WSJTXFILTERDIALOG_H 2 | #define QLOG_UI_WSJTXFILTERDIALOG_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | namespace Ui { 9 | class WsjtxFilterDialog; 10 | } 11 | 12 | class WsjtxFilterDialog : public QDialog 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit WsjtxFilterDialog(QWidget *parent = nullptr); 18 | ~WsjtxFilterDialog(); 19 | void accept() override; 20 | 21 | private: 22 | Ui::WsjtxFilterDialog *ui; 23 | QList memberListCheckBoxes; 24 | QSet dxMemberFilter; 25 | 26 | void generateMembershipCheckboxes(); 27 | 28 | }; 29 | 30 | #endif // QLOG_UI_WSJTXFILTERDIALOG_H 31 | -------------------------------------------------------------------------------- /ui/WsjtxWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef QLOG_UI_WSJTXWIDGET_H 2 | #define QLOG_UI_WSJTXWIDGET_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include "data/WsjtxEntry.h" 8 | #include "models/WsjtxTableModel.h" 9 | #include "rig/Rig.h" 10 | 11 | namespace Ui { 12 | class WsjtxWidget; 13 | } 14 | 15 | class WsjtxWidget : public QWidget 16 | { 17 | Q_OBJECT 18 | 19 | public: 20 | explicit WsjtxWidget(QWidget *parent = nullptr); 21 | ~WsjtxWidget(); 22 | 23 | public slots: 24 | void decodeReceived(WsjtxDecode); 25 | void statusReceived(WsjtxStatus); 26 | void tableViewDoubleClicked(QModelIndex); 27 | void callsignClicked(QString); 28 | void tableViewClicked(QModelIndex); 29 | void updateSpotsStatusWhenQSOAdded(const QSqlRecord &record); 30 | 31 | private slots: 32 | void displayedColumns(); 33 | void actionFilter(); 34 | 35 | signals: 36 | void callsignSelected(QString callsign, QString grid); 37 | void reply(WsjtxDecode); 38 | void CQSpot(WsjtxEntry); 39 | void filteredCQSpot(WsjtxEntry); 40 | void spotsCleared(); 41 | void frequencyChanged(VFOID, double, double, double); 42 | void modeChanged(VFOID, QString, QString, QString, qint32); 43 | 44 | private: 45 | uint dxccStatusFilterValue() const; 46 | QString contFilterRegExp() const; 47 | int getDistanceFilterValue() const; 48 | int getSNRFilterValue() const; 49 | QStringList dxMemberList() const; 50 | void reloadSetting(); 51 | void clearTable(); 52 | 53 | WsjtxTableModel* wsjtxTableModel; 54 | WsjtxStatus status; 55 | QString currBand; 56 | double currFreq; 57 | Ui::WsjtxWidget *ui; 58 | QSortFilterProxyModel *proxyModel; 59 | QRegularExpression contregexp; 60 | QRegularExpression cqRE; 61 | int distanceFilter; 62 | int snrFilter; 63 | uint dxccStatusFilter; 64 | QSet dxMemberFilter; 65 | void saveTableHeaderState(); 66 | void restoreTableHeaderState(); 67 | }; 68 | 69 | #endif // QLOG_UI_WSJTXWIDGET_H 70 | --------------------------------------------------------------------------------