Other: added 'All Mail Visible' toggle in bridge-gui-tester.

This commit is contained in:
Xavier Michelon
2022-09-15 12:22:46 +02:00
parent 43ac21fd66
commit 8a7c56e8fd
7 changed files with 101 additions and 15 deletions

View File

@ -39,6 +39,7 @@ void GRPCQtProxy::connectSignals()
connect(this, &GRPCQtProxy::delayedEventRequested, &mainWindow, &MainWindow::sendDelayedEvent); connect(this, &GRPCQtProxy::delayedEventRequested, &mainWindow, &MainWindow::sendDelayedEvent);
connect(this, &GRPCQtProxy::setIsAutostartOnReceived, &settingsTab, &SettingsTab::setIsAutostartOn); connect(this, &GRPCQtProxy::setIsAutostartOnReceived, &settingsTab, &SettingsTab::setIsAutostartOn);
connect(this, &GRPCQtProxy::setIsBetaEnabledReceived, &settingsTab, &SettingsTab::setIsBetaEnabled); connect(this, &GRPCQtProxy::setIsBetaEnabledReceived, &settingsTab, &SettingsTab::setIsBetaEnabled);
connect(this, &GRPCQtProxy::setIsAllMailVisibleReceived, &settingsTab, &SettingsTab::setIsAllMailVisible);
connect(this, &GRPCQtProxy::setColorSchemeNameReceived, &settingsTab, &SettingsTab::setColorSchemeName); connect(this, &GRPCQtProxy::setColorSchemeNameReceived, &settingsTab, &SettingsTab::setColorSchemeName);
connect(this, &GRPCQtProxy::reportBugReceived, &settingsTab, &SettingsTab::setBugReport); connect(this, &GRPCQtProxy::reportBugReceived, &settingsTab, &SettingsTab::setBugReport);
connect(this, &GRPCQtProxy::setIsStreamingReceived, &settingsTab, &SettingsTab::setIsStreaming); connect(this, &GRPCQtProxy::setIsStreamingReceived, &settingsTab, &SettingsTab::setIsStreaming);
@ -83,6 +84,15 @@ void GRPCQtProxy::setIsBetaEnabled(bool enabled)
} }
//****************************************************************************************************************************************************
/// \param[in] visible The value.
//****************************************************************************************************************************************************
void GRPCQtProxy::setIsAllMailVisible(bool visible)
{
emit setIsAllMailVisibleReceived(visible);
}
//**************************************************************************************************************************************************** //****************************************************************************************************************************************************
/// \param[in] name The color scheme. /// \param[in] name The color scheme.
//**************************************************************************************************************************************************** //****************************************************************************************************************************************************

View File

