src/gui/text/qtextoption.h
changeset 33 3e2da88830cd
parent 18 2f34d5167611
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
    66         DelimiterTab
    66         DelimiterTab
    67     };
    67     };
    68 
    68 
    69     struct Q_GUI_EXPORT Tab {
    69     struct Q_GUI_EXPORT Tab {
    70         inline Tab() : position(80), type(QTextOption::LeftTab) { }
    70         inline Tab() : position(80), type(QTextOption::LeftTab) { }
       
    71         inline Tab(qreal pos, TabType tabType, QChar delim = QChar())
       
    72             : position(pos), type(tabType), delimiter(delim) {}
    71 
    73 
    72         inline bool operator==(const Tab &other) const {
    74         inline bool operator==(const Tab &other) const {
    73             return type == other.type
    75             return type == other.type
    74                    && qFuzzyCompare(position, other.position)
    76                    && qFuzzyCompare(position, other.position)
    75                    && delimiter == other.delimiter;
    77                    && delimiter == other.delimiter;
   132 
   134 
   133 private:
   135 private:
   134     uint align : 8;
   136     uint align : 8;
   135     uint wordWrap : 4;
   137     uint wordWrap : 4;
   136     uint design : 1;
   138     uint design : 1;
   137     uint direction : 1;
   139     uint direction : 2;
   138     uint unused : 19;
   140     uint unused : 18;
   139     uint f;
   141     uint f;
   140     qreal tab;
   142     qreal tab;
   141     QTextOptionPrivate *d;
   143     QTextOptionPrivate *d;
   142 };
   144 };
   143 
   145