Flasher  0.1.0
Loading...
Searching...
No Matches
com_box.hpp
Go to the documentation of this file.
1// Copyright (C) 2024 Vincent Hamp
2//
3// This program is free software: you can redistribute it and/or modify
4// it under the terms of the GNU General Public License as published by
5// the Free Software Foundation, either version 3 of the License, or
6// (at your option) any later version.
7//
8// This program is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11// GNU General Public License for more details.
12//
13// You should have received a copy of the GNU General Public License
14// along with this program. If not, see <https://www.gnu.org/licenses/>.
15
21
22#pragma once
23
24#include <QCheckBox>
25#include <QComboBox>
26#include <QGroupBox>
27#include <QPushButton>
28#include <QThread>
29#include <esp_flasher/esp_flasher.hpp>
30
37class ComBox : public QGroupBox {
38 Q_OBJECT
39
40public:
41 ComBox(QWidget* parent = nullptr);
42
43public slots:
44 void binaries(QVector<Bin> bins);
45
46private slots:
47 void startStopButtonClicked(bool start);
48
49private:
50 QComboBox* _board_combobox{new QComboBox};
51 QComboBox* _port_combobox{new QComboBox};
52 QComboBox* _baud_combobox{new QComboBox};
53 QPushButton* _start_stop_button{new QPushButton};
54 QVector<Bin> _bins{};
55 QThread* _thread{};
56 EspFlasher* _esp_flasher{};
57};
Bottom part GUI widget which displays serial port options.
Definition com_box.hpp:37
QPushButton * _start_stop_button
Definition com_box.hpp:53
EspFlasher * _esp_flasher
Definition com_box.hpp:56
QThread * _thread
Definition com_box.hpp:55
QComboBox * _board_combobox
Definition com_box.hpp:50
ComBox(QWidget *parent=nullptr)
Create layout of various dropdown menus and a start/stop button.
Definition com_box.cpp:30
void startStopButtonClicked(bool start)
Start/stop button slot.
Definition com_box.cpp:89
QComboBox * _baud_combobox
Definition com_box.hpp:52
QComboBox * _port_combobox
Definition com_box.hpp:51
void binaries(QVector< Bin > bins)
Set binaries slot.
Definition com_box.cpp:84
QVector< Bin > _bins
Definition com_box.hpp:54