src/gui/graphicsview/qgridlayoutengine_p.h
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
    57 #include "qbitarray.h"
    57 #include "qbitarray.h"
    58 #include "qlist.h"
    58 #include "qlist.h"
    59 #include "qmap.h"
    59 #include "qmap.h"
    60 #include "qpair.h"
    60 #include "qpair.h"
    61 #include "qvector.h"
    61 #include "qvector.h"
    62 
    62 #include "qgraphicslayout_p.h"
    63 #include <float.h>
    63 #include <float.h>
    64 
    64 
    65 QT_BEGIN_NAMESPACE
    65 QT_BEGIN_NAMESPACE
    66 
    66 
    67 class QGraphicsLayoutItem;
    67 class QGraphicsLayoutItem;
   126 public:
   126 public:
   127     QStretchParameter() : QLayoutParameter<int>(-1) {}
   127     QStretchParameter() : QLayoutParameter<int>(-1) {}
   128 
   128 
   129 };
   129 };
   130 
   130 
   131 class QLayoutStyleInfo
       
   132 {
       
   133 public:
       
   134     inline QLayoutStyleInfo() { invalidate(); }
       
   135     inline QLayoutStyleInfo(QStyle *style, QWidget *widget)
       
   136         : q_valid(true), q_style(style), q_widget(widget) {}
       
   137 
       
   138     inline void invalidate() { q_valid = false; q_style = 0; q_widget = 0; }
       
   139 
       
   140     inline QStyle *style() const { return q_style; }
       
   141     inline QWidget *widget() const { return q_widget; }
       
   142 
       
   143     inline bool operator==(const QLayoutStyleInfo &other)
       
   144         { return q_style == other.q_style && q_widget == other.q_widget; }
       
   145     inline bool operator!=(const QLayoutStyleInfo &other)
       
   146         { return !(*this == other); }
       
   147 
       
   148 private:
       
   149     bool q_valid;
       
   150     QStyle *q_style;
       
   151     QWidget *q_widget;
       
   152 };
       
   153 
       
   154 class QGridLayoutBox
   131 class QGridLayoutBox
   155 {
   132 {
   156 public:
   133 public:
   157     inline QGridLayoutBox()
   134     inline QGridLayoutBox()
   158         : q_minimumSize(0), q_preferredSize(0), q_maximumSize(FLT_MAX),
   135         : q_minimumSize(0), q_preferredSize(0), q_maximumSize(FLT_MAX),