[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdepim] agents/followupreminderagent: improve++
From:       Montel Laurent <montel () kde ! org>
Date:       2014-07-07 21:12:03
Message-ID: E1X4GCh-00076t-Qm () scm ! kde ! org
[Download RAW message or body]

Git commit bb9864450cd14d707f7bff068387140386e840b4 by Montel Laurent.
Committed on 07/07/2014 at 21:11.
Pushed by mlaurent into branch 'master'.

improve++

M  +3    -1    agents/followupreminderagent/followupreminderagent.cpp
M  +22   -0    agents/followupreminderagent/followupreminderinfowidget.cpp
M  +16   -0    agents/followupreminderagent/followupreminderinfowidget.h

http://commits.kde.org/kdepim/bb9864450cd14d707f7bff068387140386e840b4

diff --git a/agents/followupreminderagent/followupreminderagent.cpp \
b/agents/followupreminderagent/followupreminderagent.cpp index 9e5d38d..b14187d \
                100644
--- a/agents/followupreminderagent/followupreminderagent.cpp
+++ b/agents/followupreminderagent/followupreminderagent.cpp
@@ -66,6 +66,9 @@ void FollowUpReminderAgent::setEnableAgent(bool enabled)
     FollowUpReminderAgentSettings::self()->writeConfig();
     if (enabled) {
         mManager->load();
+        mTimer->start();
+    } else {
+        mTimer->stop();
     }
 }
 
@@ -117,4 +120,3 @@ void FollowUpReminderAgent::reload()
 
 AKONADI_AGENT_MAIN( FollowUpReminderAgent )
 
-#include "followupreminderagent.moc"
diff --git a/agents/followupreminderagent/followupreminderinfowidget.cpp \
b/agents/followupreminderagent/followupreminderinfowidget.cpp index 3e606a8..2f51786 \
                100644
--- a/agents/followupreminderagent/followupreminderinfowidget.cpp
+++ b/agents/followupreminderagent/followupreminderinfowidget.cpp
@@ -25,6 +25,28 @@
 #include <kmenu.h>
 #include <KLocalizedString>
 
+FollowUpReminderInfoItem::FollowUpReminderInfoItem(QTreeWidget *parent)
+    : QTreeWidgetItem(parent),
+      mInfo(0)
+{
+}
+
+FollowUpReminderInfoItem::~FollowUpReminderInfoItem()
+{
+    delete mInfo;
+}
+
+void FollowUpReminderInfoItem::setInfo(FollowUpReminder::FollowUpReminderInfo *info)
+{
+    mInfo = info;
+}
+
+FollowUpReminder::FollowUpReminderInfo* FollowUpReminderInfoItem::info() const
+{
+    return mInfo;
+}
+
+
 FollowUpReminderInfoWidget::FollowUpReminderInfoWidget(QWidget *parent)
     : QWidget(parent)
 {
diff --git a/agents/followupreminderagent/followupreminderinfowidget.h \
b/agents/followupreminderagent/followupreminderinfowidget.h index 9ed02c8..cdc5961 \
                100644
--- a/agents/followupreminderagent/followupreminderinfowidget.h
+++ b/agents/followupreminderagent/followupreminderinfowidget.h
@@ -20,10 +20,26 @@
 
 #include <QWidget>
 #include <KConfigGroup>
+#include <QTreeWidgetItem>
 class QTreeWidget;
 namespace FollowUpReminder {
 class FollowUpReminderInfo;
 }
+
+class FollowUpReminderInfoItem : public QTreeWidgetItem
+{
+public:
+    explicit FollowUpReminderInfoItem(QTreeWidget *parent = 0);
+    ~FollowUpReminderInfoItem();
+
+    void setInfo(FollowUpReminder::FollowUpReminderInfo *info);
+    FollowUpReminder::FollowUpReminderInfo *info() const;
+
+private:
+    FollowUpReminder::FollowUpReminderInfo *mInfo;
+};
+
+
 class FollowUpReminderInfoWidget : public QWidget
 {
     Q_OBJECT


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic