Back to index

fet  5.18.0
sparsetableview.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                                 FET
00003                           -------------------
00004    copyright            : (C) by Lalescu Liviu
00005     email                : Please see http://lalescu.ro/liviu/ for details about contacting Liviu Lalescu (in particular, you can find here the e-mail address)
00006  ***************************************************************************
00007                       sparsetableview.h  -  description
00008                              -------------------
00009     begin                : 2010
00010     copyright            : (C) 2010 by Liviu Lalescu
00011                          : http://lalescu.ro/liviu/
00012  ***************************************************************************
00013  *                                                                         *
00014  *   This program is free software; you can redistribute it and/or modify  *
00015  *   it under the terms of the GNU General Public License as published by  *
00016  *   the Free Software Foundation; either version 2 of the License, or     *
00017  *   (at your option) any later version.                                   *
00018  *                                                                         *
00019  ***************************************************************************/
00020 
00021 #ifndef SPARSE_TABLE_VIEW_H
00022 #define SPARSE_TABLE_VIEW_H
00023 
00024 #include <QTableView>
00025 
00026 #include <QResizeEvent>
00027 
00028 #include "sparseitemmodel.h"
00029 
00030 class SparseTableView: public QTableView{
00031 private:
00032        QList<int> horizontalSizesUntruncated;
00033        
00034        int maxHorizontalHeaderSectionSize();
00035 
00036 public:
00037        SparseItemModel model;
00038 
00039        SparseTableView();
00040 
00041        void resizeToFit();
00042        
00043        //void itWasResized();
00044        
00045        void allTableChanged();
00046        
00047 protected:
00048        void resizeEvent(QResizeEvent* event);
00049 };
00050 
00051 #endif