renamed NotifyQt into RsGUIEventManager

This commit is contained in:
csoler 2025-11-11 18:56:24 +01:00
parent 390084971a
commit a91a0893cf
17 changed files with 62 additions and 65 deletions

View file

@ -358,7 +358,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags flags)
timer->connect(timer, SIGNAL(timeout()), this, SLOT(updateStatus())); timer->connect(timer, SIGNAL(timeout()), this, SLOT(updateStatus()));
timer->start(1000); timer->start(1000);
connect(NotifyQt::getInstance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged())); connect(RsGUIEventManager::getInstance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
settingsChanged(); settingsChanged();
mFontSizeHandler.registerFontSize(ui->listWidget, 1.5f); mFontSizeHandler.registerFontSize(ui->listWidget, 1.5f);

View file

@ -289,7 +289,7 @@ PostedListWidgetWithModel::PostedListWidgetWithModel(const RsGxsGroupId& postedI
connect(ui->submitPostButton, SIGNAL(clicked()), this, SLOT(createMsg())); connect(ui->submitPostButton, SIGNAL(clicked()), this, SLOT(createMsg()));
connect(ui->subscribeToolButton, SIGNAL(subscribe(bool)), this, SLOT(subscribeGroup(bool))); connect(ui->subscribeToolButton, SIGNAL(subscribe(bool)), this, SLOT(subscribeGroup(bool)));
connect(ui->filter_LE, SIGNAL(textChanged(QString)), this, SLOT(filterItems(QString))); connect(ui->filter_LE, SIGNAL(textChanged(QString)), this, SLOT(filterItems(QString)));
connect(NotifyQt::getInstance(), SIGNAL(settingsChanged()),this, SLOT(settingsChanged())); connect(RsGUIEventManager::getInstance(), SIGNAL(settingsChanged()),this, SLOT(settingsChanged()));
/* add filter actions */ /* add filter actions */
ui->postsTree->setPlaceholderText(tr("No posts available in this board")); ui->postsTree->setPlaceholderText(tr("No posts available in this board"));

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* gui/NotifyQt.cpp * * gui/RsGUIEventManager.cpp *
* * * *
* Copyright (c) 2010 Retroshare Team <retroshare.project@gmail.com> * * Copyright (c) 2010 Retroshare Team <retroshare.project@gmail.com> *
* * * *
@ -62,29 +62,26 @@
* #define NOTIFY_DEBUG * #define NOTIFY_DEBUG
****/ ****/
/*static*/ NotifyQt *NotifyQt::_instance = nullptr; /*static*/ RsGUIEventManager *RsGUIEventManager::_instance = nullptr;
/*static*/ bool NotifyQt::_disableAllToaster = false; /*static*/ bool RsGUIEventManager::_disableAllToaster = false;
/*static*/ NotifyQt *NotifyQt::Create () /*static*/ void RsGUIEventManager::Create ()
{ {
if (_instance == nullptr) { if (_instance == nullptr)
_instance = new NotifyQt (); _instance = new RsGUIEventManager ();
}
return _instance;
} }
/*static*/ NotifyQt *NotifyQt::getInstance () /*static*/ RsGUIEventManager *RsGUIEventManager::getInstance ()
{ {
return _instance; return _instance;
} }
/*static*/ bool NotifyQt::isAllDisable () /*static*/ bool RsGUIEventManager::isAllDisable ()
{ {
return _disableAllToaster; return _disableAllToaster;
} }
void NotifyQt::SetDisableAll(bool bValue) void RsGUIEventManager::SetDisableAll(bool bValue)
{ {
if (bValue!=_disableAllToaster) if (bValue!=_disableAllToaster)
{ {
@ -93,7 +90,7 @@ void NotifyQt::SetDisableAll(bool bValue)
} }
} }
NotifyQt::NotifyQt() : cDialog(NULL) RsGUIEventManager::RsGUIEventManager() : cDialog(NULL)
{ {
runningToasterTimer = new QTimer(this); runningToasterTimer = new QTimer(this);
connect(runningToasterTimer, SIGNAL(timeout()), this, SLOT(runningTick())); connect(runningToasterTimer, SIGNAL(timeout()), this, SLOT(runningTick()));
@ -118,7 +115,7 @@ NotifyQt::NotifyQt() : cDialog(NULL)
}, mEventHandlerId); // No event type means we expect to catch all possible events }, mEventHandlerId); // No event type means we expect to catch all possible events
} }
bool NotifyQt::GUI_askForPassword(const std::string& title, const std::string& key_details, bool prev_is_bad) bool RsGUIEventManager::GUI_askForPassword(const std::string& title, const std::string& key_details, bool prev_is_bad)
{ {
RsAutoUpdatePage::lockAllEvents() ; RsAutoUpdatePage::lockAllEvents() ;
@ -171,7 +168,7 @@ bool NotifyQt::GUI_askForPassword(const std::string& title, const std::string& k
RsLoginHelper::clearPgpPassphrase(); RsLoginHelper::clearPgpPassphrase();
return false; return false;
} }
bool NotifyQt::GUI_askForPluginConfirmation(const std::string& plugin_file_name, const RsFileHash& plugin_file_hash, bool first_time) bool RsGUIEventManager::GUI_askForPluginConfirmation(const std::string& plugin_file_name, const RsFileHash& plugin_file_hash, bool first_time)
{ {
// By default, when no information is known about plugins, just dont load them. They will be enabled from the GUI by the user. // By default, when no information is known about plugins, just dont load them. They will be enabled from the GUI by the user.
@ -207,14 +204,14 @@ bool NotifyQt::GUI_askForPluginConfirmation(const std::string& plugin_file_name,
} }
} }
void NotifyQt::enable() void RsGUIEventManager::enable()
{ {
QMutexLocker m(&_mutex) ; QMutexLocker m(&_mutex) ;
std::cerr << "Enabling notification system" << std::endl; std::cerr << "Enabling notification system" << std::endl;
_enabled = true ; _enabled = true ;
} }
void NotifyQt::sync_handleIncomingEvent(std::shared_ptr<const RsEvent> event) void RsGUIEventManager::sync_handleIncomingEvent(std::shared_ptr<const RsEvent> event)
{ {
auto ev6 = dynamic_cast<const RsSystemEvent*>(event.get()); auto ev6 = dynamic_cast<const RsSystemEvent*>(event.get());
@ -224,7 +221,7 @@ void NotifyQt::sync_handleIncomingEvent(std::shared_ptr<const RsEvent> event)
GUI_askForPluginConfirmation(ev6->plugin_file_name, ev6->plugin_file_hash, ev6->plugin_first_time); GUI_askForPluginConfirmation(ev6->plugin_file_name, ev6->plugin_file_hash, ev6->plugin_first_time);
} }
void NotifyQt::async_handleIncomingEvent(std::shared_ptr<const RsEvent> event) void RsGUIEventManager::async_handleIncomingEvent(std::shared_ptr<const RsEvent> event)
{ {
/* Finally Check for PopupMessages / System Error Messages */ /* Finally Check for PopupMessages / System Error Messages */
@ -403,7 +400,7 @@ void NotifyQt::async_handleIncomingEvent(std::shared_ptr<const RsEvent> event)
startWaitingToasters(); startWaitingToasters();
} }
void NotifyQt::testToasters(RsNotifyPopupFlags notifyFlags, /*RshareSettings::enumToasterPosition*/ int position, QPoint margin) void RsGUIEventManager::testToasters(RsNotifyPopupFlags notifyFlags, /*RshareSettings::enumToasterPosition*/ int position, QPoint margin)
{ {
QString title = tr("Test"); QString title = tr("Test");
QString message = tr("This is a test."); QString message = tr("This is a test.");
@ -469,7 +466,7 @@ void NotifyQt::testToasters(RsNotifyPopupFlags notifyFlags, /*RshareSettings::en
} }
} }
void NotifyQt::testToaster(ToasterNotify *toasterNotify, /*RshareSettings::enumToasterPosition*/ int position, QPoint margin) void RsGUIEventManager::testToaster(ToasterNotify *toasterNotify, /*RshareSettings::enumToasterPosition*/ int position, QPoint margin)
{ {
if (!toasterNotify) { if (!toasterNotify) {
@ -490,7 +487,7 @@ void NotifyQt::testToaster(ToasterNotify *toasterNotify, /*RshareSettings::enumT
} }
} }
void NotifyQt::testToaster(QString tag, ToasterNotify *toasterNotify, /*RshareSettings::enumToasterPosition*/ int position, QPoint margin) void RsGUIEventManager::testToaster(QString tag, ToasterNotify *toasterNotify, /*RshareSettings::enumToasterPosition*/ int position, QPoint margin)
{ {
if (!toasterNotify) { if (!toasterNotify) {
@ -511,7 +508,7 @@ void NotifyQt::testToaster(QString tag, ToasterNotify *toasterNotify, /*RshareSe
} }
} }
void NotifyQt::notifyChatFontChanged() void RsGUIEventManager::notifyChatFontChanged()
{ {
{ {
QMutexLocker m(&_mutex) ; QMutexLocker m(&_mutex) ;
@ -521,7 +518,7 @@ void NotifyQt::notifyChatFontChanged()
emit chatFontChanged(); emit chatFontChanged();
} }
void NotifyQt::notifyChatStyleChanged(int /*ChatStyle::enumStyleType*/ styleType) void RsGUIEventManager::notifyChatStyleChanged(int /*ChatStyle::enumStyleType*/ styleType)
{ {
{ {
QMutexLocker m(&_mutex) ; QMutexLocker m(&_mutex) ;
@ -532,12 +529,12 @@ void NotifyQt::notifyChatStyleChanged(int /*ChatStyle::enumStyleType*/ styleType
emit chatStyleChanged(styleType); emit chatStyleChanged(styleType);
} }
void NotifyQt::notifySettingsChanged() void RsGUIEventManager::notifySettingsChanged()
{ {
emit settingsChanged(); emit settingsChanged();
} }
void NotifyQt::startWaitingToasters() void RsGUIEventManager::startWaitingToasters()
{ {
{ {
if (waitingToasterList.empty()) { if (waitingToasterList.empty()) {
@ -607,7 +604,7 @@ void NotifyQt::startWaitingToasters()
} }
} }
void NotifyQt::runningTick() void RsGUIEventManager::runningTick()
{ {
//QMutexLocker lock(&runningToasterMutex); //QMutexLocker lock(&runningToasterMutex);
@ -692,7 +689,7 @@ void NotifyQt::runningTick()
} }
} }
void NotifyQt::displayErrorMessage(RsNotifySysFlags type,const QString& title,const QString& error_msg) void RsGUIEventManager::displayErrorMessage(RsNotifySysFlags type,const QString& title,const QString& error_msg)
{ {
/* make a warning message */ /* make a warning message */
switch(type) switch(type)
@ -711,7 +708,7 @@ void NotifyQt::displayErrorMessage(RsNotifySysFlags type,const QString& title,co
} }
} }
void NotifyQt::displayDiskSpaceWarning(int loc,int size_limit_mb) void RsGUIEventManager::displayDiskSpaceWarning(int loc,int size_limit_mb)
{ {
QString locString ; QString locString ;
switch(loc) switch(loc)

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* gui/NotifyQt.h * * gui/RsGUIEventManager.h *
* * * *
* Copyright (c) 2010 Retroshare Team <retroshare.project@gmail.com> * * Copyright (c) 2010 Retroshare Team <retroshare.project@gmail.com> *
* * * *
@ -48,16 +48,16 @@ class SignatureEventData ;
struct TurtleFileInfo; struct TurtleFileInfo;
struct TurtleGxsInfo; struct TurtleGxsInfo;
class NotifyQt: public QObject class RsGUIEventManager: public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
static NotifyQt *Create (); static void Create();
static NotifyQt *getInstance (); static RsGUIEventManager *getInstance ();
static bool isAllDisable(); static bool isAllDisable();
void enable() ; void enable() ;
virtual ~NotifyQt() = default; virtual ~RsGUIEventManager() = default;
virtual bool GUI_askForPassword(const std::string& title, const std::string& key_details, bool prev_is_bad); virtual bool GUI_askForPassword(const std::string& title, const std::string& key_details, bool prev_is_bad);
virtual bool GUI_askForPluginConfirmation(const std::string& plugin_filename, const RsFileHash& plugin_file_hash,bool first_time); virtual bool GUI_askForPluginConfirmation(const std::string& plugin_filename, const RsFileHash& plugin_file_hash,bool first_time);
@ -96,12 +96,12 @@ class NotifyQt: public QObject
void runningTick(); void runningTick();
private: private:
NotifyQt(); RsGUIEventManager();
static void displayDiskSpaceWarning(int loc,int size_limit_mb); static void displayDiskSpaceWarning(int loc,int size_limit_mb);
static void displayErrorMessage(RsNotifySysFlags type,const QString& title,const QString& error_msg); static void displayErrorMessage(RsNotifySysFlags type,const QString& title,const QString& error_msg);
static NotifyQt *_instance; static RsGUIEventManager *_instance;
static bool _disableAllToaster; static bool _disableAllToaster;
/* system notifications */ /* system notifications */

View file

@ -130,7 +130,7 @@ ChatStyle::ChatStyle() : QObject()
{ {
m_styleType = TYPE_UNKNOWN; m_styleType = TYPE_UNKNOWN;
connect(NotifyQt::getInstance(), SIGNAL(chatStyleChanged(int)), SLOT(styleChanged(int))); connect(RsGUIEventManager::getInstance(), SIGNAL(chatStyleChanged(int)), SLOT(styleChanged(int)));
} }
/* Destructor. */ /* Destructor. */

View file

@ -199,7 +199,7 @@ ChatWidget::ChatWidget(QWidget *parent)
}, this ); }, this );
},mEventHandlerId_friends,RsEventType::FRIEND_LIST); },mEventHandlerId_friends,RsEventType::FRIEND_LIST);
connect(NotifyQt::getInstance(), SIGNAL(chatFontChanged()), this, SLOT(resetFonts())); connect(RsGUIEventManager::getInstance(), SIGNAL(chatFontChanged()), this, SLOT(resetFonts()));
connect(ui->textBrowser, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenuTextBrowser(QPoint))); connect(ui->textBrowser, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenuTextBrowser(QPoint)));

View file

@ -173,7 +173,7 @@ void GxsGroupFrameDialog::initUi()
processSettings(true); processSettings(true);
if (groupFrameSettingsType() != GroupFrameSettings::Nothing) { if (groupFrameSettingsType() != GroupFrameSettings::Nothing) {
connect(NotifyQt::getInstance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged())); connect(RsGUIEventManager::getInstance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
settingsChanged(); settingsChanged();
} }

View file

@ -446,7 +446,7 @@ GxsChannelPostsWidgetWithModel::GxsChannelPostsWidgetWithModel(const RsGxsGroupI
/* Connect signals */ /* Connect signals */
connect(ui->postButton, SIGNAL(clicked()), this, SLOT(createMsg())); connect(ui->postButton, SIGNAL(clicked()), this, SLOT(createMsg()));
connect(ui->subscribeToolButton, SIGNAL(subscribe(bool)), this, SLOT(subscribeGroup(bool))); connect(ui->subscribeToolButton, SIGNAL(subscribe(bool)), this, SLOT(subscribeGroup(bool)));
connect(NotifyQt::getInstance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged())); connect(RsGUIEventManager::getInstance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
ui->postButton->setText(tr("Add new post")); ui->postButton->setText(tr("Add new post"));

View file

@ -173,7 +173,7 @@ void AppearancePage::updateRbtPageOnToolBar()
ui.cmboTollButtonsStyle->show(); ui.cmboTollButtonsStyle->show();
} }
NotifyQt::getInstance()->notifySettingsChanged(); RsGUIEventManager::getInstance()->notifySettingsChanged();
} }
void AppearancePage::updateStatusToolTip() { MainWindow::getInstance()->toggleStatusToolTip(ui.checkBoxDisableSysTrayToolTip->isChecked()); } void AppearancePage::updateStatusToolTip() { MainWindow::getInstance()->toggleStatusToolTip(ui.checkBoxDisableSysTrayToolTip->isChecked()); }
@ -194,7 +194,7 @@ void AppearancePage::updateCmboToolButtonStyle()
default: default:
Settings->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); Settings->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
} }
NotifyQt::getInstance()->notifySettingsChanged(); RsGUIEventManager::getInstance()->notifySettingsChanged();
} }
void AppearancePage::updateCmboToolButtonSize() void AppearancePage::updateCmboToolButtonSize()
@ -226,7 +226,7 @@ void AppearancePage::updateCmboToolButtonSize()
Settings->setToolButtonSize(128); Settings->setToolButtonSize(128);
Settings->setListItemIconSize(128); Settings->setListItemIconSize(128);
} }
NotifyQt::getInstance()->notifySettingsChanged(); RsGUIEventManager::getInstance()->notifySettingsChanged();
} }
// void AppearancePage::updateCmboListItemSize() // void AppearancePage::updateCmboListItemSize()
// { // {
@ -369,5 +369,5 @@ void AppearancePage::updateFontSize()
{ {
Settings->setFontSize(ui.minimumFontSize_SB->value()); Settings->setFontSize(ui.minimumFontSize_SB->value());
NotifyQt::getInstance()->notifySettingsChanged(); RsGUIEventManager::getInstance()->notifySettingsChanged();
} }

