General: standard compliance with underscores
[marnav.git] / examples / qtnmeadiag / MainWindow.hpp
blob84ecd65be5f2108a7201d23d0dfbb6a7bb263d7d
1 #ifndef MARNAV_QTNMEADIAG_MAINWINDOW_HPP
2 #define MARNAV_QTNMEADIAG_MAINWINDOW_HPP
4 #include <QMainWindow>
5 #include <string>
7 class QAction;
8 class QComboBox;
9 class QLabel;
10 class QLineEdit;
11 class QPushButton;
12 class QSerialPort;
13 class QListWidget;
15 namespace marnav_example
17 class MainWindow : public QMainWindow
19 Q_OBJECT
21 public:
22 MainWindow();
23 virtual ~MainWindow();
25 void open_file(QString filename);
27 private slots:
28 void on_about();
29 void on_about_qt();
30 void on_open();
31 void on_close();
32 void on_data_ready();
33 void on_sentence_selection();
34 void on_open_file();
36 private:
37 void create_actions();
38 void create_menus();
39 void setup_ui();
40 void add_item(QString raw_sentence);
41 void read_sentences_from_file(QString filename);
43 QAction * action_exit = nullptr;
44 QAction * action_about = nullptr;
45 QAction * action_about_qt = nullptr;
46 QAction * action_open_port = nullptr;
47 QAction * action_close_port = nullptr;
48 QAction * action_open_file = nullptr;
50 QLineEdit * port_name = nullptr;
51 QComboBox * cb_baudrate = nullptr;
52 QListWidget * sentence_list = nullptr;
53 QLabel * sentence_desc = nullptr;
55 QSerialPort * port = nullptr;
57 std::string received_data;
61 #endif