SciDAVis  1.D4
TableCommentsHeaderModel.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : TableCommentsHeaderModel.h
3  Project : SciDAVis
4  --------------------------------------------------------------------
5  Copyright : (C) 2007 by Tilman Benkert,
6  Email (use @ for *) : thzs*gmx.net
7  Description : Model wrapping a TableModel to display column
8  comments in a TableCommentsHeaderView
9 
10  ***************************************************************************/
11 
12 /***************************************************************************
13  * *
14  * This program is free software; you can redistribute it and/or modify *
15  * it under the terms of the GNU General Public License as published by *
16  * the Free Software Foundation; either version 2 of the License, or *
17  * (at your option) any later version. *
18  * *
19  * This program is distributed in the hope that it will be useful, *
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
22  * GNU General Public License for more details. *
23  * *
24  * You should have received a copy of the GNU General Public License *
25  * along with this program; if not, write to the Free Software *
26  * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
27  * Boston, MA 02110-1301 USA *
28  * *
29  ***************************************************************************/
30 
31 #ifndef TABLECOMMENTSHEADERMODEL_H
32 #define TABLECOMMENTSHEADERMODEL_H
33 
34 #include <QAbstractTableModel>
35 #include "TableModel.h"
36 
38 class TableCommentsHeaderModel : public QAbstractTableModel
39 {
40  Q_OBJECT
41 
42  public:
44  explicit TableCommentsHeaderModel( TableModel * table_model, QObject * parent = 0 );
46  virtual ~TableCommentsHeaderModel();
47 
49 
50  Qt::ItemFlags flags( const QModelIndex & index ) const;
51  QVariant data(const QModelIndex &index, int role) const;
52  QVariant headerData(int section,
53  Qt::Orientation orientation,int role) const;
54  int rowCount(const QModelIndex &parent = QModelIndex()) const;
55  int columnCount(const QModelIndex & parent = QModelIndex()) const;
57 
58  private:
60 };
61 
62 #endif