View file

@ -126,7 +126,7 @@ void ChatPage::updateFontsAndEmotes()
void ChatPage::updateChatParams() void ChatPage::updateChatParams()
{ {
Settings->setChatScreenFont(fontTempChat.toString()); Settings->setChatScreenFont(fontTempChat.toString());
NotifyQt::getInstance()->notifyChatFontChanged(); RsGUIEventManager::getInstance()->notifyChatFontChanged();
Settings->setChatSendMessageWithCtrlReturn(ui.sendMessageWithCtrlReturn->isChecked()); Settings->setChatSendMessageWithCtrlReturn(ui.sendMessageWithCtrlReturn->isChecked());
Settings->setChatSendAsPlainTextByDef(ui.sendAsPlainTextByDef->isChecked()); Settings->setChatSendAsPlainTextByDef(ui.sendAsPlainTextByDef->isChecked());
@ -186,7 +186,7 @@ void ChatPage::updatePublicStyle()
if (publicStylePath != info.stylePath || publicStyleVariant != ui.publicComboBoxVariant->currentText()) { if (publicStylePath != info.stylePath || publicStyleVariant != ui.publicComboBoxVariant->currentText()) {
Settings->setPublicChatStyle(info.stylePath, ui.publicComboBoxVariant->currentText()); Settings->setPublicChatStyle(info.stylePath, ui.publicComboBoxVariant->currentText());
NotifyQt::getInstance()->notifyChatStyleChanged(ChatStyle::TYPE_PUBLIC); RsGUIEventManager::getInstance()->notifyChatStyleChanged(ChatStyle::TYPE_PUBLIC);
} }
} }
@ -196,7 +196,7 @@ void ChatPage::updatePrivateStyle()
if (privateStylePath != info.stylePath || privateStyleVariant != ui.privateComboBoxVariant->currentText()) { if (privateStylePath != info.stylePath || privateStyleVariant != ui.privateComboBoxVariant->currentText()) {
Settings->setPrivateChatStyle(info.stylePath, ui.privateComboBoxVariant->currentText()); Settings->setPrivateChatStyle(info.stylePath, ui.privateComboBoxVariant->currentText());
NotifyQt::getInstance()->notifyChatStyleChanged(ChatStyle::TYPE_PRIVATE); RsGUIEventManager::getInstance()->notifyChatStyleChanged(ChatStyle::TYPE_PRIVATE);
} }
} }
@ -206,7 +206,7 @@ void ChatPage::updateHistoryStyle()
if (historyStylePath != info.stylePath || historyStyleVariant != ui.historyComboBoxVariant->currentText()) { if (historyStylePath != info.stylePath || historyStyleVariant != ui.historyComboBoxVariant->currentText()) {
Settings->setHistoryChatStyle(info.stylePath, ui.historyComboBoxVariant->currentText()); Settings->setHistoryChatStyle(info.stylePath, ui.historyComboBoxVariant->currentText());
NotifyQt::getInstance()->notifyChatStyleChanged(ChatStyle::TYPE_HISTORY); RsGUIEventManager::getInstance()->notifyChatStyleChanged(ChatStyle::TYPE_HISTORY);
} }
} }

