hgcacheproxymodel/tsrc/unit/cacheproxyhelper.h
changeset 1 e48454f237ca
child 6 1cdcc61142d2
equal deleted inserted replaced
0:89c329efa980 1:e48454f237ca
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 #ifndef CACHEPROXYHELPER_H
       
    18 #define CACHEPROXYHELPER_H
       
    19 
       
    20 #include <hgwidgets/hgcacheproxymodel.h>
       
    21 
       
    22 
       
    23 class CacheProxyHelper: public QObject
       
    24 {
       
    25     Q_OBJECT
       
    26 public:
       
    27     CacheProxyHelper(HgCacheProxyModel *model, QObject *parent = 0);
       
    28     ~CacheProxyHelper();
       
    29     
       
    30 private slots:
       
    31     void slotDataChanged(QModelIndex from,QModelIndex to);
       
    32     void slotHeaderDataChanged(Qt::Orientation orientation, int first, int last);
       
    33     void slotRowsAboutToBeInserted(QModelIndex parent,int from,int to);
       
    34     void slotRowsInserted(QModelIndex parent,int from,int to);
       
    35     void slotColumnsAboutToBeInserted(QModelIndex parent,int from,int to);
       
    36     void slotColumnsInserted(QModelIndex parent,int from,int to);
       
    37     void slotRowsAboutToBeRemoved(QModelIndex parent,int from,int to);
       
    38     void slotRowsRemoved(QModelIndex parent,int from,int to);
       
    39     void slotColumnsAboutToBeRemoved(QModelIndex parent,int from,int to);
       
    40     void slotColumnsRemoved(QModelIndex parent,int from,int to);
       
    41     void slotLayoutAboutToBeChanged();
       
    42     void slotLayoutChanged();
       
    43     void slotModelAboutToBeReset();
       
    44     void slotModelReset();
       
    45     
       
    46 public:
       
    47     QList< QPair< int, int > > getSignalDataChanged();
       
    48     QList< QPair< int, int > > getSignalHeaderDataChanged();
       
    49     QList< QPair< int, int > > getSignalRowsAboutToBeInserted();
       
    50     QList< QPair< int, int > > getSignalRowsInserted();
       
    51     QList< QPair< int, int > > getSignalColumnsAboutToBeInserted();
       
    52     QList< QPair< int, int > > getSignalColumnsInserted();
       
    53     QList< QPair< int, int > > getSignalRowsAboutToBeRemoved();
       
    54     QList< QPair< int, int > > getSignalRowsRemoved();
       
    55     QList< QPair< int, int > > getSignalColumnsAboutToBeRemoved();
       
    56     QList< QPair< int, int > > getSignalColumnsRemoved();
       
    57     bool getSignalLayoutAboutToBeChanged();
       
    58     bool getSignalLayoutChanged();
       
    59     bool getSignalModelAboutToBeReset();
       
    60     bool getSignalModelReset();
       
    61     
       
    62 private:
       
    63 	HgCacheProxyModel* mModel;
       
    64 	
       
    65     QList< QPair< int, int > > mSignalDataChanged;
       
    66     QList< QPair< int, int > > mSignalHeaderDataChanged;
       
    67     QList< QPair< int, int > > mSignalRowsAboutToBeInserted;
       
    68     QList< QPair< int, int > > mSignalRowsInserted;
       
    69     QList< QPair< int, int > > mSignalColumnsAboutToBeInserted;
       
    70     QList< QPair< int, int > > mSignalColumnsInserted;
       
    71     QList< QPair< int, int > > mSignalRowsAboutToBeRemoved;
       
    72     QList< QPair< int, int > > mSignalRowsRemoved;
       
    73     QList< QPair< int, int > > mSignalColumnsAboutToBeRemoved;
       
    74     QList< QPair< int, int > > mSignalColumnsRemoved;
       
    75     bool mSignalLayoutAboutToBeChanged;
       
    76     bool mSignalLayoutChanged;
       
    77     bool mSignalModelAboutToBeReset;
       
    78     bool mSignalModelReset;
       
    79     
       
    80 };
       
    81 
       
    82 #endif // CACHEPROXYHELPER_H