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/qmainwindowlayout_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**
     
    6262#include "QtCore/qvector.h"
    6363#include "QtCore/qset.h"
     64#include "QtCore/qbasictimer.h"
    6465#include "private/qlayoutengine_p.h"
     66#include "private/qwidgetanimator_p.h"
    6567
    6668#include "qdockarealayout_p.h"
     
    8991
    9092class QToolBar;
    91 class QWidgetAnimator;
    9293class QRubberBand;
    9394
     
    128129    QLayoutItem *takeAt(int index, int *x);
    129130    QList<int> indexOf(QWidget *widget) const;
    130     QLayoutItem *item(QList<int> path);
    131     QRect itemRect(QList<int> path) const;
    132     QRect gapRect(QList<int> path) const; // ### get rid of this, use itemRect() instead
     131    QLayoutItem *item(const QList<int> &path);
     132    QRect itemRect(const QList<int> &path) const;
     133    QRect gapRect(const QList<int> &path) const; // ### get rid of this, use itemRect() instead
    133134
    134135    bool contains(QWidget *widget) const;
     
    138139
    139140    QList<int> gapIndex(QWidget *widget, const QPoint &pos) const;
    140     bool insertGap(QList<int> path, QLayoutItem *item);
    141     void remove(QList<int> path);
     141    bool insertGap(const QList<int> &path, QLayoutItem *item);
     142    void remove(const QList<int> &path);
    142143    void remove(QLayoutItem *item);
    143144    void clear();
    144145    bool isValid() const;
    145146
    146     QLayoutItem *plug(QList<int> path);
    147     QLayoutItem *unplug(QList<int> path, QMainWindowLayoutState *savedState = 0);
     147    QLayoutItem *plug(const QList<int> &path);
     148    QLayoutItem *unplug(const QList<int> &path, QMainWindowLayoutState *savedState = 0);
    148149
    149150    void saveState(QDataStream &stream) const;
     
    165166    void setDockOptions(QMainWindow::DockOptions opts);
    166167    bool usesHIToolBar(QToolBar *toolbar) const;
     168
     169    void timerEvent(QTimerEvent *e);
    167170
    168171    // status bar
     
    244247    QList<int> movingSeparator;
    245248    QPoint movingSeparatorOrigin, movingSeparatorPos;
    246     QTimer *separatorMoveTimer;
    247     QVector<QLayoutStruct> separatorMoveCache;
     249    QBasicTimer separatorMoveTimer;
    248250
    249251    bool startSeparatorMove(const QPoint &pos);
     
    277279    // animations
    278280
    279     QWidgetAnimator *widgetAnimator;
     281    QWidgetAnimator widgetAnimator;
    280282    QList<int> currentGapPos;
    281283    QRect currentGapRect;
     
    294296    void restore(bool keepSavedState = false);
    295297    void updateHIToolBarStatus();
    296 
    297 private slots:
    298298    void animationFinished(QWidget *widget);
    299     void allAnimationsFinished();
     299
     300private Q_SLOTS:
    300301#ifndef QT_NO_DOCKWIDGET
    301     void doSeparatorMove();
    302302#ifndef QT_NO_TABBAR
    303303    void tabChanged();
     
    336336    void fixSizeInUnifiedToolbar(QToolBar *tb) const;
    337337    bool useHIToolBar;
     338    void syncUnifiedToolbarVisibility();
     339    bool blockVisiblityCheck;
    338340#endif
    339341};
     
    342344#endif // QT_NO_MAINWINDOW
    343345
    344 QT_BEGIN_NAMESPACE
    345 static inline int pick(Qt::Orientation o, const QPoint &pos)
    346 { return o == Qt::Horizontal ? pos.x() : pos.y(); }
    347 
    348 static inline int pick(Qt::Orientation o, const QSize &size)
    349 { return o == Qt::Horizontal ? size.width() : size.height(); }
    350 
    351 static inline int &rpick(Qt::Orientation o, QPoint &pos)
    352 { return o == Qt::Horizontal ? pos.rx() : pos.ry(); }
    353 
    354 static inline int &rpick(Qt::Orientation o, QSize &size)
    355 { return o == Qt::Horizontal ? size.rwidth() : size.rheight(); }
    356 
    357 static inline QSizePolicy::Policy pick(Qt::Orientation o, const QSizePolicy &policy)
    358 { return o == Qt::Horizontal ? policy.horizontalPolicy() : policy.verticalPolicy(); }
    359 
    360 static inline int perp(Qt::Orientation o, const QPoint &pos)
    361 { return o == Qt::Vertical ? pos.x() : pos.y(); }
    362 
    363 static inline int perp(Qt::Orientation o, const QSize &size)
    364 { return o == Qt::Vertical ? size.width() : size.height(); }
    365 
    366 static inline int &rperp(Qt::Orientation o, QPoint &pos)
    367 { return o == Qt::Vertical ? pos.rx() : pos.ry(); }
    368 
    369 static inline int &rperp(Qt::Orientation o, QSize &size)
    370 { return o == Qt::Vertical ? size.rwidth() : size.rheight(); }
    371 
    372 QT_END_NAMESPACE
    373 
    374346#endif // QDYNAMICMAINWINDOWLAYOUT_P_H
Note: See TracChangeset for help on using the changeset viewer.