View file

@ -78,6 +78,6 @@ void GroupFrameSettingsWidget::saveSettings()
Settings->setGroupFrameSettings(mType, groupFrameSettings); Settings->setGroupFrameSettings(mType, groupFrameSettings);
NotifyQt::getInstance()->notifySettingsChanged(); RsGUIEventManager::getInstance()->notifySettingsChanged();
} }
} }

View file

@ -311,5 +311,5 @@ void MessagePage::updateFontSize()
{ {
Settings->setMessageFontSize(ui.minimumFontSize->currentData().toInt()); Settings->setMessageFontSize(ui.minimumFontSize->currentData().toInt());
NotifyQt::getInstance()->notifySettingsChanged(); RsGUIEventManager::getInstance()->notifySettingsChanged();
} }

View file

@ -44,8 +44,8 @@ NotifyPage::NotifyPage(QWidget * parent, Qt::WindowFlags flags)
connect(ui.testFeedButton, SIGNAL(clicked()), this, SLOT(testFeed())); connect(ui.testFeedButton, SIGNAL(clicked()), this, SLOT(testFeed()));
connect(ui.testToasterButton, SIGNAL(clicked()), this, SLOT(testToaster())); connect(ui.testToasterButton, SIGNAL(clicked()), this, SLOT(testToaster()));
connect(ui.pushButtonDisableAll,SIGNAL(toggled(bool)), NotifyQt::getInstance(), SLOT(SetDisableAll(bool))); connect(ui.pushButtonDisableAll,SIGNAL(toggled(bool)), RsGUIEventManager::getInstance(), SLOT(SetDisableAll(bool)));
connect(NotifyQt::getInstance(),SIGNAL(disableAllChanged(bool)), ui.pushButtonDisableAll, SLOT(setChecked(bool))); connect(RsGUIEventManager::getInstance(),SIGNAL(disableAllChanged(bool)), ui.pushButtonDisableAll, SLOT(setChecked(bool)));
ui.notify_Blogs->hide(); ui.notify_Blogs->hide();
@ -325,7 +325,7 @@ void NotifyPage::load()
whileBlocking(ui.systray_GroupChat)->setChecked(Settings->getDisplayTrayGroupChat()); whileBlocking(ui.systray_GroupChat)->setChecked(Settings->getDisplayTrayGroupChat());
whileBlocking(ui.systray_ChatLobby)->setChecked(Settings->getDisplayTrayChatLobby()); whileBlocking(ui.systray_ChatLobby)->setChecked(Settings->getDisplayTrayChatLobby());
whileBlocking(ui.pushButtonDisableAll)->setChecked(NotifyQt::isAllDisable()); whileBlocking(ui.pushButtonDisableAll)->setChecked(RsGUIEventManager::isAllDisable());
RshareSettings::enumToasterPosition toasterPosition = Settings->getToasterPosition(); RshareSettings::enumToasterPosition toasterPosition = Settings->getToasterPosition();
ui.comboBoxToasterPosition->clear(); ui.comboBoxToasterPosition->clear();
@ -412,16 +412,16 @@ void NotifyPage::testToaster()
{ {
RshareSettings::enumToasterPosition pos = (RshareSettings::enumToasterPosition) ui.comboBoxToasterPosition->itemData(ui.comboBoxToasterPosition->currentIndex()).toInt(); RshareSettings::enumToasterPosition pos = (RshareSettings::enumToasterPosition) ui.comboBoxToasterPosition->itemData(ui.comboBoxToasterPosition->currentIndex()).toInt();
QPoint margin = QPoint(ui.spinBoxToasterXMargin->value(), ui.spinBoxToasterYMargin->value()); QPoint margin = QPoint(ui.spinBoxToasterXMargin->value(), ui.spinBoxToasterYMargin->value());
NotifyQt::getInstance()->testToasters(getNotifyFlags(), pos, margin); RsGUIEventManager::getInstance()->testToasters(getNotifyFlags(), pos, margin);
/* notify of plugins */ /* notify of plugins */
QList<ToasterNotifySetting>::iterator toasterNotifyIt; QList<ToasterNotifySetting>::iterator toasterNotifyIt;
for (toasterNotifyIt = mToasterNotifySettingList.begin(); toasterNotifyIt != mToasterNotifySettingList.end(); ++toasterNotifyIt) { for (toasterNotifyIt = mToasterNotifySettingList.begin(); toasterNotifyIt != mToasterNotifySettingList.end(); ++toasterNotifyIt) {
if (toasterNotifyIt->mEnabledCheckBox->isChecked()){ if (toasterNotifyIt->mEnabledCheckBox->isChecked()){
if (toasterNotifyIt->mEnabledCheckBox->accessibleName().isEmpty()){ if (toasterNotifyIt->mEnabledCheckBox->accessibleName().isEmpty()){
NotifyQt::getInstance()->testToaster(toasterNotifyIt->mToasterNotify, pos, margin) ; RsGUIEventManager::getInstance()->testToaster(toasterNotifyIt->mToasterNotify, pos, margin) ;
} else { } else {
NotifyQt::getInstance()->testToaster(toasterNotifyIt->mEnabledCheckBox->accessibleName(), toasterNotifyIt->mToasterNotify, pos, margin) ; RsGUIEventManager::getInstance()->testToaster(toasterNotifyIt->mEnabledCheckBox->accessibleName(), toasterNotifyIt->mToasterNotify, pos, margin) ;
} }
} }
} }

View file

@ -238,6 +238,6 @@ void SettingsPage::notifySettingsChanged()
/* call to RsIface save function.... */ /* call to RsIface save function.... */
//rsicontrol -> ConfigSave(); //rsicontrol -> ConfigSave();
if (NotifyQt::getInstance()) if (RsGUIEventManager::getInstance())
NotifyQt::getInstance()->notifySettingsChanged(); RsGUIEventManager::getInstance()->notifySettingsChanged();
} }

