KVIrc  4.9.2
DeveloperAPIs
KviTalTableWidget.h
Go to the documentation of this file.
1 #ifndef _KVI_TAL_TABLEWIDGET_H_
2 #define _KVI_TAL_TABLEWIDGET_H_
3 
4 //=============================================================================
5 //
6 // File : KviTalTableWidget.h
7 // Creation date : Fri Jun 27 2008 10:00:08 by Fabio Bas
8 //
9 // This file is part of the KVIrc IRC client distribution
10 // Copyright (C) 2008 Fabio Bas (ctrlaltca at gmail dot com)
11 //
12 // This program is FREE software. You can redistribute it and/or
13 // modify it under the terms of the GNU General Public License
14 // as published by the Free Software Foundation; either version 2
15 // of the License, or (at your option) any later version.
16 //
17 // This program is distributed in the HOPE that it will be USEFUL,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 // See the GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program. If not, write to the Free Software Foundation,
24 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 //
26 //=============================================================================
27 
28 #include "kvi_settings.h"
29 #include "KviQString.h"
30 
31 #include <QTableWidget>
32 #include <QHeaderView>
33 
35 
36 class KVILIB_API KviTalTableWidget : public QTableWidget
37 {
38  friend class KviTalTableWidgetItem;
39  Q_OBJECT
40 public:
41  KviTalTableWidget(QWidget * pParent);
42  virtual ~KviTalTableWidget(){};
43 
44 public:
45 };
46 
47 class KVILIB_API KviTalTableWidgetItem : public QTableWidgetItem
48 {
49 public:
51  : QTableWidgetItem()
52  {
53  pParent->insertRow(pParent->rowCount());
54  pParent->setItem(pParent->rowCount() - 1, 0, this);
55  };
56 
57  KviTalTableWidgetItem(KviTalTableWidget * pParent, int row, int column)
58  : QTableWidgetItem()
59  {
60  pParent->setItem(row, column, this);
61  };
62 
64  : QTableWidgetItem(other){};
65 };
66 
68 {
69 public:
71  : KviTalTableWidgetItem(pParent){};
72 
73  KviTalTableWidgetItemEx(KviTalTableWidget * pParent, int row, int column)
74  : KviTalTableWidgetItem(pParent, row, column){};
75 
77  : KviTalTableWidgetItem(other){};
78  virtual void displayUpdate() = 0;
79 };
80 
81 #endif // _KVI_TAL_TABLEWIDGET_H_
KviTalTableWidgetItemEx(KviTalTableWidget *pParent)
Definition: KviTalTableWidget.h:70
KviTalTableWidgetItemEx(const KviTalTableWidgetItem &other)
Definition: KviTalTableWidget.h:76
KviTalTableWidgetItem(KviTalTableWidget *pParent)
Definition: KviTalTableWidget.h:50
Definition: KviTalTableWidget.h:67
Definition: KviTalTableWidget.h:47
KviTalTableWidgetItem(const KviTalTableWidgetItem &other)
Definition: KviTalTableWidget.h:63
KviTalTableWidgetItemEx(KviTalTableWidget *pParent, int row, int column)
Definition: KviTalTableWidget.h:73
This file contains compile time settings.
virtual ~KviTalTableWidget()
Definition: KviTalTableWidget.h:42
Definition: KviTalTableWidget.h:36
#define KVILIB_API
Definition: kvi_settings.h:125
Helper functions for the QString class.
KviTalTableWidgetItem(KviTalTableWidget *pParent, int row, int column)
Definition: KviTalTableWidget.h:57