1
#ifndef _KVI_TAL_TABLEWIDGET_H_
2
#define _KVI_TAL_TABLEWIDGET_H_
4
//=============================================================================
6
// File : kvi_tal_tablewidget.h
7
// Creation date : Fri Jun 27 2008 10:00:08 by Fabio Bas
9
// This file is part of the KVirc irc client distribution
10
// Copyright (C) 2008 Fabio Bas (ctrlaltca at gmail dot com)
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 opinion) any later version.
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.
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.
26
//=============================================================================
28
#include "kvi_settings.h"
29
#include "kvi_qstring.h"
31
#include <QTableWidget>
32
#include <QHeaderView>
34
class KviTalTableWidgetItem;
36
class KVILIB_API KviTalTableWidget : public QTableWidget
38
friend class KviTalTableWidgetItem;
41
KviTalTableWidget(QWidget * pParent);
42
virtual ~KviTalTableWidget() {};
47
class KVILIB_API KviTalTableWidgetItem : public QTableWidgetItem
50
KviTalTableWidgetItem(KviTalTableWidget * pParent)
53
pParent->insertRow(pParent->rowCount());
54
pParent->setItem(pParent->rowCount()-1, 0, this);
57
KviTalTableWidgetItem(KviTalTableWidget * pParent, int row, int column)
60
pParent->setItem(row, column, this);
63
KviTalTableWidgetItem(const KviTalTableWidgetItem & other)
64
: QTableWidgetItem(other) {};
67
class KVILIB_API KviTalTableWidgetItemEx : public KviTalTableWidgetItem
70
KviTalTableWidgetItemEx(KviTalTableWidget * pParent)
71
: KviTalTableWidgetItem(pParent) {};
73
KviTalTableWidgetItemEx(KviTalTableWidget * pParent, int row, int column)
74
: KviTalTableWidgetItem(pParent, row, column) {};
76
KviTalTableWidgetItemEx(const KviTalTableWidgetItem & other)
77
: KviTalTableWidgetItem(other) {};
78
virtual void displayUpdate() = 0;
81
#endif // _KVI_TAL_TABLEWIDGET_H_