View file

@ -47,11 +47,11 @@ ToasterDisable::ToasterDisable(QWidget *parent)
setLayout(hbox); setLayout(hbox);
bool isDisable = NotifyQt::isAllDisable(); bool isDisable = RsGUIEventManager::isAllDisable();
imageButton->setChecked(isDisable); imageButton->setChecked(isDisable);
connect(NotifyQt::getInstance(), SIGNAL(disableAllChanged(bool)), this, SLOT(disable(bool))); connect(RsGUIEventManager::getInstance(), SIGNAL(disableAllChanged(bool)), this, SLOT(disable(bool)));
connect(imageButton, SIGNAL(toggled(bool)), NotifyQt::getInstance(), SLOT(SetDisableAll(bool))); connect(imageButton, SIGNAL(toggled(bool)), RsGUIEventManager::getInstance(), SLOT(SetDisableAll(bool)));
disable(isDisable); disable(isDisable);
} }

View file

@ -346,7 +346,7 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
// //
RsControl::earlyInitNotificationSystem() ; RsControl::earlyInitNotificationSystem() ;
NotifyQt *notify = NotifyQt::Create(); RsGUIEventManager::Create();
//rsNotify->registerNotifyClient(notify); //rsNotify->registerNotifyClient(notify);
/* RetroShare Core Objects */ /* RetroShare Core Objects */

View file

@ -71,7 +71,7 @@ public:
data.callback = callback; data.callback = callback;
mWidget.insert(widget, data); mWidget.insert(widget, data);
QObject::connect(NotifyQt::getInstance(), &NotifyQt::settingsChanged, widget, [this, widget, callback]() { QObject::connect(RsGUIEventManager::getInstance(), &RsGUIEventManager::settingsChanged, widget, [this, widget, callback]() {
mFontSizeHandlerBase->updateFontSize(widget, callback); mFontSizeHandlerBase->updateFontSize(widget, callback);
}); });
@ -93,7 +93,7 @@ public:
data.callback = callback; data.callback = callback;
mView.insert(view, data); mView.insert(view, data);
QObject::connect(NotifyQt::getInstance(), &NotifyQt::settingsChanged, view, [this, view, iconHeightFactor, callback]() { QObject::connect(RsGUIEventManager::getInstance(), &RsGUIEventManager::settingsChanged, view, [this, view, iconHeightFactor, callback]() {
mFontSizeHandlerBase->updateFontSize(view, iconHeightFactor, callback); mFontSizeHandlerBase->updateFontSize(view, iconHeightFactor, callback);
}); });