@ -41,6 +41,7 @@ public: // member functions.
void sendDelayedEvent(bridgepp::SPStreamEvent const &event); ///< Sends a delayed stream event. void sendDelayedEvent(bridgepp::SPStreamEvent const &event); ///< Sends a delayed stream event.
void setIsAutostartOn(bool on); ///< Forwards a SetIsAutostartOn call via a Qt signal. void setIsAutostartOn(bool on); ///< Forwards a SetIsAutostartOn call via a Qt signal.
void setIsBetaEnabled(bool enabled); ///< Forwards a SetIsBetaEnabled call via a Qt signal. void setIsBetaEnabled(bool enabled); ///< Forwards a SetIsBetaEnabled call via a Qt signal.
void setIsAllMailVisible(bool visible); ///< Forwards a SetIsAllMailVisible call via a Qt signal.
void setColorSchemeName(QString const &name); ///< Forward a SetColorSchemeName call via a Qt Signal void setColorSchemeName(QString const &name); ///< Forward a SetColorSchemeName call via a Qt Signal
void reportBug(QString const &osType, QString const &osVersion, QString const &emailClient, QString const &address, void reportBug(QString const &osType, QString const &osVersion, QString const &emailClient, QString const &address,
QString const &description, bool includeLogs); ///< Forwards a ReportBug call via a Qt signal. QString const &description, bool includeLogs); ///< Forwards a ReportBug call via a Qt signal.
@ -60,6 +61,7 @@ signals:
void delayedEventRequested(bridgepp::SPStreamEvent const &event); ///< Signal for sending a delayed event. delayed is set in the UI. void delayedEventRequested(bridgepp::SPStreamEvent const &event); ///< Signal for sending a delayed event. delayed is set in the UI.
void setIsAutostartOnReceived(bool on); ///< Forwards a SetIsAutostartOn call via a Qt signal. void setIsAutostartOnReceived(bool on); ///< Forwards a SetIsAutostartOn call via a Qt signal.
void setIsBetaEnabledReceived(bool enabled); ///< Forwards a SetIsBetaEnabled call via a Qt signal. void setIsBetaEnabledReceived(bool enabled); ///< Forwards a SetIsBetaEnabled call via a Qt signal.
void setIsAllMailVisibleReceived(bool enabled); ///< Forwards a SetIsBetaEnabled call via a Qt signal.
void setColorSchemeNameReceived(QString const &name); ///< Forward a SetColorScheme call via a Qt Signal void setColorSchemeNameReceived(QString const &name); ///< Forward a SetColorScheme call via a Qt Signal
void reportBugReceived(QString const &osType, QString const &osVersion, QString const &emailClient, QString const &address, void reportBugReceived(QString const &osType, QString const &osVersion, QString const &emailClient, QString const &address,
QString const &description, bool includeLogs); ///< Signal for the ReportBug gRPC call QString const &description, bool includeLogs); ///< Signal for the ReportBug gRPC call

View File

@ -184,6 +184,30 @@ Status GRPCService::IsBetaEnabled(ServerContext *, Empty const *, BoolValue *res
} }
//****************************************************************************************************************************************************
/// \param[in] request The request.
/// \return The status for the call.
//****************************************************************************************************************************************************
Status GRPCService::SetIsAllMailVisible(ServerContext *, BoolValue const *request, Empty *)
{
app().log().debug(__FUNCTION__);
qtProxy_.setIsAllMailVisible(request->value());
return Status::OK;
}
//****************************************************************************************************************************************************
/// \param[out] response The response.
/// \return The status for the call.
//****************************************************************************************************************************************************
Status GRPCService::IsAllMailVisible(ServerContext *, Empty const *request, BoolValue *response)
{
app().log().debug(__FUNCTION__);
response->set_value(app().mainWindow().settingsTab().isAllMailVisible());
return Status::OK;
}
//**************************************************************************************************************************************************** //****************************************************************************************************************************************************
/// \param[out] response The response. /// \param[out] response The response.
/// \return The status for the call. /// \return The status for the call.

View File

@ -52,6 +52,8 @@ public: // member functions.
grpc::Status IsAutostartOn(::grpc::ServerContext *, ::google::protobuf::Empty const*, ::google::protobuf::BoolValue *response) override; grpc::Status IsAutostartOn(::grpc::ServerContext *, ::google::protobuf::Empty const*, ::google::protobuf::BoolValue *response) override;
grpc::Status SetIsBetaEnabled(::grpc::ServerContext *, ::google::protobuf::BoolValue const *request, ::google::protobuf::Empty *) override; grpc::Status SetIsBetaEnabled(::grpc::ServerContext *, ::google::protobuf::BoolValue const *request, ::google::protobuf::Empty *) override;
grpc::Status IsBetaEnabled(::grpc::ServerContext *, ::google::protobuf::Empty const*, ::google::protobuf::BoolValue *response) override; grpc::Status IsBetaEnabled(::grpc::ServerContext *, ::google::protobuf::Empty const*, ::google::protobuf::BoolValue *response) override;
grpc::Status SetIsAllMailVisible(::grpc::ServerContext *context, ::google::protobuf::BoolValue const *request, ::google::protobuf::Empty *response) override;
grpc::Status IsAllMailVisible(::grpc::ServerContext *context, ::google::protobuf::Empty const *request, ::google::protobuf::BoolValue *response) override;
grpc::Status GoOs(::grpc::ServerContext *, ::google::protobuf::Empty const*, ::google::protobuf::StringValue *response) override; grpc::Status GoOs(::grpc::ServerContext *, ::google::protobuf::Empty const*, ::google::protobuf::StringValue *response) override;
grpc::Status TriggerReset(::grpc::ServerContext *, ::google::protobuf::Empty const*, ::google::protobuf::Empty *) override; grpc::Status TriggerReset(::grpc::ServerContext *, ::google::protobuf::Empty const*, ::google::protobuf::Empty *) override;
grpc::Status Version(::grpc::ServerContext *, ::google::protobuf::Empty const*, ::google::protobuf::StringValue *response) override; grpc::Status Version(::grpc::ServerContext *, ::google::protobuf::Empty const*, ::google::protobuf::StringValue *response) override;

View File

@ -199,6 +199,24 @@ void SettingsTab::setIsBetaEnabled(bool enabled)
} }
//****************************************************************************************************************************************************
/// \return true if the 'All Mail Visible' check box is checked.
//****************************************************************************************************************************************************
bool SettingsTab::isAllMailVisible() const
{
return ui_.checkAllMailVisible->isChecked();
}
//****************************************************************************************************************************************************
/// \param[in] visible The new value for the 'All Mail Visible' check box.
//****************************************************************************************************************************************************
void SettingsTab::setIsAllMailVisible(bool visible)
{
ui_.checkAllMailVisible->setChecked(visible);
}
//**************************************************************************************************************************************************** //****************************************************************************************************************************************************
/// \return The delay to apply before sending automatically generated events. /// \return The delay to apply before sending automatically generated events.
//**************************************************************************************************************************************************** //****************************************************************************************************************************************************
@ -447,6 +465,7 @@ void SettingsTab::resetUI()
ui_.checkIsFirstGUIStart->setChecked(false); ui_.checkIsFirstGUIStart->setChecked(false);
ui_.checkAutostart->setChecked(true); ui_.checkAutostart->setChecked(true);
ui_.checkBetaEnabled->setChecked(true); ui_.checkBetaEnabled->setChecked(true);
ui_.checkAllMailVisible->setChecked(true);
ui_.checkDarkTheme->setChecked(false); ui_.checkDarkTheme->setChecked(false);
QString const tmpDir = QStandardPaths::writableLocation(QStandardPaths::TempLocation); QString const tmpDir = QStandardPaths::writableLocation(QStandardPaths::TempLocation);

