[meego] Context menu
BIN
binary/kaktus_0.0.1_armel.deb
Normal file
11
kaktus.desktop
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Name=kaktus
|
||||
Exec=/opt/kaktus/bin/kaktus
|
||||
Icon=kaktus64
|
||||
X-Window-Icon=
|
||||
X-HildonDesk-ShowInToolbar=true
|
||||
X-Osso-Type=application/x-executable
|
||||
81
kaktus.pro
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
TARGET = kaktus
|
||||
|
||||
QT += core network sql
|
||||
|
||||
CONFIG += qdeclarative-boostable
|
||||
|
||||
contains(MEEGO_EDITION, harmattan) {
|
||||
DEFINES += MEEGO_EDITION_HARMATTAN
|
||||
}
|
||||
|
||||
#DEFINES += ONLINE_CHECK
|
||||
DEFINES += MEEGO_EDITION_HARMATTAN
|
||||
|
||||
symbian {
|
||||
TARGET.UID3 = 0xE7EAC7DC
|
||||
TARGET.CAPABILITY += NetworkServices
|
||||
CONFIG += qt-components
|
||||
DEPLOYMENT.display_name = "Kaktus"
|
||||
VERSION = 1.0.0
|
||||
ICON = kaktus.svg
|
||||
}
|
||||
|
||||
SOURCES += \
|
||||
src/main.cpp \
|
||||
src/utils.cpp \
|
||||
src/tabmodel.cpp \
|
||||
src/netvibesfetcher.cpp \
|
||||
src/listmodel.cpp \
|
||||
src/feedmodel.cpp \
|
||||
src/entrymodel.cpp \
|
||||
src/downloadmanager.cpp \
|
||||
src/databasemanager.cpp \
|
||||
src/dashboardmodel.cpp \
|
||||
src/cacheserver.cpp \
|
||||
src/settings.cpp \
|
||||
src/simplecrypt.cpp
|
||||
|
||||
HEADERS += \
|
||||
src/utils.h \
|
||||
src/tabmodel.h \
|
||||
src/netvibesfetcher.h \
|
||||
src/listmodel.h \
|
||||
src/feedmodel.h \
|
||||
src/entrymodel.h \
|
||||
src/downloadmanager.h \
|
||||
src/databasemanager.h \
|
||||
src/dashboardmodel.h \
|
||||
src/cacheserver.h \
|
||||
src/settings.h \
|
||||
src/simplecrypt.h \
|
||||
key.h
|
||||
|
||||
#QJson if Qt < 5
|
||||
lessThan(QT_MAJOR_VERSION, 5) {
|
||||
include(./QJson/json.pri)
|
||||
}
|
||||
|
||||
# QHttpServer
|
||||
include(qhttpserver/qhttpserver.pri)
|
||||
|
||||
folder_01.source = qml/harmattan
|
||||
folder_01.target = qml
|
||||
DEPLOYMENTFOLDERS = folder_01
|
||||
|
||||
include(qmlapplicationviewer/qmlapplicationviewer.pri)
|
||||
qtcAddDeployment()
|
||||
|
||||
OTHER_FILES += \
|
||||
qtc_packaging/debian_harmattan/changelog \
|
||||
i18n_paths.lst \
|
||||
i18n_ts.lst \
|
||||
lupdate.sh \
|
||||
i18n/kaktus_en.ts \
|
||||
i18n/kaktus_pl.ts
|
||||
|
||||
CODECFORTR = UTF-8
|
||||
|
||||
TRANSLATIONS = i18n/kaktus_en.ts \
|
||||
i18n/kaktus_pl.ts
|
||||
|
||||
RESOURCES += resources.qrc
|
||||
1566
kaktus.svg
Normal file
|
After Width: | Height: | Size: 67 KiB |
BIN
kaktus64.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
kaktus80.png
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
11
kaktus_harmattan.desktop
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Name=Kaktus
|
||||
Exec=/usr/bin/invoker --type=d -s /opt/kaktus/bin/kaktus
|
||||
Icon=/usr/share/icons/hicolor/80x80/apps/kaktus80.png
|
||||
X-Window-Icon=
|
||||
X-HildonDesk-ShowInToolbar=true
|
||||
X-Osso-Type=application/x-executable
|
||||
|
|
@ -70,10 +70,7 @@ Page {
|
|||
cached: model.cached
|
||||
feedindex: root.index
|
||||
|
||||
onHolded: {
|
||||
console.log("holded");
|
||||
menu.open();
|
||||
}
|
||||
onHolded: contextMenu.open()
|
||||
|
||||
onClicked: {
|
||||
|
||||
|
|
@ -120,6 +117,42 @@ Page {
|
|||
});
|
||||
}
|
||||
|
||||
Dialog {
|
||||
id: contextMenu
|
||||
buttons: Column {
|
||||
spacing: UiConstants.DefaultMargin
|
||||
|
||||
Button {
|
||||
text: readlater ? qsTr("Unsave") : qsTr("Save")
|
||||
onClicked: {
|
||||
if (readlater) {
|
||||
entryModel.setData(index, "readlater", 0);
|
||||
} else {
|
||||
entryModel.setData(index, "readlater", 1);
|
||||
}
|
||||
contextMenu.accept()
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
text: read ? qsTr("Mark as unread") : qsTr("Mark as read")
|
||||
onClicked: {
|
||||
if (read) {
|
||||
entryModel.setData(index, "read", 0);
|
||||
feedModel.incrementUnread(feedindex);
|
||||
} else {
|
||||
entryModel.setData(index, "read", 1);
|
||||
feedModel.decrementUnread(feedindex);
|
||||
/*if (lblMoreDetails.visible)
|
||||
root.expanded = false;*/
|
||||
}
|
||||
tabModel.updateFlags();
|
||||
contextMenu.accept()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ViewPlaceholder {
|
||||
|
|
@ -128,17 +161,5 @@ Page {
|
|||
}
|
||||
}
|
||||
|
||||
SelectionDialog {
|
||||
id: menu
|
||||
titleText: "Dialog Header #1"
|
||||
selectedIndex: 1
|
||||
|
||||
model: ListModel {
|
||||
ListElement { name: "ListTitle #1" }
|
||||
ListElement { name: "ListTitle #2" }
|
||||
ListElement { name: "ListTitle #3" }
|
||||
}
|
||||
}
|
||||
|
||||
ScrollDecorator { flickableItem: listView }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,6 +70,8 @@ Page {
|
|||
pageStack.push(Qt.resolvedUrl("EntryPage.qml"),{"title": title, "index": model.index});
|
||||
}
|
||||
|
||||
onHolded: contextMenu.open()
|
||||
|
||||
Connections {
|
||||
target: settings
|
||||
onShowTabIconsChanged: {
|
||||
|
|
@ -87,6 +89,35 @@ Page {
|
|||
iconSource = "";
|
||||
}
|
||||
}
|
||||
|
||||
Dialog {
|
||||
id: contextMenu
|
||||
buttons: Column {
|
||||
spacing: UiConstants.DefaultMargin
|
||||
|
||||
Button {
|
||||
text: qsTr("Mark all as read")
|
||||
enabled: model.unread!=0
|
||||
visible: enabled
|
||||
onClicked: {
|
||||
feedModel.markAllAsRead(model.index);
|
||||
tabModel.updateFlags();
|
||||
contextMenu.accept();
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
text: qsTr("Mark all as unread")
|
||||
enabled: model.read!=0
|
||||
visible: enabled
|
||||
onClicked: {
|
||||
feedModel.markAllAsUnread(model.index);
|
||||
tabModel.updateFlags();
|
||||
contextMenu.accept();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ViewPlaceholder {
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ Item {
|
|||
id: listItem
|
||||
|
||||
signal clicked
|
||||
signal holded
|
||||
property alias pressed: mouseArea.pressed
|
||||
|
||||
property int titleSize: UI.LIST_TILE_SIZE
|
||||
|
|
@ -156,9 +157,8 @@ Item {
|
|||
MouseArea {
|
||||
id: mouseArea;
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
listItem.clicked();
|
||||
}
|
||||
onClicked: listItem.clicked()
|
||||
onPressAndHold: listItem.holded()
|
||||
}
|
||||
|
||||
Image {
|
||||
|
|
|
|||
|
|
@ -85,6 +85,8 @@ Page {
|
|||
}
|
||||
}
|
||||
|
||||
onHolded: !readlaterItem ? contextMenu.open() : {}
|
||||
|
||||
Connections {
|
||||
target: settings
|
||||
onShowTabIconsChanged: {
|
||||
|
|
@ -105,6 +107,33 @@ Page {
|
|||
iconSource = "";
|
||||
}
|
||||
}
|
||||
|
||||
Dialog {
|
||||
id: contextMenu
|
||||
buttons: Column {
|
||||
spacing: UiConstants.DefaultMargin
|
||||
|
||||
Button {
|
||||
text: qsTr("Mark all as read")
|
||||
enabled: model.unread!=0
|
||||
visible: enabled
|
||||
onClicked: {
|
||||
tabModel.markAllAsRead(model.index);
|
||||
contextMenu.accept();
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
text: qsTr("Mark all as unread")
|
||||
enabled: model.read!=0
|
||||
visible: enabled
|
||||
onClicked: {
|
||||
tabModel.markAllAsUnread(model.index);
|
||||
contextMenu.accept();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 16 KiB |