Scribus
Open source desktop publishing at your fingertips
schelptreemodel.h
1 
2 /****************************************************************************
3 **
4 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
5 ** All rights reserved.
6 ** Contact: Nokia Corporation (qt-info@nokia.com)
7 **
8 ** This file is part of the examples of the Qt Toolkit.
9 **
10 ** $QT_BEGIN_LICENSE:BSD$
11 ** You may use this file under the terms of the BSD license as follows:
12 **
13 ** "Redistribution and use in source and binary forms, with or without
14 ** modification, are permitted provided that the following conditions are
15 ** met:
16 ** * Redistributions of source code must retain the above copyright
17 ** notice, this list of conditions and the following disclaimer.
18 ** * Redistributions in binary form must reproduce the above copyright
19 ** notice, this list of conditions and the following disclaimer in
20 ** the documentation and/or other materials provided with the
21 ** distribution.
22 ** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
23 ** the names of its contributors may be used to endorse or promote
24 ** products derived from this software without specific prior written
25 ** permission.
26 **
27 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28 ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
29 ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
30 ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
31 ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32 ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33 ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34 ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35 ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37 ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 //File initially based on treemodel.h from Qt 4.x
43 
44 #ifndef SCHELP_TREEMODEL_H
45 #define SCHELP_TREEMODEL_H
46 
47 #include <QAbstractItemModel>
48 #include <QModelIndex>
49 #include <QVariant>
50 
51 #include "./tt/simpletreemodel/treemodel.h"
52 
53 
54 class ScHelpTreeModel : public TreeModel
55 {
56  Q_OBJECT
57 
58 public:
59  ScHelpTreeModel(const QString &dataFile, const QString &col1name, const QString &col2name, QMap<QString, QString>* indexToBuild, QObject *parent = 0);
60  ~ScHelpTreeModel() {};
61 
62  void addRow(const QString&, const QString&, int i);
63 
64 private:
65  void setupModelData(const QString &dataFile, TreeItem *parent, QMap<QString, QString>* indexToBuild);
66 
67 };
68 
69 #endif
[0]
Definition: treemodel.h:52
Definition: schelptreemodel.h:54
QModelIndex parent(const QModelIndex &index) const
[6]
Definition: treemodel.cpp:140
[0]
Definition: treeitem.h:48