Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/widgets/qdockarealayout_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtGui module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    104104    QSize sizeHint() const;
    105105    bool expansive(Qt::Orientation o) const;
     106    bool hasFixedSize(Qt::Orientation o) const;
    106107
    107108    QLayoutItem *widgetItem;
     
    136137    QSize size() const;
    137138
    138     bool insertGap(QList<int> path, QLayoutItem *dockWidgetItem);
    139     QLayoutItem *plug(QList<int> path);
    140     QLayoutItem *unplug(QList<int> path);
     139    bool insertGap(const QList<int> &path, QLayoutItem *dockWidgetItem);
     140    QLayoutItem *plug(const QList<int> &path);
     141    QLayoutItem *unplug(const QList<int> &path);
    141142    enum TabMode { NoTabs, AllowTabs, ForceTabs };
    142143    QList<int> gapIndex(const QPoint &pos, bool nestingEnabled,
    143144                            TabMode tabMode) const;
    144     void remove(QList<int> path);
     145    void remove(const QList<int> &path);
    145146    void unnest(int index);
    146147    void split(int index, Qt::Orientation orientation, QLayoutItem *dockWidgetItem);
    147148    void tab(int index, QLayoutItem *dockWidgetItem);
    148     QDockAreaLayoutItem &item(QList<int> path);
    149     QDockAreaLayoutInfo *info(QList<int> path);
     149    QDockAreaLayoutItem &item(const QList<int> &path);
     150    QDockAreaLayoutInfo *info(const QList<int> &path);
    150151    QDockAreaLayoutInfo *info(QWidget *widget);
    151152
     
    162163    int changeSize(int index, int size, bool below);
    163164    QRect itemRect(int index) const;
    164     QRect itemRect(QList<int> path) const;
     165    QRect itemRect(const QList<int> &path) const;
    165166    QRect separatorRect(int index) const;
    166     QRect separatorRect(QList<int> path) const;
     167    QRect separatorRect(const QList<int> &path) const;
    167168
    168169    void clear();
    169170    bool isEmpty() const;
     171    bool hasFixedSize() const;
    170172    QList<int> findSeparator(const QPoint &pos) const;
    171173    int next(int idx) const;
     
    180182                            const QPoint &mouse) const;
    181183    QRegion separatorRegion() const;
    182     int separatorMove(int index, int delta, QVector<QLayoutStruct> *cache);
     184    int separatorMove(int index, int delta);
    183185
    184186    QLayoutItem *itemAt(int *x, int index) const;
     
    189191
    190192    int sep;
    191     QVector<QWidget*> separatorWidgets;
     193    mutable QVector<QWidget*> separatorWidgets;
    192194    QInternal::DockPosition dockPos;
    193195    Qt::Orientation o;
     
    195197    QMainWindow *mainWindow;
    196198    QList<QDockAreaLayoutItem> item_list;
    197 
     199#ifndef QT_NO_TABBAR
    198200    void updateSeparatorWidgets() const;
    199201    QSet<QWidget*> usedSeparatorWidgets() const;
     202#endif //QT_NO_TABBAR
    200203
    201204#ifndef QT_NO_TABBAR
     
    232235    QDockAreaLayoutInfo docks[4];
    233236    int sep; // separator extent
    234     QVector<QWidget*> separatorWidgets;
     237    bool fallbackToSizeHints; //determines if we should use the sizehint for the dock areas (true until the layout is restored or the central widget is set)
     238    mutable QVector<QWidget*> separatorWidgets;
    235239
    236240    bool isValid() const;
     
    245249    QList<int> findSeparator(const QPoint &pos) const;
    246250
    247     QDockAreaLayoutItem &item(QList<int> path);
    248     QDockAreaLayoutInfo *info(QList<int> path);
    249     const QDockAreaLayoutInfo *info(QList<int> path) const;
     251    QDockAreaLayoutItem &item(const QList<int> &path);
     252    QDockAreaLayoutInfo *info(const QList<int> &path);
     253    const QDockAreaLayoutInfo *info(const QList<int> &path) const;
    250254    QDockAreaLayoutInfo *info(QWidget *widget);
    251     QRect itemRect(QList<int> path) const;
     255    QRect itemRect(const QList<int> &path) const;
    252256    QRect separatorRect(int index) const;
    253     QRect separatorRect(QList<int> path) const;
    254 
    255     bool insertGap(QList<int> path, QLayoutItem *dockWidgetItem);
    256     QLayoutItem *plug(QList<int> path);
    257     QLayoutItem *unplug(QList<int> path);
    258     void remove(QList<int> path);
     257    QRect separatorRect(const QList<int> &path) const;
     258
     259    bool insertGap(const QList<int> &path, QLayoutItem *dockWidgetItem);
     260    QLayoutItem *plug(const QList<int> &path);
     261    QLayoutItem *unplug(const QList<int> &path);
     262    void remove(const QList<int> &path);
    259263
    260264    void fitLayout();
     
    276280                            const QPoint &mouse) const;
    277281    QRegion separatorRegion() const;
    278     int separatorMove(QList<int> separator, const QPoint &origin, const QPoint &dest,
    279                         QVector<QLayoutStruct> *cache);
     282    int separatorMove(const QList<int> &separator, const QPoint &origin, const QPoint &dest);
     283#ifndef QT_NO_TABBAR
    280284    void updateSeparatorWidgets() const;
     285#endif //QT_NO_TABBAR
    281286
    282287    QLayoutItem *itemAt(int *x, int index) const;
     
    289294                    QVector<QLayoutStruct> *hor_struct_list);
    290295
    291     QRect gapRect(QList<int> path) const;
     296    QRect gapRect(const QList<int> &path) const;
    292297
    293298    void keepSize(QDockWidget *w);
    294 
     299#ifndef QT_NO_TABBAR
    295300    QSet<QTabBar*> usedTabBars() const;
    296301    QSet<QWidget*> usedSeparatorWidgets() const;
     302#endif //QT_NO_TABBAR
    297303};
    298304
Note: See TracChangeset for help on using the changeset viewer.