• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

okteta

  • sources
  • kde-4.12
  • kdesdk
  • okteta
  • kasten
  • controllers
  • view
  • structures
modeltest.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2007 Trolltech ASA. All rights reserved.
4 **
5 ** This file is part of the Qt Concurrent project on Trolltech Labs.
6 **
7 ** This file may be used under the terms of the GNU General Public
8 ** License version 2.0 as published by the Free Software Foundation
9 ** and appearing in the file LICENSE.GPL included in the packaging of
10 ** this file. Please review the following information to ensure GNU
11 ** General Public Licensing requirements will be met:
12 ** http://www.trolltech.com/products/qt/opensource.html
13 **
14 ** If you are unsure which license is appropriate for your use, please
15 ** review the following information:
16 ** http://www.trolltech.com/products/qt/licensing.html or contact the
17 ** sales department at sales@trolltech.com.
18 **
19 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21 **
22 ****************************************************************************/
23 
24 #ifndef MODELTEST_H
25 #define MODELTEST_H
26 
27 #include <QtCore/QObject>
28 #include <QtCore/QAbstractItemModel>
29 #include <QtCore/QStack>
30 
31 class ModelTest : public QObject
32 {
33  Q_OBJECT
34 
35 public:
36  explicit ModelTest( QAbstractItemModel *model, QObject *parent = 0 );
37 
38 private Q_SLOTS:
39  void nonDestructiveBasicTest();
40  void rowCount();
41  void columnCount();
42  void hasIndex();
43  void index();
44  void parent();
45  void data();
46 
47 protected Q_SLOTS:
48  void runAllTests();
49  void layoutAboutToBeChanged();
50  void layoutChanged();
51  void modelAboutToBeReset();
52  void modelReset();
53  void rowsAboutToBeInserted( const QModelIndex &parent, int start, int end );
54  void rowsInserted( const QModelIndex & parent, int start, int end );
55  void rowsAboutToBeRemoved( const QModelIndex &parent, int start, int end );
56  void rowsRemoved( const QModelIndex & parent, int start, int end );
57  void rowsAboutToBeMoved ( const QModelIndex &, int, int, const QModelIndex &, int);
58  void rowsMoved ( const QModelIndex &, int, int, const QModelIndex &, int );
59 
60 private:
61  void checkChildren( const QModelIndex &parent, int currentDepth = 0 );
62 
63  QAbstractItemModel *model;
64 
65  struct Changing {
66  QModelIndex parent;
67  int oldSize;
68  QVariant last;
69  QVariant next;
70  };
71  QStack<Changing> insert;
72  QStack<Changing> remove;
73 
74  bool fetchingMore;
75 
76  QList<QPersistentModelIndex> changing;
77 };
78 
79 #endif
ModelTest::rowsAboutToBeMoved
void rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)
Definition: modeltest.cpp:542
ModelTest::runAllTests
void runAllTests()
Definition: modeltest.cpp:86
ModelTest::rowsInserted
void rowsInserted(const QModelIndex &parent, int start, int end)
Definition: modeltest.cpp:490
ModelTest::rowsAboutToBeRemoved
void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end)
Definition: modeltest.cpp:605
ModelTest::modelReset
void modelReset()
Definition: modeltest.cpp:522
QObject
ModelTest::rowsAboutToBeInserted
void rowsAboutToBeInserted(const QModelIndex &parent, int start, int end)
Definition: modeltest.cpp:471
ModelTest::rowsMoved
void rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)
Definition: modeltest.cpp:559
ModelTest::modelAboutToBeReset
void modelAboutToBeReset()
Definition: modeltest.cpp:517
QAbstractItemModel
ModelTest::rowsRemoved
void rowsRemoved(const QModelIndex &parent, int start, int end)
Definition: modeltest.cpp:627
ModelTest::layoutChanged
void layoutChanged()
Definition: modeltest.cpp:533
ModelTest
Definition: modeltest.h:31
ModelTest::layoutAboutToBeChanged
void layoutAboutToBeChanged()
Definition: modeltest.cpp:527
ModelTest::ModelTest
ModelTest(QAbstractItemModel *model, QObject *parent=0)
Definition: modeltest.cpp:33
QList< QPersistentModelIndex >
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

okteta

Skip menu "okteta"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal