Ananas Library 0.9.5
wtable.h
1/****************************************************************************
2** $Id: wtable.h,v 1.16 2007/09/19 09:35:00 app Exp $
3**
4** Header file of the table plugin of Ananas
5** Designer and Engine applications
6**
7** Created : 20031201
8**
9** Copyright (C) 2003-2004 Leader InfoTech. All rights reserved.
10** Copyright (C) 2006 Grigory Panov <gr1313 at mail.ru>, Yoshkar-Ola.
11**
12** This file is part of the Ananas Plugins of the Ananas
13** automation accounting system.
14**
15** This file may be distributed and/or modified under the terms of the
16** GNU General Public License version 2 as published by the Free Software
17** Foundation and appearing in the file LICENSE.GPL included in the
18** packaging of this file.
19**
20** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
21** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22**
23** See http://www.leaderit.ru/page=ananas or email sales@leaderit.ru
24** See http://www.leaderit.ru/gpl/ for GPL licensing information.
25**
26** Contact org@leaderit.ru if any conditions of this licensing are
27** not clear to you.
28**
29**********************************************************************/
30
31#ifndef WTABLE_H
32#define WTABLE_H
33
34#include <qwidget.h>
35#include <qwidgetplugin.h>
36#include <qobjectlist.h>
37#include <qscrollview.h>
38#include <qtable.h>
39#include <qlabel.h>
40#include <qevent.h>
41#include <qdatatable.h>
42#include "acfg.h"
43#include "aobject.h"
44#include "awidget.h"
45
63class QT_WIDGET_PLUGIN_EXPORT wTable : public QTable
64{
65 Q_OBJECT
66
67public:
68
69 wTable(QWidget* parent, const char * name);
70 virtual ~wTable();
71public slots:
72 virtual void setDocument(int row, aObject *object);
73 void setText(int row, int col, const QString& text);
74 QString text(int col, int row);
75 void setHeaderText(int col, const QString& text);
76 QString textHeader(int col);
77 virtual void sortColumn ( int col, bool ascending = TRUE, bool wholeRows = TRUE );
78 virtual void setColumnWidth(int col, int width);
79 virtual int columnWidth(int col);
80 virtual void setNumCols ( int r );
81 virtual int numCols () const ;
82 virtual void hideColumn ( int col );
83 virtual void showColumn ( int col );
84// bool isColumnHidden ( int col ) const;
85 virtual void adjustColumn ( int col );
86 virtual void setColumnStretchable ( int col, bool stretch );
87 bool isColumnStretchable ( int col ) const;
88 virtual void swapColumns ( int col1, int col2, bool swapHeader = FALSE );
89 virtual void swapCells ( int row1, int col1, int row2, int col2 );
90 virtual void setCurrentCell ( int row, int col );
91 virtual void setColumnReadOnly ( int col, bool ro );
92 virtual void insertColumns ( int col, int count = 1 );
93 virtual void removeColumn ( int col );
94 virtual void editCell ( int row, int col, bool replace = FALSE );
95 virtual void swapRows ( int row1, int row2, bool swapHeader = FALSE );
96 virtual int currentRow() {return QTable::currentRow();};
97signals:
98// void pressed ( int row, int col, int button, const QPoint & mousePos );
99// void currentChanged ( int row, int col );
100// void clicked ( int row, int col, int button, const QPoint & mousePos );
101// void valueChanged ( int row, int col );
102
103protected slots:
104 virtual void columnClicked ( int col );
105
106private slots:
107// void on_pressed ( int row, int col, int button, const QPoint & mousePos );
108// void on_currentChanged ( int row, int col );
109// void on_clicked ( int row, int col, int button, const QPoint & mousePos );
110// void on_valueChanged ( int row, int col );
111protected:
112 virtual void activateNextCell () {} ;
113
114};
115
116#endif
Definition aobject.h:64
Object for view and edit tabel in aTable object. .
Definition wtable.h:64