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

📄 qtable-h.html

📁 qtopiaphone英文帮助,用于初学者和开发人员,初学者可以用来学习,开发人员可以用来资料查询.
💻 HTML
📖 第 1 页 / 共 2 页
字号:
    bool isSelected( int row, int col ) const;    bool isRowSelected( int row, bool full = FALSE ) const;    bool isColumnSelected( int col, bool full = FALSE ) const;    int numSelections() const;    QTableSelection selection( int num ) const;    virtual int addSelection( const QTableSelection &amp;s );    virtual void removeSelection( const QTableSelection &amp;s );    virtual void removeSelection( int num );    virtual int currentSelection() const;    bool showGrid() const;    bool columnMovingEnabled() const;    bool rowMovingEnabled() const;    virtual void sortColumn( int col, bool ascending = TRUE,                             bool wholeRows = FALSE );    bool sorting() const;    virtual void takeItem( QTableItem *i );    virtual void setCellWidget( int row, int col, QWidget *e );    virtual QWidget *cellWidget( int row, int col ) const;    virtual void clearCellWidget( int row, int col );    virtual void paintCell( QPainter *p, int row, int col,                            const QRect &amp;cr, bool selected );    virtual void paintFocus( QPainter *p, const QRect &amp;r );    QSize sizeHint() const;public slots:    virtual void setNumRows( int r );    virtual void setNumCols( int r );    virtual void setShowGrid( bool b );    virtual void hideRow( int row );    virtual void hideColumn( int col );    virtual void showRow( int row );    virtual void showColumn( int col );    virtual void setColumnWidth( int col, int w );    virtual void setRowHeight( int row, int h );    virtual void adjustColumn( int col );    virtual void adjustRow( int row );    virtual void setColumnStretchable( int col, bool stretch );    virtual void setRowStretchable( int row, bool stretch );    bool isColumnStretchable( int col ) const;    bool isRowStretchable( int row ) const;    virtual void setSorting( bool b );    virtual void swapRows( int row1, int row2 );    virtual void swapColumns( int col1, int col2 );    virtual void swapCells( int row1, int col1, int row2, int col2 );    virtual void setLeftMargin( int m );    virtual void setTopMargin( int m );    virtual void setCurrentCell( int row, int col );    void clearSelection( bool repaint = TRUE );    virtual void setColumnMovingEnabled( bool b );    virtual void setRowMovingEnabled( bool b );protected:    void drawContents( QPainter *p, int cx, int cy, int cw, int ch );    void contentsMousePressEvent( QMouseEvent* );    void contentsMouseMoveEvent( QMouseEvent* );    void contentsMouseDoubleClickEvent( QMouseEvent* );    void contentsMouseReleaseEvent( QMouseEvent* );    void keyPressEvent( QKeyEvent* );    void focusInEvent( QFocusEvent* );    void focusOutEvent( QFocusEvent* );    void resizeEvent( QResizeEvent * );    void showEvent( QShowEvent *e );    virtual void paintEmptyArea( QPainter *p, int cx, int cy, int cw, int ch );    virtual void activateNextCell();    virtual QWidget *createEditor( int row, int col, bool initFromCell ) const;    virtual void setCellContentFromEditor( int row, int col );    virtual QWidget *beginEdit( int row, int col, bool replace );    virtual void endEdit( int row, int col, bool accept, bool replace );    virtual void resizeData( int len );    virtual void insertWidget( int row, int col, QWidget *w );    int indexOf( int row, int col ) const;protected slots:    virtual void columnWidthChanged( int col );    virtual void rowHeightChanged( int row );    virtual void columnIndexChanged( int s, int oi, int ni );    virtual void rowIndexChanged( int s, int oi, int ni );    virtual void columnClicked( int col );signals:    void currentChanged( int row, int col );    void clicked( int row, int col, int button, const QPoint &amp;mousePos );    void doubleClicked( int row, int col, int button, const QPoint &amp;mousePos );    void pressed( int row, int col, int button, const QPoint &amp;mousePos );    void selectionChanged();    void valueChanged( int row, int col );private slots:    void doAutoScroll();private:    enum EditMode { NotEditing, Editing, Replacing };    void updateGeometries();    void repaintSelections( QTableSelection *oldSelection,                            QTableSelection *newSelection,                            bool updateVertical = TRUE,                            bool updateHorizontal = TRUE );    QRect rangeGeometry( int topRow, int leftCol,                         int bottomRow, int rightCol, bool &amp;optimize );    void fixRow( int &amp;row, int y );    void fixCol( int &amp;col, int x );    void init( int numRows, int numCols );    QSize tableSize() const;    bool isEditing() const;    void repaintCell( int row, int col );    void contentsToViewport2( int x, int y, int&amp; vx, int&amp; vy );    QPoint contentsToViewport2( const QPoint &amp;p );    void viewportToContents2( int vx, int vy, int&amp; x, int&amp; y );    QPoint viewportToContents2( const QPoint &amp;p );    void updateRowWidgets( int row );    void updateColWidgets( int col );    bool isRowHidden( int ) const;    bool isColumnHidden( int ) const;private:    QVector&lt;QTableItem&gt; contents;    QVector&lt;QWidget&gt; widgets;    int curRow;    int curCol;    QTableHeader *leftHeader, *topHeader;    EditMode edMode;    int editCol, editRow;    QList&lt;QTableSelection&gt; selections;    QTableSelection *currentSel;    QTimer *autoScrollTimer;    bool sGrid, mRows, mCols;    int lastSortCol;    bool asc;    bool doSort;    bool mousePressed;    SelectionMode selMode;    int pressedRow, pressedCol;    QTablePrivate *d;};#if defined(Q_TEMPLATEDLL)// MOC_SKIP_BEGINtemplate class Q_EXPORT QArray&lt;int&gt;;template class Q_EXPORT QArray&lt;bool&gt;;// MOC_SKIP_END#endifclass Q_EXPORT QTableHeader : public <a href="qheader.html">QHeader</a>{    friend class QTable;    Q_OBJECTpublic:    enum SectionState {        Normal,        Bold,        Selected    };    QTableHeader( int, QTable *t, QWidget *parent=0, const char *name=0 );    ~QTableHeader() {};    void addLabel( const QString &amp;s , int size );    void setSectionState( int s, SectionState state );    SectionState sectionState( int s ) const;    int sectionSize( int section ) const;    int sectionPos( int section ) const;    int sectionAt( int section ) const;    void setSectionStretchable( int s, bool b );    bool isSectionStretchable( int s ) const;signals:    void sectionSizeChanged( int s );protected:    void paintEvent( QPaintEvent *e );    void paintSection( QPainter *p, int index, QRect fr );    void mousePressEvent( QMouseEvent *e );    void mouseMoveEvent( QMouseEvent *e );    void mouseReleaseEvent( QMouseEvent *e );    void mouseDoubleClickEvent( QMouseEvent *e );    void resizeEvent( QResizeEvent *e );private slots:    void doAutoScroll();    void sectionWidthChanged( int col, int os, int ns );    void indexChanged( int sec, int oldIdx, int newIdx );    void updateStretches();    void updateWidgetStretches();private:    void updateSelections();    void saveStates();    void setCaching( bool b );    void swapSections( int oldIdx, int newIdx );    bool doSelection( QMouseEvent *e );private:    QArray&lt;int&gt; states, oldStates;    QArray&lt;bool&gt; stretchable;    QArray&lt;int&gt; sectionSizes, sectionPoses;    bool mousePressed;    int pressPos, startPos, endPos;    QTable *table;    QTimer *autoScrollTimer;    QWidget *line1, *line2;    bool caching;    int resizedSection;    bool isResizing;    int numStretches;    QTimer *stretchTimer, *widgetStretchTimer;    QTableHeaderPrivate *d;    void setNumLabels( int n );};#endif // QT_NO_TABLE#endif // TABLE_H</pre><p><address><hr><div align="center"><table width="100%" cellspacing="0" border="0"><tr><td>Copyright 

⌨️ 快捷键说明

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