Martchus
975e86c895
So far the backend libraries' include paths were relative within this repository. This means the header files could not be used at their installed location. This change replaces them with "<>" includes to fix that problem and adds a new include directory so building everything at once still works. With this change it should be easier to actually split some parts into another repository if this one would become too big.
34 lines
934 B
C++
34 lines
934 B
C++
#include "./syncthingstatusselectionmodel.h"
|
|
|
|
#include <syncthingconnector/syncthingconnection.h>
|
|
|
|
using namespace QtUtilities;
|
|
|
|
namespace Data {
|
|
|
|
inline static ChecklistItem itemFor(SyncthingStatus status)
|
|
{
|
|
return ChecklistItem(static_cast<int>(status), QString(), Qt::Unchecked);
|
|
}
|
|
|
|
SyncthingStatusSelectionModel::SyncthingStatusSelectionModel(QObject *parent)
|
|
: ChecklistModel(parent)
|
|
{
|
|
setItems({
|
|
itemFor(SyncthingStatus::Disconnected),
|
|
itemFor(SyncthingStatus::Reconnecting),
|
|
itemFor(SyncthingStatus::Idle),
|
|
itemFor(SyncthingStatus::Scanning),
|
|
itemFor(SyncthingStatus::Paused),
|
|
itemFor(SyncthingStatus::Synchronizing),
|
|
itemFor(SyncthingStatus::RemoteNotInSync),
|
|
});
|
|
}
|
|
|
|
QString SyncthingStatusSelectionModel::labelForId(const QVariant &id) const
|
|
{
|
|
return SyncthingConnection::statusText(static_cast<SyncthingStatus>(id.toInt()));
|
|
}
|
|
|
|
} // namespace Data
|