~ubuntu-branches/ubuntu/feisty/digikam/feisty

« back to all changes in this revision

Viewing changes to digikamcameraclient/cameraui/gpcontroller.h

  • Committer: Bazaar Package Importer
  • Author(s): Achim Bohnet
  • Date: 2005-03-10 02:39:02 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050310023902-023nymfst5mg696c
Tags: 0.7.2-2
* debian/TODO: clean
* digikam manpage: better --detect-camera description

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* ============================================================
2
 
 * File  : gpcontroller.h
3
 
 * Author: Renchi Raju <renchi@pooh.tam.uiuc.edu>
4
 
 * Date  : 2003-01-22
5
 
 * Description : 
6
 
 * 
7
 
 * Copyright 2003 by Renchi Raju
8
 
 
9
 
 * This program is free software; you can redistribute it
10
 
 * and/or modify it under the terms of the GNU General
11
 
 * Public License as published bythe Free Software Foundation;
12
 
 * either version 2, or (at your option)
13
 
 * any later version.
14
 
 * 
15
 
 * This program is distributed in the hope that it will be useful,
16
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 
 * GNU General Public License for more details.
19
 
 * 
20
 
 * ============================================================ */
21
 
 
22
 
#ifndef GPCONTROLLER_H
23
 
#define GPCONTROLLER_H
24
 
 
25
 
#include <qobject.h>
26
 
#include <qthread.h>
27
 
#include <qmutex.h>
28
 
 
29
 
#include "mtqueue.h"
30
 
#include "gpcommand.h"
31
 
#include "cameratype.h"
32
 
 
33
 
class QString;
34
 
class QImage;
35
 
class GPCamera;
36
 
class ThumbnailSize;
37
 
 
38
 
class GPController : public QObject, public QThread
39
 
{
40
 
    Q_OBJECT
41
 
 
42
 
public:
43
 
 
44
 
    GPController(QObject *parent, const CameraType& ctype);
45
 
    ~GPController();
46
 
 
47
 
    void requestInitialize();
48
 
    void requestGetSubFolders(const QString& folder);
49
 
    void requestMakeFolder(const QString& folder,
50
 
                           const QString& newFolder);
51
 
    void requestDeleteFolder(const QString& folder);
52
 
    void requestGetItemsInfo(const QString& folder);
53
 
    void requestGetAllItemsInfo(const QString& folder);
54
 
    void requestGetThumbnail(const QString& folder,
55
 
                             const QString& imageName,
56
 
                             const ThumbnailSize& thumbSize);
57
 
    void requestDownloadItem(const QString& folder,
58
 
                             const QString& itemName,
59
 
                             const QString& saveFile);
60
 
    void requestDeleteItem(const QString& folder,
61
 
                           const QString& itemName);
62
 
    void requestDeleteAllItems(const QString& rootFolder);
63
 
    void requestUploadItem(const QString& folder,
64
 
                           const QString& localFile,
65
 
                           const QString& uploadName);
66
 
    void requestOpenItem(const QString& folder,
67
 
                         const QString& itemName,
68
 
                         const QString& saveFile);
69
 
    void requestOpenItemWithService(const QString& folder,
70
 
                                    const QString& itemName,
71
 
                                    const QString& saveFile,
72
 
                                    const QString& serviceName);
73
 
    void requestExifInfo(const QString& folder,
74
 
                         const QString& itemName);
75
 
    void cancel();
76
 
    void getInformation(QString& summary, QString& manual,
77
 
                        QString& about);
78
 
    
79
 
 
80
 
protected:
81
 
 
82
 
    void run();
83
 
 
84
 
private:
85
 
 
86
 
    void initialize();
87
 
    void getSubFolders(const QString& folder);
88
 
    void makeFolder(const QString& folder,
89
 
                    const QString& newFolder);
90
 
    void deleteFolder(const QString& folder);
91
 
    void getItemsInfo(const QString& folder);
92
 
    void getAllItemsInfo(const QString& folder);
93
 
    void getThumbnail(const QString& folder,
94
 
                      const QString& imageName,
95
 
                      const ThumbnailSize& thumbSize);
96
 
    void downloadItem(const QString& folder,
97
 
                      const QString& itemName,
98
 
                      const QString& saveFile);
99
 
    void deleteItem(const QString& folder,
100
 
                    const QString& itemName);
101
 
    void deleteAllItems(const QString& rootFolder);
102
 
    void uploadItem(const QString& folder,
103
 
                    const QString& uploadName,
104
 
                    const QString& localFile);
105
 
    void openItem(const QString& folder,
106
 
                  const QString& itemName,
107
 
                  const QString& saveFile);
108
 
    void openItemWithService(const QString& folder,
109
 
                             const QString& itemName,
110
 
                             const QString& saveFile,
111
 
                             const QString& serviceName);
112
 
    void exifInfo(const QString& folder,
113
 
                  const QString& itemName);
114
 
    void error(const QString& errorMsg);
115
 
 
116
 
    void scaleHighlightThumbnail(QImage& thumbnail,
117
 
                                 const ThumbnailSize& thumbSize);
118
 
    void showBusy(bool val);
119
 
    
120
 
 
121
 
    QObject  *parent_;
122
 
    GPCamera *camera_;
123
 
    QMutex    mutex_;
124
 
    MTQueue<GPCommand> cmdQueue_;
125
 
    bool      close_;
126
 
 
127
 
private slots:
128
 
 
129
 
    void slotStatusMsg(const QString& msg);
130
 
    void slotProgressVal(int val);
131
 
    void slotErrorMsg(const QString& msg);
132
 
    
133
 
};
134
 
 
135
 
#endif /* GPCONTROLLER_H */