⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qtable-h.html

📁 QT 下载资料仅供参考
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- /home/reggie/tmp/qt-3.0-reggie-5401/qt-x11-commercial-3.0.5/include/qtable.h:1 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta name="Translator" content="farfareast"><meta name="Qt zh_CN Documents Website" content="http://www.qiliang.net/qt"><title>qtable.h包含文件</title><style type="text/css"><!--h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }a:link { color: #004faf; text-decoration: none }a:visited { color: #672967; text-decoration: none }body { background: #ffffff; color: black; font-family: "Times New Roman" }--></style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr bgcolor="#E5E5E5"><td valign=center> <a href="index.html"><font color="#004faf">主页</font></a> | <a href="classes.html"><font color="#004faf">所有的类</font></a> | <a href="mainclasses.html"><font color="#004faf">主要的类</font></a> | <a href="annotated.html"><font color="#004faf">注释的类</font></a> | <a href="groups.html"><font color="#004faf">分组的类</font></a> | <a href="functions.html"><font color="#004faf">函数</font></a></td><td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>qtable.h</h1><p>这里是qtable.h包含文件的所有文本,一字不差。它仅仅用来说明,版权由Trolltech保留。<hr><pre>/******************************************************************************** Definition of QTable widget class**** Created : 000607**** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.**** This file is part of the table module of the Qt GUI Toolkit.**** This file may be distributed under the terms of the Q Public License** as defined by Trolltech AS of Norway and appearing in the file** LICENSE.QPL included in the packaging of this file.**** This file may be distributed and/or modified under the terms of the** GNU General Public License version 2 as published by the Free Software** Foundation and appearing in the file LICENSE.GPL included in the** packaging of this file.**** Licensees holding valid Qt Enterprise Edition licenses may use this** file in accordance with the Qt Commercial License Agreement provided** with the Software.**** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.**** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for**   information about Qt Commercial License Agreements.** See http://www.trolltech.com/qpl/ for QPL licensing information.** See http://www.trolltech.com/gpl/ for GPL licensing information.**** Contact info@trolltech.com if any conditions of this licensing are** not clear to you.************************************************************************/#ifndef QTABLE_H#define QTABLE_H#ifndef QT_H#include &lt;qscrollview.h&gt;#include &lt;qpixmap.h&gt;#include &lt;qptrvector.h&gt;#include &lt;qheader.h&gt;#include &lt;qmemarray.h&gt;#include &lt;qptrlist.h&gt;#include &lt;qguardedptr.h&gt;#include &lt;qshared.h&gt;#include &lt;qintdict.h&gt;#include &lt;qstringlist.h&gt;#endif // QT_H#ifndef QT_NO_TABLEclass QTableHeader;class QValidator;class QTable;class QPaintEvent;class QTimer;class QResizeEvent;class QComboBox;class QCheckBox;class QDragObject;struct QTablePrivate;struct QTableHeaderPrivate;class Q_EXPORT QTableSelection{public:    QTableSelection();    void init( int row, int col );    void expandTo( int row, int col );    bool operator==( const QTableSelection &amp;s ) const;    bool operator!=( const QTableSelection &amp;s ) const { return !(operator==(s)); }    int topRow() const { return tRow; }    int bottomRow() const { return bRow; }    int leftCol() const { return lCol; }    int rightCol() const { return rCol; }    int anchorRow() const { return aRow; }    int anchorCol() const { return aCol; }    bool isActive() const { return active; }private:    uint active : 1;    uint inited : 1;    int tRow, lCol, bRow, rCol;    int aRow, aCol;};class Q_EXPORT QTableItem : public Qt{    friend class QTable;public:    enum EditType { Never, OnTyping, WhenCurrent, Always };    QTableItem( QTable *table, EditType et, const QString &amp;text );    QTableItem( QTable *table, EditType et, const QString &amp;text,                const QPixmap &amp;p );    virtual ~QTableItem();    virtual QPixmap pixmap() const;    virtual QString text() const;    virtual void setPixmap( const QPixmap &amp;p );    virtual void setText( const QString &amp;t );    QTable *table() const { return t; }    virtual int alignment() const;    virtual void setWordWrap( bool b );    bool wordWrap() const;    EditType editType() const;    virtual QWidget *createEditor() const;    virtual void setContentFromEditor( QWidget *w );    virtual void setReplaceable( bool );    bool isReplaceable() const;    virtual QString key() const;    virtual QSize sizeHint() const;    virtual void setSpan( int rs, int cs );    int rowSpan() const;    int colSpan() const;    virtual void setRow( int r );    virtual void setCol( int c );    int row() const;    int col() const;    virtual void paint( QPainter *p, const QColorGroup &amp;cg,                        const QRect &amp;cr, bool selected );    void updateEditor( int oldRow, int oldCol );    virtual void setEnabled( bool b );    bool isEnabled() const;    virtual int rtti() const;    static int RTTI;private:    QString txt;    QPixmap pix;    QTable *t;    EditType edType;    uint wordwrap : 1;    uint tcha : 1;    uint enabled : 1;    int rw, cl;    int rowspan, colspan;};class Q_EXPORT QComboTableItem : public QTableItem{public:    QComboTableItem( QTable *table, const QStringList &amp;list, bool editable = FALSE );    virtual QWidget *createEditor() const;    virtual void setContentFromEditor( QWidget *w );    virtual void paint( QPainter *p, const QColorGroup &amp;cg,                        const QRect &amp;cr, bool selected );    virtual void setCurrentItem( int i );    virtual void setCurrentItem( const QString &amp;i );    int currentItem() const;    QString currentText() const;    int count() const;    QString text( int i ) const;    virtual void setEditable( bool b );    bool isEditable() const;    virtual void setStringList( const QStringList &amp;l );    int rtti() const;    static int RTTI;private:    QComboBox *cb;    QStringList entries;    int current;    bool edit;    static QComboBox *fakeCombo;};class Q_EXPORT QCheckTableItem : public QTableItem{public:    QCheckTableItem( QTable *table, const QString &amp;txt );    virtual QWidget *createEditor() const;    virtual void setContentFromEditor( QWidget *w );    virtual void paint( QPainter *p, const QColorGroup &amp;cg,                        const QRect &amp;cr, bool selected );    virtual void setChecked( bool b );    bool isChecked() const;    int rtti() const;    static int RTTI;private:    QCheckBox *cb;    bool checked;};#if defined(Q_TEMPLATEDLL)// MOC_SKIP_BEGINQ_TEMPLATE_EXTERN template class Q_EXPORT QPtrVector&lt;QTableItem&gt;;Q_TEMPLATE_EXTERN template class Q_EXPORT QPtrVector&lt;QWidget&gt;;Q_TEMPLATE_EXTERN template class Q_EXPORT QPtrList&lt;QTableSelection&gt;;Q_TEMPLATE_EXTERN template class Q_EXPORT QIntDict&lt;int&gt;;// MOC_SKIP_END#endifclass Q_EXPORT QTable : public QScrollView{    Q_OBJECT    Q_ENUMS( SelectionMode FocusStyle )    Q_PROPERTY( int numRows READ numRows WRITE setNumRows )    Q_PROPERTY( int numCols READ numCols WRITE setNumCols )    Q_PROPERTY( bool showGrid READ showGrid WRITE setShowGrid )    Q_PROPERTY( bool rowMovingEnabled READ rowMovingEnabled WRITE setRowMovingEnabled )    Q_PROPERTY( bool columnMovingEnabled READ columnMovingEnabled WRITE setColumnMovingEnabled )    Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly )    Q_PROPERTY( bool sorting READ sorting WRITE setSorting )    Q_PROPERTY( SelectionMode selectionMode READ selectionMode WRITE setSelectionMode )    Q_PROPERTY( FocusStyle focusStyle READ focusStyle WRITE setFocusStyle )    friend class QTableHeader;    friend class QComboTableItem;    friend class QCheckTableItem;    friend class QTableItem;public:    QTable( QWidget* parent=0, const char* name=0 );    QTable( int numRows, int numCols,            QWidget* parent=0, const char* name=0 );    ~QTable();    QHeader *horizontalHeader() const;    QHeader *verticalHeader() const;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -