Qt 4.8
Public Functions | Public Variables | List of all members
QTabWidgetPrivate Class Reference
Inheritance diagram for QTabWidgetPrivate:
QWidgetPrivate QObjectPrivate QObjectData

Public Functions

void _q_removeTab (int)
 
void _q_showTab (int)
 Ensures that the selected tab's page is visible and appropriately sized. More...
 
void _q_tabMoved (int from, int to)
 
bool hasHeightForWidth () const
 
void init ()
 
 QTabWidgetPrivate ()
 
void updateTabBarPosition ()
 
 ~QTabWidgetPrivate ()
 
- Public Functions inherited from QWidgetPrivate
void _q_showIfNotHidden ()
 
virtual void aboutToDestroy ()
 
void activateChildLayoutsRecursively ()
 
QSize adjustedSize () const
 
void adjustQuitOnCloseAttribute ()
 
QInputContextassignedInputContext () const
 
QPainterbeginSharedPainter ()
 
QWidgetchildAt_helper (const QPoint &, bool) const
 
QWidgetchildAtRecursiveHelper (const QPoint &p, bool, bool includeFrame=false) const
 
QRect clipRect () const
 
QRegion clipRegion () const
 
void clipToEffectiveMask (QRegion &region) const
 
bool close_helper (CloseMode mode)
 
void create_sys (WId window, bool initializeWindow, bool destroyOldWindow)
 
QWindowSurfacecreateDefaultWindowSurface ()
 
QWindowSurfacecreateDefaultWindowSurface_sys ()
 
void createExtra ()
 Creates the widget extra data. More...
 
void createRecursively ()
 
void createSysExtra ()
 
void createTLExtra ()
 
void createTLSysExtra ()
 
void createWinId (WId id=0)
 
void deactivateWidgetCleanup ()
 
void deleteExtra ()
 Deletes the widget extra data. More...
 
void deleteSysExtra ()
 
void deleteTLSysExtra ()
 
void drawWidget (QPaintDevice *pdev, const QRegion &rgn, const QPoint &offset, int flags, QPainter *sharedPainter=0, QWidgetBackingStore *backingStore=0)
 
QWidgeteffectiveFocusWidget ()
 
QRect effectiveRectFor (const QRect &rect) const
 
bool endSharedPainter ()
 
void enforceNativeChildren ()
 
QWExtraextraData () const
 
QRect frameStrut () const
 
void getLayoutItemMargins (int *left, int *top, int *right, int *bottom) const
 
const QRegiongetOpaqueChildren () const
 
void handleSoftwareInputPanel (Qt::MouseButton button, bool clickCausedFocus)
 
void hide_helper ()
 
void hide_sys ()
 Platform-specific part of QWidget::hide(). More...
 
void hideChildren (bool spontaneous)
 
void inheritStyle ()
 
void init (QWidget *desktopWidget, Qt::WindowFlags f)
 
QInputContextinputContext () const
 
