| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
#ifndef KSNIP_ICAPTURETABSTATEHANDLER_H |
| 21 |
#define KSNIP_ICAPTURETABSTATEHANDLER_H |
| 22 |
|
| 23 |
#include <QObject> |
| 24 |
|
| 25 |
struct SaveResultDto; |
| 26 |
struct RenameResultDto; |
| 27 |
|
| 28 |
class ICaptureTabStateHandler : public QObject |
| 29 |
{ |
| 30 |
Q_OBJECT |
| 31 |
public: |
| 32 |
explicit ICaptureTabStateHandler() = default; |
| 33 |
~ICaptureTabStateHandler() override = default; |
| 34 |
virtual void add(int index, const QString &filename, const QString &path, bool isSaved) = 0; |
| 35 |
virtual bool isSaved(int index) = 0; |
| 36 |
virtual bool isPathValid(int index) = 0; |
| 37 |
virtual QString path(int index) = 0; |
| 38 |
virtual QString filename(int index) = 0; |
| 39 |
virtual void setSaveState(int index, const SaveResultDto &saveResult) = 0; |
| 40 |
virtual void renameFile(int index, const RenameResultDto &renameResult) = 0; |
| 41 |
virtual int count() const = 0; |
| 42 |
virtual int currentTabIndex() const = 0; |
| 43 |
|
| 44 |
signals: |
| 45 |
void updateTabInfo(int index, const QString &title, const QString &toolTip); |
| 46 |
|
| 47 |
public slots: |
| 48 |
virtual void tabMoved(int fromIndex, int toIndex) = 0; |
| 49 |
virtual void currentTabChanged(int index) = 0; |
| 50 |
virtual void tabRemoved(int index) = 0; |
| 51 |
virtual void currentTabContentChanged() = 0; |
| 52 |
}; |
| 53 |
|
| 54 |
#endif |