syncthingtray/fileitemactionplugin/syncthingdiractions.h
Martchus 975e86c895 Allow backend libraries to be used from other projects
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.
2021-01-25 19:48:11 +01:00

38 lines
1.1 KiB
C++

#ifndef SYNCTHINGDIRACTIONS_H
#define SYNCTHINGDIRACTIONS_H
#include <syncthingconnector/syncthingdir.h>
#include "./syncthinginfoaction.h"
class SyncthingFileItemActionStaticData;
/*!
* \brief The SyncthingDirActions class provides the read-only directory info actions.
*/
class SyncthingDirActions : public QObject {
Q_OBJECT
friend QList<QAction *> &operator<<(QList<QAction *> &, SyncthingDirActions &);
public:
explicit SyncthingDirActions(const Data::SyncthingDir &dir, const SyncthingFileItemActionStaticData *data = nullptr, QObject *parent = nullptr);
public Q_SLOTS:
void updateStatus(const std::vector<Data::SyncthingDir> &dirs);
bool updateStatus(const Data::SyncthingDir &dir);
private:
QString m_dirId;
QAction m_infoAction;
SyncthingInfoAction m_statusAction;
SyncthingInfoAction m_globalStatusAction;
SyncthingInfoAction m_localStatusAction;
SyncthingInfoAction m_lastScanAction;
SyncthingInfoAction m_rescanIntervalAction;
SyncthingInfoAction m_errorsAction;
};
QList<QAction *> &operator<<(QList<QAction *> &actions, SyncthingDirActions &dirActions);
#endif // SYNCTHINGDIRACTIONS_H