1
/* ============================================================
2
* File : digikamcameraclient.cpp
3
* Author: Renchi Raju <renchi@pooh.tam.uiuc.edu>
7
* Copyright 2003 by Renchi Raju
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)
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.
20
* ============================================================ */
22
#include <kapplication.h>
25
#include "digikamcameraclient.h"
27
#include "cameratype.h"
30
DigikamCameraClient::DigikamCameraClient()
32
DCOPObject("DigikamCameraClient")
37
DigikamCameraClient::~DigikamCameraClient()
42
ASYNC DigikamCameraClient::cameraOpen(QString libraryPath, QString downloadAlbum,
43
QString title, QString model,
44
QString port, QString path)
46
if (mCurrentUI) return;
48
// Make sure to ref the app so that we don't
49
// exit when camerui kmainwindow derefs at exit
52
CameraType ctype(title, model, port, path);
53
CameraUI *cameraUI = new CameraUI(libraryPath, downloadAlbum, ctype);
54
connect(cameraUI, SIGNAL(signalFinished()),
55
this, SLOT(slotCameraUIFinished()));
59
mCurrentUI = cameraUI;
62
ASYNC DigikamCameraClient::cameraConnect()
64
if (!mCurrentUI) return;
66
mCurrentUI->connectCamera();
69
ASYNC DigikamCameraClient::cameraChangeLibraryPath(QString libraryPath)
71
if (!mCurrentUI) return;
73
mCurrentUI->changeLibraryPath(libraryPath);
76
ASYNC DigikamCameraClient::cameraChangeDownloadAlbum(QString album)
78
if (!mCurrentUI) return;
80
mCurrentUI->changeDownloadAlbum(album);
83
ASYNC DigikamCameraClient::cameraDownloadSelected()
85
if (!mCurrentUI) return;
87
mCurrentUI->downloadSelected();
90
void DigikamCameraClient::close()
100
void DigikamCameraClient::slotCameraUIFinished()