mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-07-17 16:24:23 -04:00
Use Qt signals to process configuration name changes
This change maintains the encapsulation of the MultiSettings class by using a signal to notify clients of changes to the current configuration name. Modifications to the MainWindow class to display the current configuration name in the status bar, if it is not "Default", based on MultiSettings events rather than polling for changes. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7257 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#ifndef MULTISETTINGS_HPP__
|
||||
#define MULTISETTINGS_HPP__
|
||||
|
||||
#include <QObject>
|
||||
#include <QVariant>
|
||||
|
||||
#include "pimpl_h.hpp"
|
||||
@@ -59,7 +60,10 @@ class QString;
|
||||
//
|
||||
|
||||
class MultiSettings
|
||||
: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MultiSettings ();
|
||||
MultiSettings (MultiSettings const&) = delete;
|
||||
@@ -86,6 +90,9 @@ public:
|
||||
// again.
|
||||
bool exit ();
|
||||
|
||||
// emitted when the name of the current configuration changes
|
||||
Q_SIGNAL void configurationNameChanged (QString const& name) const;
|
||||
|
||||
private:
|
||||
class impl;
|
||||
pimpl<impl> m_;
|
||||
|
||||
Reference in New Issue
Block a user