KLDAP Library
ldapattributeproxymodel.h
00001 /* 00002 This file is part of libkldap. 00003 Copyright (c) 2006 Sean Harmer <sh@theharmers.co.uk> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 Boston, MA 02110-1301, USA. 00019 */ 00020 00021 #ifndef KLDAP_LDAPATTRIBUTEPROXYMODEL_H 00022 #define KLDAP_LDAPATTRIBUTEPROXYMODEL_H 00023 00024 #include <QtGui/QSortFilterProxyModel> 00025 00026 #include "kldap_export.h" 00027 00028 namespace KLDAP { 00029 00030 class KLDAP_EXPORT LdapAttributeProxyModel : public QSortFilterProxyModel 00031 { 00032 Q_OBJECT 00033 public: 00034 explicit LdapAttributeProxyModel( QObject *parent = 0 ); 00035 ~LdapAttributeProxyModel(); 00036 00037 virtual QVariant data( const QModelIndex &index, int role ) const; 00042 virtual bool setData( const QModelIndex &index, 00043 const QVariant &value, 00044 int role = Qt::EditRole ); 00045 virtual bool filterAcceptsRow( int sourceRow, const QModelIndex &sourceParent ) const; 00046 virtual QVariant headerData( int section, Qt::Orientation orientation, int role ) const; 00047 virtual int columnCount( const QModelIndex &parent ) const; 00048 virtual Qt::ItemFlags flags( const QModelIndex &index ) const; 00049 virtual bool hasChildren( const QModelIndex &parent ) const; 00050 00051 virtual QModelIndex mapFromSource ( const QModelIndex & sourceIndex ) const; 00052 virtual QModelIndex mapToSource ( const QModelIndex & proxyIndex ) const; 00053 00058 virtual bool insertRows( int row, int count, 00059 const QModelIndex &parent = QModelIndex() ); 00064 virtual bool removeRows( int row, int count, 00065 const QModelIndex &parent = QModelIndex() ); 00070 virtual void sort( int column, Qt::SortOrder order = Qt::AscendingOrder ); 00071 00072 // 00073 // Drag and drop support 00074 // 00079 virtual Qt::DropActions supportedDropActions() const; 00084 virtual QMimeData *mimeData( const QModelIndexList &indexes ) const; 00089 virtual bool dropMimeData( const QMimeData *data, Qt::DropAction action, 00090 int row, int column, const QModelIndex &parent ); 00091 00092 private: 00093 class LdapAttributeProxyModelPrivate; 00094 LdapAttributeProxyModelPrivate *const m_d; 00095 }; 00096 00097 } 00098 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon May 14 2012 04:51:55 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon May 14 2012 04:51:55 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.