X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fbufferviewconfig.cpp;fp=src%2Fcommon%2Fbufferviewconfig.cpp;h=14e4d044fbbc356a9904c7e71ade8b01e2fe5f61;hp=0ec0348ba4c8d8f63471239446a22aa8a33a998d;hb=f6b9eeda207d42c99fc3e9085631722cf2ec83dc;hpb=2a00e8f57d66d9913a10c30408b89676a74010a1 diff --git a/src/common/bufferviewconfig.cpp b/src/common/bufferviewconfig.cpp index 0ec0348b..14e4d044 100644 --- a/src/common/bufferviewconfig.cpp +++ b/src/common/bufferviewconfig.cpp @@ -22,6 +22,7 @@ #include "bufferinfo.h" +INIT_SYNCABLE_OBJECT(BufferViewConfig) BufferViewConfig::BufferViewConfig(int bufferViewId, QObject *parent) : SyncableObject(parent), _bufferViewId(bufferViewId), @@ -48,6 +49,7 @@ void BufferViewConfig::setBufferViewName(const QString &bufferViewName) { return; _bufferViewName = bufferViewName; + SYNC(ARG(bufferViewName)) emit bufferViewNameSet(bufferViewName); } @@ -56,7 +58,9 @@ void BufferViewConfig::setNetworkId(const NetworkId &networkId) { return; _networkId = networkId; + SYNC(ARG(networkId)) emit networkIdSet(networkId); + emit configChanged(); } void BufferViewConfig::setAddNewBuffersAutomatically(bool addNewBuffersAutomatically) { @@ -64,7 +68,8 @@ void BufferViewConfig::setAddNewBuffersAutomatically(bool addNewBuffersAutomatic return; _addNewBuffersAutomatically = addNewBuffersAutomatically; - emit addNewBuffersAutomaticallySet(addNewBuffersAutomatically); + SYNC(ARG(addNewBuffersAutomatically)) + emit configChanged(); } void BufferViewConfig::setSortAlphabetically(bool sortAlphabetically) { @@ -72,7 +77,8 @@ void BufferViewConfig::setSortAlphabetically(bool sortAlphabetically) { return; _sortAlphabetically = sortAlphabetically; - emit sortAlphabeticallySet(sortAlphabetically); + SYNC(ARG(sortAlphabetically)) + emit configChanged(); } void BufferViewConfig::setDisableDecoration(bool disableDecoration) { @@ -80,7 +86,7 @@ void BufferViewConfig::setDisableDecoration(bool disableDecoration) { return; _disableDecoration = disableDecoration; - emit disableDecorationSet(disableDecoration); + SYNC(ARG(disableDecoration)) } void BufferViewConfig::setAllowedBufferTypes(int bufferTypes) { @@ -88,7 +94,8 @@ void BufferViewConfig::setAllowedBufferTypes(int bufferTypes) { return; _allowedBufferTypes = bufferTypes; - emit allowedBufferTypesSet(bufferTypes); + SYNC(ARG(bufferTypes)) + emit configChanged(); } void BufferViewConfig::setMinimumActivity(int activity) { @@ -96,7 +103,8 @@ void BufferViewConfig::setMinimumActivity(int activity) { return; _minimumActivity = activity; - emit minimumActivitySet(activity); + SYNC(ARG(activity)) + emit configChanged(); } void BufferViewConfig::setHideInactiveBuffers(bool hideInactiveBuffers) { @@ -104,7 +112,8 @@ void BufferViewConfig::setHideInactiveBuffers(bool hideInactiveBuffers) { return; _hideInactiveBuffers = hideInactiveBuffers; - emit hideInactiveBuffersSet(hideInactiveBuffers); + SYNC(ARG(hideInactiveBuffers)) + emit configChanged(); } QVariantList BufferViewConfig::initBufferList() const { @@ -124,8 +133,7 @@ void BufferViewConfig::initSetBufferList(const QVariantList &buffers) { _buffers << buffer.value(); } - // normaly initSeters don't need an emit. this one is to track changes in the settingspage - emit bufferListSet(); + emit configChanged(); // used to track changes in the settingspage } void BufferViewConfig::initSetBufferList(const QList &buffers) { @@ -135,8 +143,7 @@ void BufferViewConfig::initSetBufferList(const QList &buffers) { _buffers << bufferId; } - // normaly initSeters don't need an emit. this one is to track changes in the settingspage - emit bufferListSet(); + emit configChanged(); // used to track changes in the settingspage } QVariantList BufferViewConfig::initRemovedBuffers() const { @@ -192,6 +199,7 @@ void BufferViewConfig::addBuffer(const BufferId &bufferId, int pos) { _buffers.insert(pos, bufferId); emit bufferAdded(bufferId, pos); + emit configChanged(); } void BufferViewConfig::moveBuffer(const BufferId &bufferId, int pos) { @@ -205,6 +213,7 @@ void BufferViewConfig::moveBuffer(const BufferId &bufferId, int pos) { _buffers.move(_buffers.indexOf(bufferId), pos); emit bufferMoved(bufferId, pos); + emit configChanged(); } void BufferViewConfig::removeBuffer(const BufferId &bufferId) { @@ -217,6 +226,7 @@ void BufferViewConfig::removeBuffer(const BufferId &bufferId) { _temporarilyRemovedBuffers << bufferId; emit bufferRemoved(bufferId); + emit configChanged(); } void BufferViewConfig::removeBufferPermanently(const BufferId &bufferId) { @@ -229,4 +239,5 @@ void BufferViewConfig::removeBufferPermanently(const BufferId &bufferId) { _removedBuffers << bufferId; emit bufferPermanentlyRemoved(bufferId); + emit configChanged(); }