[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:20:44 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=460c4e9
The following commit has been merged in the master branch:
commit 460c4e9fd1551326b14e30a7fe93e30a2f24843a
Author: David Edmundson <kde at davidedmundson.co.uk>
Date: Sat Jan 21 01:12:47 2012 +0000
Fix date picker
---
logviewer/log-viewer.cpp | 23 +++++++++++++++++------
logviewer/log-viewer.h | 5 +++++
2 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/logviewer/log-viewer.cpp b/logviewer/log-viewer.cpp
index 8f973c5..e235dd4 100644
--- a/logviewer/log-viewer.cpp
+++ b/logviewer/log-viewer.cpp
@@ -34,6 +34,7 @@ LogViewer::LogViewer(QWidget *parent) :
connect(m_accountManager->becomeReady(), SIGNAL(finished(Tp::PendingOperation*)), SLOT(onAccountManagerReady()));
connect(ui->entityList, SIGNAL(activated(QModelIndex)), SLOT(onEntitySelected(QModelIndex)));
+ connect(ui->datePicker, SIGNAL(dateChanged(QDate)), SLOT(onDateSelected()));
}
LogViewer::~LogViewer()
@@ -50,15 +51,25 @@ void LogViewer::onAccountManagerReady()
void LogViewer::onEntitySelected(const QModelIndex &index)
{
- //calendar needs to get pendingDates
- Tpl::EntityPtr entity = index.data(EntityModel::EntityRole).value<Tpl::EntityPtr>();
- Tp::AccountPtr account = index.data(EntityModel::AccountRole).value<Tp::AccountPtr>();
- ui->messageView->loadLog(account, entity, QDate::currentDate());
+ //TODO, update calendar needs to get pendingDates
- //main view needs to show pendingEvents
+ updateMainView();
}
void LogViewer::onDateSelected()
{
- //update main view
+ updateMainView();
+}
+
+void LogViewer::updateMainView()
+{
+ QModelIndex currentIndex = ui->entityList->currentIndex();
+
+ if (!currentIndex.isValid()) {
+ return;
+ }
+
+ Tpl::EntityPtr entity = currentIndex.data(EntityModel::EntityRole).value<Tpl::EntityPtr>();
+ Tp::AccountPtr account = currentIndex.data(EntityModel::AccountRole).value<Tp::AccountPtr>();
+ ui->messageView->loadLog(account, entity, ui->datePicker->date());
}
diff --git a/logviewer/log-viewer.h b/logviewer/log-viewer.h
index 06d39af..cd65393 100644
--- a/logviewer/log-viewer.h
+++ b/logviewer/log-viewer.h
@@ -23,7 +23,12 @@ private Q_SLOTS:
void onEntitySelected(const QModelIndex &index);
void onDateSelected();
+ void updateMainView();
+
+
private:
+
+
Ui::LogViewer *ui;
Tp::AccountManagerPtr m_accountManager;
EntityModel *m_entityModel;
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list