[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdepim] kontact/plugins/knotes: Return note list
From: Montel Laurent <montel () kde ! org>
Date: 2013-10-31 21:21:42
Message-ID: E1VbzgU-0003xM-Cu () scm ! kde ! org
[Download RAW message or body]
Git commit e0c2dd21172e71b1e0e806d6a859db623059b231 by Montel Laurent.
Committed on 31/10/2013 at 21:21.
Pushed by mlaurent into branch 'master'.
Return note list
M +12 -0 kontact/plugins/knotes/knotes_part.cpp
M +1 -0 kontact/plugins/knotes/knotes_part.h
M +3 -0 kontact/plugins/knotes/org.kde.kontact.KNotes.xml
http://commits.kde.org/kdepim/e0c2dd21172e71b1e0e806d6a859db623059b231
diff --git a/kontact/plugins/knotes/knotes_part.cpp \
b/kontact/plugins/knotes/knotes_part.cpp index e727152..ac141c6 100644
--- a/kontact/plugins/knotes/knotes_part.cpp
+++ b/kontact/plugins/knotes/knotes_part.cpp
@@ -216,6 +216,18 @@ KNotesPart::~KNotesPart()
mNoteTip = 0;
}
+QStringList KNotesPart::notesList() const
+{
+ QStringList notes;
+
+ QHashIterator<QString, KNotesIconViewItem*> i(mNoteList);
+ while ( i.hasNext() ) {
+ i.next();
+ notes.append(i.value()->journal()->uid());
+ }
+ return notes;
+}
+
void KNotesPart::requestToolTip( const QModelIndex &index )
{
const QRect m_itemRect = mNotesWidget->notesView()->visualRect( index );
diff --git a/kontact/plugins/knotes/knotes_part.h \
b/kontact/plugins/knotes/knotes_part.h index b92c934..e3d3ddb 100644
--- a/kontact/plugins/knotes/knotes_part.h
+++ b/kontact/plugins/knotes/knotes_part.h
@@ -60,6 +60,7 @@ public slots:
QString newNote( const QString &name = QString(),
const QString &text = QString() );
QString newNoteFromClipboard( const QString &name = QString() );
+ QStringList notesList() const;
public:
void killNote( const QString &id );
diff --git a/kontact/plugins/knotes/org.kde.kontact.KNotes.xml \
b/kontact/plugins/knotes/org.kde.kontact.KNotes.xml index 3380c4d..53326ae 100644
--- a/kontact/plugins/knotes/org.kde.kontact.KNotes.xml
+++ b/kontact/plugins/knotes/org.kde.kontact.KNotes.xml
@@ -38,5 +38,8 @@
<arg name="id" type="s" direction="in"/>
<arg type="s" direction="out"/>
</method>
+ <method name="notesList">
+ <arg type="as" direction="out"/>
+ </method>
</interface>
</node>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic