[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepimlibs/akonadi
From: Tobias Koenig <tokoe () kde ! org>
Date: 2009-07-21 9:57:03
Message-ID: 1248170223.705247.26569.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1000427 by tokoe:
coding style cleanup + apidocs
M +38 -23 descendantsproxymodel.h
M +15 -16 entitytreemodel.h
M +38 -21 selectionproxymodel.h
--- trunk/KDE/kdepimlibs/akonadi/descendantsproxymodel.h #1000426:1000427
@@ -17,44 +17,59 @@
02110-1301, USA.
*/
-#ifndef DESCENDANTSPROXYMODEL_H
-#define DESCENDANTSPROXYMODEL_H
+#ifndef AKONADI_DESCENDANTSPROXYMODEL_H
+#define AKONADI_DESCENDANTSPROXYMODEL_H
+#include "akonadi_export.h"
+
#include <kdescendantsproxymodel.h>
-#include "akonadi_export.h"
-
namespace Akonadi
{
-
class DescendantsProxyModelPrivate;
+/**
+ * @short A proxy model that flattens a tree-based model to a list model.
+ *
+ * @author Stephen Kelly <steveire@gmail.com>
+ * @since 4.4
+ */
class AKONADI_EXPORT DescendantsProxyModel : public KDescendantsProxyModel
{
Q_OBJECT
-public:
- DescendantsProxyModel(QObject *parent = 0);
- virtual ~DescendantsProxyModel();
+ public:
+ /**
+ * Creates a new descendants proxy model.
+ *
+ * @param parent The parent object.
+ */
+ DescendantsProxyModel( QObject *parent = 0 );
- /**
- * Sets the header @p set that shall be used by the proxy.
- *
- * \s EntityTreeModel::HeaderGroup
- */
- void setHeaderSet( int set );
+ /**
+ * Destroys the descendants proxy model.
+ */
+ virtual ~DescendantsProxyModel();
- /**
- * Returns the header set used by the proxy.
- */
- int headerSet() const;
+ /**
+ * Sets the header @p set that shall be used by the proxy model.
+ *
+ * \s EntityTreeModel::HeaderGroup
+ */
+ void setHeaderSet( int set );
- virtual QVariant headerData( int section, Qt::Orientation orientation, int role = \
Qt::DisplayRole ) const; + /**
+ * Returns the header set used by the proxy model.
+ */
+ int headerSet() const;
-private:
- Q_DECLARE_PRIVATE(DescendantsProxyModel)
- DescendantsProxyModelPrivate *d_ptr;
-
+ virtual QVariant headerData( int section, Qt::Orientation orientation, int role \
= Qt::DisplayRole ) const; +
+ private:
+ //@cond PRIVATE
+ Q_DECLARE_PRIVATE(DescendantsProxyModel)
+ DescendantsProxyModelPrivate *d_ptr;
+ //@endcond
};
}
--- trunk/KDE/kdepimlibs/akonadi/entitytreemodel.h #1000426:1000427
@@ -20,14 +20,14 @@
#ifndef AKONADI_ENTITYTREEMODEL_H
#define AKONADI_ENTITYTREEMODEL_H
+#include "akonadi_export.h"
-#include <QtCore/QAbstractItemModel>
-#include <QtCore/QStringList>
-
#include <akonadi/collection.h>
#include <akonadi/item.h>
-#include "akonadi_export.h"
+#include <QtCore/QAbstractItemModel>
+#include <QtCore/QStringList>
+
// TODO (Applies to all these 'new' models, not just EntityTreeModel):
// * Figure out how LazyPopulation and signals from monitor containing items should
// fit together. Possibly store a list of collections whose items have already
@@ -47,11 +47,11 @@
namespace Akonadi
{
-class Item;
class CollectionStatistics;
+class Item;
+class ItemFetchScope;
class Monitor;
class Session;
-class ItemFetchScope;
class EntityTreeModelPrivate;
@@ -253,21 +253,20 @@
virtual bool hasChildren( const QModelIndex &parent = QModelIndex() ) const;
/**
- Reimplemented to handle the AmazingCompletionRole.
- */
- virtual QModelIndexList match(const QModelIndex& start, int role, const \
QVariant& value, int hits = 1, Qt::MatchFlags flags = Qt::MatchFlags( \
Qt::MatchStartsWith | Qt::MatchWrap ) ) const; + * Reimplemented to handle the \
AmazingCompletionRole. + */
+ virtual QModelIndexList match( const QModelIndex& start, int role, const \
QVariant& value, int hits = 1, Qt::MatchFlags flags = Qt::MatchFlags( \
Qt::MatchStartsWith | Qt::MatchWrap ) ) const;
/**
- Reimplement this in a subclass to return true if @p item matches @p value with \
@p flags in the AmazingCompletionRole.
- */
- virtual bool match(const Item &item, const QVariant &value, Qt::MatchFlags \
flags) const; + * Reimplement this in a subclass to return true if @p item \
matches @p value with @p flags in the AmazingCompletionRole. + */
+ virtual bool match( const Item &item, const QVariant &value, Qt::MatchFlags \
flags ) const;
/**
- Reimplement this in a subclass to return true if @p collection matches @p \
value with @p flags in the AmazingCompletionRole.
- */
- virtual bool match(const Collection &collection, const QVariant &value, \
Qt::MatchFlags flags) const; + * Reimplement this in a subclass to return true if \
@p collection matches @p value with @p flags in the AmazingCompletionRole. + */
+ virtual bool match( const Collection &collection, const QVariant &value, \
Qt::MatchFlags flags ) const;
-
protected:
/**
* Clears and resets the model. Always call this instead of the reset method in \
the superclass.
--- trunk/KDE/kdepimlibs/akonadi/selectionproxymodel.h #1000426:1000427
@@ -20,43 +20,60 @@
#ifndef AKONADI_SELECTIONPROXYMODEL_H
#define AKONADI_SELECTIONPROXYMODEL_H
-#include <QItemSelectionModel>
+#include "akonadi_export.h"
-#include "akonadi_export.h"
#include <kselectionproxymodel.h>
+#include <QtGui/QItemSelectionModel>
+
namespace Akonadi
{
class SelectionProxyModelPrivate;
+/**
+ * @short A proxy model that provides data depending on the selection of a view.
+ *
+ * @author Stephen Kelly <steveire@gmail.com>
+ * @since 4.4
+ */
class AKONADI_EXPORT SelectionProxyModel : public KSelectionProxyModel
{
Q_OBJECT
-public:
- explicit SelectionProxyModel(QItemSelectionModel *selectionModel, QObject *parent \
= 0 );
- virtual ~SelectionProxyModel();
- /**
- * Sets the header @p set that shall be used by the proxy.
- *
- * \s EntityTreeModel::HeaderGroup
- */
- void setHeaderSet( int set );
+ public:
+ /**
+ * Creates a new selection proxy model.
+ *
+ * @param selectionModel The selection model to work on.
+ * @param parent The parent object.
+ */
+ explicit SelectionProxyModel( QItemSelectionModel *selectionModel, QObject \
*parent = 0 );
- /**
- * Returns the header set used by the proxy.
- */
- int headerSet() const;
+ /**
+ * Destroys the selection proxy model.
+ */
+ virtual ~SelectionProxyModel();
- virtual QVariant headerData( int section, Qt::Orientation orientation, int role = \
Qt::DisplayRole ) const; + /**
+ * Sets the header @p set that shall be used by the proxy model.
+ *
+ * \s EntityTreeModel::HeaderGroup
+ */
+ void setHeaderSet( int set );
-private:
- Q_DECLARE_PRIVATE(SelectionProxyModel)
- //@cond PRIVATE
- SelectionProxyModelPrivate *d_ptr;
- //@endcond
+ /**
+ * Returns the header set used by the proxy model.
+ */
+ int headerSet() const;
+ virtual QVariant headerData( int section, Qt::Orientation orientation, int role \
= Qt::DisplayRole ) const; +
+ private:
+ //@cond PRIVATE
+ Q_DECLARE_PRIVATE( SelectionProxyModel )
+ SelectionProxyModelPrivate *d_ptr;
+ //@endcond
};
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic