diff options
author | Robin Burchell <robin.burchell@jollamobile.com> | 2014-01-21 10:19:09 +0100 |
---|---|---|
committer | Robin Burchell <robin+qt@viroteck.net> | 2014-01-23 19:52:39 +0100 |
commit | 1d48985c25e4dbf700d65da5761dc2859b5c6cfc (patch) | |
tree | 409dcb064982bab3cf8cf04f005a680437fb1966 /examples/qtmail | |
parent | 8fd59a4d2f87c76dbd85d05cf81b96a4566ccc8c (diff) |
Make qmfutil a Qt module: QmfWidgets.
I'm not totally clear how useful this thing actually is, but instead of
bastardising it across a few examples/projects, let's promote it to a module and
avoid that black magic.
Change-Id: I4d34961bc30e01455274afdd344286f4e5cfd25a
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'examples/qtmail')
45 files changed, 4 insertions, 5793 deletions
diff --git a/examples/qtmail/app/app.pro b/examples/qtmail/app/app.pro index f5175249..af916a51 100644 --- a/examples/qtmail/app/app.pro +++ b/examples/qtmail/app/app.pro @@ -1,24 +1,11 @@ TEMPLATE = app TARGET = qtmail5 -QT += widgets qmfclient qmfclient-private qmfmessageserver # TODO: example linking against private headers is bad -macx:contains(QT_CONFIG, qt_framework) { - LIBS += -framework qmfutil5 -} else { - LIBS += -lqmfutil5 -} +# TODO: example linking against private headers is bad +QT += widgets qmfclient qmfclient-private qmfmessageserver qmfwidgets target.path += $$QMF_INSTALL_ROOT/bin -INCLUDEPATH += \ - ../libs/qmfutil \ - -LIBS += \ - -L../libs/qmfutil/build - -macx:LIBS += \ - -F../libs/qmfutil/build - HEADERS += emailclient.h \ messagelistview.h \ searchview.h \ diff --git a/examples/qtmail/libs/qmfutil/emailfoldermodel.cpp b/examples/qtmail/libs/qmfutil/emailfoldermodel.cpp deleted file mode 100644 index 1b037e24..00000000 --- a/examples/qtmail/libs/qmfutil/emailfoldermodel.cpp +++ /dev/null @@ -1,521 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Messaging Framework. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "emailfoldermodel.h" -#include <qmailmessageset.h> -#include <qmailaccount.h> -#include <qmailstore.h> -#include "qtmailnamespace.h" - -/* EmailStandardFolderMessageSet */ - -EmailStandardFolderMessageSet::EmailStandardFolderMessageSet(QMailMessageSetContainer *container, QMailFolder::StandardFolder folderType, const QString &name) - : QMailFilterMessageSet(container, contentKey(folderType), name), - _type(folderType) -{ -} - -QMailFolder::StandardFolder EmailStandardFolderMessageSet::standardFolderType() const -{ - return _type; -} - -QMailMessageKey EmailStandardFolderMessageSet::contentKey(QMailFolder::StandardFolder type) -{ - QMailMessageKey key; - - quint64 setMask = 0; - quint64 unsetMask = 0; - - switch (type) { - case QMailFolder::OutboxFolder: - setMask = QMailMessage::Outbox; - unsetMask = QMailMessage::Trash; - break; - - case QMailFolder::DraftsFolder: - setMask = QMailMessage::Draft; - unsetMask = QMailMessage::Trash | QMailMessage::Outbox; - break; - - case QMailFolder::TrashFolder: - setMask = QMailMessage::Trash; - break; - - case QMailFolder::SentFolder: - setMask = QMailMessage::Sent; - unsetMask = QMailMessage::Trash; - break; - - case QMailFolder::JunkFolder: - setMask = QMailMessage::Junk; - unsetMask = QMailMessage::Trash; - break; - - default: - break; - } - - if (setMask) { - key &= QMailMessageKey(QMailMessageKey::status(setMask, QMailDataComparator::Includes)); - } - if (unsetMask) { - key &= QMailMessageKey(QMailMessageKey::status(unsetMask, QMailDataComparator::Excludes)); - } - - if (key.isEmpty()) { - return QMailMessageKey::nonMatchingKey(); - } - - return key; -} - - -/* EmailFolderMessageSet */ - -EmailFolderMessageSet::EmailFolderMessageSet(QMailMessageSetContainer *container, const QMailFolderId &folderId, bool hierarchical) - : QMailFolderMessageSet(container, folderId, hierarchical) -{ -} - -QMailMessageKey EmailFolderMessageSet::messageKey() const -{ - return contentKey(folderId(), false); -} - -QMailMessageKey EmailFolderMessageSet::descendantsMessageKey() const -{ - return contentKey(folderId(), true); -} - -QMailMessageKey EmailFolderMessageSet::contentKey(const QMailFolderId &id, bool descendants) -{ - // Only return email messages from this folder - QMailMessageKey key(QMailFolderMessageSet::contentKey(id, descendants) & QMailMessageKey::messageType(QMailMessage::Email)); - - quint64 exclusions = 0; - - QMailFolder folder(id); - if ((folder.status() & QMailFolder::Trash) == 0) { - exclusions |= QMailMessage::Trash; - } - if ((folder.status() & QMailFolder::Junk) == 0) { - exclusions |= QMailMessage::Junk; - } - - if (exclusions) { - key &= QMailMessageKey::status(exclusions, QMailDataComparator::Excludes); - } - - return key; -} - -void EmailFolderMessageSet::createChild(const QMailFolderId &childId) -{ - // Our child folders should also be email-only - EmailFolderMessageSet *child = new EmailFolderMessageSet(this, childId, hierarchical()); - append(child); -} - - -/* EmailAccountMessageSet */ - -EmailAccountMessageSet::EmailAccountMessageSet(QMailMessageSetContainer *container, const QMailAccountId &accountId) - : QMailAccountMessageSet(container, accountId) -{ -} - -QMailMessageKey EmailAccountMessageSet::messageKey() const -{ - return contentKey(accountId()); -} - -QMailMessageKey EmailAccountMessageSet::descendantsMessageKey() const -{ - // No such concept for accounts - return QMailMessageKey::nonMatchingKey(); -} - -QMailMessageKey EmailAccountMessageSet::contentKey(const QMailAccountId &id) -{ - // Only return incoming messages from this account, and not Trash messages - return (QMailAccountMessageSet::contentKey(id, false) & - QMailMessageKey::status(QMailMessage::Trash, QMailDataComparator::Excludes) & - QMailMessageKey::status(QMailMessage::Junk, QMailDataComparator::Excludes) & - QMailMessageKey::status(QMailMessage::Outgoing, QMailDataComparator::Excludes)); -} - -void EmailAccountMessageSet::createChild(const QMailFolderId &childId) -{ - // Our child folders should also be email-only - EmailFolderMessageSet *child = new EmailFolderMessageSet(this, childId, hierarchical()); - append(child); -} - - -/* InboxMessageSet */ - -InboxMessageSet::InboxMessageSet(QMailMessageSetContainer *container) - : EmailStandardFolderMessageSet(container, QMailFolder::InboxFolder, tr("Inbox")) -{ -} - -QMailMessageKey InboxMessageSet::messageKey() const -{ - return contentKey(); -} - -QMailMessageKey InboxMessageSet::contentKey() -{ - // Return all incoming messages for any email account, unless in the Trash/Junk folder - return (QMailMessageKey::parentAccountId(emailAccountKey()) & - QMailMessageKey::status(QMailMessage::Trash | QMailMessage::Junk | QMailMessage::Outgoing, QMailDataComparator::Excludes)); -} - -void InboxMessageSet::accountsAdded(const QMailAccountIdList &) -{ - synchronizeAccountChildren(); -} - -void InboxMessageSet::accountsUpdated(const QMailAccountIdList &) -{ - synchronizeAccountChildren(); -} - -void InboxMessageSet::accountsRemoved(const QMailAccountIdList &) -{ - synchronizeAccountChildren(); -} - -void InboxMessageSet::accountContentsModified(const QMailAccountIdList &ids) -{ - foreach (const QMailAccountId &id, ids) { - if (_accountIds.contains(id)) { - update(this); - return; - } - } -} - -void InboxMessageSet::init() -{ - // Add every email account as a folder within the inbox - synchronizeAccountChildren(); - - connect(model(), SIGNAL(accountsAdded(QMailAccountIdList)), this, SLOT(accountsAdded(QMailAccountIdList))); - connect(model(), SIGNAL(accountsUpdated(QMailAccountIdList)), this, SLOT(accountsUpdated(QMailAccountIdList))); - connect(model(), SIGNAL(accountsRemoved(QMailAccountIdList)), this, SLOT(accountsRemoved(QMailAccountIdList))); - connect(model(), SIGNAL(accountContentsModified(QMailAccountIdList)), this, SLOT(accountContentsModified(QMailAccountIdList))); - - EmailStandardFolderMessageSet::init(); -} - -void InboxMessageSet::resyncState() -{ - synchronizeAccountChildren(); - - EmailStandardFolderMessageSet::resyncState(); -} - -void InboxMessageSet::synchronizeAccountChildren() -{ - QMailAccountIdList newAccountIds(QMailStore::instance()->queryAccounts(emailAccountKey())); - if (newAccountIds != _accountIds) { - // Our subfolder set has changed - _accountIds = newAccountIds; - - // Delete any accounts that are no longer present - QList<QMailMessageSet*> obsoleteChildren; - for (int i = 0; i < count(); ++i) { - QMailAccountId childId = static_cast<QMailAccountMessageSet*>(at(i))->accountId(); - if (newAccountIds.contains(childId)) { - newAccountIds.removeAll(childId); - } else { - obsoleteChildren.append(at(i)); - } - } - remove(obsoleteChildren); - - // Add any child folders we don't already contain - foreach (const QMailAccountId &accountId, newAccountIds) { - append(new EmailAccountMessageSet(this, accountId)); - } - - update(this); - } -} - -QMailAccountKey InboxMessageSet::emailAccountKey() -{ - return (QMailAccountKey::messageType(QMailMessage::Email) & - QMailAccountKey::status(QMailAccount::Enabled, QMailDataComparator::Includes)); -} - - -/* EmailFolderModel */ - -EmailFolderModel::EmailFolderModel(QObject *parent) - : FolderModel(parent) -{ -} - -EmailFolderModel::~EmailFolderModel() -{ -} - -QVariant EmailFolderModel::data(QMailMessageSet *item, int role, int column) const -{ - if (item) { - if (role == FolderSynchronizationEnabledRole) { - return itemSynchronizationEnabled(item); - } else if(role == FolderChildCreationPermittedRole || role == FolderDeletionPermittedRole - || role == FolderRenamePermittedRole) { - return itemPermitted(item, static_cast<Roles>(role)); - } - else if (role == ContextualAccountIdRole) { - return itemContextualAccountId(item); - } - return FolderModel::data(item, role, column); - } - - return QVariant(); -} - -QVariant EmailFolderModel::headerData(int section, Qt::Orientation, int role) const -{ - if (role == Qt::DisplayRole && section == 0) - return tr("Folder"); - - return QVariant(); -} - -void EmailFolderModel::init() -{ - // Add the special Inbox folder - append(new InboxMessageSet(this)); - - // Add the remainder of the standard folders as status filters - append(new EmailStandardFolderMessageSet(this, QMailFolder::OutboxFolder, tr("Outbox"))); - append(new EmailStandardFolderMessageSet(this, QMailFolder::DraftsFolder, tr("Drafts"))); - append(new EmailStandardFolderMessageSet(this, QMailFolder::SentFolder, tr("Sent"))); - append(new EmailStandardFolderMessageSet(this, QMailFolder::JunkFolder, tr("Junk"))); - append(new EmailStandardFolderMessageSet(this, QMailFolder::TrashFolder, tr("Trash"))); -} - -QIcon EmailFolderModel::itemIcon(QMailMessageSet *item) const -{ - if (EmailStandardFolderMessageSet *standardItem = qobject_cast<EmailStandardFolderMessageSet*>(item)) { - return standardFolderIcon(standardItem); - } else if (EmailFolderMessageSet *emailItem = qobject_cast<EmailFolderMessageSet*>(item)) { - return emailFolderIcon(emailItem); - } - - return FolderModel::itemIcon(item); -} - -QString EmailFolderModel::itemStatusDetail(QMailMessageSet *item) const -{ - // Don't report any state for excluded folders - if (!itemSynchronizationEnabled(item)) - return QString(); - - return FolderModel::itemStatusDetail(item); -} - -FolderModel::StatusText EmailFolderModel::itemStatusText(QMailMessageSet *item) const -{ - if (EmailStandardFolderMessageSet *standardItem = qobject_cast<EmailStandardFolderMessageSet*>(item)) { - return standardFolderStatusText(standardItem); - } - - return FolderModel::itemStatusText(item); -} - -static QMap<QMailFolder::StandardFolder, QIcon> iconMapInit() -{ - QMap<QMailFolder::StandardFolder, QIcon> map; - - map[QMailFolder::InboxFolder] = Qtmail::icon("inboxfolder"); - map[QMailFolder::OutboxFolder] = Qtmail::icon("outboxfolder"); - map[QMailFolder::DraftsFolder] = Qtmail::icon("draftfolder"); - map[QMailFolder::SentFolder] = Qtmail::icon("sentfolder"); - map[QMailFolder::JunkFolder] = Qtmail::icon("junkfolder"); - map[QMailFolder::TrashFolder] = Qtmail::icon("trashfolder"); - - return map; -} - -static QIcon folderIcon(QMailFolder::StandardFolder type) -{ - const QMap<QMailFolder::StandardFolder, QIcon> iconMap(iconMapInit()); - - QMap<QMailFolder::StandardFolder, QIcon>::const_iterator it = iconMap.find(type); - if (it != iconMap.end()) - return it.value(); - - return Qtmail::icon("folder"); -} - -QIcon EmailFolderModel::standardFolderIcon(EmailStandardFolderMessageSet *item) const -{ - return folderIcon(item->standardFolderType()); -} - -QIcon EmailFolderModel::emailFolderIcon(EmailFolderMessageSet *item) const -{ - QMailFolder folder(item->folderId()); - if (folder.status() & QMailFolder::Trash) { - return folderIcon(QMailFolder::TrashFolder); - } else if (folder.status() & QMailFolder::Sent) { - return folderIcon(QMailFolder::SentFolder); - } else if (folder.status() & QMailFolder::Drafts) { - return folderIcon(QMailFolder::DraftsFolder); - } else if (folder.status() & QMailFolder::Junk) { - return folderIcon(QMailFolder::JunkFolder); - } - - return Qtmail::icon("folder"); -} - -FolderModel::StatusText EmailFolderModel::standardFolderStatusText(EmailStandardFolderMessageSet *item) const -{ - QMailFolder::StandardFolder standardType(item->standardFolderType()); - if ((standardType != QMailFolder::TrashFolder) && - (standardType != QMailFolder::DraftsFolder) && - (standardType != QMailFolder::OutboxFolder)) { - // No special handling - return filterStatusText(static_cast<QMailFilterMessageSet*>(item)); - } - - QString status, detail; - - if (QMailStore* store = QMailStore::instance()) { - // Find the total and unread total for this folder - QMailMessageKey itemKey = item->messageKey(); - int total = store->countMessages(itemKey); - - // Find the subtotal for this folder - int subTotal = 0; - SubTotalType type = Unread; - - if (standardType == QMailFolder::TrashFolder) { - // For Trash, report the 'new' count, or else the 'unread' count - subTotal = store->countMessages(itemKey & QMailMessageKey::status(QMailMessage::New)); - if (subTotal) { - type = New; - } else { - subTotal = store->countMessages(itemKey & unreadKey()); - } - } else if ((standardType == QMailFolder::DraftsFolder) || (standardType == QMailFolder::OutboxFolder)) { - // For Drafts and Outbox, suppress the 'unread' count - subTotal = 0; - } - - detail = describeFolderCount(total, subTotal, type); - status = formatCounts(total, subTotal, false, false); - } - - return qMakePair(status, detail); -} - -bool EmailFolderModel::itemSynchronizationEnabled(QMailMessageSet *item) const -{ - if (QMailFolderMessageSet *folderItem = qobject_cast<QMailFolderMessageSet*>(item)) { - // Only relevant for account folders - QMailFolder folder(folderItem->folderId()); - if (folder.parentAccountId().isValid()) - return (folder.status() & QMailFolder::SynchronizationEnabled); - } - - return true; -} - -bool EmailFolderModel::itemPermitted(QMailMessageSet *item, Roles role) const -{ - if (QMailFolderMessageSet *folderItem = qobject_cast<QMailFolderMessageSet*>(item)) { - // Only relevant for account folders - QMailFolder folder(folderItem->folderId()); - if (folder.parentAccountId().isValid()) { - quint64 folderStatus = folder.status(); - switch(role) { - case FolderChildCreationPermittedRole: - return (folderStatus & QMailFolder::ChildCreationPermitted); - case FolderDeletionPermittedRole: - return (folderStatus & QMailFolder::DeletionPermitted); - case FolderRenamePermittedRole: - return (folderStatus & QMailFolder::RenamePermitted); - default: - qWarning() << "itemPermitted has been called on an unknown role: " << role; - } - } - } - - return false; -} - - -QMailAccountId EmailFolderModel::itemContextualAccountId(QMailMessageSet *item) const -{ - if (QMailAccountMessageSet *accountItem = qobject_cast<QMailAccountMessageSet*>(item)) { - return accountItem->accountId(); - } else if (QMailFolderMessageSet *folderItem = qobject_cast<QMailFolderMessageSet*>(item)) { - QMailFolder folder(folderItem->folderId()); - if (folder.id().isValid()) - return folder.parentAccountId(); - } - - return QMailAccountId(); -} - -/* AccountFolderModel */ - -AccountFolderModel::AccountFolderModel(const QMailAccountId &id, QObject *parent) - : EmailFolderModel(parent), - accountId(id) -{ -} - -void AccountFolderModel::init() -{ - // Show only the folders for our account - append(new EmailAccountMessageSet(this, accountId)); -} - diff --git a/examples/qtmail/libs/qmfutil/emailfoldermodel.h b/examples/qtmail/libs/qmfutil/emailfoldermodel.h deleted file mode 100644 index 20f71a84..00000000 --- a/examples/qtmail/libs/qmfutil/emailfoldermodel.h +++ /dev/null @@ -1,192 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Messaging Framework. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef EMAILFOLDERMODEL_H -#define EMAILFOLDERMODEL_H - -#include "foldermodel.h" -#include <qmailfolder.h> - -// A message set that returns only the messages matching a specific status field - -class QMFUTIL_EXPORT EmailStandardFolderMessageSet : public QMailFilterMessageSet -{ - Q_OBJECT - -public: - EmailStandardFolderMessageSet(QMailMessageSetContainer *container, QMailFolder::StandardFolder folderType, const QString &name); - - virtual QMailFolder::StandardFolder standardFolderType() const; - - static QMailMessageKey contentKey(QMailFolder::StandardFolder folderType); - -protected: - QMailFolder::StandardFolder _type; -}; - - -// A message set that returns only the email messages within a folder: - -class QMFUTIL_EXPORT EmailFolderMessageSet : public QMailFolderMessageSet -{ - Q_OBJECT - -public: - EmailFolderMessageSet(QMailMessageSetContainer *container, const QMailFolderId &folderId, bool hierarchical); - - virtual QMailMessageKey messageKey() const; - virtual QMailMessageKey descendantsMessageKey() const; - - static QMailMessageKey contentKey(const QMailFolderId &id, bool descendants); - -protected: - virtual void createChild(const QMailFolderId &childId); -}; - - -// An account folder element which returns only email messages - -class QMFUTIL_EXPORT EmailAccountMessageSet : public QMailAccountMessageSet -{ - Q_OBJECT - -public: - EmailAccountMessageSet(QMailMessageSetContainer *container, const QMailAccountId &accountId); - - virtual QMailMessageKey messageKey() const; - virtual QMailMessageKey descendantsMessageKey() const; - - static QMailMessageKey contentKey(const QMailAccountId &id); - -protected: - virtual void createChild(const QMailFolderId &childId); -}; - - -// A folder element which includes all email accounts as sub-folders: - -class QMFUTIL_EXPORT InboxMessageSet : public EmailStandardFolderMessageSet -{ - Q_OBJECT - -public: - InboxMessageSet(QMailMessageSetContainer *container); - - virtual QMailMessageKey messageKey() const; - - static QMailMessageKey contentKey(); - -protected slots: - virtual void accountsAdded(const QMailAccountIdList &ids); - virtual void accountsUpdated(const QMailAccountIdList &ids); - virtual void accountsRemoved(const QMailAccountIdList &ids); - virtual void accountContentsModified(const QMailAccountIdList &ids); - -protected: - virtual void init(); - virtual void synchronizeAccountChildren(); - virtual void resyncState(); - - static QMailAccountKey emailAccountKey(); - -protected: - QMailAccountIdList _accountIds; -}; - - -class QMFUTIL_EXPORT EmailFolderModel : public FolderModel -{ - Q_OBJECT - -public: - using FolderModel::data; - - enum Roles - { - FolderIconRole = FolderModel::FolderIconRole, - FolderStatusRole = FolderModel::FolderStatusRole, - FolderStatusDetailRole = FolderModel::FolderStatusDetailRole, - FolderIdRole = FolderModel::FolderIdRole, - FolderSynchronizationEnabledRole, - ContextualAccountIdRole, - FolderDeletionPermittedRole, - FolderChildCreationPermittedRole, - FolderRenamePermittedRole - }; - - EmailFolderModel(QObject *parent = 0); - ~EmailFolderModel(); - - virtual void init(); - - virtual QVariant data(QMailMessageSet *item, int role, int column) const; - virtual QVariant headerData(int section, Qt::Orientation, int role) const; - -protected: - virtual QIcon itemIcon(QMailMessageSet *item) const; - virtual QString itemStatusDetail(QMailMessageSet *item) const; - virtual FolderModel::StatusText itemStatusText(QMailMessageSet *item) const; - - virtual QIcon standardFolderIcon(EmailStandardFolderMessageSet *item) const; - virtual QIcon emailFolderIcon(EmailFolderMessageSet *item) const; - - virtual FolderModel::StatusText standardFolderStatusText(EmailStandardFolderMessageSet *item) const; - - virtual bool itemSynchronizationEnabled(QMailMessageSet *item) const; - virtual bool itemPermitted(QMailMessageSet *item, Roles role) const; - virtual QMailAccountId itemContextualAccountId(QMailMessageSet *item) const; -}; - -class QMFUTIL_EXPORT AccountFolderModel : public EmailFolderModel -{ - Q_OBJECT - -public: - explicit AccountFolderModel(const QMailAccountId &id, QObject *parent = 0); - - virtual void init(); - -protected: - QMailAccountId accountId; -}; - -#endif - diff --git a/examples/qtmail/libs/qmfutil/emailfolderview.cpp b/examples/qtmail/libs/qmfutil/emailfolderview.cpp deleted file mode 100644 index 213ee024..00000000 --- a/examples/qtmail/libs/qmfutil/emailfolderview.cpp +++ /dev/null @@ -1,132 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Messaging Framework. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "emailfolderview.h" -#include <QPainter> - -EmailFolderView::EmailFolderView(QWidget *parent) - : FolderView(parent), - mModel(0), - mDelegate(new EmailFolderDelegate(this)) -{ - setItemDelegate(mDelegate); - setUniformRowHeights(true); -} - -EmailFolderModel *EmailFolderView::model() const -{ - return mModel; -} - -void EmailFolderView::setModel(EmailFolderModel *model) -{ - mModel = model; - FolderView::setModel(model); - - if (!mModel->isEmpty()) { - setCurrentIndex(mModel->index(0, 0, QModelIndex())); - - // Expand the inbox to show accounts - //QModelIndex inboxIndex(mModel->indexFromFolderId(QMailFolderId(QMailFolder::InboxFolder))); - QModelIndex inboxIndex(mModel->index(0, 0, QModelIndex())); - expand(inboxIndex); - } -} - -void EmailFolderView::setModel(QAbstractItemModel *) -{ - qWarning() << "EmailFolderView requires a model of type: EmailFolderModel!"; -} - - -EmailFolderDelegate::EmailFolderDelegate(EmailFolderView *parent) - : FolderDelegate(parent), - _unsynchronized(false) -{ -} - -void EmailFolderDelegate::drawDisplay(QPainter *painter, const QStyleOptionViewItem &option, const QRect &originalRect, const QString &text) const -{ - if (_unsynchronized) { - painter->save(); - painter->setOpacity(0.5); - } - - FolderDelegate::drawDisplay(painter, option, originalRect, text); - - if (_unsynchronized) - painter->restore(); -} - -void EmailFolderDelegate::drawDecoration(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QVariant &decoration) const -{ - if (_unsynchronized) { - painter->save(); - painter->setOpacity(0.5); - } - - FolderDelegate::drawDecoration(painter, option, rect, decoration); - - if (_unsynchronized) - painter->restore(); -} - -void EmailFolderDelegate::init(const QStyleOptionViewItem &option, const QModelIndex &index) -{ - FolderDelegate::init(option, index); - - // Don't show the excess indicators if this item is expanded - if (static_cast<EmailFolderView*>(_parent)->isExpanded(index)) { - // Don't show the indicators for hidden counts when they're not hidden - _statusText.remove(FolderModel::excessIndicator()); - - // Don't show an empty unread count - if (_statusText.startsWith("0/")) - _statusText.remove(0, 2); - - // Don't show a zero count - if (_statusText == "0") - _statusText.clear(); - } - - _unsynchronized = !index.data(EmailFolderModel::FolderSynchronizationEnabledRole).value<bool>(); -} - diff --git a/examples/qtmail/libs/qmfutil/emailfolderview.h b/examples/qtmail/libs/qmfutil/emailfolderview.h deleted file mode 100644 index 981e7ab6..00000000 --- a/examples/qtmail/libs/qmfutil/emailfolderview.h +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Messaging Framework. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef EMAILFOLDERVIEW_H -#define EMAILFOLDERVIEW_H - -#include "emailfoldermodel.h" -#include "folderdelegate.h" -#include "folderview.h" - -class EmailFolderDelegate; - -class QMFUTIL_EXPORT EmailFolderView : public FolderView -{ - Q_OBJECT - -public: - EmailFolderView(QWidget *parent); - - virtual EmailFolderModel *model() const; - void setModel(EmailFolderModel *model); - -private: - virtual void setModel(QAbstractItemModel *model); - - EmailFolderModel *mModel; - EmailFolderDelegate* mDelegate; -}; - - -class EmailFolderDelegate : public FolderDelegate -{ - Q_OBJECT - -public: - EmailFolderDelegate(EmailFolderView *parent = 0); - - virtual void drawDisplay(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QString &text) const; - virtual void drawDecoration(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QVariant &decoration) const; - -private: - virtual void init(const QStyleOptionViewItem &option, const QModelIndex &index); - - bool _unsynchronized; -}; - -#endif diff --git a/examples/qtmail/libs/qmfutil/folderdelegate.cpp b/examples/qtmail/libs/qmfutil/folderdelegate.cpp deleted file mode 100644 index 5002fa83..00000000 --- a/examples/qtmail/libs/qmfutil/folderdelegate.cpp +++ /dev/null @@ -1,144 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Messaging Framework. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "folderdelegate.h" -#include <QAbstractItemView> -#include <QKeyEvent> -#include <QPainter> -#include <QScrollBar> - -FolderDelegate::FolderDelegate(QAbstractItemView *parent) - : QItemDelegate(parent), - _parent(parent), - _scrollBar(parent ? parent->verticalScrollBar() : 0), - m_showStatus(true) -{ -} - -FolderDelegate::FolderDelegate(QWidget *parent) - : QItemDelegate(parent), - _parent(parent), - _scrollBar(0), - m_showStatus(true) -{ -} - -void FolderDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const -{ - const_cast<FolderDelegate*>(this)->init(option, index); - QItemDelegate::paint(painter, option, index); -} - -void FolderDelegate::drawDisplay(QPainter *painter, const QStyleOptionViewItem &option, const QRect &originalRect, const QString &text) const -{ - static const int smoothListScrollBarWidth = 6; - - // Reduce the available width by the scrollbar size, if necessary - QRect rect(originalRect); - if (_scrollBar && _scrollBar->isVisible()) - rect.setWidth(rect.width() - _parent->style()->pixelMetric(QStyle::PM_ScrollBarExtent)); - else if (!_scrollBar) - rect.setWidth(rect.width() - smoothListScrollBarWidth); - - int tw = 0; - if (!_statusText.isEmpty()) { - QFontMetrics fontMetrics(option.font); - tw = fontMetrics.width(_statusText); - } - - QRect textRect(rect); - textRect.setWidth(rect.width() - tw); - QItemDelegate::drawDisplay(painter, option, textRect, text); - - if (tw) { - static const int margin = 5; - - QRect statusRect = option.direction == Qt::RightToLeft - ? QRect(0, rect.top(), tw + margin, rect.height()) - : QRect(rect.left()+rect.width()-tw-margin, rect.top(), tw, rect.height()); - if(m_showStatus) - painter->drawText(statusRect, Qt::AlignCenter, _statusText); - } -} - -void FolderDelegate::drawDecoration(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QVariant &decoration) const -{ - if (!rect.isValid()) - return; - - // If we have an icon, we ignore the pixmap - if (decoration.type() == QVariant::Icon) { - QIcon icon = qvariant_cast<QIcon>(decoration); - - QIcon::Mode mode(QIcon::Normal); - if (!(option.state & QStyle::State_Enabled)) - mode = QIcon::Disabled; - - QIcon::State state(option.state & QStyle::State_Open ? QIcon::On : QIcon::Off); - icon.paint(painter, rect, option.decorationAlignment, mode, state); - } -} - -QSize FolderDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const -{ - // Ensure that we use the full width for our item - QSize base(QItemDelegate::sizeHint(option,index)); - return QSize(qMax(base.width(), option.rect.width()), base.height()); -} - -bool FolderDelegate::showStatus() const -{ - return m_showStatus; -} - -void FolderDelegate::setShowStatus(bool val) -{ - m_showStatus = val; -} - -void FolderDelegate::init(const QStyleOptionViewItem &option, const QModelIndex &index) -{ - _statusText = index.data(FolderModel::FolderStatusRole).value<QString>(); - - Q_UNUSED(option) -} - - diff --git a/examples/qtmail/libs/qmfutil/folderdelegate.h b/examples/qtmail/libs/qmfutil/folderdelegate.h deleted file mode 100644 index eba1f1f1..00000000 --- a/examples/qtmail/libs/qmfutil/folderdelegate.h +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Messaging Framework. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef FOLDERDELEGATE_H -#define FOLDERDELEGATE_H - -#include "foldermodel.h" -#include <QItemDelegate> - -QT_BEGIN_NAMESPACE - -class QAbstractItemView; -class QScrollBar; - -QT_END_NAMESPACE - -class FolderDelegate : public QItemDelegate -{ - Q_OBJECT - -public: - FolderDelegate(QAbstractItemView *parent = 0); - FolderDelegate(QWidget *parent); - - virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; - virtual void drawDisplay(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QString &text) const; - virtual void drawDecoration(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QVariant &decoration) const; - - virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const; - - bool showStatus() const; - void setShowStatus(bool val); - -protected: - virtual void init(const QStyleOptionViewItem &option, const QModelIndex &index); - - QWidget *_parent; - QScrollBar *_scrollBar; - QString _statusText; - bool m_showStatus; -}; - -#endif diff --git a/examples/qtmail/libs/qmfutil/foldermodel.cpp b/examples/qtmail/libs/qmfutil/foldermodel.cpp deleted file mode 100644 index d7f0551c..00000000 --- a/examples/qtmail/libs/qmfutil/foldermodel.cpp +++ /dev/null @@ -1,310 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Messaging Framework. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "foldermodel.h" -#include <qmailaccount.h> -#include <qmailfolder.h> -#include <qmailstore.h> -#include <QApplication> -#include <QTimer> -#include "qtmailnamespace.h" - -using QMailDataComparator::Includes; -using QMailDataComparator::Excludes; - -FolderModel::FolderModel(QObject *parent) - : QMailMessageSetModel(parent) -{ -} - -FolderModel::~FolderModel() -{ -} - -QVariant FolderModel::data(QMailMessageSet *item, int role, int column) const -{ - if (item) { - if (role == FolderIconRole) { - return itemIcon(item); - } else if (role == FolderStatusRole) { - return itemStatus(item); - } else if (role == FolderStatusDetailRole) { - return itemStatusDetail(item); - } else if (role == FolderIdRole) { - return itemFolderId(item); - } - - return QMailMessageSetModel::data(item, role, column); - } - - return QVariant(); -} - -QString FolderModel::excessIndicator() -{ - return "*"; -} - -void FolderModel::appended(QMailMessageSet *item) -{ - QMailMessageSetModel::appended(item); - - // Determine an initial status for this item - scheduleUpdate(item); -} - -void FolderModel::updated(QMailMessageSet *item) -{ - QMailMessageSetModel::updated(item); - - // See if the status has changed for this item - scheduleUpdate(item); -} - -void FolderModel::removed(QMailMessageSet *item) -{ - QMailMessageSetModel::removed(item); - - updatedItems.removeAll(item); -} - -QIcon FolderModel::itemIcon(QMailMessageSet *item) const -{ - if (qobject_cast<QMailFolderMessageSet*>(item)) { - return Qtmail::icon("folder"); - } else if (qobject_cast<QMailAccountMessageSet*>(item)) { - return Qtmail::icon("accountfolder"); - } else if (qobject_cast<QMailFilterMessageSet*>(item)) { - return Qtmail::icon("search"); - } - - return QIcon(); -} - -QString FolderModel::itemStatus(QMailMessageSet *item) const -{ - QMap<QMailMessageSet*, StatusText>::const_iterator it = statusMap.find(item); - if (it != statusMap.end()) - return it->first; - - return QString(); -} - -QString FolderModel::itemStatusDetail(QMailMessageSet *item) const -{ - QMap<QMailMessageSet*, StatusText>::const_iterator it = statusMap.find(item); - if (it != statusMap.end()) - return it->second; - - return QString(); -} - -FolderModel::StatusText FolderModel::itemStatusText(QMailMessageSet *item) const -{ - if (QMailFolderMessageSet *folderItem = qobject_cast<QMailFolderMessageSet*>(item)) { - return folderStatusText(folderItem); - } else if (QMailAccountMessageSet *accountItem = qobject_cast<QMailAccountMessageSet*>(item)) { - return accountStatusText(accountItem); - } else if (QMailFilterMessageSet *filterItem = qobject_cast<QMailFilterMessageSet*>(item)) { - return filterStatusText(filterItem); - } - - return qMakePair(QString(), QString()); -} - -QString FolderModel::formatCounts(int total, int unread, bool excessTotal, bool excessUnread) -{ - QString countStr; - - if (total || excessTotal || excessUnread) { - if (unread || excessUnread) { - QString unreadIndicator(excessUnread ? FolderModel::excessIndicator() : ""); - QString totalIndicator(excessTotal ? FolderModel::excessIndicator() : ""); - - if (QApplication::isRightToLeft()) - countStr.append(QString("%1%2/%3%4").arg(total).arg(totalIndicator).arg(unread).arg(unreadIndicator)); - else - countStr.append(QString("%1%2/%3%4").arg(unread).arg(unreadIndicator).arg(total).arg(totalIndicator)); - } else { - countStr.append(QString("%1%2").arg(total).arg(excessTotal ? FolderModel::excessIndicator() : "")); - } - } - - return countStr; -} - -QString FolderModel::describeFolderCount(int total, int subTotal, SubTotalType type) -{ - QString desc(QString::number(total)); - - if (total && subTotal) { - if (type == New) { - desc += tr(" (%n new)", "%1 = number of new messages", subTotal); - } else if (type == Unsent) { - desc += tr(" (%n unsent)", "%1 = number of unsent messages", subTotal); - } else if (type == Unread) { - desc += tr(" (%n unread)", "%1 = number of unread messages", subTotal); - } - } - - return desc; -} - -QMailMessageKey FolderModel::unreadKey() -{ - // Both 'read' and 'read-elsewhere' mean !unread - return (QMailMessageKey::status(QMailMessage::Read, Excludes) & - QMailMessageKey::status(QMailMessage::ReadElsewhere, Excludes)); -} - -FolderModel::StatusText FolderModel::folderStatusText(QMailFolderMessageSet *item) const -{ - QString status, detail; - - if (QMailStore* store = QMailStore::instance()) { - int inclusiveTotal = 0; - int inclusiveUnreadTotal = 0; - - // Find the total and unread total for this folder - QMailMessageKey itemKey = item->messageKey(); - int total = store->countMessages(itemKey); - int unreadTotal = store->countMessages(itemKey & unreadKey()); - - // Determine whether there are messages lower in the hierarchy - QMailMessageKey inclusiveKey = item->descendantsMessageKey(); - inclusiveTotal = total + store->countMessages(inclusiveKey); - - if (inclusiveTotal > total) { - inclusiveUnreadTotal = unreadTotal + store->countMessages(inclusiveKey & unreadKey()); - } - - detail = describeFolderCount(total, unreadTotal, Unread); - status = formatCounts(total, unreadTotal, (inclusiveTotal > total), (inclusiveUnreadTotal > unreadTotal)); - } - - return qMakePair(status, detail); -} - -FolderModel::StatusText FolderModel::accountStatusText(QMailAccountMessageSet *item) const -{ - QString status, detail; - - if (QMailStore* store = QMailStore::instance()) { - QMailMessageKey itemKey = item->messageKey(); - int total = store->countMessages(itemKey); - - if (total) { - // Find the unread total for this account - int unreadTotal = store->countMessages(itemKey & unreadKey()); - - // See if there are 'new' messages for this account - int subTotal = store->countMessages(itemKey & QMailMessageKey::status(QMailMessage::New, Includes)); - if (subTotal) { - detail = describeFolderCount(total, subTotal, New); - } else { - detail = formatCounts(total, unreadTotal, false, false); - } - - status = formatCounts(total, unreadTotal, false, false); - } else { - detail = QString::number(0); - } - } - - return qMakePair(status, detail); -} - -FolderModel::StatusText FolderModel::filterStatusText(QMailFilterMessageSet *item) const -{ - QString status, detail; - - if (QMailStore* store = QMailStore::instance()) { - QMailMessageKey itemKey = item->messageKey(); - int total = store->countMessages(itemKey); - - if (total) { - // Find the unread total for this set - int unreadTotal = store->countMessages(itemKey & unreadKey()); - - detail = describeFolderCount(total, unreadTotal); - status = formatCounts(total, unreadTotal, false, false); - } else { - detail = QString::number(0); - } - } - - return qMakePair(status, detail); -} - -void FolderModel::scheduleUpdate(QMailMessageSet *item) -{ - if (updatedItems.isEmpty()) { - QTimer::singleShot(0, this, SLOT(processUpdatedItems())); - } else if (updatedItems.contains(item)) { - return; - } - - updatedItems.append(item); -} - -void FolderModel::processUpdatedItems() -{ - // Note: throughput can be increased at a cost to interactivity by increasing batchSize: - const int batchSize = 1; - - // Only process a small number before returning to the event loop - int count = 0; - while (!updatedItems.isEmpty() && (count < batchSize)) { - QMailMessageSet *item = updatedItems.takeFirst(); - - FolderModel::StatusText text = itemStatusText(item); - if (text != statusMap[item]) { - statusMap[item] = text; - emit dataChanged(item->modelIndex(), item->modelIndex()); - } - - ++count; - } - - if (!updatedItems.isEmpty()) - QTimer::singleShot(0, this, SLOT(processUpdatedItems())); -} - diff --git a/examples/qtmail/libs/qmfutil/foldermodel.h b/examples/qtmail/libs/qmfutil/foldermodel.h deleted file mode 100644 index dac0f0cf..00000000 --- a/examples/qtmail/libs/qmfutil/foldermodel.h +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Messaging Framework. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef FOLDERMODEL_H -#define FOLDERMODEL_H - -#include <qtmailnamespace.h> -#include <qmailmessageset.h> -#include <QIcon> -#include <QPair> -#include <QString> - -class QMFUTIL_EXPORT FolderModel : public QMailMessageSetModel -{ - Q_OBJECT - -public: - enum Roles - { - FolderIconRole = Qt::DecorationRole, - FolderStatusRole = QMailMessageSetModel::SubclassUserRole, - FolderStatusDetailRole, - FolderIdRole - }; - - FolderModel(QObject *parent = 0); - ~FolderModel(); - - static QString excessIndicator(); - - using QMailMessageSetModel::data; - virtual QVariant data(QMailMessageSet *item, int role, int column) const; - -protected slots: - void processUpdatedItems(); - -protected: - typedef QPair<QString, QString> StatusText; - - void scheduleUpdate(QMailMessageSet *item); - - virtual void appended(QMailMessageSet *item); - virtual void updated(QMailMessageSet *item); - virtual void removed(QMailMessageSet *item); - - virtual QIcon itemIcon(QMailMessageSet *item) const; - virtual QString itemStatus(QMailMessageSet *item) const; - virtual QString itemStatusDetail(QMailMessageSet *item) const; - - virtual StatusText itemStatusText(QMailMessageSet *item) const; - virtual StatusText folderStatusText(QMailFolderMessageSet *item) const; - virtual StatusText accountStatusText(QMailAccountMessageSet *item) const; - virtual StatusText filterStatusText(QMailFilterMessageSet *item) const; - - enum SubTotalType { Unread, New, Unsent }; - - static QMailMessageKey unreadKey(); - - static QString describeFolderCount(int total, int subTotal, SubTotalType type = Unread); - static QString formatCounts(int total, int unread, bool excessTotal = false, bool excessUnread = false); - - QMap<QMailMessageSet*, StatusText> statusMap; - - QList<QMailMessageSet*> updatedItems; -}; - - -#endif - diff --git a/examples/qtmail/libs/qmfutil/folderview.cpp b/examples/qtmail/libs/qmfutil/folderview.cpp deleted file mode 100644 index da4400e0..00000000 --- a/examples/qtmail/libs/qmfutil/folderview.cpp +++ /dev/null @@ -1,401 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Messaging Framework. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "folderview.h" -#include <QKeyEvent> -#include <qmailmessagekey.h> -#include <qdatastream.h> - -FolderView::FolderView(QWidget *parent) - : QTreeView(parent), - lastItem(0), - oldModel(0) -{ - connect(this, SIGNAL(activated(QModelIndex)), this, SLOT(itemActivated(QModelIndex))); - connect(this, SIGNAL(expanded(QModelIndex)), this, SLOT(itemExpanded(QModelIndex))); - connect(this, SIGNAL(collapsed(QModelIndex)), this, SLOT(itemCollapsed(QModelIndex))); -} - -FolderView::~FolderView() -{ -} - -QMailMessageSet *FolderView::currentItem() const -{ - if (FolderModel *folderModel = model()) - return folderModel->itemFromIndex(currentIndex()); - - return 0; -} - -bool FolderView::setCurrentItem(QMailMessageSet *item) -{ - if (FolderModel *folderModel = model()) { - QModelIndex index(folderModel->indexFromItem(item)); - if (index.isValid()) { - setCurrentIndex(index); - return true; - } - } - - return false; -} - -QMailAccountId FolderView::currentAccountId() const -{ - if (FolderModel *folderModel = model()) - return folderModel->accountIdFromIndex(currentIndex()); - - return QMailAccountId(); -} - -bool FolderView::setCurrentAccountId(const QMailAccountId& id) -{ - if (FolderModel *folderModel = model()) { - QModelIndex index(folderModel->indexFromAccountId(id)); - if (index.isValid()) { - setCurrentIndex(index); - return true; - } - } - - return false; -} - -QMailFolderId FolderView::currentFolderId() const -{ - if (FolderModel *folderModel = model()) - return folderModel->folderIdFromIndex(currentIndex()); - - return QMailFolderId(); -} - -bool FolderView::setCurrentFolderId(const QMailFolderId& id) -{ - if (FolderModel *folderModel = model()) { - QModelIndex index(folderModel->indexFromFolderId(id)); - if (index.isValid()) { - setCurrentIndex(index); - return true; - } - } - - return false; -} - -bool FolderView::ignoreMailStoreUpdates() const -{ - if (FolderModel *folderModel = model()) - return folderModel->ignoreMailStoreUpdates(); - - return false; -} - -void FolderView::setIgnoreMailStoreUpdates(bool ignore) -{ - if (FolderModel *folderModel = model()) - folderModel->setIgnoreMailStoreUpdates(ignore); -} - -void FolderView::itemActivated(const QModelIndex &index) -{ - if (FolderModel *folderModel = model()) - if (QMailMessageSet *item = folderModel->itemFromIndex(index)) - emit activated(item); -} - -void FolderView::itemSelected(const QModelIndex &index) -{ - if (FolderModel *folderModel = model()) - if (QMailMessageSet *item = folderModel->itemFromIndex(index)) - emit selected(item); -} - -static QByteArray arrayFromKey(const QMailMessageKey &key) -{ - QByteArray array; - QDataStream stream(&array, QIODevice::WriteOnly); - key.serialize<QDataStream>(stream); - return array; -} - -void FolderView::itemExpanded(const QModelIndex &index) -{ - if (FolderModel *folderModel = model()) { - - QMailFolderId folderId = folderModel->folderIdFromIndex(index); - if (folderId.isValid()) { - expandedFolders.insert(folderId); - return; - } - - QMailAccountId accountId = folderModel->accountIdFromIndex(index); - if (accountId.isValid()) { - expandedAccounts.insert(accountId); - return; - } - - QMailMessageSet *item = folderModel->itemFromIndex(index); - if (item) { - QMailMessageKey key = item->messageKey(); - expandedKeys.insert(arrayFromKey(key)); - return; - } - } -} - -void FolderView::itemCollapsed(const QModelIndex &index) -{ - if (FolderModel *folderModel = model()) { - - QMailFolderId folderId = folderModel->folderIdFromIndex(index); - if (folderId.isValid()) { - expandedFolders.remove(folderId); - return; - } - - QMailAccountId accountId = folderModel->accountIdFromIndex(index); - if (accountId.isValid()) { - expandedAccounts.remove(accountId); - return; - } - - QMailMessageSet *item = folderModel->itemFromIndex(index); - if (item) { - QMailMessageKey key = item->messageKey(); - expandedKeys.remove(arrayFromKey(key)); - return; - } - } -} - -void FolderView::currentChanged(const QModelIndex ¤tIndex, const QModelIndex &previousIndex) -{ - itemSelected(currentIndex); - - Q_UNUSED(previousIndex) -} - -void FolderView::dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight) -{ - if(topLeft == currentIndex() || bottomRight == currentIndex()) - emit selectionUpdated(); - QTreeView::dataChanged(topLeft,bottomRight); -} - -namespace { - -template<typename IdType> -QModelIndex itemIndex(const IdType &id, FolderModel *folderModel); - -template<> -QModelIndex itemIndex<QMailAccountId>(const QMailAccountId &id, FolderModel *folderModel) -{ - return folderModel->indexFromAccountId(id); -} - -template<> -QModelIndex itemIndex<QMailFolderId>(const QMailFolderId &id, FolderModel *folderModel) -{ - return folderModel->indexFromFolderId(id); -} - -template<> -QModelIndex itemIndex<QByteArray>(const QByteArray &key, FolderModel *folderModel) -{ - for (int i = 0; i < folderModel->count(); ++i) { - if (arrayFromKey(folderModel->at(i)->messageKey()) == key) { - return folderModel->indexFromItem(folderModel->at(i)); - } - } - return QModelIndex(); -} -} - -template<typename SetType> -bool FolderView::expandSet(SetType &ids, FolderModel *model) -{ - int originalCount = ids.count(); - int count = originalCount; - int oldCount = count + 1; - - while (count && (count < oldCount)) { - oldCount = count; - - typename SetType::iterator it = ids.begin(); - while (it != ids.end()) { - QModelIndex index(itemIndex(*it, model)); - if (index.isValid()) { - if (!isExpanded(index)) - expand(index); - - if (isExpanded(index)) { - // We no longer need to expand this folder - it = ids.erase(it); - --count; - } - else - { - ++it; - } - } else { - ++it; - } - } - } - - return (count != originalCount); -} - -template<typename SetType> -void FolderView::removeNonexistent(SetType &ids, FolderModel *model) -{ - typename SetType::iterator it = ids.begin(); - while (it != ids.end()) { - QModelIndex index(itemIndex(*it, model)); - if (!index.isValid()) { - it = ids.erase(it); - } else { - ++it; - } - } -} - -bool FolderView::expandKeys(QSet<QByteArray> &keys, FolderModel *model) -{ - return expandSet(keys, model); -} - -bool FolderView::expandFolders(QSet<QMailFolderId> &folderIds, FolderModel *model) -{ - return expandSet(folderIds, model); -} - -bool FolderView::expandAccounts(QSet<QMailAccountId> &accountIds, FolderModel *model) -{ - return expandSet(accountIds, model); -} - -void FolderView::modelReset() -{ - if (FolderModel *folderModel = model()) { - // Remove any items that are no longer in the model - removeNonexistent(expandedKeys, folderModel); - removeNonexistent(expandedAccounts, folderModel); - removeNonexistent(expandedFolders, folderModel); - - // Ensure all the expanded items are re-expanded - QSet<QByteArray> keys(expandedKeys); - QSet<QMailAccountId> accountIds(expandedAccounts); - QSet<QMailFolderId> folderIds(expandedFolders); - - bool itemsExpanded(false); - do { - itemsExpanded = false; - - // We need to repeat this process, because many items cannot be expanded until - // their parent item is expanded... - itemsExpanded |= expandKeys(keys, folderModel); - itemsExpanded |= expandAccounts(accountIds, folderModel); - itemsExpanded |= expandFolders(folderIds, folderModel); - } while (itemsExpanded); - - // Any remainining IDs must not be accessible in the model any longer - foreach (const QByteArray &key, keys) - expandedKeys.remove(key); - - foreach (const QMailAccountId &accountId, accountIds) - expandedAccounts.remove(accountId); - - foreach (const QMailFolderId &folderId, folderIds) - expandedFolders.remove(folderId); - } -} - -void FolderView::keyPressEvent(QKeyEvent *e) -{ - switch (e->key()) - { - case Qt::Key_Select: - case Qt::Key_Space: - case Qt::Key_Return: - case Qt::Key_Enter: - - e->accept(); - itemActivated(currentIndex()); - break; - - case Qt::Key_Back: - e->accept(); - emit backPressed(); - break; - - default: - QTreeView::keyPressEvent(e); - } -} - -void FolderView::showEvent(QShowEvent *e) -{ - setIgnoreMailStoreUpdates(false); - QTreeView::showEvent(e); - if (lastItem) { - setCurrentItem(lastItem); - } - lastItem = 0; -} - -void FolderView::hideEvent(QHideEvent *e) -{ - lastItem = currentItem(); - setIgnoreMailStoreUpdates(true); - QTreeView::hideEvent(e); -} - -void FolderView::setModel(QAbstractItemModel *model) -{ - if (oldModel) { - disconnect(oldModel, SIGNAL(reset()), this, SLOT(modelReset())); - } - QTreeView::setModel(model); - oldModel = model; - connect(model, SIGNAL(modelReset()), this, SLOT(modelReset())); -} diff --git a/examples/qtmail/libs/qmfutil/folderview.h b/examples/qtmail/libs/qmfutil/folderview.h deleted file mode 100644 index d7031f53..00000000 --- a/examples/qtmail/libs/qmfutil/folderview.h +++ /dev/null @@ -1,112 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Messaging Framework. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef FOLDERVIEW_H -#define FOLDERVIEW_H - -#include "foldermodel.h" -#include "folderdelegate.h" -#include <QSet> -#include <QTreeView> -#include <QPointer> -class QMFUTIL_EXPORT FolderView : public QTreeView -{ - Q_OBJECT - -public: - FolderView(QWidget *parent); - virtual ~FolderView(); - - virtual FolderModel *model() const = 0; - - QMailMessageSet *currentItem() const; - bool setCurrentItem(QMailMessageSet *item); - - QMailAccountId currentAccountId() const; - bool setCurrentAccountId(const QMailAccountId& id); - - QMailFolderId currentFolderId() const; - bool setCurrentFolderId(const QMailFolderId& id); - - bool ignoreMailStoreUpdates() const; - void setIgnoreMailStoreUpdates(bool ignore); - - virtual void setModel(QAbstractItemModel *model); - -signals: - void selected(QMailMessageSet *); - void activated(QMailMessageSet *); - void selectionUpdated(); - void backPressed(); - -protected slots: - virtual void itemSelected(const QModelIndex &index); - virtual void itemActivated(const QModelIndex &index); - virtual void itemExpanded(const QModelIndex &index); - virtual void itemCollapsed(const QModelIndex &index); - virtual void currentChanged(const QModelIndex ¤tIndex, const QModelIndex &previousIndex); - virtual void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight); - virtual void modelReset(); - -protected: - virtual void keyPressEvent(QKeyEvent *e); - virtual void showEvent(QShowEvent *e); - virtual void hideEvent(QHideEvent *e); - -private: - template<typename SetType> - bool expandSet(SetType &ids, FolderModel *model); - - template<typename SetType> - void removeNonexistent(SetType &ids, FolderModel *model); - - bool expandKeys(QSet<QByteArray> &keys, FolderModel *model); - bool expandAccounts(QSet<QMailAccountId> &accountIds, FolderModel *model); - bool expandFolders(QSet<QMailFolderId> &folderIds, FolderModel *model); - - QSet<QMailAccountId> expandedAccounts; - QSet<QMailFolderId> expandedFolders; - QSet<QByteArray> expandedKeys; - QPointer<QMailMessageSet> lastItem; - QPointer<QAbstractItemModel> oldModel; -}; - -#endif diff --git a/examples/qtmail/libs/qmfutil/libqmfutil-ar.ts b/examples/qtmail/libs/qmfutil/libqmfutil-ar.ts deleted file mode 100644 index d16ca308..00000000 --- a/examples/qtmail/libs/qmfutil/libqmfutil-ar.ts +++ /dev/null @@ -1,184 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.0"> -<context> - <name>AddressSelectorWidget</name> - <message> - <location filename="addressselectorwidget.cpp" line="558"/> - <source>No valid contacts</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>DetailsLineEdit</name> - <message> - <location filename="detailspage.cpp" line="113"/> - <location filename="detailspage.cpp" line="115"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>DetailsPage</name> - <message> - <location filename="detailspage.cpp" line="37"/> - <source>(no subject)</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="334"/> - <source>Edit message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="344"/> - <source>From contacts</source> - <comment>Find recipient's phone number or email address from Contacts application</comment> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="348"/> - <source>Copy</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="350"/> - <source>Paste</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="361"/> - <source>To</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="377"/> - <source>CC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="393"/> - <source>BCC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="409"/> - <source>Subject</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="420"/> - <source>Delivery report</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="424"/> - <source>Read reply</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="430"/> - <source>From</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="443"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="712"/> - <source>vCard describing %1</source> - <comment>%1 = Person's name</comment> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="721"/> - <source>vCard describing a contact</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="724"/> - <source>vCard describing multiple contacts</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>EmailComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="106"/> - <location filename="qmailcomposer.cpp" line="108"/> - <source>Email</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>GenericComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="179"/> - <source>Message</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>MMSComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="217"/> - <source>Multimedia message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="qmailcomposer.cpp" line="219"/> - <source>MMS</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>QtopiaHomeMailMessageDelegate</name> - <message> - <location filename="qmailmessagedelegate.cpp" line="594"/> - <source>Reply</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>RecipientEdit</name> - <message> - <location filename="detailspage.cpp" line="171"/> - <source>Select Contacts</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="215"/> - <location filename="detailspage.cpp" line="221"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="218"/> - <source>Search</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>RecipientSelectorButton</name> - <message> - <location filename="detailspage.cpp" line="243"/> - <source>...</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>VideomailComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="135"/> - <source>Videomail</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="qmailcomposer.cpp" line="137"/> - <source>Video mail</source> - <translation type="unfinished"></translation> - </message> -</context> -</TS> diff --git a/examples/qtmail/libs/qmfutil/libqmfutil-de.ts b/examples/qtmail/libs/qmfutil/libqmfutil-de.ts deleted file mode 100644 index d16ca308..00000000 --- a/examples/qtmail/libs/qmfutil/libqmfutil-de.ts +++ /dev/null @@ -1,184 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.0"> -<context> - <name>AddressSelectorWidget</name> - <message> - <location filename="addressselectorwidget.cpp" line="558"/> - <source>No valid contacts</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>DetailsLineEdit</name> - <message> - <location filename="detailspage.cpp" line="113"/> - <location filename="detailspage.cpp" line="115"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>DetailsPage</name> - <message> - <location filename="detailspage.cpp" line="37"/> - <source>(no subject)</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="334"/> - <source>Edit message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="344"/> - <source>From contacts</source> - <comment>Find recipient's phone number or email address from Contacts application</comment> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="348"/> - <source>Copy</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="350"/> - <source>Paste</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="361"/> - <source>To</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="377"/> - <source>CC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="393"/> - <source>BCC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="409"/> - <source>Subject</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="420"/> - <source>Delivery report</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="424"/> - <source>Read reply</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="430"/> - <source>From</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="443"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="712"/> - <source>vCard describing %1</source> - <comment>%1 = Person's name</comment> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="721"/> - <source>vCard describing a contact</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="724"/> - <source>vCard describing multiple contacts</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>EmailComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="106"/> - <location filename="qmailcomposer.cpp" line="108"/> - <source>Email</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>GenericComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="179"/> - <source>Message</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>MMSComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="217"/> - <source>Multimedia message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="qmailcomposer.cpp" line="219"/> - <source>MMS</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>QtopiaHomeMailMessageDelegate</name> - <message> - <location filename="qmailmessagedelegate.cpp" line="594"/> - <source>Reply</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>RecipientEdit</name> - <message> - <location filename="detailspage.cpp" line="171"/> - <source>Select Contacts</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="215"/> - <location filename="detailspage.cpp" line="221"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="218"/> - <source>Search</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>RecipientSelectorButton</name> - <message> - <location filename="detailspage.cpp" line="243"/> - <source>...</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>VideomailComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="135"/> - <source>Videomail</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="qmailcomposer.cpp" line="137"/> - <source>Video mail</source> - <translation type="unfinished"></translation> - </message> -</context> -</TS> diff --git a/examples/qtmail/libs/qmfutil/libqmfutil-en_GB.ts b/examples/qtmail/libs/qmfutil/libqmfutil-en_GB.ts deleted file mode 100644 index d16ca308..00000000 --- a/examples/qtmail/libs/qmfutil/libqmfutil-en_GB.ts +++ /dev/null @@ -1,184 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.0"> -<context> - <name>AddressSelectorWidget</name> - <message> - <location filename="addressselectorwidget.cpp" line="558"/> - <source>No valid contacts</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>DetailsLineEdit</name> - <message> - <location filename="detailspage.cpp" line="113"/> - <location filename="detailspage.cpp" line="115"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>DetailsPage</name> - <message> - <location filename="detailspage.cpp" line="37"/> - <source>(no subject)</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="334"/> - <source>Edit message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="344"/> - <source>From contacts</source> - <comment>Find recipient's phone number or email address from Contacts application</comment> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="348"/> - <source>Copy</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="350"/> - <source>Paste</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="361"/> - <source>To</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="377"/> - <source>CC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="393"/> - <source>BCC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="409"/> - <source>Subject</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="420"/> - <source>Delivery report</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="424"/> - <source>Read reply</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="430"/> - <source>From</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="443"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="712"/> - <source>vCard describing %1</source> - <comment>%1 = Person's name</comment> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="721"/> - <source>vCard describing a contact</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="724"/> - <source>vCard describing multiple contacts</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>EmailComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="106"/> - <location filename="qmailcomposer.cpp" line="108"/> - <source>Email</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>GenericComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="179"/> - <source>Message</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>MMSComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="217"/> - <source>Multimedia message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="qmailcomposer.cpp" line="219"/> - <source>MMS</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>QtopiaHomeMailMessageDelegate</name> - <message> - <location filename="qmailmessagedelegate.cpp" line="594"/> - <source>Reply</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>RecipientEdit</name> - <message> - <location filename="detailspage.cpp" line="171"/> - <source>Select Contacts</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="215"/> - <location filename="detailspage.cpp" line="221"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="218"/> - <source>Search</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>RecipientSelectorButton</name> - <message> - <location filename="detailspage.cpp" line="243"/> - <source>...</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>VideomailComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="135"/> - <source>Videomail</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="qmailcomposer.cpp" line="137"/> - <source>Video mail</source> - <translation type="unfinished"></translation> - </message> -</context> -</TS> diff --git a/examples/qtmail/libs/qmfutil/libqmfutil-en_SU.ts b/examples/qtmail/libs/qmfutil/libqmfutil-en_SU.ts deleted file mode 100644 index d16ca308..00000000 --- a/examples/qtmail/libs/qmfutil/libqmfutil-en_SU.ts +++ /dev/null @@ -1,184 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.0"> -<context> - <name>AddressSelectorWidget</name> - <message> - <location filename="addressselectorwidget.cpp" line="558"/> - <source>No valid contacts</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>DetailsLineEdit</name> - <message> - <location filename="detailspage.cpp" line="113"/> - <location filename="detailspage.cpp" line="115"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>DetailsPage</name> - <message> - <location filename="detailspage.cpp" line="37"/> - <source>(no subject)</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="334"/> - <source>Edit message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="344"/> - <source>From contacts</source> - <comment>Find recipient's phone number or email address from Contacts application</comment> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="348"/> - <source>Copy</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="350"/> - <source>Paste</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="361"/> - <source>To</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="377"/> - <source>CC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="393"/> - <source>BCC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="409"/> - <source>Subject</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="420"/> - <source>Delivery report</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="424"/> - <source>Read reply</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="430"/> - <source>From</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="443"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="712"/> - <source>vCard describing %1</source> - <comment>%1 = Person's name</comment> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="721"/> - <source>vCard describing a contact</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="724"/> - <source>vCard describing multiple contacts</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>EmailComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="106"/> - <location filename="qmailcomposer.cpp" line="108"/> - <source>Email</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>GenericComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="179"/> - <source>Message</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>MMSComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="217"/> - <source>Multimedia message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="qmailcomposer.cpp" line="219"/> - <source>MMS</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>QtopiaHomeMailMessageDelegate</name> - <message> - <location filename="qmailmessagedelegate.cpp" line="594"/> - <source>Reply</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>RecipientEdit</name> - <message> - <location filename="detailspage.cpp" line="171"/> - <source>Select Contacts</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="215"/> - <location filename="detailspage.cpp" line="221"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="218"/> - <source>Search</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>RecipientSelectorButton</name> - <message> - <location filename="detailspage.cpp" line="243"/> - <source>...</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>VideomailComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="135"/> - <source>Videomail</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="qmailcomposer.cpp" line="137"/> - <source>Video mail</source> - <translation type="unfinished"></translation> - </message> -</context> -</TS> diff --git a/examples/qtmail/libs/qmfutil/libqmfutil-en_US.ts b/examples/qtmail/libs/qmfutil/libqmfutil-en_US.ts deleted file mode 100644 index 07a7469f..00000000 --- a/examples/qtmail/libs/qmfutil/libqmfutil-en_US.ts +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.0"> -</TS> diff --git a/examples/qtmail/libs/qmfutil/libqmfutil-es.ts b/examples/qtmail/libs/qmfutil/libqmfutil-es.ts deleted file mode 100644 index d16ca308..00000000 --- a/examples/qtmail/libs/qmfutil/libqmfutil-es.ts +++ /dev/null @@ -1,184 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.0"> -<context> - <name>AddressSelectorWidget</name> - <message> - <location filename="addressselectorwidget.cpp" line="558"/> - <source>No valid contacts</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>DetailsLineEdit</name> - <message> - <location filename="detailspage.cpp" line="113"/> - <location filename="detailspage.cpp" line="115"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>DetailsPage</name> - <message> - <location filename="detailspage.cpp" line="37"/> - <source>(no subject)</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="334"/> - <source>Edit message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="344"/> - <source>From contacts</source> - <comment>Find recipient's phone number or email address from Contacts application</comment> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="348"/> - <source>Copy</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="350"/> - <source>Paste</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="361"/> - <source>To</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="377"/> - <source>CC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="393"/> - <source>BCC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="409"/> - <source>Subject</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="420"/> - <source>Delivery report</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="424"/> - <source>Read reply</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="430"/> - <source>From</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="443"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="712"/> - <source>vCard describing %1</source> - <comment>%1 = Person's name</comment> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="721"/> - <source>vCard describing a contact</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="724"/> - <source>vCard describing multiple contacts</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>EmailComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="106"/> - <location filename="qmailcomposer.cpp" line="108"/> - <source>Email</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>GenericComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="179"/> - <source>Message</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>MMSComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="217"/> - <source>Multimedia message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="qmailcomposer.cpp" line="219"/> - <source>MMS</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>QtopiaHomeMailMessageDelegate</name> - <message> - <location filename="qmailmessagedelegate.cpp" line="594"/> - <source>Reply</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>RecipientEdit</name> - <message> - <location filename="detailspage.cpp" line="171"/> - <source>Select Contacts</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="215"/> - <location filename="detailspage.cpp" line="221"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="218"/> - <source>Search</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>RecipientSelectorButton</name> - <message> - <location filename="detailspage.cpp" line="243"/> - <source>...</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>VideomailComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="135"/> - <source>Videomail</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="qmailcomposer.cpp" line="137"/> - <source>Video mail</source> - <translation type="unfinished"></translation> - </message> -</context> -</TS> diff --git a/examples/qtmail/libs/qmfutil/libqmfutil-fr.ts b/examples/qtmail/libs/qmfutil/libqmfutil-fr.ts deleted file mode 100644 index d16ca308..00000000 --- a/examples/qtmail/libs/qmfutil/libqmfutil-fr.ts +++ /dev/null @@ -1,184 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.0"> -<context> - <name>AddressSelectorWidget</name> - <message> - <location filename="addressselectorwidget.cpp" line="558"/> - <source>No valid contacts</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>DetailsLineEdit</name> - <message> - <location filename="detailspage.cpp" line="113"/> - <location filename="detailspage.cpp" line="115"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>DetailsPage</name> - <message> - <location filename="detailspage.cpp" line="37"/> - <source>(no subject)</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="334"/> - <source>Edit message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="344"/> - <source>From contacts</source> - <comment>Find recipient's phone number or email address from Contacts application</comment> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="348"/> - <source>Copy</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="350"/> - <source>Paste</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="361"/> - <source>To</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="377"/> - <source>CC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="393"/> - <source>BCC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="409"/> - <source>Subject</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="420"/> - <source>Delivery report</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="424"/> - <source>Read reply</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="430"/> - <source>From</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="443"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="712"/> - <source>vCard describing %1</source> - <comment>%1 = Person's name</comment> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="721"/> - <source>vCard describing a contact</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="724"/> - <source>vCard describing multiple contacts</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>EmailComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="106"/> - <location filename="qmailcomposer.cpp" line="108"/> - <source>Email</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>GenericComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="179"/> - <source>Message</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>MMSComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="217"/> - <source>Multimedia message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="qmailcomposer.cpp" line="219"/> - <source>MMS</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>QtopiaHomeMailMessageDelegate</name> - <message> - <location filename="qmailmessagedelegate.cpp" line="594"/> - <source>Reply</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>RecipientEdit</name> - <message> - <location filename="detailspage.cpp" line="171"/> - <source>Select Contacts</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="215"/> - <location filename="detailspage.cpp" line="221"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="218"/> - <source>Search</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>RecipientSelectorButton</name> - <message> - <location filename="detailspage.cpp" line="243"/> - <source>...</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>VideomailComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="135"/> - <source>Videomail</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="qmailcomposer.cpp" line="137"/> - <source>Video mail</source> - <translation type="unfinished"></translation> - </message> -</context> -</TS> diff --git a/examples/qtmail/libs/qmfutil/libqmfutil-it.ts b/examples/qtmail/libs/qmfutil/libqmfutil-it.ts deleted file mode 100644 index d16ca308..00000000 --- a/examples/qtmail/libs/qmfutil/libqmfutil-it.ts +++ /dev/null @@ -1,184 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.0"> -<context> - <name>AddressSelectorWidget</name> - <message> - <location filename="addressselectorwidget.cpp" line="558"/> - <source>No valid contacts</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>DetailsLineEdit</name> - <message> - <location filename="detailspage.cpp" line="113"/> - <location filename="detailspage.cpp" line="115"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>DetailsPage</name> - <message> - <location filename="detailspage.cpp" line="37"/> - <source>(no subject)</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="334"/> - <source>Edit message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="344"/> - <source>From contacts</source> - <comment>Find recipient's phone number or email address from Contacts application</comment> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="348"/> - <source>Copy</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="350"/> - <source>Paste</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="361"/> - <source>To</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="377"/> - <source>CC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="393"/> - <source>BCC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="409"/> - <source>Subject</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="420"/> - <source>Delivery report</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="424"/> - <source>Read reply</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="430"/> - <source>From</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="443"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="712"/> - <source>vCard describing %1</source> - <comment>%1 = Person's name</comment> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="721"/> - <source>vCard describing a contact</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="724"/> - <source>vCard describing multiple contacts</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>EmailComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="106"/> - <location filename="qmailcomposer.cpp" line="108"/> - <source>Email</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>GenericComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="179"/> - <source>Message</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>MMSComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="217"/> - <source>Multimedia message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="qmailcomposer.cpp" line="219"/> - <source>MMS</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>QtopiaHomeMailMessageDelegate</name> - <message> - <location filename="qmailmessagedelegate.cpp" line="594"/> - <source>Reply</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>RecipientEdit</name> - <message> - <location filename="detailspage.cpp" line="171"/> - <source>Select Contacts</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="215"/> - <location filename="detailspage.cpp" line="221"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="218"/> - <source>Search</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>RecipientSelectorButton</name> - <message> - <location filename="detailspage.cpp" line="243"/> - <source>...</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>VideomailComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="135"/> - <source>Videomail</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="qmailcomposer.cpp" line="137"/> - <source>Video mail</source> - <translation type="unfinished"></translation> - </message> -</context> -</TS> diff --git a/examples/qtmail/libs/qmfutil/libqmfutil-ja.ts b/examples/qtmail/libs/qmfutil/libqmfutil-ja.ts deleted file mode 100644 index d16ca308..00000000 --- a/examples/qtmail/libs/qmfutil/libqmfutil-ja.ts +++ /dev/null @@ -1,184 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.0"> -<context> - <name>AddressSelectorWidget</name> - <message> - <location filename="addressselectorwidget.cpp" line="558"/> - <source>No valid contacts</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>DetailsLineEdit</name> - <message> - <location filename="detailspage.cpp" line="113"/> - <location filename="detailspage.cpp" line="115"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>DetailsPage</name> - <message> - <location filename="detailspage.cpp" line="37"/> - <source>(no subject)</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="334"/> - <source>Edit message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="344"/> - <source>From contacts</source> - <comment>Find recipient's phone number or email address from Contacts application</comment> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="348"/> - <source>Copy</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="350"/> - <source>Paste</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="361"/> - <source>To</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="377"/> - <source>CC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="393"/> - <source>BCC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="409"/> - <source>Subject</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="420"/> - <source>Delivery report</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="424"/> - <source>Read reply</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="430"/> - <source>From</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="443"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="712"/> - <source>vCard describing %1</source> - <comment>%1 = Person's name</comment> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="721"/> - <source>vCard describing a contact</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="724"/> - <source>vCard describing multiple contacts</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>EmailComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="106"/> - <location filename="qmailcomposer.cpp" line="108"/> - <source>Email</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>GenericComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="179"/> - <source>Message</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>MMSComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="217"/> - <source>Multimedia message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="qmailcomposer.cpp" line="219"/> - <source>MMS</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>QtopiaHomeMailMessageDelegate</name> - <message> - <location filename="qmailmessagedelegate.cpp" line="594"/> - <source>Reply</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>RecipientEdit</name> - <message> - <location filename="detailspage.cpp" line="171"/> - <source>Select Contacts</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="215"/> - <location filename="detailspage.cpp" line="221"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="218"/> - <source>Search</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>RecipientSelectorButton</name> - <message> - <location filename="detailspage.cpp" line="243"/> - <source>...</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>VideomailComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="135"/> - <source>Videomail</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="qmailcomposer.cpp" line="137"/> - <source>Video mail</source> - <translation type="unfinished"></translation> - </message> -</context> -</TS> diff --git a/examples/qtmail/libs/qmfutil/libqmfutil-ko.ts b/examples/qtmail/libs/qmfutil/libqmfutil-ko.ts deleted file mode 100644 index d16ca308..00000000 --- a/examples/qtmail/libs/qmfutil/libqmfutil-ko.ts +++ /dev/null @@ -1,184 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.0"> -<context> - <name>AddressSelectorWidget</name> - <message> - <location filename="addressselectorwidget.cpp" line="558"/> - <source>No valid contacts</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>DetailsLineEdit</name> - <message> - <location filename="detailspage.cpp" line="113"/> - <location filename="detailspage.cpp" line="115"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>DetailsPage</name> - <message> - <location filename="detailspage.cpp" line="37"/> - <source>(no subject)</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="334"/> - <source>Edit message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="344"/> - <source>From contacts</source> - <comment>Find recipient's phone number or email address from Contacts application</comment> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="348"/> - <source>Copy</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="350"/> - <source>Paste</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="361"/> - <source>To</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="377"/> - <source>CC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="393"/> - <source>BCC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="409"/> - <source>Subject</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="420"/> - <source>Delivery report</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="424"/> - <source>Read reply</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="430"/> - <source>From</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="443"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="712"/> - <source>vCard describing %1</source> - <comment>%1 = Person's name</comment> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="721"/> - <source>vCard describing a contact</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="724"/> - <source>vCard describing multiple contacts</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>EmailComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="106"/> - <location filename="qmailcomposer.cpp" line="108"/> - <source>Email</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>GenericComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="179"/> - <source>Message</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>MMSComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="217"/> - <source>Multimedia message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="qmailcomposer.cpp" line="219"/> - <source>MMS</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>QtopiaHomeMailMessageDelegate</name> - <message> - <location filename="qmailmessagedelegate.cpp" line="594"/> - <source>Reply</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>RecipientEdit</name> - <message> - <location filename="detailspage.cpp" line="171"/> - <source>Select Contacts</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="215"/> - <location filename="detailspage.cpp" line="221"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="218"/> - <source>Search</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>RecipientSelectorButton</name> - <message> - <location filename="detailspage.cpp" line="243"/> - <source>...</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>VideomailComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="135"/> - <source>Videomail</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="qmailcomposer.cpp" line="137"/> - <source>Video mail</source> - <translation type="unfinished"></translation> - </message> -</context> -</TS> diff --git a/examples/qtmail/libs/qmfutil/libqmfutil-pt_BR.ts b/examples/qtmail/libs/qmfutil/libqmfutil-pt_BR.ts deleted file mode 100644 index d16ca308..00000000 --- a/examples/qtmail/libs/qmfutil/libqmfutil-pt_BR.ts +++ /dev/null @@ -1,184 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.0"> -<context> - <name>AddressSelectorWidget</name> - <message> - <location filename="addressselectorwidget.cpp" line="558"/> - <source>No valid contacts</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>DetailsLineEdit</name> - <message> - <location filename="detailspage.cpp" line="113"/> - <location filename="detailspage.cpp" line="115"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>DetailsPage</name> - <message> - <location filename="detailspage.cpp" line="37"/> - <source>(no subject)</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="334"/> - <source>Edit message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="344"/> - <source>From contacts</source> - <comment>Find recipient's phone number or email address from Contacts application</comment> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="348"/> - <source>Copy</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="350"/> - <source>Paste</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="361"/> - <source>To</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="377"/> - <source>CC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="393"/> - <source>BCC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="409"/> - <source>Subject</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="420"/> - <source>Delivery report</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="424"/> - <source>Read reply</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="430"/> - <source>From</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="443"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="712"/> - <source>vCard describing %1</source> - <comment>%1 = Person's name</comment> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="721"/> - <source>vCard describing a contact</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="724"/> - <source>vCard describing multiple contacts</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>EmailComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="106"/> - <location filename="qmailcomposer.cpp" line="108"/> - <source>Email</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>GenericComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="179"/> - <source>Message</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>MMSComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="217"/> - <source>Multimedia message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="qmailcomposer.cpp" line="219"/> - <source>MMS</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>QtopiaHomeMailMessageDelegate</name> - <message> - <location filename="qmailmessagedelegate.cpp" line="594"/> - <source>Reply</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>RecipientEdit</name> - <message> - <location filename="detailspage.cpp" line="171"/> - <source>Select Contacts</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="215"/> - <location filename="detailspage.cpp" line="221"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="218"/> - <source>Search</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>RecipientSelectorButton</name> - <message> - <location filename="detailspage.cpp" line="243"/> - <source>...</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>VideomailComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="135"/> - <source>Videomail</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="qmailcomposer.cpp" line="137"/> - <source>Video mail</source> - <translation type="unfinished"></translation> - </message> -</context> -</TS> diff --git a/examples/qtmail/libs/qmfutil/libqmfutil-zh_CN.ts b/examples/qtmail/libs/qmfutil/libqmfutil-zh_CN.ts deleted file mode 100644 index d16ca308..00000000 --- a/examples/qtmail/libs/qmfutil/libqmfutil-zh_CN.ts +++ /dev/null @@ -1,184 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.0"> -<context> - <name>AddressSelectorWidget</name> - <message> - <location filename="addressselectorwidget.cpp" line="558"/> - <source>No valid contacts</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>DetailsLineEdit</name> - <message> - <location filename="detailspage.cpp" line="113"/> - <location filename="detailspage.cpp" line="115"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>DetailsPage</name> - <message> - <location filename="detailspage.cpp" line="37"/> - <source>(no subject)</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="334"/> - <source>Edit message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="344"/> - <source>From contacts</source> - <comment>Find recipient's phone number or email address from Contacts application</comment> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="348"/> - <source>Copy</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="350"/> - <source>Paste</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="361"/> - <source>To</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="377"/> - <source>CC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="393"/> - <source>BCC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="409"/> - <source>Subject</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="420"/> - <source>Delivery report</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="424"/> - <source>Read reply</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="430"/> - <source>From</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="443"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="712"/> - <source>vCard describing %1</source> - <comment>%1 = Person's name</comment> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="721"/> - <source>vCard describing a contact</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="724"/> - <source>vCard describing multiple contacts</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>EmailComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="106"/> - <location filename="qmailcomposer.cpp" line="108"/> - <source>Email</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>GenericComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="179"/> - <source>Message</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>MMSComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="217"/> - <source>Multimedia message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="qmailcomposer.cpp" line="219"/> - <source>MMS</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>QtopiaHomeMailMessageDelegate</name> - <message> - <location filename="qmailmessagedelegate.cpp" line="594"/> - <source>Reply</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>RecipientEdit</name> - <message> - <location filename="detailspage.cpp" line="171"/> - <source>Select Contacts</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="215"/> - <location filename="detailspage.cpp" line="221"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="218"/> - <source>Search</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>RecipientSelectorButton</name> - <message> - <location filename="detailspage.cpp" line="243"/> - <source>...</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>VideomailComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="135"/> - <source>Videomail</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="qmailcomposer.cpp" line="137"/> - <source>Video mail</source> - <translation type="unfinished"></translation> - </message> -</context> -</TS> diff --git a/examples/qtmail/libs/qmfutil/libqmfutil-zh_TW.ts b/examples/qtmail/libs/qmfutil/libqmfutil-zh_TW.ts deleted file mode 100644 index d16ca308..00000000 --- a/examples/qtmail/libs/qmfutil/libqmfutil-zh_TW.ts +++ /dev/null @@ -1,184 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.0"> -<context> - <name>AddressSelectorWidget</name> - <message> - <location filename="addressselectorwidget.cpp" line="558"/> - <source>No valid contacts</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>DetailsLineEdit</name> - <message> - <location filename="detailspage.cpp" line="113"/> - <location filename="detailspage.cpp" line="115"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>DetailsPage</name> - <message> - <location filename="detailspage.cpp" line="37"/> - <source>(no subject)</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="334"/> - <source>Edit message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="344"/> - <source>From contacts</source> - <comment>Find recipient's phone number or email address from Contacts application</comment> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="348"/> - <source>Copy</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="350"/> - <source>Paste</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="361"/> - <source>To</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="377"/> - <source>CC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="393"/> - <source>BCC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="409"/> - <source>Subject</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="420"/> - <source>Delivery report</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="424"/> - <source>Read reply</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="430"/> - <source>From</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="443"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="712"/> - <source>vCard describing %1</source> - <comment>%1 = Person's name</comment> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="721"/> - <source>vCard describing a contact</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="724"/> - <source>vCard describing multiple contacts</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>EmailComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="106"/> - <location filename="qmailcomposer.cpp" line="108"/> - <source>Email</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>GenericComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="179"/> - <source>Message</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>MMSComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="217"/> - <source>Multimedia message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="qmailcomposer.cpp" line="219"/> - <source>MMS</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>QtopiaHomeMailMessageDelegate</name> - <message> - <location filename="qmailmessagedelegate.cpp" line="594"/> - <source>Reply</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>RecipientEdit</name> - <message> - <location filename="detailspage.cpp" line="171"/> - <source>Select Contacts</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="215"/> - <location filename="detailspage.cpp" line="221"/> - <source>Send</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="detailspage.cpp" line="218"/> - <source>Search</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>RecipientSelectorButton</name> - <message> - <location filename="detailspage.cpp" line="243"/> - <source>...</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>VideomailComposerPlugin</name> - <message> - <location filename="qmailcomposer.cpp" line="135"/> - <source>Videomail</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="qmailcomposer.cpp" line="137"/> - <source>Video mail</source> - <translation type="unfinished"></translation> - </message> -</context> -</TS> diff --git a/examples/qtmail/libs/qmfutil/pics/icons/16x16/edit.png b/examples/qtmail/libs/qmfutil/pics/icons/16x16/edit.png Binary files differdeleted file mode 100644 index fc9884bf..00000000 --- a/examples/qtmail/libs/qmfutil/pics/icons/16x16/edit.png +++ /dev/null diff --git a/examples/qtmail/libs/qmfutil/pics/icons/16x16/folder.png b/examples/qtmail/libs/qmfutil/pics/icons/16x16/folder.png Binary files differdeleted file mode 100644 index f7e8c351..00000000 --- a/examples/qtmail/libs/qmfutil/pics/icons/16x16/folder.png +++ /dev/null diff --git a/examples/qtmail/libs/qmfutil/pics/icons/16x16/folder_inbox.png b/examples/qtmail/libs/qmfutil/pics/icons/16x16/folder_inbox.png Binary files differdeleted file mode 100644 index cafac619..00000000 --- a/examples/qtmail/libs/qmfutil/pics/icons/16x16/folder_inbox.png +++ /dev/null diff --git a/examples/qtmail/libs/qmfutil/pics/icons/16x16/folder_outbox.png b/examples/qtmail/libs/qmfutil/pics/icons/16x16/folder_outbox.png Binary files differdeleted file mode 100644 index 91e3b244..00000000 --- a/examples/qtmail/libs/qmfutil/pics/icons/16x16/folder_outbox.png +++ /dev/null diff --git a/examples/qtmail/libs/qmfutil/pics/icons/16x16/folder_sent_mail.png b/examples/qtmail/libs/qmfutil/pics/icons/16x16/folder_sent_mail.png Binary files differdeleted file mode 100644 index 3b513045..00000000 --- a/examples/qtmail/libs/qmfutil/pics/icons/16x16/folder_sent_mail.png +++ /dev/null diff --git a/examples/qtmail/libs/qmfutil/pics/icons/16x16/server.png b/examples/qtmail/libs/qmfutil/pics/icons/16x16/server.png Binary files differdeleted file mode 100644 index ef289f6f..00000000 --- a/examples/qtmail/libs/qmfutil/pics/icons/16x16/server.png +++ /dev/null diff --git a/examples/qtmail/libs/qmfutil/pics/icons/16x16/trash.png b/examples/qtmail/libs/qmfutil/pics/icons/16x16/trash.png Binary files differdeleted file mode 100644 index cef2ad65..00000000 --- a/examples/qtmail/libs/qmfutil/pics/icons/16x16/trash.png +++ /dev/null diff --git a/examples/qtmail/libs/qmfutil/pics/icons/mail_find.png b/examples/qtmail/libs/qmfutil/pics/icons/mail_find.png Binary files differdeleted file mode 100644 index bae182de..00000000 --- a/examples/qtmail/libs/qmfutil/pics/icons/mail_find.png +++ /dev/null diff --git a/examples/qtmail/libs/qmfutil/qmailcomposer.cpp b/examples/qtmail/libs/qmfutil/qmailcomposer.cpp deleted file mode 100644 index 4d3ab43f..00000000 --- a/examples/qtmail/libs/qmfutil/qmailcomposer.cpp +++ /dev/null @@ -1,406 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Messaging Framework. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qmailcomposer.h" -#include <QApplication> -#include <QIcon> -#include <QMap> -#include <QWidget> -#include <qmaillog.h> -#include <qmailpluginmanager.h> -#include <qmailaccount.h> -#include <qmailmessage.h> - -#define PLUGIN_KEY "composers" - -typedef QMap<QString, QMailComposerInterface*> PluginMap; - -// Load all the viewer plugins into a map for quicker reference -static PluginMap initMap(QMailPluginManager& manager) -{ - PluginMap map; - - foreach (const QString &item, manager.list()) { - QObject *instance = manager.instance(item); - if (QMailComposerInterface* iface = qobject_cast<QMailComposerInterface*>(instance)) - map.insert(iface->key(), iface); - } - return map; -} - -// Return a reference to a map containing all loaded plugin objects -static PluginMap& pluginMap() -{ - static QMailPluginManager pluginManager(PLUGIN_KEY); - static PluginMap map(initMap(pluginManager)); - - return map; -} - -// Return the composer plugin object matching the specified ID -static QMailComposerInterface* mapping(const QString& key) -{ - PluginMap::ConstIterator it; - if ((it = pluginMap().find(key)) != pluginMap().end()) - return it.value(); - - qWarning() << "Failed attempt to map composer:" << key; - return 0; -} - -/*! - \class QMailComposerInterface - \ingroup qmfutil - - \brief The QMailComposerInterface class defines the interface to objects that can compose a mail message. - - Qt Extended uses the QMailComposerInterface interface for composing mail messages. A class may implement the - QMailComposerInterface interface to compose a mail message format. - - The composer class may start composing with no associated message, or it may be provided with an existing - message to edit, via the \l {QMailComposerInterface::compose()}{compose()} function. - A client can query whether the composer object is empty with the - \l {QMailComposerInterface::isEmpty()}{isEmpty()} function, and extract the - composed message with the \l {QMailComposerInterface::message()}{message()} function. The current - state of composition can be cleared with the \l {QMailComposerInterface::clear()}{clear()} function. - - The composer object should emit the \l {QMailComposerInterface::changed()}{changed()} signal - whenever the composed message changes. If composition is cancelled, the composer should emit the - \l {QMailComposerInterface::cancel()}{cancel()} signal. When the message is ready to send, the composer should - emit the \l {QMailComposerInterface::sendMessage()}{sendMessage()} signal. For composers which need to inform - of state changes during composition, such as multi-page composers, - the \l {QMailComposerInterface::statusChanged()}{statusChanged()} signal should be emitted to allow container - objects to update their view of the \l {QMailComposerInterface::status()}{status()} string. - - Each composer class must export metadata describing itself and the messages it is able to compose. To do - this, the composer must implement the - \l {QMailComposerInterface::key()}{key()}, - \l {QMailComposerInterface::messageTypes()}{messageTypes()}, - \l {QMailComposerInterface::name()}{name()}, - \l {QMailComposerInterface::displayName()}{displayName()} and - \l {QMailComposerInterface::displayIcon()}{displayIcon()} functions. - - \code - QString key = QMailComposerFactory::defaultKey( QMailMessage::Email ); - QMailComposerInterface* emailComposer = QMailComposerFactory::create( key, this, "emailComposer" ); - \endcode - - \sa QMailComposerFactory -*/ - -/*! - Constructs the QMailComposerInterface object with the parent widget \a parent. -*/ -QMailComposerInterface::QMailComposerInterface( QWidget *parent ) - : QWidget( parent ) -{ -} - -/*! - Returns a string identifying the composer. -*/ - -QString QMailComposerInterface::key() const -{ - QString val = metaObject()->className(); - val.chop(9); // remove trailing "Interface" - return val; -} - -/*! - Returns the message types created by the composer. -*/ -QList<QMailMessage::MessageType> QMailComposerInterface::messageTypes() const -{ - return mapping(key())->messageTypes(); -} - -/*! - Returns the content types created by the composer. -*/ -QList<QMailMessage::ContentType> QMailComposerInterface::contentTypes() const -{ - return mapping(key())->contentTypes(); -} - -/*! - Returns the translated name of the message type \a type created by the composer. -*/ -QString QMailComposerInterface::name(QMailMessage::MessageType type) const -{ - return mapping(key())->name(type); -} - -/*! - Returns the translated name of the message type \a type created by the composer, - in a form suitable for display on a button or menu. -*/ -QString QMailComposerInterface::displayName(QMailMessage::MessageType type) const -{ - return mapping(key())->displayName(type); -} - -/*! - Returns the icon representing the message type \a type created by the composer. -*/ -QIcon QMailComposerInterface::displayIcon(QMailMessage::MessageType type) const -{ - return mapping(key())->displayIcon(type); -} - -/* ! - Adds \a item as an attachment to the message in the composer. The \a action parameter - specifies what the composer should do with \a item. -void QMailComposerInterface::attach( const QContent& item, QMailMessage::AttachmentsAction action ) -{ - // default implementation does nothing - Q_UNUSED(item) - Q_UNUSED(action) -} -*/ - -/*! - Sets the composer to append \a signature to the body of the message, when creating a message. -*/ -void QMailComposerInterface::setSignature(const QString& signature) -{ - // default implementation does nothing - Q_UNUSED(signature) -} - -/*! - Sets the composer to use the account identified by \a accountId for outgoing messages. -*/ -void QMailComposerInterface::setSendingAccountId(const QMailAccountId &accountId) -{ - // default implementation does nothing - Q_UNUSED(accountId) -} - -/*! - Returns a list of actions that are exported by the composer. -*/ -QList<QAction*> QMailComposerInterface::actions() const -{ - return QList<QAction*>(); -} - -/*! - \fn bool QMailComposerInterface::isEmpty() const - - Returns true if the composer contains no message content; otherwise returns false. -*/ - -/*! - \fn QMailMessage QMailComposerInterface::message() const - - Returns the current content of the composer. -*/ - -/*! - \fn void QMailComposerInterface::compose(QMailMessage::ResponseType type, - const QMailMessage& source = QMailMessage(), - const QMailMessagePart::Location& sourceLocation = QMailMessagePart::Location(), - QMailMessage::MessageType messageType = QMailMessage::AnyType) - - Directs the composer to compose a message, of the form required for the response type \a type. - If \a source is non-empty, then it should be interpreted as preset content to be composed. - If \a sourceLocation is non-empty, then it should be interpreted as indicating a message part - that forms preset content for the composition. \a messageType indicates the type of - message that the composer should produce. -*/ - -/*! - \fn void QMailComposerInterface::clear() - - Clears any message content contained in the composer. -*/ - -/*! - \fn QString QMailComposerInterface::title() const - - Returns a string that may be used as the title for the composer presentation. -*/ - -/*! - Returns a string description of the current composition state. -*/ -QString QMailComposerInterface::status() const -{ - return QString(); -} - -/*! - \fn bool QMailComposerInterface::isReadyToSend() const - - Returns true if the composed message is ready to send or \c false otherwise. -*/ - -/*! - \fn bool QMailComposerInterface::isSupported(QMailMessage::MessageType t, QMailMessage::ContentType c) const - - Returns true if the composer can produce a message of type \a t, containing data of content type \a c. -*/ - -/*! - \fn void QMailComposerInterface::cancel() - - Signal that is emitted when message composition is cancelled. - - \sa changed() -*/ - -/*! - \fn void QMailComposerInterface::changed() - - Signal that is emitted when the currently composed message has been changed. - - \sa cancel() -*/ - -/*! - \fn void QMailComposerInterface::statusChanged(const QString &status) - - Signal that is emitted when the message composition state has changed, to a new - state described by \a status. For example, when transitioning from message body - composition to message details composition in a multi-page composer. - - \sa status(), cancel(), changed() -*/ - -/*! - \fn void QMailComposerInterface::sendMessage() - - Signal that is emitted when message composition has finished and the message is ready to send. - - \sa isReadyToSend() -*/ - -/*! - \class QMailComposerFactory - \ingroup qmfutil - - \brief The QMailComposerFactory class creates objects implementing the QMailComposerInterface interface. - - The QMailComposerFactory class creates objects that are able to compose mail messages, and - that implement the QMailComposerInterface interface. The factory chooses an implementation - based on the type of message to be composed. - - The QMailComposerInterface class describes the interface supported by classes that can be created - by the QMailComposerFactory class. To create a new class that can be created via the QMailComposerFactory, - implement a plug-in that derives from QMailComposerInterface. - - \sa QMailComposerInterface -*/ - -/*! - Returns a list of keys identifying classes that can compose messages of type \a type containing \a contentType content. -*/ -QStringList QMailComposerFactory::keys( QMailMessage::MessageType type , QMailMessage::ContentType contentType) -{ - QStringList in; - - foreach (PluginMap::mapped_type plugin, pluginMap()) - if (plugin->isSupported(type, contentType)) - in << plugin->key(); - - return in; -} - -/*! - Returns the key identifying the first class found that can compose messages of type \a type. -*/ -QString QMailComposerFactory::defaultKey( QMailMessage::MessageType type ) -{ - QStringList list(QMailComposerFactory::keys(type)); - return (list.isEmpty() ? QString() : list.first()); -} - -/*! - Returns the message types created by the composer identified by \a key. - - \sa QMailComposerInterface::messageTypes() -*/ -QList<QMailMessage::MessageType> QMailComposerFactory::messageTypes( const QString& key ) -{ - return mapping(key)->messageTypes(); -} - -/*! - Returns the name for the message type \a type created by the composer identified by \a key. - - \sa QMailComposerInterface::name() -*/ -QString QMailComposerFactory::name(const QString &key, QMailMessage::MessageType type) -{ - return mapping(key)->name(type); -} - -/*! - Returns the display name for the message type \a type created by the composer identified by \a key. - - \sa QMailComposerInterface::displayName() -*/ -QString QMailComposerFactory::displayName(const QString &key, QMailMessage::MessageType type) -{ - return mapping(key)->displayName(type); -} - -/*! - Returns the display icon for the message type \a type created by the composer identified by \a key. - - \sa QMailComposerInterface::displayIcon() -*/ -QIcon QMailComposerFactory::displayIcon(const QString &key, QMailMessage::MessageType type) -{ - return mapping(key)->displayIcon(type); -} - -/*! - Creates a composer object of the class identified by \a key, setting the returned object to - have the parent widget \a parent. -*/ -QMailComposerInterface *QMailComposerFactory::create( const QString& key, QWidget *parent ) -{ - Q_UNUSED(parent); - return mapping(key); -} - diff --git a/examples/qtmail/libs/qmfutil/qmailcomposer.h b/examples/qtmail/libs/qmfutil/qmailcomposer.h deleted file mode 100644 index 5152b683..00000000 --- a/examples/qtmail/libs/qmfutil/qmailcomposer.h +++ /dev/null @@ -1,127 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Messaging Framework. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QMAILCOMPOSER_H -#define QMAILCOMPOSER_H - -#include <QWidget> -#include <QList> -#include <QString> -#include <qmailglobal.h> -#include <qmailmessage.h> -#include <QAction> - -class QMailAccount; - -QT_BEGIN_NAMESPACE - -class QMenu; - -QT_END_NAMESPACE - -class QMFUTIL_EXPORT QMailComposerInterface : public QWidget -{ - Q_OBJECT - -public: - QMailComposerInterface( QWidget *parent = 0 ); - - virtual QString key() const = 0; - virtual QList<QMailMessage::MessageType> messageTypes() const = 0; - virtual QList<QMailMessage::ContentType> contentTypes() const = 0; - virtual QString name(QMailMessage::MessageType type) const = 0; - virtual QString displayName(QMailMessage::MessageType type) const = 0; - virtual QIcon displayIcon(QMailMessage::MessageType type) const = 0; - virtual bool isSupported(QMailMessage::MessageType t, QMailMessage::ContentType c = QMailMessage::NoContent) const - { - bool supportsMessageType(t == QMailMessage::AnyType || messageTypes().contains(t)); - bool supportsContentType(c == QMailMessage::NoContent || contentTypes().contains(c)); - - return (supportsMessageType && supportsContentType); - } - - virtual QString title() const = 0; - virtual void compose(QMailMessage::ResponseType type, - const QMailMessage& source = QMailMessage(), - const QMailMessagePart::Location& sourceLocation = QMailMessagePart::Location(), - QMailMessage::MessageType = QMailMessage::AnyType) = 0; - - virtual QMailMessage message() const = 0; - virtual QList<QAction*> actions() const; - virtual bool isEmpty() const = 0; - virtual bool isReadyToSend() const = 0; - virtual QString status() const; - -public slots: - virtual void clear() = 0; - //virtual void attach( const QContent &lnk, QMailMessage::AttachmentsAction action = QMailMessage::LinkToAttachments ); - virtual void setSignature(const QString &sig); - virtual void setSendingAccountId(const QMailAccountId &accountId); - -signals: - void sendMessage(); - void cancel(); - void changed(); - void statusChanged(const QString& status); -}; - -class QMFUTIL_EXPORT QMailComposerFactory -{ -public: - // Yield the key for each interface supporting the supplied type - static QStringList keys(QMailMessage::MessageType type = QMailMessage::AnyType, - QMailMessage::ContentType contentType = QMailMessage::NoContent); - - // Yield the default key for the supplied type - static QString defaultKey( QMailMessage::MessageType type = QMailMessage::AnyType ); - - // Properties available for each interface - static QList<QMailMessage::MessageType> messageTypes(const QString &key); - //static QList<QMailMessage::ContentType> contentTypes(const QString& key); - static QString name(const QString &key, QMailMessage::MessageType type); - static QString displayName(const QString &key, QMailMessage::MessageType type); - static QIcon displayIcon(const QString &key, QMailMessage::MessageType type); - - // Use the interface identified by the supplied key to create a composer - static QMailComposerInterface *create( const QString& key, QWidget *parent = 0 ); -}; - -#endif diff --git a/examples/qtmail/libs/qmfutil/qmailviewer.cpp b/examples/qtmail/libs/qmfutil/qmailviewer.cpp deleted file mode 100644 index 126880ba..00000000 --- a/examples/qtmail/libs/qmfutil/qmailviewer.cpp +++ /dev/null @@ -1,380 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Messaging Framework. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qmailviewer.h" -#include <QApplication> -#include <QIcon> -#include <QMap> -#include <QUrl> -#include <QWidget> -#include <qmaillog.h> -#include <qmailpluginmanager.h> - -#define PLUGIN_KEY "viewers" - -typedef QMap<QString, QMailViewerInterface*> PluginMap; - -// Load all the viewer plugins into a map for quicker reference -static PluginMap initMap(QMailPluginManager& manager) -{ - PluginMap map; - - foreach (const QString &item, manager.list()) { - QObject *instance = manager.instance(item); - if (QMailViewerInterface* iface = qobject_cast<QMailViewerInterface*>(instance)) - map.insert(iface->key(), iface); - } - return map; -} - -// Return a reference to a map containing all loaded plugin objects -static PluginMap& pluginMap() -{ - static QMailPluginManager pluginManager(PLUGIN_KEY); - static PluginMap map(initMap(pluginManager)); - - return map; -} - -// Return the viewer plugin object matching the specified ID -static QMailViewerInterface* mapping(const QString& key) -{ - PluginMap::ConstIterator it; - if ((it = pluginMap().find(key)) != pluginMap().end()) - return it.value(); - - return 0; -} - -/*! - \class QMailViewerInterface - \ingroup qmfutil - - \brief The QMailViewerInterface class defines the interface to objects that can display a mail message. - - Qt Extended uses the QMailViewerInterface interface for displaying mail messages. A class may implement the - QMailViewerInterface interface to display a mail message format. - - The message to be displayed is provided to the viewer class using the \l {QMailViewerInterface::setMessage()} - {setMessage()} function. If the message refers to external resources, these should be provided using the - \l {QMailViewerInterface::setResource()}{setResource()} function. The \l {QMailViewerInterface::clear()}{clear()} - function clears any message or resources previously set. - - The viewer object should emit the \l {QMailViewerInterface::anchorClicked()}{anchorClicked()} signal if the user - selects a link in the message. If the message supports a concept of completion, then the - \l {QMailViewerInterface::finished()}{finished()} signal should be emitted after the display has been completed. - - Rather than creating objects that implement the QMailViewerInterface directly, clients should create an object - of an appropriate type by using the QMailViewerFactory class: - - \code - QString key = QMailViewerFactory::defaultKey( QMailViewerFactory::SmilContent ); - QMailViewerInterface* smilViewer = QMailViewerFactory::create( key, this, "smilViewer" ); - \endcode - - \sa QMailViewerFactory -*/ - -/*! - \fn QWidget* QMailViewerInterface::widget() const - - Returns the top-level widget that implements the viewer functionality. -*/ - -/*! - \fn bool QMailViewerInterface::setMessage(const QMailMessage& mail) - - Displays the contents of \a mail. Returns whether the message could be successfully displayed. -*/ - -/*! - \fn void QMailViewerInterface::clear() - - Resets the display to have no content, and removes any resource associations. -*/ - -/*! - \fn QMailViewerInterface::respondToMessage(QMailMessage::ResponseType type) - - This signal is emitted by the viewer to initiate a response action, of type \a type. -*/ - -/*! - \fn QMailViewerInterface::respondToMessagePart(const QMailMessagePart::Location &partLocation, QMailMessage::ResponseType type) - - This signal is emitted by the viewer to initiate a response to the message - part indicated by \a partLocation, of type \a type. -*/ - -/*! - \fn QMailViewerInterface::contactDetails(const QContact &contact) - - This signal is emitted by the viewer to request a display of \a{contact}'s details. -*/ - -/*! - \fn QMailViewerInterface::anchorClicked(const QUrl& link) - - This signal is emitted when the user presses the select key while the display has the - anchor \a link selected. -*/ - -/*! - \fn QMailViewerInterface::messageChanged(const QMailMessageId &id) - - This signal is emitted by the viewer to report that it is now viewing a different message, - identified by \a id. -*/ - -/*! - \fn QMailViewerInterface::viewMessage(const QMailMessageId &id, QMailViewerFactory::PresentationType type) - - This signal is emitted by the viewer to request a display of the message identified by \a id, - using the presentation style \a type. -*/ - -/*! - \fn QMailViewerInterface::sendMessage(QMailMessage &message) - - This signal is emitted by the viewer to send a new message, whose contents are held by \a message. -*/ - -/*! - \fn QMailViewerInterface::finished() - - This signal is emitted when the display of the current mail message is completed. This signal - is emitted only for message types that define a concept of completion, such as SMIL slideshows. -*/ - -/*! - \fn QMailViewerInterface::retrieveMessage() - - This signal is emitted by the viewer to initiate a message completion action. - This is only meaningful if the message has not yet been completely retrieved. - - \sa QMailMessage::status(), QMailRetrievalAction::retrieveMessages() -*/ - -/*! - \fn QMailViewerInterface::retrieveMessagePortion(uint bytes) - - This signal is emitted by the viewer to retrieve an additional \a bytes from the message. - This is only meaningful if the message has not yet been completely retrieved. - - \sa QMailMessage::status(), QMailRetrievalAction::retrieveMessages() -*/ - -/*! - \fn QMailViewerInterface::retrieveMessagePart(const QMailMessagePart &part) - - This signal is emitted by the viewer to initiate a message part retrieval action for \a part. -*/ - -/*! - \fn QMailViewerInterface::retrieveMessagePartPortion(const QMailMessagePart &part, uint bytes) - - This signal is emitted by the viewer to initiate a message part retrieval action for an additional \a bytes of the \a part. -*/ - -/*! - Constructs the QMailViewerInterface object with the parent widget \a parent. -*/ -QMailViewerInterface::QMailViewerInterface( QWidget *parent ) - : QObject( parent ) -{ -} - -/*! - Destructs the QMailViewerInterface object. -*/ -QMailViewerInterface::~QMailViewerInterface() -{ -} - -/*! - Scrolls the display to position the \a link within the viewable area. -*/ -void QMailViewerInterface::scrollToAnchor(const QString& link) -{ - // default implementation does nothing - Q_UNUSED(link) -} - -/*! - \fn void QMailViewerInterface::addActions(const QList<QAction*>& actions) - - Requests that the viewer add the content of \a actions to the set of available user actions. -*/ - -/*! - \fn void QMailViewerInterface::removeAction(QAction* action) - - Requests that the viewer remove \a action from the set of available user actions. -*/ - -/*! - Allows the viewer object to handle the notification of the arrival of new messages, - identified by \a list. - - Return true to indicate that the event has been handled, or false to let the caller handle - the new message event. -*/ -bool QMailViewerInterface::handleIncomingMessages( const QMailMessageIdList &list ) const -{ - // default implementation does nothing - Q_UNUSED(list) - return false; -} - -/*! - Allows the viewer object to handle the notification of the transmission of queued messages, - identified by \a list. - - Return true to indicate that the event has been handled, or false to let the caller handle - the new message event. -*/ -bool QMailViewerInterface::handleOutgoingMessages( const QMailMessageIdList &list ) const -{ - // default implementation does nothing - Q_UNUSED(list) - return false; -} - -/*! - \fn QString QMailViewerInterface::key() const - - Returns a value that uniquely identifies the viewer component. -*/ - -/*! - \fn QMailViewerFactory::PresentationType QMailViewerInterface::presentation() const - - Returns the type of message presentation that this viewer implements. -*/ - -/*! - \fn bool QMailViewerInterface::isSupported(QMailMessage::ContentType t, QMailViewerFactory::PresentationType pres) const - - Returns true if the viewer can present a message containing data of content type \a t, using the - presentation type \a pres. -*/ - -/*! - \fn QList<QMailMessage::ContentType> QMailViewerInterface::types() const - - Returns a list of the content types that can be presented by this viewer component. -*/ - -/*! - Supplies the viewer object with a resource that may be referenced by a mail message. The resource - identified as \a name will be displayed as the object \a value. -*/ -void QMailViewerInterface::setResource(const QUrl& name, QVariant value) -{ - // default implementation does nothing - Q_UNUSED(name) - Q_UNUSED(value) -} - - -/*! - \class QMailViewerFactory - \ingroup qmfutil - - \brief The QMailViewerFactory class creates objects implementing the QMailViewerInterface interface. - - The QMailViewerFactory class creates objects that are able to display mail messages, and - implement the QMailViewerInterface interface. The factory chooses an implementation - based on the type of message to be displayed. - - The QMailViewerInterface class describes the interface supported by classes that can be created - by the QMailViewerFactory class. To create a new class that can be created via the QMailViewerFactory, - implement a plug-in that derives from QMailViewerInterface. - - \sa QMailViewerInterface -*/ - -/*! - \enum QMailViewerFactory::PresentationType - - This enum defines the types of presentation that message viewer components may implement. - - \value AnyPresentation Do not specify the type of presentation to be employed. - \value StandardPresentation Present the message in the standard fashion for the relevant content type. - \value ConversationPresentation Present the message in the context of a conversation with a contact. - \value UserPresentation The first value that can be used for application-specific purposes. -*/ - -/*! - Returns a list of keys identifying classes that can display a message containing \a type content, - using the presentation type \a pres. -*/ -QStringList QMailViewerFactory::keys(QMailMessage::ContentType type, PresentationType pres) -{ - QStringList in; - - foreach (PluginMap::mapped_type plugin, pluginMap()) - if (plugin->isSupported(type, pres)) - in << plugin->key(); - - return in; -} - -/*! - Returns the key identifying the first class found that can display message containing \a type content, - using the presentation type \a pres. -*/ -QString QMailViewerFactory::defaultKey(QMailMessage::ContentType type, PresentationType pres) -{ - QStringList list(QMailViewerFactory::keys(type, pres)); - return (list.isEmpty() ? QString() : list.first()); -} - -/*! - Creates a viewer object of the class identified by \a key, setting the returned object to - have the parent widget \a parent. -*/ -QMailViewerInterface *QMailViewerFactory::create(const QString &key, QWidget *parent) -{ - Q_UNUSED(parent); - return mapping(key); -} - diff --git a/examples/qtmail/libs/qmfutil/qmailviewer.h b/examples/qtmail/libs/qmfutil/qmailviewer.h deleted file mode 100644 index 92dab0ee..00000000 --- a/examples/qtmail/libs/qmfutil/qmailviewer.h +++ /dev/null @@ -1,136 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Messaging Framework. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QMAILVIEWER_H -#define QMAILVIEWER_H - -#include <qmailmessage.h> -#include <QObject> -#include <QString> -#include <QVariant> -#include <qmailglobal.h> -#include <QWidget> - -QT_BEGIN_NAMESPACE - -class QContact; -class QMenu; -class QUrl; - -QT_END_NAMESPACE - -class QMailViewerInterface; - -class QMFUTIL_EXPORT QMailViewerFactory -{ -public: - enum PresentationType - { - AnyPresentation = 0, - StandardPresentation = 1, - ConversationPresentation = 2, - UserPresentation = 64 - }; - - // Yield the ID for each interface supporting the supplied type, where the - // value is interpreted as a ContentType value - static QStringList keys(QMailMessage::ContentType type = QMailMessage::UnknownContent, PresentationType pres = AnyPresentation); - - // Yield the default ID for the supplied type - static QString defaultKey(QMailMessage::ContentType type = QMailMessage::UnknownContent, PresentationType pres = AnyPresentation); - - // Use the interface identified by the supplied ID to create a viewer - static QMailViewerInterface *create(const QString &key, QWidget *parent = 0); -}; - -// The interface for objects able to view mail messages -class QMFUTIL_EXPORT QMailViewerInterface : public QObject -{ - Q_OBJECT - -public: - QMailViewerInterface( QWidget* parent = 0 ); - virtual ~QMailViewerInterface(); - - virtual QWidget* widget() const = 0; - - virtual void scrollToAnchor(const QString& link); - - virtual void addActions(const QList<QAction*>& actions) = 0; - virtual void removeAction(QAction* action) = 0; - - virtual bool handleIncomingMessages(const QMailMessageIdList &list) const; - virtual bool handleOutgoingMessages(const QMailMessageIdList &list) const; - - virtual QString key() const = 0; - virtual QMailViewerFactory::PresentationType presentation() const = 0; - virtual QList<QMailMessage::ContentType> types() const = 0; - - bool isSupported(QMailMessage::ContentType t, QMailViewerFactory::PresentationType pres) const - { - if ((pres != QMailViewerFactory::AnyPresentation) && (pres != presentation())) - return false; - - return types().contains(t); - } - - -public slots: - virtual bool setMessage(const QMailMessage& mail) = 0; - virtual void setResource(const QUrl& name, QVariant value); - virtual void clear() = 0; - -signals: - void anchorClicked(const QUrl &link); - void contactDetails(const QContact &contact); - void messageChanged(const QMailMessageId &id); - void viewMessage(const QMailMessageId &id, QMailViewerFactory::PresentationType type); - void sendMessage(QMailMessage &message); - void retrieveMessage(); - void retrieveMessagePortion(uint bytes); - void retrieveMessagePart(const QMailMessagePart &part); - void retrieveMessagePartPortion(const QMailMessagePart &part, uint bytes); - void respondToMessage(QMailMessage::ResponseType type); - void respondToMessagePart(const QMailMessagePart::Location &partLocation, QMailMessage::ResponseType type); - void finished(); -}; - -#endif diff --git a/examples/qtmail/libs/qmfutil/qmfutil.pro b/examples/qtmail/libs/qmfutil/qmfutil.pro deleted file mode 100644 index 19154e15..00000000 --- a/examples/qtmail/libs/qmfutil/qmfutil.pro +++ /dev/null @@ -1,46 +0,0 @@ -TEMPLATE = lib -CONFIG += warn_on -TARGET = qmfutil5 -QT += widgets qmfclient -target.path += $$QMF_INSTALL_ROOT/lib - -DEFINES += QMFUTIL_INTERNAL - -HEADERS += emailfoldermodel.h \ - emailfolderview.h \ - folderdelegate.h \ - foldermodel.h \ - folderview.h \ - qmailcomposer.h \ - qmailviewer.h \ - selectfolder.h \ - qtmailnamespace.h - -SOURCES += emailfoldermodel.cpp \ - emailfolderview.cpp \ - folderdelegate.cpp \ - foldermodel.cpp \ - folderview.cpp \ - qmailcomposer.cpp \ - qmailviewer.cpp \ - selectfolder.cpp \ - qtmailnamespace.cpp - -TRANSLATIONS += libqmfutil-ar.ts \ - libqmfutil-de.ts \ - libqmfutil-en_GB.ts \ - libqmfutil-en_SU.ts \ - libqmfutil-en_US.ts \ - libqmfutil-es.ts \ - libqmfutil-fr.ts \ - libqmfutil-it.ts \ - libqmfutil-ja.ts \ - libqmfutil-ko.ts \ - libqmfutil-pt_BR.ts \ - libqmfutil-zh_CN.ts \ - libqmfutil-zh_TW.ts - -RESOURCES += qmfutil.qrc - -include(../../../../common.pri) - diff --git a/examples/qtmail/libs/qmfutil/qmfutil.qrc b/examples/qtmail/libs/qmfutil/qmfutil.qrc deleted file mode 100644 index 89e5bd21..00000000 --- a/examples/qtmail/libs/qmfutil/qmfutil.qrc +++ /dev/null @@ -1,12 +0,0 @@ -<!DOCTYPE RCC><RCC version="1.0"> -<qresource prefix="/icon"> -<file alias="folder">pics/icons/16x16/folder.png</file> -<file alias="account">pics/icons/16x16/server.png</file> -<file alias="find">pics/icons/mail_find.png</file> -<file alias="inbox">pics/icons/16x16/folder_inbox.png</file> -<file alias="drafts">pics/icons/16x16/edit.png</file> -<file alias="sent">pics/icons/16x16/folder_sent_mail.png</file> -<file alias="outbox">pics/icons/16x16/folder_outbox.png</file> -<file alias="trash">pics/icons/16x16/trash.png</file> -</qresource> -</RCC> diff --git a/examples/qtmail/libs/qmfutil/qtmailnamespace.cpp b/examples/qtmail/libs/qmfutil/qtmailnamespace.cpp deleted file mode 100644 index 937fb18b..00000000 --- a/examples/qtmail/libs/qmfutil/qtmailnamespace.cpp +++ /dev/null @@ -1,101 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Messaging Framework. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qtmailnamespace.h" -#include <qmaillog.h> -#include <QMap> - -typedef QMap<QString,QIcon> IconMap; - -static QIcon loadIcon(const QString& themeIdentifier, const QString& resourceFallback) -{ -#if ((QT_VERSION < QT_VERSION_CHECK(4, 6, 0)) || !defined(Q_OS_LINUX)) - Q_UNUSED(themeIdentifier); - return QIcon(resourceFallback); -#else - return QIcon::fromTheme(themeIdentifier,QIcon(resourceFallback)); -#endif -} - -static IconMap init() -{ - IconMap m; - m.insert("clear",loadIcon("edit-clear",":icon/erase")); - m.insert("attachment",loadIcon("mail-attachment",":icon/attach")); - m.insert("add",loadIcon("list-add",":icon/add")); - m.insert("remove",loadIcon("list-remove",":icon/erase")); - m.insert("reset", loadIcon("document-revert", ":icon/reset")); - m.insert("close",loadIcon("window-close",":icon/close")); - m.insert("uparrow",loadIcon("up",":icon/up")); - m.insert("downarrow",loadIcon("down",":icon/down")); - m.insert("sendandreceive",loadIcon("mail-send-receive",":icon/sync")); - m.insert("cancel",loadIcon("process-stop",":icon/cancel")); - m.insert("settings",loadIcon("package_settings",":icon/settings")); - m.insert("compose",loadIcon("mail-message-new",":icon/new")); - m.insert("search",loadIcon("search",":icon/find")); - m.insert("reply",loadIcon("mail-reply-sender",":icon/reply")); - m.insert("replyall",loadIcon("mail-reply-all",":icon/replyall")); - m.insert("forward",loadIcon("mail-forward",":icon/forward")); - m.insert("deletemail",loadIcon("edit-delete-mail",":icon/trash")); - m.insert("folder",loadIcon("folder",":icon/folder")); - m.insert("folderremote",loadIcon("folder-remote",":icon/folder-remote")); - m.insert("inboxfolder",loadIcon("inboxfolder",":icon/inbox")); - m.insert("trashfolder",loadIcon("emptytrash",":icon/trash")); - m.insert("junkfolder",loadIcon("mail-mark-junk",":icon/folder")); - m.insert("sentfolder",loadIcon("mail-send",":icon/sent")); - m.insert("accountfolder",loadIcon("accountfolder",":icon/account")); - m.insert("outboxfolder",loadIcon("outboxfolder",":icon/outbox")); - m.insert("draftfolder",loadIcon("emblem-draft",":icon/drafts")); - m.insert("workoffline",loadIcon("network-offline",":icon/connect_no")); - m.insert("quit",loadIcon("exit",":icon/quit")); - return m; -} - -QIcon Qtmail::icon(const QString& name) -{ - static IconMap icons(init()); - QIcon result = icons[name]; - - if(result.isNull()) - qWarning() << name << " icon not found."; - - return icons[name]; -} diff --git a/examples/qtmail/libs/qmfutil/qtmailnamespace.h b/examples/qtmail/libs/qmfutil/qtmailnamespace.h deleted file mode 100644 index ec56a28c..00000000 --- a/examples/qtmail/libs/qmfutil/qtmailnamespace.h +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Messaging Framework. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QTMAILNAMESPACE_H -#define QTMAILNAMESPACE_H - -#include <QIcon> -#include <qmailglobal.h> - -namespace Qtmail -{ - QMFUTIL_EXPORT QIcon icon(const QString& name); -} - -#endif diff --git a/examples/qtmail/libs/qmfutil/selectfolder.cpp b/examples/qtmail/libs/qmfutil/selectfolder.cpp deleted file mode 100644 index db066167..00000000 --- a/examples/qtmail/libs/qmfutil/selectfolder.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Messaging Framework. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "selectfolder.h" -#include "emailfolderview.h" -#include "folderdelegate.h" -#include "emailfoldermodel.h" -#include <qmailfolder.h> -#include <qmailmessageset.h> -#include <QLayout> -#include <QListWidget> -#include <QPushButton> - -SelectFolderDialog::SelectFolderDialog(FolderModel *model, QWidget *parent) - : QDialog( parent ) -{ - setWindowTitle( tr( "Select folder" ) ); - - FolderDelegate* del = new FolderDelegate(this); - del->setShowStatus(false); - - EmailFolderView *emailView = new EmailFolderView(this); - if (EmailFolderModel *emailModel = qobject_cast<EmailFolderModel*>(model)) { - emailView->setModel(emailModel); - } else { - qWarning() << "model must must be a non-abstract subclass of FolderModel"; - } - - m_folderView = emailView; - m_folderView->setItemDelegate(del); - m_folderView->expandAll(); - - connect(m_folderView, SIGNAL(selected(QMailMessageSet*)), this, SLOT(selected(QMailMessageSet*))); - - QGridLayout *top = new QGridLayout( this ); - top->addWidget(m_folderView); - - QHBoxLayout* buttonsLayout = new QHBoxLayout; - - buttonsLayout->addStretch(); - - m_okButton = new QPushButton("Ok",this); - buttonsLayout->addWidget(m_okButton); - connect(m_okButton,SIGNAL(clicked(bool)),this,SLOT(accept())); - - QPushButton* cancelButton = new QPushButton("Cancel",this); - buttonsLayout->addWidget(cancelButton); - connect(cancelButton,SIGNAL(clicked(bool)),this,SLOT(reject())); - - top->addLayout(buttonsLayout,1,0); -} - -void SelectFolderDialog::setInvalidSelections(const QList<QMailMessageSet*> &invalidSelections) -{ - m_invalidSelections = invalidSelections; - m_okButton->setEnabled(!m_invalidSelections.contains(m_folderView->currentItem())); -} - -void SelectFolderDialog::selected(QMailMessageSet *item) -{ - m_okButton->setEnabled(!m_invalidSelections.contains(item)); -} - -QMailMessageSet* SelectFolderDialog::selectedItem() const -{ - return m_folderView->currentItem(); -} - diff --git a/examples/qtmail/libs/qmfutil/selectfolder.h b/examples/qtmail/libs/qmfutil/selectfolder.h deleted file mode 100644 index 62951742..00000000 --- a/examples/qtmail/libs/qmfutil/selectfolder.h +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Messaging Framework. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef SELECTFOLDER_H -#define SELECTFOLDER_H - -#include <QDialog> -#include <QList> -#include <qtmailnamespace.h> -#include <qmailid.h> -#include <qmailmessageset.h> - -class FolderModel; -class FolderView; - -QT_BEGIN_NAMESPACE - -class QListWidget; -class QPushButton; - -QT_END_NAMESPACE - -class QMFUTIL_EXPORT SelectFolderDialog : public QDialog -{ - Q_OBJECT - -public: - explicit SelectFolderDialog(FolderModel *model, QWidget *parent = 0); - - void setInvalidSelections(const QList<QMailMessageSet*> &invalid); - - QMailMessageSet* selectedItem() const; - -protected slots: - void selected(QMailMessageSet *item); - -private: - FolderView* m_folderView; - QPushButton* m_okButton; - QList<QMailMessageSet*> m_invalidSelections; -}; - -#endif diff --git a/examples/qtmail/plugins/composers/email/email.pro b/examples/qtmail/plugins/composers/email/email.pro index c2fa7eb0..e0b20baa 100644 --- a/examples/qtmail/plugins/composers/email/email.pro +++ b/examples/qtmail/plugins/composers/email/email.pro @@ -3,24 +3,10 @@ TARGET = emailcomposer CONFIG += plugin target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins5/composers -QT += widgets qmfclient -macx:contains(QT_CONFIG, qt_framework) { - LIBS += -framework qmfutil5 -} else { - LIBS += -lqmfutil5 -} +QT += widgets qmfclient qmfwidgets DEFINES += PLUGIN_INTERNAL -DEPENDPATH += . - -INCLUDEPATH += . ../../../libs/qmfutil - -LIBS += -L../../../libs/qmfutil/build - -macx:LIBS += -F../../../libs/qmfutil/build - - HEADERS += emailcomposer.h \ attachmentlistwidget.h diff --git a/examples/qtmail/plugins/viewers/generic/generic.pro b/examples/qtmail/plugins/viewers/generic/generic.pro index 8540a222..cce061d9 100644 --- a/examples/qtmail/plugins/viewers/generic/generic.pro +++ b/examples/qtmail/plugins/viewers/generic/generic.pro @@ -3,12 +3,7 @@ TARGET = genericviewer CONFIG += plugin target.path += $$QMF_INSTALL_ROOT/lib/qmf/plugins5/viewers -QT += widgets qmfclient -macx:contains(QT_CONFIG, qt_framework) { - LIBS += -framework qmfutil5 -} else { - LIBS += -lqmfutil5 -} +QT += widgets qmfclient qmfwidgets # Use webkit to render mail if available contains(QT_CONFIG,webkit){ @@ -18,11 +13,6 @@ contains(QT_CONFIG,webkit){ DEPENDPATH += . -INCLUDEPATH += . ../../../libs/qmfutil - -LIBS += -L../../../libs/qmfutil/build -LIBS += -F../../../libs/qmfutil/build - HEADERS += attachmentoptions.h browserwidget.h genericviewer.h SOURCES += attachmentoptions.cpp browserwidget.cpp genericviewer.cpp diff --git a/examples/qtmail/qtmail.pro b/examples/qtmail/qtmail.pro index d49cacc3..1fe2997f 100644 --- a/examples/qtmail/qtmail.pro +++ b/examples/qtmail/qtmail.pro @@ -1,22 +1,15 @@ TEMPLATE = subdirs -libs_qmfutil.subdir = libs/qmfutil -libs_qmfutil.target = sub-qmfutil - app.subdir = app app.target = sub-app -app.depends = sub-qmfutil plugins_viewers_generic.subdir = plugins/viewers/generic plugins_viewers_generic.target = sub-plugins-viewers-generic -plugins_viewers_generic.depends = sub-qmfutil plugins_composers_email.subdir = plugins/composers/email plugins_composers_email.target = sub-plugins-composers-email -plugins_composers_email.depends = sub-qmfutil SUBDIRS += \ - libs_qmfutil \ app \ plugins_viewers_generic \ plugins_composers_email |