From a91a0893cf5bbe18260fcea30b3a91768a4d1aba Mon Sep 17 00:00:00 2001 From: csoler Date: Tue, 11 Nov 2025 18:56:24 +0100 Subject: [PATCH] renamed NotifyQt into RsGUIEventManager --- retroshare-gui/src/gui/MainWindow.cpp | 2 +- .../gui/Posted/PostedListWidgetWithModel.cpp | 2 +- .../{notifyqt.cpp => RsGUIEventManager.cpp} | 53 +++++++++---------- .../gui/{notifyqt.h => RsGUIEventManager.h} | 14 ++--- retroshare-gui/src/gui/chat/ChatStyle.cpp | 2 +- retroshare-gui/src/gui/chat/ChatWidget.cpp | 2 +- .../src/gui/gxs/GxsGroupFrameDialog.cpp | 2 +- .../GxsChannelPostsWidgetWithModel.cpp | 2 +- .../src/gui/settings/AppearancePage.cpp | 8 +-- retroshare-gui/src/gui/settings/ChatPage.cpp | 8 +-- .../gui/settings/GroupFrameSettingsWidget.cpp | 2 +- .../src/gui/settings/MessagePage.cpp | 2 +- .../src/gui/settings/NotifyPage.cpp | 12 ++--- .../src/gui/settings/rsettingswin.cpp | 4 +- .../src/gui/statusbar/ToasterDisable.cpp | 6 +-- retroshare-gui/src/main.cpp | 2 +- retroshare-gui/src/util/FontSizeHandler.cpp | 4 +- 17 files changed, 62 insertions(+), 65 deletions(-) rename retroshare-gui/src/gui/{notifyqt.cpp => RsGUIEventManager.cpp} (92%) rename retroshare-gui/src/gui/{notifyqt.h => RsGUIEventManager.h} (92%) diff --git a/retroshare-gui/src/gui/MainWindow.cpp b/retroshare-gui/src/gui/MainWindow.cpp index 2aa00b39a..fb337321b 100644 --- a/retroshare-gui/src/gui/MainWindow.cpp +++ b/retroshare-gui/src/gui/MainWindow.cpp @@ -358,7 +358,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags flags) timer->connect(timer, SIGNAL(timeout()), this, SLOT(updateStatus())); timer->start(1000); - connect(NotifyQt::getInstance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged())); + connect(RsGUIEventManager::getInstance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged())); settingsChanged(); mFontSizeHandler.registerFontSize(ui->listWidget, 1.5f); diff --git a/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp b/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp index aec3c7bdb..a674e5035 100644 --- a/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp +++ b/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp @@ -289,7 +289,7 @@ PostedListWidgetWithModel::PostedListWidgetWithModel(const RsGxsGroupId& postedI connect(ui->submitPostButton, SIGNAL(clicked()), this, SLOT(createMsg())); connect(ui->subscribeToolButton, SIGNAL(subscribe(bool)), this, SLOT(subscribeGroup(bool))); 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 */ ui->postsTree->setPlaceholderText(tr("No posts available in this board")); diff --git a/retroshare-gui/src/gui/notifyqt.cpp b/retroshare-gui/src/gui/RsGUIEventManager.cpp similarity index 92% rename from retroshare-gui/src/gui/notifyqt.cpp rename to retroshare-gui/src/gui/RsGUIEventManager.cpp index a088b10cf..f7831dfbf 100644 --- a/retroshare-gui/src/gui/notifyqt.cpp +++ b/retroshare-gui/src/gui/RsGUIEventManager.cpp @@ -1,5 +1,5 @@ /******************************************************************************* - * gui/NotifyQt.cpp * + * gui/RsGUIEventManager.cpp * * * * Copyright (c) 2010 Retroshare Team * * * @@ -62,29 +62,26 @@ * #define NOTIFY_DEBUG ****/ -/*static*/ NotifyQt *NotifyQt::_instance = nullptr; -/*static*/ bool NotifyQt::_disableAllToaster = false; +/*static*/ RsGUIEventManager *RsGUIEventManager::_instance = nullptr; +/*static*/ bool RsGUIEventManager::_disableAllToaster = false; -/*static*/ NotifyQt *NotifyQt::Create () +/*static*/ void RsGUIEventManager::Create () { - if (_instance == nullptr) { - _instance = new NotifyQt (); - } - - return _instance; + if (_instance == nullptr) + _instance = new RsGUIEventManager (); } -/*static*/ NotifyQt *NotifyQt::getInstance () +/*static*/ RsGUIEventManager *RsGUIEventManager::getInstance () { return _instance; } -/*static*/ bool NotifyQt::isAllDisable () +/*static*/ bool RsGUIEventManager::isAllDisable () { return _disableAllToaster; } -void NotifyQt::SetDisableAll(bool bValue) +void RsGUIEventManager::SetDisableAll(bool bValue) { if (bValue!=_disableAllToaster) { @@ -93,7 +90,7 @@ void NotifyQt::SetDisableAll(bool bValue) } } -NotifyQt::NotifyQt() : cDialog(NULL) +RsGUIEventManager::RsGUIEventManager() : cDialog(NULL) { runningToasterTimer = new QTimer(this); 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 } -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() ; @@ -171,7 +168,7 @@ bool NotifyQt::GUI_askForPassword(const std::string& title, const std::string& k RsLoginHelper::clearPgpPassphrase(); 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. @@ -207,14 +204,14 @@ bool NotifyQt::GUI_askForPluginConfirmation(const std::string& plugin_file_name, } } -void NotifyQt::enable() +void RsGUIEventManager::enable() { QMutexLocker m(&_mutex) ; std::cerr << "Enabling notification system" << std::endl; _enabled = true ; } -void NotifyQt::sync_handleIncomingEvent(std::shared_ptr event) +void RsGUIEventManager::sync_handleIncomingEvent(std::shared_ptr event) { auto ev6 = dynamic_cast(event.get()); @@ -224,7 +221,7 @@ void NotifyQt::sync_handleIncomingEvent(std::shared_ptr event) GUI_askForPluginConfirmation(ev6->plugin_file_name, ev6->plugin_file_hash, ev6->plugin_first_time); } -void NotifyQt::async_handleIncomingEvent(std::shared_ptr event) +void RsGUIEventManager::async_handleIncomingEvent(std::shared_ptr event) { /* Finally Check for PopupMessages / System Error Messages */ @@ -403,7 +400,7 @@ void NotifyQt::async_handleIncomingEvent(std::shared_ptr event) 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 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) { @@ -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) { @@ -511,7 +508,7 @@ void NotifyQt::testToaster(QString tag, ToasterNotify *toasterNotify, /*RshareSe } } -void NotifyQt::notifyChatFontChanged() +void RsGUIEventManager::notifyChatFontChanged() { { QMutexLocker m(&_mutex) ; @@ -521,7 +518,7 @@ void NotifyQt::notifyChatFontChanged() emit chatFontChanged(); } -void NotifyQt::notifyChatStyleChanged(int /*ChatStyle::enumStyleType*/ styleType) +void RsGUIEventManager::notifyChatStyleChanged(int /*ChatStyle::enumStyleType*/ styleType) { { QMutexLocker m(&_mutex) ; @@ -532,12 +529,12 @@ void NotifyQt::notifyChatStyleChanged(int /*ChatStyle::enumStyleType*/ styleType emit chatStyleChanged(styleType); } -void NotifyQt::notifySettingsChanged() +void RsGUIEventManager::notifySettingsChanged() { emit settingsChanged(); } -void NotifyQt::startWaitingToasters() +void RsGUIEventManager::startWaitingToasters() { { if (waitingToasterList.empty()) { @@ -607,7 +604,7 @@ void NotifyQt::startWaitingToasters() } } -void NotifyQt::runningTick() +void RsGUIEventManager::runningTick() { //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 */ 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 ; switch(loc) diff --git a/retroshare-gui/src/gui/notifyqt.h b/retroshare-gui/src/gui/RsGUIEventManager.h similarity index 92% rename from retroshare-gui/src/gui/notifyqt.h rename to retroshare-gui/src/gui/RsGUIEventManager.h index 4bd969ab8..2ae4ab464 100644 --- a/retroshare-gui/src/gui/notifyqt.h +++ b/retroshare-gui/src/gui/RsGUIEventManager.h @@ -1,5 +1,5 @@ /******************************************************************************* - * gui/NotifyQt.h * + * gui/RsGUIEventManager.h * * * * Copyright (c) 2010 Retroshare Team * * * @@ -48,16 +48,16 @@ class SignatureEventData ; struct TurtleFileInfo; struct TurtleGxsInfo; -class NotifyQt: public QObject +class RsGUIEventManager: public QObject { Q_OBJECT public: - static NotifyQt *Create (); - static NotifyQt *getInstance (); + static void Create(); + static RsGUIEventManager *getInstance (); static bool isAllDisable(); 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_askForPluginConfirmation(const std::string& plugin_filename, const RsFileHash& plugin_file_hash,bool first_time); @@ -96,12 +96,12 @@ class NotifyQt: public QObject void runningTick(); private: - NotifyQt(); + RsGUIEventManager(); static void displayDiskSpaceWarning(int loc,int size_limit_mb); static void displayErrorMessage(RsNotifySysFlags type,const QString& title,const QString& error_msg); - static NotifyQt *_instance; + static RsGUIEventManager *_instance; static bool _disableAllToaster; /* system notifications */ diff --git a/retroshare-gui/src/gui/chat/ChatStyle.cpp b/retroshare-gui/src/gui/chat/ChatStyle.cpp index d6e380f40..8eca138ad 100644 --- a/retroshare-gui/src/gui/chat/ChatStyle.cpp +++ b/retroshare-gui/src/gui/chat/ChatStyle.cpp @@ -130,7 +130,7 @@ ChatStyle::ChatStyle() : QObject() { m_styleType = TYPE_UNKNOWN; - connect(NotifyQt::getInstance(), SIGNAL(chatStyleChanged(int)), SLOT(styleChanged(int))); + connect(RsGUIEventManager::getInstance(), SIGNAL(chatStyleChanged(int)), SLOT(styleChanged(int))); } /* Destructor. */ diff --git a/retroshare-gui/src/gui/chat/ChatWidget.cpp b/retroshare-gui/src/gui/chat/ChatWidget.cpp index 651a77376..f278f4400 100644 --- a/retroshare-gui/src/gui/chat/ChatWidget.cpp +++ b/retroshare-gui/src/gui/chat/ChatWidget.cpp @@ -199,7 +199,7 @@ ChatWidget::ChatWidget(QWidget *parent) }, this ); },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))); diff --git a/retroshare-gui/src/gui/gxs/GxsGroupFrameDialog.cpp b/retroshare-gui/src/gui/gxs/GxsGroupFrameDialog.cpp index da745b122..750d714ed 100644 --- a/retroshare-gui/src/gui/gxs/GxsGroupFrameDialog.cpp +++ b/retroshare-gui/src/gui/gxs/GxsGroupFrameDialog.cpp @@ -173,7 +173,7 @@ void GxsGroupFrameDialog::initUi() processSettings(true); if (groupFrameSettingsType() != GroupFrameSettings::Nothing) { - connect(NotifyQt::getInstance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged())); + connect(RsGUIEventManager::getInstance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged())); settingsChanged(); } diff --git a/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.cpp b/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.cpp index 13a189fb1..a95b42b15 100644 --- a/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.cpp +++ b/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.cpp @@ -446,7 +446,7 @@ GxsChannelPostsWidgetWithModel::GxsChannelPostsWidgetWithModel(const RsGxsGroupI /* Connect signals */ connect(ui->postButton, SIGNAL(clicked()), this, SLOT(createMsg())); 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")); diff --git a/retroshare-gui/src/gui/settings/AppearancePage.cpp b/retroshare-gui/src/gui/settings/AppearancePage.cpp index 2aecd6024..e9e32af47 100755 --- a/retroshare-gui/src/gui/settings/AppearancePage.cpp +++ b/retroshare-gui/src/gui/settings/AppearancePage.cpp @@ -173,7 +173,7 @@ void AppearancePage::updateRbtPageOnToolBar() ui.cmboTollButtonsStyle->show(); } - NotifyQt::getInstance()->notifySettingsChanged(); + RsGUIEventManager::getInstance()->notifySettingsChanged(); } void AppearancePage::updateStatusToolTip() { MainWindow::getInstance()->toggleStatusToolTip(ui.checkBoxDisableSysTrayToolTip->isChecked()); } @@ -194,7 +194,7 @@ void AppearancePage::updateCmboToolButtonStyle() default: Settings->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); } - NotifyQt::getInstance()->notifySettingsChanged(); + RsGUIEventManager::getInstance()->notifySettingsChanged(); } void AppearancePage::updateCmboToolButtonSize() @@ -226,7 +226,7 @@ void AppearancePage::updateCmboToolButtonSize() Settings->setToolButtonSize(128); Settings->setListItemIconSize(128); } - NotifyQt::getInstance()->notifySettingsChanged(); + RsGUIEventManager::getInstance()->notifySettingsChanged(); } // void AppearancePage::updateCmboListItemSize() // { @@ -369,5 +369,5 @@ void AppearancePage::updateFontSize() { Settings->setFontSize(ui.minimumFontSize_SB->value()); - NotifyQt::getInstance()->notifySettingsChanged(); + RsGUIEventManager::getInstance()->notifySettingsChanged(); } diff --git a/retroshare-gui/src/gui/settings/ChatPage.cpp b/retroshare-gui/src/gui/settings/ChatPage.cpp index ed551aa10..a319d4b6c 100644 --- a/retroshare-gui/src/gui/settings/ChatPage.cpp +++ b/retroshare-gui/src/gui/settings/ChatPage.cpp @@ -126,7 +126,7 @@ void ChatPage::updateFontsAndEmotes() void ChatPage::updateChatParams() { Settings->setChatScreenFont(fontTempChat.toString()); - NotifyQt::getInstance()->notifyChatFontChanged(); + RsGUIEventManager::getInstance()->notifyChatFontChanged(); Settings->setChatSendMessageWithCtrlReturn(ui.sendMessageWithCtrlReturn->isChecked()); Settings->setChatSendAsPlainTextByDef(ui.sendAsPlainTextByDef->isChecked()); @@ -186,7 +186,7 @@ void ChatPage::updatePublicStyle() if (publicStylePath != info.stylePath || publicStyleVariant != 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()) { 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()) { Settings->setHistoryChatStyle(info.stylePath, ui.historyComboBoxVariant->currentText()); - NotifyQt::getInstance()->notifyChatStyleChanged(ChatStyle::TYPE_HISTORY); + RsGUIEventManager::getInstance()->notifyChatStyleChanged(ChatStyle::TYPE_HISTORY); } } diff --git a/retroshare-gui/src/gui/settings/GroupFrameSettingsWidget.cpp b/retroshare-gui/src/gui/settings/GroupFrameSettingsWidget.cpp index 6bf4c1886..c3aadbf3a 100644 --- a/retroshare-gui/src/gui/settings/GroupFrameSettingsWidget.cpp +++ b/retroshare-gui/src/gui/settings/GroupFrameSettingsWidget.cpp @@ -78,6 +78,6 @@ void GroupFrameSettingsWidget::saveSettings() Settings->setGroupFrameSettings(mType, groupFrameSettings); - NotifyQt::getInstance()->notifySettingsChanged(); + RsGUIEventManager::getInstance()->notifySettingsChanged(); } } diff --git a/retroshare-gui/src/gui/settings/MessagePage.cpp b/retroshare-gui/src/gui/settings/MessagePage.cpp index 0f11ef109..283be7bef 100644 --- a/retroshare-gui/src/gui/settings/MessagePage.cpp +++ b/retroshare-gui/src/gui/settings/MessagePage.cpp @@ -311,5 +311,5 @@ void MessagePage::updateFontSize() { Settings->setMessageFontSize(ui.minimumFontSize->currentData().toInt()); - NotifyQt::getInstance()->notifySettingsChanged(); + RsGUIEventManager::getInstance()->notifySettingsChanged(); } diff --git a/retroshare-gui/src/gui/settings/NotifyPage.cpp b/retroshare-gui/src/gui/settings/NotifyPage.cpp index 23408181d..ba37d1f82 100755 --- a/retroshare-gui/src/gui/settings/NotifyPage.cpp +++ b/retroshare-gui/src/gui/settings/NotifyPage.cpp @@ -44,8 +44,8 @@ NotifyPage::NotifyPage(QWidget * parent, Qt::WindowFlags flags) connect(ui.testFeedButton, SIGNAL(clicked()), this, SLOT(testFeed())); connect(ui.testToasterButton, SIGNAL(clicked()), this, SLOT(testToaster())); - connect(ui.pushButtonDisableAll,SIGNAL(toggled(bool)), NotifyQt::getInstance(), SLOT(SetDisableAll(bool))); - connect(NotifyQt::getInstance(),SIGNAL(disableAllChanged(bool)), ui.pushButtonDisableAll, SLOT(setChecked(bool))); + connect(ui.pushButtonDisableAll,SIGNAL(toggled(bool)), RsGUIEventManager::getInstance(), SLOT(SetDisableAll(bool))); + connect(RsGUIEventManager::getInstance(),SIGNAL(disableAllChanged(bool)), ui.pushButtonDisableAll, SLOT(setChecked(bool))); ui.notify_Blogs->hide(); @@ -325,7 +325,7 @@ void NotifyPage::load() whileBlocking(ui.systray_GroupChat)->setChecked(Settings->getDisplayTrayGroupChat()); whileBlocking(ui.systray_ChatLobby)->setChecked(Settings->getDisplayTrayChatLobby()); - whileBlocking(ui.pushButtonDisableAll)->setChecked(NotifyQt::isAllDisable()); + whileBlocking(ui.pushButtonDisableAll)->setChecked(RsGUIEventManager::isAllDisable()); RshareSettings::enumToasterPosition toasterPosition = Settings->getToasterPosition(); ui.comboBoxToasterPosition->clear(); @@ -412,16 +412,16 @@ void NotifyPage::testToaster() { RshareSettings::enumToasterPosition pos = (RshareSettings::enumToasterPosition) ui.comboBoxToasterPosition->itemData(ui.comboBoxToasterPosition->currentIndex()).toInt(); QPoint margin = QPoint(ui.spinBoxToasterXMargin->value(), ui.spinBoxToasterYMargin->value()); - NotifyQt::getInstance()->testToasters(getNotifyFlags(), pos, margin); + RsGUIEventManager::getInstance()->testToasters(getNotifyFlags(), pos, margin); /* notify of plugins */ QList::iterator toasterNotifyIt; for (toasterNotifyIt = mToasterNotifySettingList.begin(); toasterNotifyIt != mToasterNotifySettingList.end(); ++toasterNotifyIt) { if (toasterNotifyIt->mEnabledCheckBox->isChecked()){ if (toasterNotifyIt->mEnabledCheckBox->accessibleName().isEmpty()){ - NotifyQt::getInstance()->testToaster(toasterNotifyIt->mToasterNotify, pos, margin) ; + RsGUIEventManager::getInstance()->testToaster(toasterNotifyIt->mToasterNotify, pos, margin) ; } else { - NotifyQt::getInstance()->testToaster(toasterNotifyIt->mEnabledCheckBox->accessibleName(), toasterNotifyIt->mToasterNotify, pos, margin) ; + RsGUIEventManager::getInstance()->testToaster(toasterNotifyIt->mEnabledCheckBox->accessibleName(), toasterNotifyIt->mToasterNotify, pos, margin) ; } } } diff --git a/retroshare-gui/src/gui/settings/rsettingswin.cpp b/retroshare-gui/src/gui/settings/rsettingswin.cpp index a9fab8895..b0e5064ff 100644 --- a/retroshare-gui/src/gui/settings/rsettingswin.cpp +++ b/retroshare-gui/src/gui/settings/rsettingswin.cpp @@ -238,6 +238,6 @@ void SettingsPage::notifySettingsChanged() /* call to RsIface save function.... */ //rsicontrol -> ConfigSave(); - if (NotifyQt::getInstance()) - NotifyQt::getInstance()->notifySettingsChanged(); + if (RsGUIEventManager::getInstance()) + RsGUIEventManager::getInstance()->notifySettingsChanged(); } diff --git a/retroshare-gui/src/gui/statusbar/ToasterDisable.cpp b/retroshare-gui/src/gui/statusbar/ToasterDisable.cpp index a304f8721..d92b58220 100644 --- a/retroshare-gui/src/gui/statusbar/ToasterDisable.cpp +++ b/retroshare-gui/src/gui/statusbar/ToasterDisable.cpp @@ -47,11 +47,11 @@ ToasterDisable::ToasterDisable(QWidget *parent) setLayout(hbox); - bool isDisable = NotifyQt::isAllDisable(); + bool isDisable = RsGUIEventManager::isAllDisable(); imageButton->setChecked(isDisable); - connect(NotifyQt::getInstance(), SIGNAL(disableAllChanged(bool)), this, SLOT(disable(bool))); - connect(imageButton, SIGNAL(toggled(bool)), NotifyQt::getInstance(), SLOT(SetDisableAll(bool))); + connect(RsGUIEventManager::getInstance(), SIGNAL(disableAllChanged(bool)), this, SLOT(disable(bool))); + connect(imageButton, SIGNAL(toggled(bool)), RsGUIEventManager::getInstance(), SLOT(SetDisableAll(bool))); disable(isDisable); } diff --git a/retroshare-gui/src/main.cpp b/retroshare-gui/src/main.cpp index 0aec1cd2a..130b32775 100644 --- a/retroshare-gui/src/main.cpp +++ b/retroshare-gui/src/main.cpp @@ -346,7 +346,7 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO); // RsControl::earlyInitNotificationSystem() ; - NotifyQt *notify = NotifyQt::Create(); + RsGUIEventManager::Create(); //rsNotify->registerNotifyClient(notify); /* RetroShare Core Objects */ diff --git a/retroshare-gui/src/util/FontSizeHandler.cpp b/retroshare-gui/src/util/FontSizeHandler.cpp index c184da0de..0dc153e60 100644 --- a/retroshare-gui/src/util/FontSizeHandler.cpp +++ b/retroshare-gui/src/util/FontSizeHandler.cpp @@ -71,7 +71,7 @@ public: data.callback = callback; 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); }); @@ -93,7 +93,7 @@ public: data.callback = callback; 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); });