equal
deleted
inserted
replaced
73 { |
73 { |
74 Q_DECLARE_PUBLIC(QTabBar) |
74 Q_DECLARE_PUBLIC(QTabBar) |
75 public: |
75 public: |
76 QTabBarPrivate() |
76 QTabBarPrivate() |
77 :currentIndex(-1), pressedIndex(-1), shape(QTabBar::RoundedNorth), layoutDirty(false), |
77 :currentIndex(-1), pressedIndex(-1), shape(QTabBar::RoundedNorth), layoutDirty(false), |
78 drawBase(true), scrollOffset(0), expanding(true), closeButtonOnTabs(false), |
78 drawBase(true), scrollOffset(0), useScrollButtonsSetByUser(false) , expanding(true), closeButtonOnTabs(false), |
79 selectionBehaviorOnRemove(QTabBar::SelectRightTab), paintWithOffsets(true), movable(false), |
79 selectionBehaviorOnRemove(QTabBar::SelectRightTab), paintWithOffsets(true), movable(false), |
80 dragInProgress(false), documentMode(false), movingTab(0) {} |
80 dragInProgress(false), documentMode(false), movingTab(0) |
|
81 #ifdef Q_WS_MAC |
|
82 , previousPressedIndex(-1) |
|
83 #endif |
|
84 {} |
81 |
85 |
82 int currentIndex; |
86 int currentIndex; |
83 int pressedIndex; |
87 int pressedIndex; |
84 QTabBar::Shape shape; |
88 QTabBar::Shape shape; |
85 bool layoutDirty; |
89 bool layoutDirty; |
181 |
185 |
182 void makeVisible(int index); |
186 void makeVisible(int index); |
183 QSize iconSize; |
187 QSize iconSize; |
184 Qt::TextElideMode elideMode; |
188 Qt::TextElideMode elideMode; |
185 bool useScrollButtons; |
189 bool useScrollButtons; |
|
190 bool useScrollButtonsSetByUser; |
186 |
191 |
187 bool expanding; |
192 bool expanding; |
188 bool closeButtonOnTabs; |
193 bool closeButtonOnTabs; |
189 QTabBar::SelectionBehavior selectionBehaviorOnRemove; |
194 QTabBar::SelectionBehavior selectionBehaviorOnRemove; |
190 |
195 |
193 bool movable; |
198 bool movable; |
194 bool dragInProgress; |
199 bool dragInProgress; |
195 bool documentMode; |
200 bool documentMode; |
196 |
201 |
197 QWidget *movingTab; |
202 QWidget *movingTab; |
198 |
203 #ifdef Q_WS_MAC |
|
204 int previousPressedIndex; |
|
205 #endif |
199 // shared by tabwidget and qtabbar |
206 // shared by tabwidget and qtabbar |
200 static void initStyleBaseOption(QStyleOptionTabBarBaseV2 *optTabBase, QTabBar *tabbar, QSize size) |
207 static void initStyleBaseOption(QStyleOptionTabBarBaseV2 *optTabBase, QTabBar *tabbar, QSize size) |
201 { |
208 { |
202 QStyleOptionTab tabOverlap; |
209 QStyleOptionTab tabOverlap; |
203 tabOverlap.shape = tabbar->shape(); |
210 tabOverlap.shape = tabbar->shape(); |