Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
digiKam
Commits
fe9a2d0b
Commit
fe9a2d0b
authored
Aug 10, 2011
by
Gilles Caulier
🗼
Browse files
Fast one click button to Download New items from Camera interface is implemented.
BUGS: 259861
parent
4ad23d15
Changes
4
Hide whitespace changes
Inline
Side-by-side
utilities/cameragui/main/cameraui.cpp
View file @
fe9a2d0b
...
...
@@ -400,7 +400,13 @@ void CameraUI::setupActions()
// -----------------------------------------------------------------
d
->
downloadSelectedAction
=
new
KAction
(
KIcon
(
"computer"
),
i18n
(
"Download Selected"
),
this
);
d
->
downloadNewAction
=
new
KAction
(
KIcon
(
"get-hot-new-stuff"
),
i18n
(
"Download New"
),
this
);
connect
(
d
->
downloadNewAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
slotDownloadNew
()));
actionCollection
()
->
addAction
(
"cameraui_imagedownloadnew"
,
d
->
downloadNewAction
);
// -----------------------------------------------------------------
d
->
downloadSelectedAction
=
new
KAction
(
i18n
(
"Download Selected"
),
this
);
connect
(
d
->
downloadSelectedAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
slotDownloadSelected
()));
actionCollection
()
->
addAction
(
"cameraui_imagedownloadselected"
,
d
->
downloadSelectedAction
);
d
->
downloadSelectedAction
->
setEnabled
(
false
);
...
...
@@ -411,6 +417,12 @@ void CameraUI::setupActions()
connect
(
d
->
downloadAllAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
slotDownloadAll
()));
actionCollection
()
->
addAction
(
"cameraui_imagedownloadall"
,
d
->
downloadAllAction
);
// -------------------------------------------------------------------------
d
->
downloadDelNewAction
=
new
KAction
(
i18n
(
"Download/Delete New"
),
this
);
connect
(
d
->
downloadDelNewAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
slotDownloadAndDeleteNew
()));
actionCollection
()
->
addAction
(
"cameraui_imagedownloaddeletenew"
,
d
->
downloadDelNewAction
);
// -----------------------------------------------------------------
d
->
downloadDelSelectedAction
=
new
KAction
(
i18n
(
"Download/Delete Selected"
),
this
);
...
...
@@ -456,6 +468,12 @@ void CameraUI::setupActions()
connect
(
d
->
deleteAllAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
slotDeleteAll
()));
actionCollection
()
->
addAction
(
"cameraui_imagedeleteall"
,
d
->
deleteAllAction
);
// -------------------------------------------------------------------------
d
->
deleteNewAction
=
new
KAction
(
i18n
(
"Delete New"
),
this
);
connect
(
d
->
deleteNewAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
slotDeleteNew
()));
actionCollection
()
->
addAction
(
"cameraui_imagedeletenew"
,
d
->
deleteNewAction
);
// -- Last Photo First menu actions --------------------------------------------
d
->
lastPhotoFirstAction
=
new
KToggleAction
(
i18n
(
"Show last photo first"
),
this
);
...
...
@@ -960,20 +978,32 @@ void CameraUI::slotBusy(bool val)
// d->renameCustomizer->restoreFocus();
d
->
uploadAction
->
setEnabled
(
d
->
controller
->
cameraUploadSupport
());
d
->
downloadSelectedAction
->
setEnabled
(
true
);
d
->
downloadDelSelectedAction
->
setEnabled
(
d
->
controller
->
cameraDeleteSupport
());
d
->
downloadNewAction
->
setEnabled
(
true
);
d
->
downloadAllAction
->
setEnabled
(
true
);
d
->
downloadDelAllAction
->
setEnabled
(
d
->
controller
->
cameraDeleteSupport
());
d
->
deleteNewAction
->
setEnabled
(
d
->
controller
->
cameraDeleteSupport
());
d
->
deleteSelectedAction
->
setEnabled
(
d
->
controller
->
cameraDeleteSupport
());
d
->
deleteAllAction
->
setEnabled
(
d
->
controller
->
cameraDeleteSupport
());
d
->
selectNewItemsAction
->
setEnabled
(
true
);
d
->
selectAllAction
->
setEnabled
(
true
);
d
->
selectNoneAction
->
setEnabled
(
true
);
d
->
selectInvertAction
->
setEnabled
(
true
);
d
->
selectNewItemsAction
->
setEnabled
(
true
);
d
->
selectLockedItemsAction
->
setEnabled
(
true
);
d
->
selectNoneAction
->
setEnabled
(
true
);
d
->
lockAction
->
setEnabled
(
true
);
d
->
markAsDownloadedAction
->
setEnabled
(
true
);
d
->
cameraInfoAction
->
setEnabled
(
true
);
d
->
cameraCaptureAction
->
setEnabled
(
d
->
controller
->
cameraCaptureImageSupport
());
d
->
imageViewAction
->
setEnabled
(
true
);
// selection-dependent update of lockAction, markAsDownloadedAction,
// downloadSelectedAction, downloadDelSelectedAction, deleteSelectedAction
slotNewSelection
(
d
->
view
->
countSelected
()
>
0
);
slotNewSelection
(
d
->
view
->
countSelected
()
>
0
);
d
->
anim
->
stop
();
d
->
statusProgressBar
->
progressBarMode
(
StatusProgressBar
::
TextMode
,
i18n
(
"Ready"
));
...
...
@@ -1010,17 +1040,23 @@ void CameraUI::slotBusy(bool val)
//d->advBox->setEnabled(false);
d
->
uploadAction
->
setEnabled
(
false
);
d
->
downloadSelectedAction
->
setEnabled
(
false
);
d
->
downloadDelSelectedAction
->
setEnabled
(
false
);
d
->
downloadNewAction
->
setEnabled
(
false
);
d
->
downloadAllAction
->
setEnabled
(
false
);
d
->
downloadDelAllAction
->
setEnabled
(
false
);
d
->
deleteNewAction
->
setEnabled
(
false
);
d
->
deleteSelectedAction
->
setEnabled
(
false
);
d
->
deleteAllAction
->
setEnabled
(
false
);
d
->
selectNewItemsAction
->
setEnabled
(
false
);
d
->
selectAllAction
->
setEnabled
(
false
);
d
->
selectNoneAction
->
setEnabled
(
false
);
d
->
selectInvertAction
->
setEnabled
(
false
);
d
->
selectNewItemsAction
->
setEnabled
(
false
);
d
->
selectLockedItemsAction
->
setEnabled
(
false
);
d
->
selectNoneAction
->
setEnabled
(
false
);
d
->
lockAction
->
setEnabled
(
false
);
d
->
markAsDownloadedAction
->
setEnabled
(
false
);
d
->
cameraInfoAction
->
setEnabled
(
false
);
...
...
@@ -1414,6 +1450,18 @@ void CameraUI::slotUploaded(const CamItemInfo& itemInfo)
refreshFreeSpace
();
}
void
CameraUI
::
slotDownloadNew
()
{
d
->
view
->
slotSelectNew
();
QTimer
::
singleShot
(
0
,
this
,
SLOT
(
slotDownloadSelected
()));
}
void
CameraUI
::
slotDownloadAndDeleteNew
()
{
d
->
view
->
slotSelectNew
();
QTimer
::
singleShot
(
0
,
this
,
SLOT
(
slotDownloadAndDeleteSelected
()));
}
void
CameraUI
::
slotDownloadSelected
()
{
slotDownload
(
true
,
false
);
...
...
@@ -1465,7 +1513,7 @@ void CameraUI::slotDownload(bool onlySelected, bool deleteAfter, Album* album)
if
(
pa
)
{
CollectionLocation
cl
=
CollectionManager
::
instance
()
->
locationForAlbumRootId
(
pa
->
albumRootId
());
if
(
!
cl
.
isAvailable
()
||
!
cl
.
isNull
())
if
(
!
cl
.
isAvailable
()
||
cl
.
isNull
())
{
KMessageBox
::
information
(
this
,
i18n
(
"Collection which host your default target album set to process "
"download from camera device is not available. Please select another one from "
...
...
@@ -1917,6 +1965,12 @@ void CameraUI::deleteItems(bool onlySelected, bool onlyDownloaded)
}
}
void
CameraUI
::
slotDeleteNew
()
{
d
->
view
->
slotSelectNew
();
QTimer
::
singleShot
(
0
,
this
,
SLOT
(
slotDeleteSelected
()));
}
void
CameraUI
::
slotDeleteSelected
()
{
deleteItems
(
true
,
false
);
...
...
utilities/cameragui/main/cameraui.h
View file @
fe9a2d0b
...
...
@@ -151,12 +151,19 @@ private Q_SLOTS:
void
slotUpload
();
void
slotUploadItems
(
const
KUrl
::
List
&
);
void
slotDownloadNew
();
void
slotDownloadSelected
();
void
slotDownloadAll
();
void
slotDownloadAndDeleteNew
();
void
slotDownloadAndDeleteSelected
();
void
slotDownloadAndDeleteAll
();
void
slotDeleteNew
();
void
slotDeleteSelected
();
void
slotDownloadAndDeleteSelected
();
void
slotDeleteAll
();
void
slotToggleLock
();
void
slotMarkAsDownloaded
();
...
...
utilities/cameragui/main/cameraui.rc
View file @
fe9a2d0b
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<gui
version=
"20
1
"
name=
"cameraui"
>
<gui
version=
"20
5
"
name=
"cameraui"
>
<MenuBar>
...
...
@@ -25,12 +25,15 @@
<Menu
name=
"Image"
><text>
&
Image
</text>
<Action
name=
"cameraui_imageview"
/>
<Separator
/>
<Action
name=
"cameraui_imagedownloadnew"
/>
<Action
name=
"cameraui_imagedownloadselected"
/>
<Action
name=
"cameraui_imagedownloadall"
/>
<Separator
/>
<Action
name=
"cameraui_imagedownloaddeletenew"
/>
<Action
name=
"cameraui_imagedownloaddeleteselected"
/>
<Action
name=
"cameraui_imagedownloaddeleteall"
/>
<Separator
/>
<Action
name=
"cameraui_imagedeletenew"
/>
<Action
name=
"cameraui_imagedeleteselected"
/>
<Action
name=
"cameraui_imagedeleteall"
/>
<Separator
/>
...
...
@@ -79,7 +82,7 @@
<Action
name=
"cameraui_cancelprocess"
/>
<Separator/>
<Action
name=
"cameraui_imageview"
/>
<Action
name=
"cameraui_imagedownload
selected
"
/>
<Action
name=
"cameraui_imagedownload
new
"
/>
<Action
name=
"cameraui_imageupload"
/>
<Action
name=
"cameraui_imagelock"
/>
<Separator/>
...
...
utilities/cameragui/main/cameraui_p.h
View file @
fe9a2d0b
...
...
@@ -100,12 +100,15 @@ public:
cameraCaptureAction
(
0
),
cameraInfoAction
(
0
),
decreaseThumbsAction
(
0
),
deleteNewAction
(
0
),
deleteAllAction
(
0
),
deleteSelectedAction
(
0
),
downloadNewAction
(
0
),
downloadAllAction
(
0
),
downloadSelectedAction
(
0
),
downloadDelNewAction
(
0
),
downloadDelAllAction
(
0
),
downloadDelSelectedAction
(
0
),
downloadSelectedAction
(
0
),
fullScreenAction
(
0
),
imageViewAction
(
0
),
increaseThumbsAction
(
0
),
...
...
@@ -183,12 +186,15 @@ public:
KAction
*
cameraCaptureAction
;
KAction
*
cameraInfoAction
;
KAction
*
decreaseThumbsAction
;
KAction
*
deleteNewAction
;
KAction
*
deleteAllAction
;
KAction
*
deleteSelectedAction
;
KAction
*
downloadNewAction
;
KAction
*
downloadAllAction
;
KAction
*
downloadSelectedAction
;
KAction
*
downloadDelNewAction
;
KAction
*
downloadDelAllAction
;
KAction
*
downloadDelSelectedAction
;
KAction
*
downloadSelectedAction
;
KAction
*
fullScreenAction
;
KAction
*
imageViewAction
;
KAction
*
increaseThumbsAction
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment