#include "bufferinfo.h"
+INIT_SYNCABLE_OBJECT(BufferViewConfig)
BufferViewConfig::BufferViewConfig(int bufferViewId, QObject *parent)
: SyncableObject(parent),
_bufferViewId(bufferViewId),
return;
_bufferViewName = bufferViewName;
+ SYNC(ARG(bufferViewName))
emit bufferViewNameSet(bufferViewName);
}
return;
_networkId = networkId;
+ SYNC(ARG(networkId))
emit networkIdSet(networkId);
+ emit configChanged();
}
void BufferViewConfig::setAddNewBuffersAutomatically(bool addNewBuffersAutomatically) {
return;
_addNewBuffersAutomatically = addNewBuffersAutomatically;
- emit addNewBuffersAutomaticallySet(addNewBuffersAutomatically);
+ SYNC(ARG(addNewBuffersAutomatically))
+ emit configChanged();
}
void BufferViewConfig::setSortAlphabetically(bool sortAlphabetically) {
return;
_sortAlphabetically = sortAlphabetically;
- emit sortAlphabeticallySet(sortAlphabetically);
+ SYNC(ARG(sortAlphabetically))
+ emit configChanged();
}
void BufferViewConfig::setDisableDecoration(bool disableDecoration) {
return;
_disableDecoration = disableDecoration;
- emit disableDecorationSet(disableDecoration);
+ SYNC(ARG(disableDecoration))
}
void BufferViewConfig::setAllowedBufferTypes(int bufferTypes) {
return;
_allowedBufferTypes = bufferTypes;
- emit allowedBufferTypesSet(bufferTypes);
+ SYNC(ARG(bufferTypes))
+ emit configChanged();
}
void BufferViewConfig::setMinimumActivity(int activity) {
return;
_minimumActivity = activity;
- emit minimumActivitySet(activity);
+ SYNC(ARG(activity))
+ emit configChanged();
}
void BufferViewConfig::setHideInactiveBuffers(bool hideInactiveBuffers) {
return;
_hideInactiveBuffers = hideInactiveBuffers;
- emit hideInactiveBuffersSet(hideInactiveBuffers);
+ SYNC(ARG(hideInactiveBuffers))
+ emit configChanged();
}
QVariantList BufferViewConfig::initBufferList() const {
_buffers << buffer.value<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
}
void BufferViewConfig::initSetBufferList(const QList<BufferId> &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 {
_temporarilyRemovedBuffers.remove(bufferId);
_buffers.insert(pos, bufferId);
+ SYNC(ARG(bufferId), ARG(pos))
emit bufferAdded(bufferId, pos);
+ emit configChanged();
}
void BufferViewConfig::moveBuffer(const BufferId &bufferId, int pos) {
pos = _buffers.count() - 1;
_buffers.move(_buffers.indexOf(bufferId), pos);
+ SYNC(ARG(bufferId), ARG(pos))
emit bufferMoved(bufferId, pos);
+ emit configChanged();
}
void BufferViewConfig::removeBuffer(const BufferId &bufferId) {
_removedBuffers.remove(bufferId);
_temporarilyRemovedBuffers << bufferId;
-
+ SYNC(ARG(bufferId))
emit bufferRemoved(bufferId);
+ emit configChanged();
}
void BufferViewConfig::removeBufferPermanently(const BufferId &bufferId) {
_removedBuffers << bufferId;
+ SYNC(ARG(bufferId))
emit bufferPermanentlyRemoved(bufferId);
+ emit configChanged();
}