View File

@ -46,6 +46,7 @@ public: // member functions.
bool isFirstGUIStart() const; ///< Get the value for the 'Is First GUI Start' check. bool isFirstGUIStart() const; ///< Get the value for the 'Is First GUI Start' check.
bool isAutostartOn() const; ///< Get the value for the 'Autostart' check. bool isAutostartOn() const; ///< Get the value for the 'Autostart' check.
bool isBetaEnabled() const; ///< Get the value for the 'Beta Enabled' check. bool isBetaEnabled() const; ///< Get the value for the 'Beta Enabled' check.
bool isAllMailVisible() const; ///< Get the value for the 'All Mail Visible' check.
QString colorSchemeName() const; ///< Get the value of the 'Use Dark Theme' checkbox. QString colorSchemeName() const; ///< Get the value of the 'Use Dark Theme' checkbox.
qint32 eventDelayMs() const; ///< Get the delay for sending automatically generated events. qint32 eventDelayMs() const; ///< Get the delay for sending automatically generated events.
QString logsPath() const; ///< Get the content of the 'Logs Path' edit. QString logsPath() const; ///< Get the content of the 'Logs Path' edit.
@ -70,9 +71,10 @@ public: // slots
void updateGUIState(); ///< Update the GUI state. void updateGUIState(); ///< Update the GUI state.
void setIsStreaming(bool isStreaming); ///< Set the isStreamingEvents value. void setIsStreaming(bool isStreaming); ///< Set the isStreamingEvents value.
void setClientPlatform(QString const &clientPlatform); ///< Set the client platform. void setClientPlatform(QString const &clientPlatform); ///< Set the client platform.
void setIsAutostartOn(bool on); ///< Set the value for the 'Autostart' check. void setIsAutostartOn(bool on); ///< Set the value for the 'Autostart' check box.
void setIsBetaEnabled(bool enabled); ///< Get the value for the 'Beta Enabled' check. void setIsBetaEnabled(bool enabled); ///< Set the value for the 'Beta Enabled' check box.
void setColorSchemeName(QString const &name); ///< Set the value for the 'Use Dark Theme' checkbox. void setIsAllMailVisible(bool visible); ///< Set the value for the 'All Mail Visible' check box.
void setColorSchemeName(QString const &name); ///< Set the value for the 'Use Dark Theme' check box.
void setBugReport(QString const &osType, QString const &osVersion, QString const &emailClient, QString const &address, QString const &description, void setBugReport(QString const &osType, QString const &osVersion, QString const &emailClient, QString const &address, QString const &description,
bool includeLogs); ///< Set the content of the bug report box. bool includeLogs); ///< Set the content of the bug report box.
void changePorts(qint32 imapPort, qint32 smtpPort); ///< Change the IMAP and SMTP ports. void changePorts(qint32 imapPort, qint32 smtpPort); ///< Change the IMAP and SMTP ports.

View File

@ -153,7 +153,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="2"> <item row="2" column="1">
<widget class="QCheckBox" name="checkAutomaticUpdate">
<property name="text">
<string>Automatic Update</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="checkDarkTheme"> <widget class="QCheckBox" name="checkDarkTheme">
<property name="text"> <property name="text">
<string>Dark Theme</string> <string>Dark Theme</string>
@ -163,10 +170,13 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="1" column="2">
<widget class="QCheckBox" name="checkAutomaticUpdate"> <widget class="QCheckBox" name="checkAllMailVisible">
<property name="text"> <property name="text">
<string>Automatic Update</string> <string>Show 'All Mail'</string>
</property>
<property name="checked">
<bool>false</bool>
</property> </property>
</widget> </widget>
</item> </item>
@ -814,25 +824,42 @@
</layout> </layout>
</widget> </widget>
<tabstops> <tabstops>
<tabstop>editVersion</tabstop>
<tabstop>comboOS</tabstop>
<tabstop>editCurrentEmailClient</tabstop>
<tabstop>checkShowOnStartup</tabstop> <tabstop>checkShowOnStartup</tabstop>
<tabstop>checkShowSplashScreen</tabstop> <tabstop>checkShowSplashScreen</tabstop>
<tabstop>checkIsFirstGUIStart</tabstop> <tabstop>checkIsFirstGUIStart</tabstop>
<tabstop>checkAutostart</tabstop> <tabstop>checkAutostart</tabstop>
<tabstop>checkBetaEnabled</tabstop> <tabstop>checkBetaEnabled</tabstop>
<tabstop>checkAllMailVisible</tabstop>
<tabstop>checkDarkTheme</tabstop> <tabstop>checkDarkTheme</tabstop>
<tabstop>editVersion</tabstop> <tabstop>checkAutomaticUpdate</tabstop>
<tabstop>comboOS</tabstop> <tabstop>editHostname</tabstop>
<tabstop>editCurrentEmailClient</tabstop> <tabstop>spinPortIMAP</tabstop>
<tabstop>editOSType</tabstop> <tabstop>spinPortSMTP</tabstop>
<tabstop>editOSVersion</tabstop> <tabstop>checkUseSSLForSMTP</tabstop>
<tabstop>editEmailClient</tabstop> <tabstop>checkDoHEnabled</tabstop>
<tabstop>editAddress</tabstop>
<tabstop>editDescription</tabstop>
<tabstop>editLogsPath</tabstop> <tabstop>editLogsPath</tabstop>
<tabstop>editLicensePath</tabstop> <tabstop>editLicensePath</tabstop>
<tabstop>editReleaseNotesLink</tabstop> <tabstop>editReleaseNotesLink</tabstop>
<tabstop>editDependencyLicenseLink</tabstop> <tabstop>editDependencyLicenseLink</tabstop>
<tabstop>editLandingPageLink</tabstop> <tabstop>editLandingPageLink</tabstop>
<tabstop>checkCacheOnDiskEnabled</tabstop>
<tabstop>editDiskCachePath</tabstop>
<tabstop>editOSType</tabstop>
<tabstop>editOSVersion</tabstop>
<tabstop>editEmailClient</tabstop>
<tabstop>editAddress</tabstop>
<tabstop>editDescription</tabstop>
<tabstop>spinEventDelay</tabstop>
<tabstop>buttonInternetOff</tabstop>
<tabstop>buttonInternetOn</tabstop>
<tabstop>buttonShowMainWindow</tabstop>
<tabstop>checkIsPortFree</tabstop>
<tabstop>checkNextCacheChangeWillSucceed</tabstop>
<tabstop>comboCacheError</tabstop>
<tabstop>checkNextBugReportWillSucceed</tabstop>
</tabstops> </tabstops>
<resources/> <resources/>
<connections/> <connections/>