mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 20:56:51 +00:00
WIP: Added bridge-gui-test app. WIP: goos. WIP: event sending. WIP: include bridge-gui-tester in frontend project WIP: app end login event buttons. WIP: login events. . WIP: moved and renamed tab code WIP: wired login logic. WIP: setColorScheme and loginAbort. WIP: more calls implemented + random users and numbers. WIP: mail calls. WIP: bug reports. WIP: more signal send via the grpc Qt proxy. WIP: Qt proxy on the event stream tab. WIP: user change events wiring. WIP: GUI changes. WIP: minor refactoring. WIP: remove event stream tab. WIP: GUI changes. WIP: separate logs, cache and keychain implemented. WIP: Automatic update. Other: fix linux build. WIP: fix for live addition/modification/removal of users on the server side.
58 lines
2.3 KiB
C++
58 lines
2.3 KiB
C++
// Copyright (c) 2022 Proton AG
|
|
//
|
|
// This file is part of Proton Mail Bridge.
|
|
//
|
|
// Proton Mail Bridge is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// Proton Mail Bridge is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
|
#ifndef BRIDGE_GUI_TESTER_MAIN_WINDOW_H
|
|
#define BRIDGE_GUI_TESTER_MAIN_WINDOW_H
|
|
|
|
|
|
#include "ui_MainWindow.h"
|
|
#include "GRPCService.h"
|
|
#include <bridgepp/Log/Log.h>
|
|
|
|
|
|
//**********************************************************************************************************************
|
|
/// \brief Main window class
|
|
//**********************************************************************************************************************
|
|
class MainWindow : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
public: // member functions.
|
|
explicit MainWindow(QWidget *parent); ///< Default constructor.
|
|
MainWindow(MainWindow const &) = delete; ///< Disabled copy-constructor.
|
|
MainWindow(MainWindow &&) = delete; ///< Disabled assignment copy-constructor.
|
|
~MainWindow() override = default; ///< Destructor.
|
|
MainWindow &operator=(MainWindow const &) = delete; ///< Disabled assignment operator.
|
|
MainWindow &operator=(MainWindow &&) = delete; ///< Disabled move assignment operator.
|
|
|
|
SettingsTab &settingsTab(); ///< Returns a reference the 'Settings' tab.
|
|
UsersTab &usersTab(); ///< Returns a reference to the 'Users' tab.
|
|
|
|
public slots:
|
|
void sendDelayedEvent(bridgepp::SPStreamEvent const& event); ///< Sends a gRPC event after the delay specified in the UI. The call is non blocking.
|
|
|
|
private slots:
|
|
void addLogEntry(bridgepp::Log::Level level, QString const &message); ///< Add an entry to the log.
|
|
void addBridgeGUILogEntry(bridgepp::Log::Level level, const QString &message); ///< Add an entry to the log.
|
|
|
|
private:
|
|
Ui::MainWindow ui_ {}; ///< The GUI for the window.
|
|
};
|
|
|
|
|
|
#endif // BRIDGE_GUI_TESTER_MAIN_WINDOW_H
|