Debian Codegraph @

src/gui/captureHandler/ICaptureTabStateHandler.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2020 Damir Porobic <[email protected]>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
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 //KSNIP_ICAPTURETABSTATEHANDLER_H