Changeset View
Changeset View
Standalone View
Standalone View
plugins/dockers/recorder/recorderdocker_dock.h
- This file was added.
| 1 | /* | ||||
|---|---|---|---|---|---|
| 2 | * Copyright (c) 2009 Cyrille Berger <cberger@cberger.net> | ||||
| 3 | * | ||||
| 4 | * This library is free software; you can redistribute it and/or modify | ||||
| 5 | * it under the terms of the GNU Lesser General Public License as published by | ||||
| 6 | * the Free Software Foundation; version 2.1 of the License. | ||||
| 7 | * | ||||
| 8 | * This library is distributed in the hope that it will be useful, | ||||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
| 11 | * GNU Lesser General Public License for more details. | ||||
| 12 | * | ||||
| 13 | * You should have received a copy of the GNU Lesser General Public License | ||||
| 14 | * along with this program; if not, write to the Free Software | ||||
| 15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
| 16 | */ | ||||
| 17 | | ||||
| 18 | #ifndef _RECORDER_DOCK_H_ | ||||
| 19 | #define _RECORDER_DOCK_H_ | ||||
| 20 | | ||||
| 21 | #include <QPointer> | ||||
| 22 | #include <QDockWidget> | ||||
| 23 | #include <KoCanvasObserverBase.h> | ||||
| 24 | #include <QPushButton> | ||||
| 25 | #include <QLineEdit> | ||||
| 26 | #include <QGridLayout> | ||||
| 27 | #include <QLabel> | ||||
| 28 | #include <QSpacerItem> | ||||
| 29 | #include <kis_canvas2.h> | ||||
| 30 | #include "kis_idle_watcher.h" | ||||
| 31 | #include "encoder.h" | ||||
| 32 | | ||||
| 33 | class QVBoxLayout; | ||||
| 34 | class RecorderWidget; | ||||
| 35 | | ||||
| 36 | class RecorderDockerDock : public QDockWidget, public KoCanvasObserverBase { | ||||
| 37 | Q_OBJECT | ||||
| 38 | public: | ||||
| 39 | RecorderDockerDock(); | ||||
| 40 | QString observerName() override { return "RecorderDockerDock"; } | ||||
| 41 | void setCanvas(KoCanvasBase *canvas) override; | ||||
| 42 | void unsetCanvas() override; | ||||
| 43 | | ||||
| 44 | private: | ||||
| 45 | QGridLayout *m_layout; | ||||
| 46 | QPointer<KisCanvas2> m_recordingCanvas; | ||||
| 47 | QString m_recordPath; | ||||
| 48 | | ||||
| 49 | QPointer<KisCanvas2> m_canvas; | ||||
| 50 | QLabel *m_recordDirectoryLabel; | ||||
| 51 | QLineEdit *m_recordDirectoryLineEdit; | ||||
| 52 | QPushButton *m_recordDirectoryPushButton; | ||||
| 53 | QLabel *m_imageNameLabel; | ||||
| 54 | QLineEdit *m_imageNameLineEdit; | ||||
| 55 | QPushButton *m_recordToggleButton; | ||||
| 56 | QSpacerItem *m_spacer; | ||||
| 57 | QLabel *m_logLabel; | ||||
| 58 | QLineEdit *m_logLineEdit; | ||||
| 59 | KisIdleWatcher m_imageIdleWatcher; | ||||
| 60 | QMutex m_saveMutex; | ||||
| 61 | QMutex m_eventMutex; | ||||
| 62 | Encoder *m_encoder; | ||||
| 63 | | ||||
| 64 | bool m_recordEnabled; | ||||
| 65 | int m_recordCounter; | ||||
| 66 | void enableRecord(bool &enabled, const QString &path); | ||||
| 67 | | ||||
| 68 | private Q_SLOTS: | ||||
| 69 | void onRecordButtonToggled(bool enabled); | ||||
| 70 | void onSelectRecordFolderButtonClicked(); | ||||
| 71 | void startUpdateCanvasProjection(); | ||||
| 72 | void generateThumbnail(); | ||||
| 73 | }; | ||||
| 74 | | ||||
| 75 | | ||||
| 76 | #endif | ||||