summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-07-29 20:59:54 (GMT)
committerKevin Smith <kevin.smith@isode.com>2016-08-09 20:15:12 (GMT)
commit42defb3516a8b7f06c7b0fbc832332a4e60c0f86 (patch)
treeb833bc3cf0166947da16345be511b71dcb04baca /Swift/Controllers/Roster/ContactRosterItem.h
parent3c7b2b3dc884f347771f6e3036779193e7e45627 (diff)
downloadswift-42defb3516a8b7f06c7b0fbc832332a4e60c0f86.zip
swift-42defb3516a8b7f06c7b0fbc832332a4e60c0f86.tar.bz2
Enable better date formatting in the UI
This adds the ability to provide more specific date formatting via the Translator interface. The default translator will use Boost's formatting capabilities. The QtTranslator use more localized and better readable formatting. Test-Information: Tested with Qt 5.5.1 on OS X 10.11.6. Checked that tooltips and presence text in new chat views show the new formatting. Change-Id: I90ff5ab8b31fb41f2dcbea2c40b8846c534c355f
Diffstat (limited to 'Swift/Controllers/Roster/ContactRosterItem.h')
-rw-r--r--Swift/Controllers/Roster/ContactRosterItem.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/Swift/Controllers/Roster/ContactRosterItem.h b/Swift/Controllers/Roster/ContactRosterItem.h
index 2ffec09..37c3840 100644
--- a/Swift/Controllers/Roster/ContactRosterItem.h
+++ b/Swift/Controllers/Roster/ContactRosterItem.h
@@ -17,7 +17,6 @@
#include <boost/signals2.hpp>
#include <Swiften/Elements/MUCOccupant.h>
-#include <Swiften/Elements/Presence.h>
#include <Swiften/Elements/StatusShow.h>
#include <Swiften/Elements/VCard.h>
#include <Swiften/JID/JID.h>
@@ -27,6 +26,8 @@
namespace Swift {
class GroupRosterItem;
+class Presence;
+
class ContactRosterItem : public RosterItem {
public:
enum Feature {
@@ -49,7 +50,9 @@ class ContactRosterItem : public RosterItem {
StatusShow::Type getSimplifiedStatusShow() const;
std::string getStatusText() const;
std::string getIdleText() const;
+ boost::posix_time::ptime getIdle() const;
std::string getOfflineSinceText() const;
+ boost::posix_time::ptime getOfflineSince() const;
void setAvatarPath(const boost::filesystem::path& path);
const boost::filesystem::path& getAvatarPath() const;
const JID& getJID() const;
@@ -82,7 +85,6 @@ class ContactRosterItem : public RosterItem {
private:
JID jid_;
JID displayJID_;
- boost::posix_time::ptime lastAvailableTime_;
boost::filesystem::path avatarPath_;
std::shared_ptr<Presence> presence_;
std::vector<std::string> groups_;