File: MessageAggregatorMainWindow.hpp

package info (click to toggle)
wsjtx 2.0.0%2Brepack-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 192,624 kB
  • sloc: cpp: 1,071,838; ansic: 60,751; f90: 25,266; python: 20,318; sh: 10,636; xml: 8,148; cs: 2,121; fortran: 2,051; yacc: 472; asm: 353; makefile: 316; perl: 19
file content (63 lines) | stat: -rw-r--r-- 2,062 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef WSJTX_MESSAGE_AGGREGATOR_MAIN_WINDOW_MODEL_HPP__
#define WSJTX_MESSAGE_AGGREGATOR_MAIN_WINDOW_MODEL_HPP__

#include <QMainWindow>
#include <QHash>
#include <QString>

#include "MessageServer.hpp"

class QDateTime;
class QStandardItemModel;
class QMenu;
class DecodesModel;
class BeaconsModel;
class QLineEdit;
class QTableView;
class ClientWidget;
class QListWidget;

using Frequency = MessageServer::Frequency;

class MessageAggregatorMainWindow
  : public QMainWindow
{
  Q_OBJECT;

public:
  MessageAggregatorMainWindow ();
  ~MessageAggregatorMainWindow ();

  Q_SLOT void log_qso (QString const& /*id*/, QDateTime time_off, QString const& dx_call, QString const& dx_grid
                       , Frequency dial_frequency, QString const& mode, QString const& report_sent
                       , QString const& report_received, QString const& tx_power, QString const& comments
                       , QString const& name, QDateTime time_on, QString const& operator_call
                       , QString const& my_call, QString const& my_grid
                       , QString const& exchange_sent, QString const& exchange_rcvd);

private:
  void add_client (QString const& id, QString const& version, QString const& revision);
  void remove_client (QString const& id);
  void change_highlighting (QString const& call, QColor const& bg = QColor {}, QColor const& fg = QColor {},
                            bool last_only = false);

  // maps client id to widgets
  using ClientsDictionary = QHash<QString, ClientWidget *>;
  ClientsDictionary dock_widgets_;

  QStandardItemModel * log_;
  QMenu * view_menu_;
  DecodesModel * decodes_model_;
  BeaconsModel * beacons_model_;
  MessageServer * server_;
  QLineEdit * multicast_group_line_edit_;
  QTableView * log_table_view_;
  QListWidget * calls_of_interest_;
  QAction * add_call_of_interest_action_;
  QAction * delete_call_of_interest_action_;
  QAction * last_call_of_interest_action_;
  QAction * call_of_interest_bg_colour_action_;
  QAction * call_of_interest_fg_colour_action_;
};

#endif