3 Copyright (C) 2001 The Kompany
4 2002-2003 Ilya Konstantinov <kde-devel@future.shiny.co.il>
5 2002-2003 Marcus Meissner <marcus@jet.franken.de>
6 2003 Nadeem Hasan <nhasan@nadmm.com>
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28 #include <KPluginFactory>
35 class KameraDeviceSelectDialog
;
38 class KActionCollection
;
42 class KKameraConfig
: public KCModule
45 friend class KameraDeviceSelectDialog
;
48 KKameraConfig(QWidget
*parent
, const QVariantList
&);
49 virtual ~KKameraConfig();
51 // KCModule interface methods
56 QString
quickHelp() const;
59 QString
suggestName(const QString
&name
);
62 void slot_deviceMenu(Q3IconViewItem
*item
, const QPoint
&point
);
63 void slot_deviceSelected(Q3IconViewItem
*item
);
64 void slot_addCamera();
65 void slot_removeCamera();
66 void slot_configureCamera();
67 void slot_cameraSummary();
68 void slot_testCamera();
69 void slot_cancelOperation();
70 void slot_error(const QString
&message
);
71 void slot_error(const QString
&message
, const QString
&details
);
74 void displayGPFailureDialogue(void);
75 void displayGPSuccessDialogue(void);
76 void displayCameraAbilities(const CameraAbilities
&abilities
);
77 void populateDeviceListView(void);
78 void beforeCameraOperation(void);
79 void afterCameraOperation(void);
82 static void cbGPIdle(GPContext
*context
, void *data
);
83 static GPContextFeedback
cbGPCancel(GPContext
*context
, void *data
);
86 typedef QMap
<QString
, KCamera
*> CameraDevicesMap
;
89 CameraDevicesMap m_devices
;
95 // widgets for the cameras listview
96 K3IconView
*m_deviceSel
;
97 KActionCollection
*m_actions
;
98 QPushButton
*m_addCamera
, *m_removeCamera
, *m_testCamera
, *m_configureCamera
;
100 KMenu
*m_devicePopup
;
102 // true if libgphoto2 was initialised successfully in
104 bool m_gpInitialised
;
106 static KKameraConfig
*m_instance
;