void invalidateBuffer (const QRegion &)
 Invalidates the rgn (in widget's coordinates) of the backing store, i.e. More...
 
void invalidateBuffer (const QRect &)
 This function is equivalent to calling invalidateBuffer(QRegion(rect), ...), but is more efficient as it eliminates QRegion operations/allocations and can use the rect more precisely for additional cut-offs. More...
 
void invalidateBuffer_resizeHelper (const QPoint &oldPos, const QSize &oldSize)
 Invalidates the buffer when the widget is resized. More...
 
void invalidateGraphicsEffectsRecursively ()
 
bool isAboutToShow () const
 
bool isBackgroundInherited () const
 
bool isOverlapped (const QRect &) const
 
void lower_sys ()
 
QPoint mapFromGlobal (const QPoint &pos) const
 
QPoint mapToGlobal (const QPoint &pos) const
 
QWidgetBackingStoremaybeBackingStore () const
 
QTLWExtramaybeTopData () const
 
void moveRect (const QRect &, int dx, int dy)
 
bool nativeChildrenForced () const
 
QFont naturalWidgetFont (uint inheritedMask) const
 
QPalette naturalWidgetPalette (uint inheritedMask) const
 Returns the palette that the widget w inherits from its ancestors and QApplication::palette. More...
 
void paintBackground (QPainter *, const QRegion &, int flags=DrawAsRoot) const
 
bool paintOnScreen () const
 
void paintSiblingsRecursive (QPaintDevice *pdev, const QObjectList &children, int index, const QRegion &rgn, const QPoint &offset, int flags, QPainter *sharedPainter, QWidgetBackingStore *backingStore)
 
bool pointInsideRectAndMask (const QPoint &) const
 
QRegion prepareToRender (const QRegion &region, QWidget::RenderFlags renderFlags)
 
void propagatePaletteChange ()
 Propagate this widget's palette to all children, except style sheet widgets, and windows that don't enable window propagation (palettes don't normally propagate to windows). More...
 
 QWidgetPrivate (int version=QObjectPrivateVersion)
 
void raise_sys ()
 
QPaintDeviceredirected (QPoint *offset) const
 
void registerDropSite (bool)
 
void render (QPaintDevice *target, const QPoint &targetOffset, const QRegion &sourceRegion, QWidget::RenderFlags renderFlags, bool readyToRender)
 
void render_helper (QPainter *painter, const QPoint &targetOffset, const QRegion &sourceRegion, QWidget::RenderFlags renderFlags)
 
void repaint_sys (const QRegion &rgn)
 
void reparentFocusWidgets (QWidget *oldtlw)
 
void resolveFont ()
 Determine which font is implicitly imposed on this widget by its ancestors and QApplication::font, resolve this against its own font (attributes from the implicit font are copied over). More...
 
void resolveLayoutDirection ()
 
void resolveLocale ()
 
void resolvePalette ()
 Determine which palette is inherited from this widget's ancestors and QApplication::palette, resolve this against this widget's palette (attributes from the inherited palette are copied over this widget's palette). More...
 
void restoreRedirected ()
 
void scroll_sys (int dx, int dy)
 
void scroll_sys (int dx, int dy, const QRect &r)
 
void scrollChildren (int dx, int dy)
 
void scrollRect (const QRect &, int dx, int dy)
 
void sendPendingMoveAndResizeEvents (bool recursive=false, bool disableUpdates=false)
 
void sendStartupMessage (const char *message) const
 Platform-specific part of QWidget::show(). More...
 
void setConstraints_sys ()
 
void setCursor_sys (const QCursor &cursor)
 
void setDirtyOpaqueRegion ()
 
void setEnabled_helper (bool)
 
void setFocus_sys ()
 
void setFont_helper (const QFont &font)
 
void setGeometry_sys (int, int, int, int, bool)
 
void setLayoutDirection_helper (Qt::LayoutDirection)
 
void setLayoutItemMargins (int left, int top, int right, int bottom)
 
void setLayoutItemMargins (QStyle::SubElement element, const QStyleOption *opt=0)
 
void setLocale_helper (const QLocale &l, bool forceUpdate=false)
 
void setMask_sys (const QRegion &)
 
bool setMaximumSize_helper (int &maxw, int &maxh)
 
bool setMinimumSize_helper (int &minw, int &minh)
 
void setModal_sys ()
 
void setNetWmWindowTypes ()
 
void setOpaque (bool opaque)
 
void setPalette_helper (const QPalette &)
 
void setParent_sys (QWidget *parent, Qt::WindowFlags)
 
void setRedirected (QPaintDevice *replacement, const QPoint &offset)
 
void setSharedPainter (QPainter *painter)
 
void setStyle_helper (QStyle *newStyle, bool propagate, bool metalHack=false)
 
void setUpdatesEnabled_helper (bool)
 
void setWindowFilePath_helper (const QString &filePath)
 
void setWindowIcon_helper ()
 
void setWindowIcon_sys (bool forceReset=false)
 
void setWindowIconText_helper (const QString &cap)
 
void setWindowIconText_sys (const QString &cap)
 
void setWindowOpacity_sys (qreal opacity)
 
void setWindowRole ()
 
void setWindowTitle_helper (const QString &cap)
 
void setWindowTitle_sys (const QString &cap)
 
void setWinId (WId)
 
QPaintersharedPainter () const
 
void show_helper ()
 
void show_recursive ()
 Makes the widget visible in the isVisible() meaning of the word. More...
 
void show_sys ()
 Platform-specific part of QWidget::show(). More...
 
void showChildren (bool spontaneous)
 
void stackUnder_sys (QWidget *)
 
void subtractOpaqueChildren (QRegion &rgn, const QRect &clipRect) const
 
void subtractOpaqueSiblings (QRegion &source, bool *hasDirtySiblingsAbove=0, bool alsoNonOpaque=false) const
 
void syncBackingStore ()
 
void syncBackingStore (const QRegion &region)
 
QTLWExtratopData () const
 
void unsetCursor_sys ()
 
void updateFont (const QFont &)
 Assign font to this widget, and propagate it to all children, except style sheet widgets (handled differently) and windows that don't enable window propagation. More...
 
void updateFrameStrut ()
 Computes the frame rectangle when needed. More...
 
void updateGeometry_helper (bool forceUpdate)
 
void updateIsOpaque ()
 
void updateIsTranslucent ()
 
void updateSystemBackground ()
 
void updateX11AcceptFocus ()
 
void x11UpdateIsOpaque ()
 
 ~QWidgetPrivate ()
 
- Public Functions inherited from QObjectPrivate
void _q_reregisterTimers (void *pointer)
 
void addConnection (int signal, Connection *c)
 
void cleanConnectionLists ()
 
void connectNotify (const char *signal)
 
void deleteChildren ()
 
void disconnectNotify (const char *signal)
 
bool isSender (const QObject *receiver, const char *signal) const
 
bool isSignalConnected (uint signalIdx) const
 Returns true if the signal with index signal_index from object sender is connected. More...
 
void moveToThread_helper ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
QObjectList receiverList (const char *signal) const
 
QObjectList senderList () const
 
void setParent_helper (QObject *)
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData)
 
int signalIndex (const char *signalName) const
 Returns the signal index used in the internal connectionLists vector. More...
 
virtual ~QObjectPrivate ()
 
- Public Functions inherited from QObjectData
virtual ~QObjectData ()=0
 

Public Variables

int alignment
 
bool dirty
 
QWidgetleftCornerWidget
 
QRect panelRect
 
QTabWidget::TabPosition pos
 
QWidgetrightCornerWidget
 
QTabWidget::TabShape shape
 
QStackedWidgetstack
 
QTabBartabs
 
- Public Variables inherited from QWidgetPrivate
QString accessibleDescription
 
QString accessibleName
 
QList< QAction * > actions
 
QPalette::ColorRole bg_role: 8
 
signed char bottomLayoutItemMargin
 
short bottommargin
 
QWidgetData data
 
QRegion dirty
 
uint dirtyOpaqueChildren: 1
 
QWExtraextra
 
QPaintEngineextraPaintEngine
 
QPalette::ColorRole fg_role: 8
 
QWidgetfocus_child
 
QWidgetfocus_next
 
QWidgetfocus_prev
 
QMap< Qt::GestureType, Qt::GestureFlags > gestureContext
 
QGraphicsEffectgraphicsEffect
 
Qt::HANDLE hd
 
uint high_attributes [4]
 
QPointer< QInputContextic
 
Qt::InputMethodHints imHints
 
uint inDirtyList: 1
 
uint inheritedFontResolveMask
 
uint inheritedPaletteResolveMask
 
uint inheritsInputMethodHints: 1
 
uint inSetParent: 1
 
uint isGLWidget: 1
 
uint isMoved: 1
 
uint isOpaque: 1
 
uint isScrolled: 1
 
QLayoutlayout
 
signed char leftLayoutItemMargin
 
short leftmargin
 
QLocale locale
 
QRegionneedsFlush
 
QRegion opaqueChildren
 
Qt::HANDLE picture
 
const QMetaObjectpolished
 
QPaintDeviceredirectDev
 
QPoint redirectOffset
 
signed char rightLayoutItemMargin
 
short rightmargin
 
QSizePolicy size_policy
 
QString statusTip
 
QString toolTip
 
signed char topLayoutItemMargin
 
short topmargin
 
uint usesDoubleBufferedGLContext: 1
 
QString whatsThis
 
QWidgetItemV2widgetItem
 
QX11Info xinfo
 
- Public Variables inherited from QObjectPrivate
union {
   QObject *   currentChildBeingDeleted
 
   QAbstractDeclarativeData *   declarativeData
 
}; 
 
quint32 connectedSignals [2]
 
QObjectConnectionListVectorconnectionLists
 
SendercurrentSender
 
QList< QPointer< QObject > > eventFilters
 
ExtraDataextraData
 
QString objectName
 
Connectionsenders
 
QAtomicPointer< QtSharedPointer::ExternalRefCountData > sharedRefcount
 
QThreadDatathreadData
 
void * unused
 
- Public Variables inherited from QObjectData
uint blockSig: 1
 
QObjectList children
 
uint hasGuards: 1
 
uint inEventHandler: 1
 
uint inThreadChangeEvent: 1
 
uint isWidget: 1
 
QMetaObjectmetaObject
 
uint ownObjectName: 1
 
QObjectparent
 
uint pendTimer: 1
 
int postedEvents
 
QObjectq_ptr
 
uint receiveChildEvents: 1
 
uint sendChildEvents: 1
 
uint unused: 22
 
uint wasDeleted: 1
 

Additional Inherited Members

- Public Types inherited from QWidgetPrivate
enum  CloseMode { CloseNoEvent, CloseWithEvent, CloseWithSpontaneousEvent }
 
enum  Direction { DirectionNorth = 0x01, DirectionEast = 0x10, DirectionSouth = 0x02, DirectionWest = 0x20 }
 
enum  DrawWidgetFlags {
  DrawAsRoot = 0x01, DrawPaintOnScreen = 0x02, DrawRecursive = 0x04, DrawInvisible = 0x08,
  DontSubtractOpaqueChildren = 0x10, DontSetCompositionMode = 0x20, DontDrawOpaqueChildren = 0x40, DontDrawNativeChildren = 0x80
}
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
- Static Public Functions inherited from QWidgetPrivate
static void adjustFlags (Qt::WindowFlags &flags, QWidget *w=0)
 
static QGraphicsProxyWidgetnearestGraphicsProxyWidget (const QWidget *origin)
 Finds the nearest widget embedded in a graphics proxy widget along the chain formed by this widget and its ancestors. More...
 
static int pointToRect (const QPoint &p, const QRect &r)
 
static QRect screenGeometry (const QWidget *widget)
 
- Static Public Functions inherited from QObjectPrivate
static void clearGuards (QObject *)
 
static QObjectPrivateget (QObject *o)
 
static void resetCurrentSender (QObject *receiver, Sender *currentSender, Sender *previousSender)
 
static SendersetCurrentSender (QObject *receiver, Sender *sender)
 
static void signalSignature (const QMetaMethod &signal, QVarLengthArray< char > *result)
 
- Static Public Variables inherited from QWidgetPrivate
static QWidgetSetallWidgets = 0
 
static int instanceCounter = 0
 
static QWidgetkeyboardGrabber = 0
 
static QWidgetMappermapper = 0
 
static int maxInstances = 0
 
static QWidgetmouseGrabber = 0
 

Detailed Description

Definition at line 204 of file qtabwidget.cpp.

Constructors and Destructors

◆ QTabWidgetPrivate()

QTabWidgetPrivate::QTabWidgetPrivate ( )

Definition at line 229 of file qtabwidget.cpp.

230  : tabs(0), stack(0), dirty(true),
233 {}
QWidget * rightCornerWidget
Definition: qtabwidget.cpp:226
QStackedWidget * stack
Definition: qtabwidget.cpp:219
QTabWidget::TabShape shape
Definition: qtabwidget.cpp:223
QTabWidget::TabPosition pos
Definition: qtabwidget.cpp:222
QWidget * leftCornerWidget
Definition: qtabwidget.cpp:225

◆ ~QTabWidgetPrivate()

QTabWidgetPrivate::~QTabWidgetPrivate ( )

Definition at line 235 of file qtabwidget.cpp.

236 {}

Functions

◆ _q_removeTab()

void QTabWidgetPrivate::_q_removeTab ( int  index)

Definition at line 776 of file qtabwidget.cpp.

Referenced by init().

777 {
778  Q_Q(QTabWidget);
779  tabs->removeTab(index);
780  q->setUpLayout();
781  q->tabRemoved(index);
782 }
void removeTab(int index)
Removes the tab at position index.
Definition: qtabbar.cpp:902
#define Q_Q(Class)
Definition: qglobal.h:2483
quint16 index
The QTabWidget class provides a stack of tabbed widgets.
Definition: qtabwidget.h:60

◆ _q_showTab()

void QTabWidgetPrivate::_q_showTab ( int  index)

Ensures that the selected tab's page is visible and appropriately sized.

Definition at line 764 of file qtabwidget.cpp.

765 {
766  Q_Q(QTabWidget);
767  if (index < stack->count() && index >= 0)
769  emit q->currentChanged(index);
770 #ifdef QT3_SUPPORT
771  emit q->selected(q->tabText(index));
772  emit q->currentChanged(stack->widget(index));
773 #endif
774 }
#define Q_Q(Class)
Definition: qglobal.h:2483
QWidget * widget(int) const
Returns the widget at the given index, or 0 if there is no such widget.
#define emit
Definition: qobjectdefs.h:76
void setCurrentIndex(int index)
QStackedWidget * stack
Definition: qtabwidget.cpp:219
quint16 index
The QTabWidget class provides a stack of tabbed widgets.
Definition: qtabwidget.h:60

◆ _q_tabMoved()

void QTabWidgetPrivate::_q_tabMoved ( int  from,
int  to 
)

Definition at line 784 of file qtabwidget.cpp.

785 {
786  stack->blockSignals(true);
787  QWidget *w = stack->widget(from);
788  stack->removeWidget(w);
789  stack->insertWidget(to, w);
790  stack->blockSignals(false);
791 }
bool blockSignals(bool b)
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke...
Definition: qobject.cpp:1406
void removeWidget(QWidget *w)
Removes widget from the QStackedWidget.
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
QWidget * widget(int) const
Returns the widget at the given index, or 0 if there is no such widget.
int insertWidget(int index, QWidget *w)
Inserts the given widget at the given index in the QStackedWidget.
QStackedWidget * stack
Definition: qtabwidget.cpp:219

◆ hasHeightForWidth()

bool QTabWidgetPrivate::hasHeightForWidth ( ) const
virtual
Warning
This function is not part of the public interface.

virtual private*

This is a bit hackish, but ideally we would have created a virtual function in the public API (however, too late...) so that subclasses could reimplement their own function. Instead we add a virtual function to QWidgetPrivate.

Qt5: move to public class and make virtual

Reimplemented from QWidgetPrivate.

Definition at line 268 of file qtabwidget.cpp.

269 {
270  bool has = size_policy.hasHeightForWidth();
271  if (!has && stack)
273  return has;
274 }
QSizePolicy size_policy
Definition: qwidget_p.h:756
virtual bool hasHeightForWidth() const
Definition: qwidget.cpp:10260
bool hasHeightForWidth() const
Definition: qsizepolicy.h:136
QStackedWidget * stack
Definition: qtabwidget.cpp:219
Q_GUI_EXPORT QWidgetPrivate * qt_widget_private(QWidget *widget)
Definition: qwidget.cpp:12920

◆ init()

void QTabWidgetPrivate::init ( )

Definition at line 238 of file qtabwidget.cpp.

239 {
240  Q_Q(QTabWidget);
241 
242  stack = new QStackedWidget(q);
243  stack->setObjectName(QLatin1String("qt_tabwidget_stackedwidget"));
244  stack->setLineWidth(0);
245  // hack so that QMacStyle::layoutSpacing() can detect tab widget pages
247 
248  QObject::connect(stack, SIGNAL(widgetRemoved(int)), q, SLOT(_q_removeTab(int)));
249  QTabBar *tabBar = new QTabBar(q);
250  tabBar->setObjectName(QLatin1String("qt_tabwidget_tabbar"));
251  tabBar->setDrawBase(false);
252  q->setTabBar(tabBar);
253 
256 #ifdef QT_KEYPAD_NAVIGATION
257  if (QApplication::keypadNavigationEnabled())
258  q->setFocusPolicy(Qt::NoFocus);
259  else
260 #endif
261  q->setFocusPolicy(Qt::TabFocus);
262  q->setFocusProxy(tabs);
263  q->setTabPosition(static_cast<QTabWidget::TabPosition> (q->style()->styleHint(
265 
266 }
void setDrawBase(bool drawTheBase)
Definition: qtabbar.cpp:800
#define SLOT(a)
Definition: qobjectdefs.h:226
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QTabBar class provides a tab bar, e.g.
Definition: qtabbar.h:59
void setLineWidth(int)
Definition: qframe.cpp:368
void setObjectName(const QString &name)
Definition: qobject.cpp:1112
#define Q_Q(Class)
Definition: qglobal.h:2483
#define SIGNAL(a)
Definition: qobjectdefs.h:227
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
QStackedWidget * stack
Definition: qtabwidget.cpp:219
void _q_removeTab(int)
Definition: qtabwidget.cpp:776
The QTabWidget class provides a stack of tabbed widgets.
Definition: qtabwidget.h:60
void setSizePolicy(QSizePolicy)
Definition: qwidget.cpp:10198
The QStackedWidget class provides a stack of widgets where only one widget is visible at a time...

◆ updateTabBarPosition()

void QTabWidgetPrivate::updateTabBarPosition ( )

Definition at line 966 of file qtabwidget.cpp.

967 {
968  Q_Q(QTabWidget);
969  switch (pos) {
970  case QTabWidget::North:
973  break;
974  case QTabWidget::South:
977  break;
978  case QTabWidget::West:
981  break;
982  case QTabWidget::East:
985  break;
986  }
987  q->setUpLayout();
988 }
#define Q_Q(Class)
Definition: qglobal.h:2483
void setShape(Shape shape)
Definition: qtabbar.cpp:778
QTabWidget::TabShape shape
Definition: qtabwidget.cpp:223
The QTabWidget class provides a stack of tabbed widgets.
Definition: qtabwidget.h:60
QTabWidget::TabPosition pos
Definition: qtabwidget.cpp:222

Properties

◆ alignment

int QTabWidgetPrivate::alignment

Definition at line 224 of file qtabwidget.cpp.

◆ dirty

bool QTabWidgetPrivate::dirty

Definition at line 221 of file qtabwidget.cpp.

◆ leftCornerWidget

QWidget* QTabWidgetPrivate::leftCornerWidget

Definition at line 225 of file qtabwidget.cpp.

◆ panelRect

QRect QTabWidgetPrivate::panelRect

Definition at line 220 of file qtabwidget.cpp.

◆ pos

QTabWidget::TabPosition QTabWidgetPrivate::pos

Definition at line 222 of file qtabwidget.cpp.

◆ rightCornerWidget

QWidget* QTabWidgetPrivate::rightCornerWidget

Definition at line 226 of file qtabwidget.cpp.

◆ shape

QTabWidget::TabShape QTabWidgetPrivate::shape

Definition at line 223 of file qtabwidget.cpp.

◆ stack

QStackedWidget* QTabWidgetPrivate::stack

Definition at line 219 of file qtabwidget.cpp.

Referenced by hasHeightForWidth(), and init().

◆ tabs

QTabBar* QTabWidgetPrivate::tabs

Definition at line 218 of file qtabwidget.cpp.

Referenced by init().


The documentation for this class was generated from the following file: