|
Last change
on this file since 169 was 160, checked in by dmik, 19 years ago |
|
Imported table and iconview modules and a bunch of dependent examples from the official release 3.3.1 from Trolltech.
|
-
Property svn:keywords
set to
Id
|
|
File size:
1.2 KB
|
| Line | |
|---|
| 1 | /****************************************************************************
|
|---|
| 2 | ** $Id: statistics.h 160 2006-12-11 20:15:57Z dmik $
|
|---|
| 3 | **
|
|---|
| 4 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
|
|---|
| 5 | **
|
|---|
| 6 | ** This file is part of an example program for Qt. This example
|
|---|
| 7 | ** program may be used, distributed and modified without limitation.
|
|---|
| 8 | **
|
|---|
| 9 | *****************************************************************************/
|
|---|
| 10 |
|
|---|
| 11 | #ifndef STATISTICS_H
|
|---|
| 12 | #define STATISTICS_H
|
|---|
| 13 |
|
|---|
| 14 | #include <qtable.h>
|
|---|
| 15 | #include <qcombobox.h>
|
|---|
| 16 |
|
|---|
| 17 | class TableItem : public QTableItem
|
|---|
| 18 | {
|
|---|
| 19 | public:
|
|---|
| 20 | TableItem( QTable *t, EditType et, const QString &txt ) : QTableItem( t, et, txt ) {}
|
|---|
| 21 | void paint( QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected );
|
|---|
| 22 | };
|
|---|
| 23 |
|
|---|
| 24 | class ComboItem : public QTableItem
|
|---|
| 25 | {
|
|---|
| 26 | public:
|
|---|
| 27 | ComboItem( QTable *t, EditType et );
|
|---|
| 28 | QWidget *createEditor() const;
|
|---|
| 29 | void setContentFromEditor( QWidget *w );
|
|---|
| 30 | void setText( const QString &s );
|
|---|
| 31 |
|
|---|
| 32 | private:
|
|---|
| 33 | QComboBox *cb;
|
|---|
| 34 |
|
|---|
| 35 | };
|
|---|
| 36 |
|
|---|
| 37 | class Table : public QTable
|
|---|
| 38 | {
|
|---|
| 39 | Q_OBJECT
|
|---|
| 40 |
|
|---|
| 41 | public:
|
|---|
| 42 | Table();
|
|---|
| 43 | void sortColumn( int col, bool ascending, bool wholeRows );
|
|---|
| 44 |
|
|---|
| 45 | private slots:
|
|---|
| 46 | void recalcSum( int row, int col );
|
|---|
| 47 |
|
|---|
| 48 | private:
|
|---|
| 49 | void initTable();
|
|---|
| 50 |
|
|---|
| 51 | };
|
|---|
| 52 |
|
|---|
| 53 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.