Flasher  0.1.0
Loading...
Searching...
No Matches
main_window.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 <QMainWindow>
25#include <QNetworkAccessManager>
26#include <QToolBar>
27#include "com_box.hpp"
28#include "log.hpp"
29
41class MainWindow : public QMainWindow {
42 Q_OBJECT
43
44public:
45 MainWindow();
46
47private slots:
48 void about();
49
50signals:
51 void binaries(QVector<Bin> bins);
52
53private:
55 void addArchiveFromHardDrive(QString ar_path);
57 void addArchiveFromNetworkDrive(QString browser_download_url);
58
59 QToolBar* _toolbar{addToolBar("")};
60 QNetworkAccessManager* _network_manager{new QNetworkAccessManager};
62 Log* _log{new Log};
63};
Bottom part GUI widget which displays serial port options.
Definition com_box.hpp:37
Redirect Qt logging types to QTextEdit.
Definition log.hpp:33
Main window.
Definition main_window.hpp:41
MainWindow()
Add menu and toolbar.
Definition main_window.cpp:37
void addArchiveFromNetworkDrive()
Query GitHub REST API for latest release of firmware.
Definition main_window.cpp:149
QToolBar * _toolbar
Definition main_window.hpp:59
void about()
About message box.
Definition main_window.cpp:210
Log * _log
Definition main_window.hpp:62
ComBox * _com_box
Definition main_window.hpp:61
QNetworkAccessManager * _network_manager
Definition main_window.hpp:60
void binaries(QVector< Bin > bins)
void addArchiveFromHardDrive()
Open file dialog, get .zip archive path.
Definition main_window.cpp:92
GUI options.
GUI log.