equal
deleted
inserted
replaced
46 */ |
46 */ |
47 void save(CxeImageDataItem* data); |
47 void save(CxeImageDataItem* data); |
48 |
48 |
49 public slots: |
49 public slots: |
50 void handleVideoSaved(CxeError::Id status, const QString& filename); |
50 void handleVideoSaved(CxeError::Id status, const QString& filename); |
51 void handleSnapshotReady(CxeError::Id status, const QPixmap& snapshot, const QString& filename); |
51 void handleSnapshotReady(CxeError::Id status, const QImage& snapshot, const QString& filename); |
52 void handleSnapshotReady(CxeError::Id status, const QPixmap& snapshot, int id); |
52 void handleSnapshotReady(CxeError::Id status, const QImage& snapshot, int id); |
53 |
|
54 |
53 |
55 protected slots: |
54 protected slots: |
56 void handleFileHarvested(CxeError::Id status, const QString& filename); |
55 void handleFileHarvested(CxeError::Id status, const QString& filename); |
57 |
56 |
58 protected: |
57 protected: |
65 * Functions called from this method are running in "saving thread" |
64 * Functions called from this method are running in "saving thread" |
66 */ |
65 */ |
67 void run(); |
66 void run(); |
68 void read(); |
67 void read(); |
69 void saveNow(); |
68 void saveNow(); |
70 void harvestFile(const QString& filename); |
69 void harvestFile(const QString& filename, bool addLocation); |
71 |
70 |
72 private: // data shared between the threads |
71 private: // data shared between the threads |
73 |
72 |
74 bool mExitThread; |
73 bool mExitThread; |
75 QQueue<CxeImageDataItem*> mQueue; |
74 QQueue<CxeImageDataItem*> mQueue; |
76 |
75 |
77 mutable QMutex mMutex; |
76 mutable QMutex mMutex; |
78 QWaitCondition mDataToSave; |
77 QWaitCondition mDataToSave; |
79 |
78 |
80 mutable QMutex mSnapshotsMutex; |
79 mutable QMutex mSnapshotsMutex; |
81 QHash<QString, QPixmap> mSnapshots; |
80 QHash<QString, QImage> mSnapshots; |
82 |
81 |
83 protected: // thread only used data |
82 protected: // thread only used data |
84 int mCount; |
83 int mCount; |
85 int mActiveHarvests; |
84 int mActiveHarvests; |
86 bool mExit; |
85 bool mExit; |