Commit 718e4ad2 authored by Camilo higuita's avatar Camilo higuita

add same contextual actions to cloud image gallery

parent b82ad9db
......@@ -213,7 +213,7 @@ bool DBActions::addAlbum(const QString &album)
QVariantMap albumMap
{
{FMH::MODEL_NAME[FMH::MODEL_KEY::ALBUM], album},
{FMH::MODEL_NAME[FMH::MODEL_KEY::DATE], QDateTime::currentDateTime()}
{FMH::MODEL_NAME[FMH::MODEL_KEY::ADDDATE], QDateTime::currentDateTime()}
};
if(this->insert(PIX::TABLEMAP[PIX::TABLE::ALBUMS], albumMap))
......@@ -233,7 +233,7 @@ bool DBActions::picAlbum(const QString &album, const QString &url)
{
{FMH::MODEL_NAME[FMH::MODEL_KEY::URL], url},
{FMH::MODEL_NAME[FMH::MODEL_KEY::ALBUM], album},
{FMH::MODEL_NAME[FMH::MODEL_KEY::DATE], QDateTime::currentDateTime()}
{FMH::MODEL_NAME[FMH::MODEL_KEY::ADDDATE], QDateTime::currentDateTime()}
};
return this->insert(PIX::TABLEMAP[PIX::TABLE::IMAGES_ALBUMS], albumPic);
}
......
......@@ -127,6 +127,7 @@ bool Albums::insert(const QVariantMap &pic)
return true;
}
qDebug()<< "COUDLDNT ADD ALBUM" << album;
return false;
}
......@@ -152,7 +153,7 @@ bool Albums::remove(const int &index)
void Albums::insertPic(const QString &album, const QString &url)
{
this->insert({{FMH::MODEL_NAME[FMH::MODEL_KEY::ALBUM], album}});
//this->insert({{FMH::MODEL_NAME[FMH::MODEL_KEY::ALBUM], album}});
this->dba->picAlbum(album, url);
}
......@@ -32,6 +32,7 @@ Maui.Dialog
placeholderText: qsTr("New album...")
onAccepted:
{
console.log("CREATING ALBUM", albumText.text)
albumsView.addAlbum(albumText.text)
_albumsList.currentIndex = _albumsList.count-1
clear()
......
......@@ -73,13 +73,13 @@ PixGrid
onPressAndHold:
{
control.grid.currentIndex = index
control.menu.popup()
_picMenu.popup()
}
onRightClicked:
{
control.grid.currentIndex = index
control.menu.popup()
_picMenu.popup()
}
onEmblemClicked:
{
......@@ -105,6 +105,12 @@ PixGrid
grid.model: _cloudModel
PixMenu
{
id: _picMenu
index: control.grid.currentIndex
}
// property alias list : _cloudList
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment