Qt 4.8
Public Types | Public Functions | Public Variables | Private Functions | Properties | List of all members
QWorkspacePrivate Class Reference
Inheritance diagram for QWorkspacePrivate:
QWidgetPrivate QObjectPrivate QObjectData

Public Types

enum  WSActs {
  RestoreAct, MoveAct, ResizeAct, MinimizeAct,
  MaximizeAct, CloseAct, StaysOnTopAct, ShadeAct,
  NCountAct
}
 
- 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 **)
 

Public Functions

void activateWindow (QWidget *w, bool change_focus=true)
 
QWorkspaceChildfindChild (QWidget *w)
 
void hideChild (QWorkspaceChild *c)
 
void hideMaximizeControls ()
 
void init ()
 
void insertIcon (QWidget *w)
 
void maximizeWindow (QWidget *w)
 
void minimizeWindow (QWidget *w)
 
void normalizeWindow (QWidget *w)
 
void place (QWidget *)
 
void removeIcon (QWidget *w)
 
void showMaximizeControls ()
 
void showWindow (QWidget *w)
 
QRect updateWorkspace ()
 
- 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)
 
virtual bool hasHeightForWidth () const
 
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

QActionactions [NCountAct]
 
QWorkspaceChildactive
 
QBrush background
 
QWidgetbecomeActive
 
QWidgetcorner
 
QList< QWorkspaceChild * > focus
 
QScrollBarhbar
 
QList< QWidget * > icons
 
QPointer< QMDIControlmaxcontrols
 
QPointer< QMenuBarmaxmenubar
 
QRect maxRestore
 
QPointer< QLabelmaxtools
 
QWorkspaceChildmaxWindow
 
QMenupopup
 
int px
 
int py
 
QHash< int, const char * > shortcutMap
 
QMenutoolPopup
 
QString topTitle
 
QScrollBarvbar
 
QList< QWorkspaceChild * > windows
 
int xoffset
 
int yoffset
 
- 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
 

Private Functions

void _q_minimizeActiveWindow ()
 
void _q_normalizeActiveWindow ()
 
void _q_operationMenuActivated (QAction *)
 
void _q_popupOperationMenu (const QPoint &)
 
void _q_scrollBarChanged ()
 
void _q_showOperationMenu ()
 
void _q_updateActions ()
 

Properties

bool inTitleChange
 

Additional Inherited Members

- 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 981 of file qworkspace.cpp.

Enumerations

◆ WSActs

Functions

◆ _q_minimizeActiveWindow()

void QWorkspacePrivate::_q_minimizeActiveWindow ( )
private

Definition at line 2094 of file qworkspace.cpp.

2095 {
2096  if (maxWindow)
2098  else if (active)
2099  active->showMinimized();
2100 }
QWorkspaceChild * active
Definition: qworkspace.cpp:984
QWorkspaceChild * maxWindow
Definition: qworkspace.cpp:988

◆ _q_normalizeActiveWindow()

void QWorkspacePrivate::_q_normalizeActiveWindow ( )
private

Definition at line 2086 of file qworkspace.cpp.

2087 {
2088  if (maxWindow)
2089  maxWindow->showNormal();
2090  else if (active)
2091  active->showNormal();
2092 }
QWorkspaceChild * active
Definition: qworkspace.cpp:984
QWorkspaceChild * maxWindow
Definition: qworkspace.cpp:988

◆ _q_operationMenuActivated()

void QWorkspacePrivate::_q_operationMenuActivated ( QAction action)
private

Definition at line 2177 of file qworkspace.cpp.

2178 {
2179  if (!active)
2180  return;
2181  if(action == actions[QWorkspacePrivate::RestoreAct]) {
2182  active->showNormal();
2183  } else if(action == actions[QWorkspacePrivate::MoveAct]) {
2184  active->doMove();
2185  } else if(action == actions[QWorkspacePrivate::ResizeAct]) {
2186  if (active->shademode)
2187  active->showShaded();
2188  active->doResize();
2189  } else if(action == actions[QWorkspacePrivate::MinimizeAct]) {
2190  active->showMinimized();
2191  } else if(action == actions[QWorkspacePrivate::MaximizeAct]) {
2192  active->showMaximized();
2193  } else if(action == actions[QWorkspacePrivate::ShadeAct]) {
2194  active->showShaded();
2195  } else if(action == actions[QWorkspacePrivate::StaysOnTopAct]) {
2196  if(QWidget* w = active->windowWidget()) {
2197  if ((w->windowFlags() & Qt::WindowStaysOnTopHint)) {
2198  w->overrideWindowFlags(w->windowFlags() & ~Qt::WindowStaysOnTopHint);
2199  } else {
2200  w->overrideWindowFlags(w->windowFlags() | Qt::WindowStaysOnTopHint);
2201  w->parentWidget()->raise();
2202  }
2203  }
2204  }
2205 }
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
Definition: qnamespace.h:54
QWorkspaceChild * active
Definition: qworkspace.cpp:984
QWidget * windowWidget() const
QAction * actions[NCountAct]

◆ _q_popupOperationMenu()

void QWorkspacePrivate::_q_popupOperationMenu ( const QPoint p)
private

Definition at line 2123 of file qworkspace.cpp.

2124 {
2126  return;
2127  if (active->titlebar && active->titlebar->isTool())
2128  toolPopup->popup(p);
2129  else
2130  popup->popup(p);
2131 }
bool isTool() const
Definition: qworkspace.cpp:658
void popup(const QPoint &pos, QAction *at=0)
Displays the menu so that the action atAction will be at the specified global position p...
Definition: qmenu.cpp:1847
QWorkspaceTitleBar * titlebar
Definition: qworkspace.cpp:965
QWorkspaceChild * active
Definition: qworkspace.cpp:984
QWidget * windowWidget() const
Qt::WindowFlags windowFlags() const
Window flags are a combination of a type (e.
Definition: qwidget.h:939

◆ _q_scrollBarChanged()

void QWorkspacePrivate::_q_scrollBarChanged ( )
private

Definition at line 3338 of file qworkspace.cpp.

3339 {
3340  int ver = yoffset - vbar->value();
3341  int hor = xoffset - hbar->value();
3342  yoffset = vbar->value();
3343  xoffset = hbar->value();
3344 
3346  while (it != windows.end()) {
3347  QWorkspaceChild *child = *it;
3348  ++it;
3349  // we do not use move() due to the reimplementation in QWorkspaceChild
3350  child->setGeometry(child->x() + hor, child->y() + ver, child->width(), child->height());
3351  }
3352  updateWorkspace();
3353 }
int y() const
#define it(className, varName)
iterator begin()
Returns an STL-style iterator pointing to the first item in the list.
Definition: qlist.h:267
void setGeometry(int x, int y, int w, int h)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: qwidget.h:1017
QScrollBar * hbar
int height() const
QScrollBar * vbar
int value() const
int width() const
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the list...
Definition: qlist.h:270
QList< QWorkspaceChild * > windows
Definition: qworkspace.cpp:985
The QList::iterator class provides an STL-style non-const iterator for QList and QQueue.
Definition: qlist.h:181
int x() const

◆ _q_showOperationMenu()

void QWorkspacePrivate::_q_showOperationMenu ( )
private

Definition at line 2102 of file qworkspace.cpp.

2103 {
2104  Q_Q(QWorkspace);
2105  if (!active || !active->windowWidget())
2106  return;
2108  QPoint p;
2109  QMenu *popup = (active->titlebar && active->titlebar->isTool()) ? toolPopup : this->popup;
2110  if (q->isRightToLeft()) {
2112  p.rx() -= popup->sizeHint().width();
2113  } else {
2114  p = QPoint(active->windowWidget()->mapToGlobal(QPoint(0,0)));
2115  }
2116  if (!active->isVisible()) {
2117  p = active->iconWidget()->mapToGlobal(QPoint(0,0));
2118  p.ry() -= popup->sizeHint().height();
2119  }
2121 }
bool isTool() const
Definition: qworkspace.cpp:658
int width
the width of the widget excluding any window frame
Definition: qwidget.h:166
bool isVisible() const
Definition: qwidget.h:1005
QSize sizeHint() const
Reimplemented Function
Definition: qmenu.cpp:1805
int & ry()
Returns a reference to the y coordinate of this point.
Definition: qpoint.h:143
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
#define Q_Q(Class)
Definition: qglobal.h:2483
The QWorkspace widget provides a workspace window that can be used in an MDI application.
Definition: qworkspace.h:60
int width() const
Returns the width.
Definition: qsize.h:126
int & rx()
Returns a reference to the x coordinate of this point.
Definition: qpoint.h:140
The QMenu class provides a menu widget for use in menu bars, context menus, and other popup menus...
Definition: qmenu.h:72
QWidget * iconWidget() const
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
QWorkspaceTitleBar * titlebar
Definition: qworkspace.cpp:965
int height() const
Returns the height.
Definition: qsize.h:129
QWorkspaceChild * active
Definition: qworkspace.cpp:984
QWidget * windowWidget() const
Qt::WindowFlags windowFlags() const
Window flags are a combination of a type (e.
Definition: qwidget.h:939
void _q_popupOperationMenu(const QPoint &)
QPoint mapToGlobal(const QPoint &) const
Translates the widget coordinate pos to global screen coordinates.

◆ _q_updateActions()

void QWorkspacePrivate::_q_updateActions ( )
private

Definition at line 2133 of file qworkspace.cpp.

2134 {
2135  Q_Q(QWorkspace);
2136  for (int i = 1; i < NCountAct-1; i++) {
2137  bool enable = active != 0;
2138  actions[i]->setEnabled(enable);
2139  }
2140 
2141  if (!active || !active->windowWidget())
2142  return;
2143 
2144  QWidget *windowWidget = active->windowWidget();
2145  bool canResize = windowWidget->maximumSize() != windowWidget->minimumSize();
2149 
2150  if (active == maxWindow) {
2155  } else if (active->isVisible()){
2157  } else {
2162  }
2163  if (active->shademode) {
2165  QIcon(q->style()->standardPixmap(QStyle::SP_TitleBarUnshadeButton, 0, q)));
2167  } else {
2169  QIcon(q->style()->standardPixmap(QStyle::SP_TitleBarShadeButton, 0, q)));
2171  }
2175 }
QSize maximumSize
the widget&#39;s maximum size in pixels
Definition: qwidget.h:173
QSize minimumSize
the widget&#39;s minimum size
Definition: qwidget.h:172
bool isVisible() const
Definition: qwidget.h:1005
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
void setEnabled(bool)
Definition: qaction.cpp:1192
#define Q_Q(Class)
Definition: qglobal.h:2483
The QWorkspace widget provides a workspace window that can be used in an MDI application.
Definition: qworkspace.h:60
void setText(const QString &text)
Definition: qaction.cpp:860
void setChecked(bool)
Definition: qaction.cpp:1138
void setIcon(const QIcon &icon)
Definition: qaction.cpp:772
QWorkspaceChild * active
Definition: qworkspace.cpp:984
QWidget * windowWidget() const
QWorkspaceChild * maxWindow
Definition: qworkspace.cpp:988
Qt::WindowFlags windowFlags() const
Window flags are a combination of a type (e.
Definition: qwidget.h:939
QAction * actions[NCountAct]
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60

◆ activateWindow()

void QWorkspacePrivate::activateWindow ( QWidget w,
bool  change_focus = true 
)

Definition at line 1319 of file qworkspace.cpp.

1320 {
1321  Q_Q(QWorkspace);
1322  if (!w) {
1323  active = 0;
1324  emit q->windowActivated(0);
1325  return;
1326  }
1327  if (!q->isVisible()) {
1328  becomeActive = w;
1329  return;
1330  }
1331 
1332  if (active && active->windowWidget() == w) {
1333  if (!isChildOf(q->focusWidget(), w)) // child window does not have focus
1334  active->setActive(true);
1335  return;
1336  }
1337 
1338  active = 0;
1339  // First deactivate all other workspace clients
1341  while (it != windows.end()) {
1342  QWorkspaceChild* c = *it;
1343  ++it;
1344  if (c->windowWidget() == w)
1345  active = c;
1346  else
1347  c->setActive(false);
1348  }
1349 
1350  if (!active)
1351  return;
1352 
1353  // Then activate the new one, so the focus is stored correctly
1354  active->setActive(true);
1355 
1356  if (!active)
1357  return;
1358 
1359  if (maxWindow && maxWindow != active && active->windowWidget() &&
1361  active->showMaximized();
1362 
1363  active->internalRaise();
1364 
1365  if (change_focus) {
1366  int from = focus.indexOf(active);
1367  if (from >= 0)
1368  focus.move(from, focus.size() - 1);
1369  }
1370 
1371  updateWorkspace();
1372  emit q->windowActivated(w);
1373 }
unsigned char c[8]
Definition: qnumeric_p.h:62
#define it(className, varName)
QWidget * becomeActive
Definition: qworkspace.cpp:996
iterator begin()
Returns an STL-style iterator pointing to the first item in the list.
Definition: qlist.h:267
#define Q_Q(Class)
Definition: qglobal.h:2483
The QWorkspace widget provides a workspace window that can be used in an MDI application.
Definition: qworkspace.h:60
void move(int from, int to)
Moves the item at index position from to index position to.
Definition: qlist.h:628
void setActive(bool)
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the list...
Definition: qlist.h:270
#define emit
Definition: qobjectdefs.h:76
QList< QWorkspaceChild * > windows
Definition: qworkspace.cpp:985
The QList::iterator class provides an STL-style non-const iterator for QList and QQueue.
Definition: qlist.h:181
int indexOf(const T &t, int from=0) const
Returns the index position of the first occurrence of value in the list, searching forward from index...
Definition: qlist.h:847
int size() const
Returns the number of items in the list.
Definition: qlist.h:137
QWorkspaceChild * active
Definition: qworkspace.cpp:984
QWidget * windowWidget() const
QList< QWorkspaceChild * > focus
Definition: qworkspace.cpp:986
QWorkspaceChild * maxWindow
Definition: qworkspace.cpp:988
Qt::WindowFlags windowFlags() const
Window flags are a combination of a type (e.
Definition: qwidget.h:939
static bool isChildOf(QWidget *child, QWidget *parent)

◆ findChild()

QWorkspaceChild * QWorkspacePrivate::findChild ( QWidget w)

Definition at line 1782 of file qworkspace.cpp.

1783 {
1785  while (it != windows.end()) {
1786  QWorkspaceChild* c = *it;
1787  ++it;
1788  if (c->windowWidget() == w)
1789  return c;
1790  }
1791  return 0;
1792 }
unsigned char c[8]
Definition: qnumeric_p.h:62
#define it(className, varName)
iterator begin()
Returns an STL-style iterator pointing to the first item in the list.
Definition: qlist.h:267
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the list...
Definition: qlist.h:270
QList< QWorkspaceChild * > windows
Definition: qworkspace.cpp:985
The QList::iterator class provides an STL-style non-const iterator for QList and QQueue.
Definition: qlist.h:181
QWidget * windowWidget() const

◆ hideChild()

void QWorkspacePrivate::hideChild ( QWorkspaceChild c)

Definition at line 2208 of file qworkspace.cpp.

2209 {
2210  Q_Q(QWorkspace);
2211 
2212 // bool updatesEnabled = q->updatesEnabled();
2213 // q->setUpdatesEnabled(false);
2214  focus.removeAll(c);
2215  QRect restore;
2216  if (maxWindow == c)
2217  restore = maxRestore;
2218  if (active == c) {
2219  q->setFocus();
2220  q->activatePreviousWindow();
2221  }
2222  if (active == c)
2223  activateWindow(0);
2224  if (maxWindow == c) {
2226  maxWindow = 0;
2227  }
2228  c->hide();
2229  if (!restore.isEmpty())
2230  c->setGeometry(restore);
2231 // q->setUpdatesEnabled(updatesEnabled);
2232 }
void setGeometry(int x, int y, int w, int h)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: qwidget.h:1017
#define Q_Q(Class)
Definition: qglobal.h:2483
The QWorkspace widget provides a workspace window that can be used in an MDI application.
Definition: qworkspace.h:60
void hideMaximizeControls()
void activateWindow(QWidget *w, bool change_focus=true)
void hide()
Hides the widget.
Definition: qwidget.h:501
bool isEmpty() const
Returns true if the rectangle is empty, otherwise returns false.
Definition: qrect.h:234
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
QWorkspaceChild * active
Definition: qworkspace.cpp:984
QList< QWorkspaceChild * > focus
Definition: qworkspace.cpp:986
QWorkspaceChild * maxWindow
Definition: qworkspace.cpp:988
int removeAll(const T &t)
Removes all occurrences of value in the list and returns the number of entries removed.
Definition: qlist.h:770

◆ hideMaximizeControls()

void QWorkspacePrivate::hideMaximizeControls ( )

Definition at line 2023 of file qworkspace.cpp.

2024 {
2025  Q_Q(QWorkspace);
2027  if (maxmenubar) {
2030  }
2031  if (maxcontrols) {
2033  maxcontrols = 0;
2034  }
2035  if (maxtools) {
2036  maxtools->deleteLater();
2037  maxtools = 0;
2038  }
2039  }
2040 
2041  //unmerge the title bar/modification state
2042  if (topTitle.size()) {
2043  inTitleChange = true;
2044  q->window()->setWindowTitle(topTitle);
2045  inTitleChange = false;
2046  }
2047  q->window()->setWindowModified(false);
2048 }
virtual int styleHint(StyleHint stylehint, const QStyleOption *opt=0, const QWidget *widget=0, QStyleHintReturn *returnData=0) const =0
Returns an integer representing the specified style hint for the given widget described by the provid...
QStyle * style() const
Definition: qwidget.cpp:2742
#define Q_Q(Class)
Definition: qglobal.h:2483
The QWorkspace widget provides a workspace window that can be used in an MDI application.
Definition: qworkspace.h:60
int size() const
Returns the number of characters in this string.
Definition: qstring.h:102
QPointer< QLabel > maxtools
Definition: qworkspace.cpp:997
QPointer< QMenuBar > maxmenubar
Definition: qworkspace.cpp:991
void setCornerWidget(QWidget *w, Qt::Corner corner=Qt::TopRightCorner)
This sets the given widget to be shown directly on the left of the first menu item, or on the right of the last menu item, depending on corner.
Definition: qmenubar.cpp:1980
QPointer< QMDIControl > maxcontrols
Definition: qworkspace.cpp:990
void deleteLater()
Schedules this object for deletion.
Definition: qobject.cpp:2145

◆ init()

void QWorkspacePrivate::init ( )
Warning
This function is not part of the public interface.

Definition at line 1075 of file qworkspace.cpp.

1076 {
1077  Q_Q(QWorkspace);
1078 
1079  maxcontrols = 0;
1080  active = 0;
1081  maxWindow = 0;
1082  maxtools = 0;
1083  px = 0;
1084  py = 0;
1085  becomeActive = 0;
1086  popup = new QMenu(q);
1087  toolPopup = new QMenu(q);
1088  popup->setObjectName(QLatin1String("qt_internal_mdi_popup"));
1089  toolPopup->setObjectName(QLatin1String("qt_internal_mdi_tool_popup"));
1090 
1091  actions[QWorkspacePrivate::RestoreAct] = new QAction(QIcon(q->style()->standardPixmap(QStyle::SP_TitleBarNormalButton, 0, q)),
1092  QWorkspace::tr("&Restore"), q);
1094  actions[QWorkspacePrivate::ResizeAct] = new QAction(QWorkspace::tr("&Size"), q);
1095  actions[QWorkspacePrivate::MinimizeAct] = new QAction(QIcon(q->style()->standardPixmap(QStyle::SP_TitleBarMinButton, 0, q)),
1096  QWorkspace::tr("Mi&nimize"), q);
1097  actions[QWorkspacePrivate::MaximizeAct] = new QAction(QIcon(q->style()->standardPixmap(QStyle::SP_TitleBarMaxButton, 0, q)),
1098  QWorkspace::tr("Ma&ximize"), q);
1099  actions[QWorkspacePrivate::CloseAct] = new QAction(QIcon(q->style()->standardPixmap(QStyle::SP_TitleBarCloseButton, 0, q)),
1100  QWorkspace::tr("&Close")
1101 #ifndef QT_NO_SHORTCUT
1103 #endif
1104  ,q);
1105  QObject::connect(actions[QWorkspacePrivate::CloseAct], SIGNAL(triggered()), q, SLOT(closeActiveWindow()));
1106  actions[QWorkspacePrivate::StaysOnTopAct] = new QAction(QWorkspace::tr("Stay on &Top"), q);
1108  actions[QWorkspacePrivate::ShadeAct] = new QAction(QIcon(q->style()->standardPixmap(QStyle::SP_TitleBarShadeButton, 0, q)),
1109  QWorkspace::tr("Sh&ade"), q);
1110 
1111  QObject::connect(popup, SIGNAL(aboutToShow()), q, SLOT(_q_updateActions()));
1118  popup->addSeparator();
1119  popup->addAction(actions[QWorkspacePrivate::CloseAct]);
1120 
1121  QObject::connect(toolPopup, SIGNAL(aboutToShow()), q, SLOT(_q_updateActions()));
1123  toolPopup->addAction(actions[QWorkspacePrivate::MoveAct]);
1124  toolPopup->addAction(actions[QWorkspacePrivate::ResizeAct]);
1128  toolPopup->addAction(actions[QWorkspacePrivate::CloseAct]);
1129 
1130 #ifndef QT_NO_SHORTCUT
1131  // Set up shortcut bindings (id -> slot), most used first
1133  foreach (const QKeySequence &seq, shortcuts)
1134  shortcutMap.insert(q->grabShortcut(seq), "activateNextWindow");
1135 
1137  foreach (const QKeySequence &seq, shortcuts)
1138  shortcutMap.insert(q->grabShortcut(seq), "activatePreviousWindow");
1139 
1141  foreach (const QKeySequence &seq, shortcuts)
1142  shortcutMap.insert(q->grabShortcut(seq), "closeActiveWindow");
1143 
1144  shortcutMap.insert(q->grabShortcut(QKeySequence(QLatin1String("ALT+-"))), "_q_showOperationMenu");
1145 #endif // QT_NO_SHORTCUT
1146 
1147  q->setBackgroundRole(QPalette::Dark);
1148  q->setAutoFillBackground(true);
1150 
1151  hbar = vbar = 0;
1152  corner = 0;
1153  xoffset = yoffset = 0;
1154 
1155  q->window()->installEventFilter(q);
1156 
1157  inTitleChange = false;
1158  updateWorkspace();
1159 }
#define SLOT(a)
Definition: qobjectdefs.h:226
QWidget * becomeActive
Definition: qworkspace.cpp:996
QHash< int, const char * > shortcutMap
Definition: qworkspace.cpp:992
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
static QList< QKeySequence > keyBindings(StandardKey key)
Returns a list of key bindings for the given key.
The QString class provides a Unicode character string.
Definition: qstring.h:83
QScrollBar * hbar
QAction * addAction(const QString &text)
This convenience function creates a new action with text.
Definition: qmenu.cpp:1453
QScrollBar * vbar
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
Definition: qhash.h:753
void setObjectName(const QString &name)
Definition: qobject.cpp:1112
#define Q_Q(Class)
Definition: qglobal.h:2483
The QWorkspace widget provides a workspace window that can be used in an MDI application.
Definition: qworkspace.h:60
#define SIGNAL(a)
Definition: qobjectdefs.h:227
void _q_operationMenuActivated(QAction *)
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
QAction * addSeparator()
This convenience function creates a new separator action, i.e.
Definition: qmenu.cpp:1583
QPointer< QLabel > maxtools
Definition: qworkspace.cpp:997
The QKeySequence class encapsulates a key sequence as used by shortcuts.
Definition: qkeysequence.h:72
The QMenu class provides a menu widget for use in menu bars, context menus, and other popup menus...
Definition: qmenu.h:72
void setChecked(bool)
Definition: qaction.cpp:1138
QWorkspaceChild * active
Definition: qworkspace.cpp:984
QWorkspaceChild * maxWindow
Definition: qworkspace.cpp:988
QPointer< QMDIControl > maxcontrols
Definition: qworkspace.cpp:990
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:55
The QAction class provides an abstract user interface action that can be inserted into widgets...
Definition: qaction.h:64
QAction * actions[NCountAct]
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60

◆ insertIcon()

void QWorkspacePrivate::insertIcon ( QWidget w)

Definition at line 1534 of file qworkspace.cpp.

1535 {
1536  Q_Q(QWorkspace);
1537  if (!w || icons.contains(w))
1538  return;
1539  icons.append(w);
1540  if (w->parentWidget() != q) {
1541  w->setParent(q, 0);
1542  w->move(0,0);
1543  }
1544  QRect cr = updateWorkspace();
1545  int x = 0;
1546  int y = cr.height() - w->height();
1547 
1549  while (it != icons.end()) {
1550  QWidget* i = *it;
1551  ++it;
1552  if (x > 0 && x + i->width() > cr.width()){
1553  x = 0;
1554  y -= i->height();
1555  }
1556 
1557  if (i != w &&
1558  i->geometry().intersects(QRect(x, y, w->width(), w->height())))
1559  x += i->width();
1560  }
1561  w->move(x, y);
1562 
1563  if (q->isVisibleTo(q->parentWidget())) {
1564  w->show();
1565  w->lower();
1566  }
1567  updateWorkspace();
1568 }
QWidget * parentWidget() const
Returns the parent of this widget, or 0 if it does not have any parent widget.
Definition: qwidget.h:1035
void setParent(QWidget *parent)
Sets the parent of the widget to parent, and resets the window flags.
Definition: qwidget.cpp:10479
int width
the width of the widget excluding any window frame
Definition: qwidget.h:166
#define it(className, varName)
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
iterator begin()
Returns an STL-style iterator pointing to the first item in the list.
Definition: qlist.h:267
int width() const
Returns the width of the rectangle.
Definition: qrect.h:303
int height() const
Returns the height of the rectangle.
Definition: qrect.h:306
#define Q_Q(Class)
Definition: qglobal.h:2483
The QWorkspace widget provides a workspace window that can be used in an MDI application.
Definition: qworkspace.h:60
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
QBool contains(const T &t) const
Returns true if the list contains an occurrence of value; otherwise returns false.
Definition: qlist.h:880
void lower()
Lowers the widget to the bottom of the parent widget&#39;s stack.
Definition: qwidget.cpp:11939
int height
the height of the widget excluding any window frame
Definition: qwidget.h:167
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the list...
Definition: qlist.h:270
QList< QWidget * > icons
Definition: qworkspace.cpp:987
void show()
Shows the widget and its child widgets.
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
bool intersects(const QRect &r) const
Returns true if this rectangle intersects with the given rectangle (i.
Definition: qrect.cpp:1429
QRect geometry
the geometry of the widget relative to its parent and excluding the window frame
Definition: qwidget.h:158
void move(int x, int y)
This corresponds to move(QPoint(x, y)).
Definition: qwidget.h:1011
The QList class is a template class that provides lists.
Definition: qdatastream.h:62

◆ maximizeWindow()

void QWorkspacePrivate::maximizeWindow ( QWidget w)

Definition at line 1711 of file qworkspace.cpp.

1712 {
1713  Q_Q(QWorkspace);
1714  QWorkspaceChild* c = findChild(w);
1715 
1716  if (!w || !(w->windowFlags() & Qt::WindowMaximizeButtonHint))
1717  return;
1718 
1719  if (!c || c == maxWindow)
1720  return;
1721 
1722  bool updatesEnabled = q->updatesEnabled();
1723  q->setUpdatesEnabled(false);
1724 
1725  if (c->iconw && icons.contains(c->iconw->parentWidget()))
1726  normalizeWindow(w);
1727  QRect r(c->geometry());
1728  QWorkspaceChild *oldMaxWindow = maxWindow;
1729  maxWindow = c;
1730 
1732 
1733  c->adjustToFullscreen();
1734  c->show();
1735  c->internalRaise();
1736  if (oldMaxWindow != c) {
1737  if (oldMaxWindow) {
1738  oldMaxWindow->setGeometry(maxRestore);
1739  oldMaxWindow->overrideWindowState(Qt::WindowNoState);
1740  if(oldMaxWindow->windowWidget())
1741  oldMaxWindow->windowWidget()->overrideWindowState(Qt::WindowNoState);
1742  }
1743  maxRestore = r;
1744  }
1745 
1746  activateWindow(w);
1747 
1749  if (!active && becomeActive) {
1751  active->setActive(true);
1752  becomeActive = 0;
1753  emit q->windowActivated(active->windowWidget());
1754  }
1755  c->widgetResizeHandler->setActive(false);
1756  if (c->titlebar)
1757  c->titlebar->setMovable(false);
1758  }
1759  updateWorkspace();
1760 
1763  q->setUpdatesEnabled(updatesEnabled);
1764 }
QPointer< QWorkspaceTitleBar > iconw
Definition: qworkspace.cpp:966
QWidget * parentWidget() const
Returns the parent of this widget, or 0 if it does not have any parent widget.
Definition: qwidget.h:1035
QWorkspaceChild * findChild(QWidget *w)
void adjustToFullscreen()
unsigned char c[8]
Definition: qnumeric_p.h:62
QWidget * becomeActive
Definition: qworkspace.cpp:996
virtual int styleHint(StyleHint stylehint, const QStyleOption *opt=0, const QWidget *widget=0, QStyleHintReturn *returnData=0) const =0
Returns an integer representing the specified style hint for the given widget described by the provid...
void overrideWindowState(Qt::WindowStates state)
Definition: qwidget.cpp:3098
void showMaximizeControls()
QStyle * style() const
Definition: qwidget.cpp:2742
#define Q_Q(Class)
Definition: qglobal.h:2483
The QWorkspace widget provides a workspace window that can be used in an MDI application.
Definition: qworkspace.h:60
void setActive(bool)
QBool contains(const T &t) const
Returns true if the list contains an occurrence of value; otherwise returns false.
Definition: qlist.h:880
#define emit
Definition: qobjectdefs.h:76
void activateWindow(QWidget *w, bool change_focus=true)
QWidgetResizeHandler * widgetResizeHandler
Definition: qworkspace.cpp:964
QList< QWidget * > icons
Definition: qworkspace.cpp:987
void setMovable(bool)
Definition: qworkspace.cpp:798
void normalizeWindow(QWidget *w)
QPointer< QMenuBar > maxmenubar
Definition: qworkspace.cpp:991
QWorkspaceTitleBar * titlebar
Definition: qworkspace.cpp:965
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
QWorkspaceChild * active
Definition: qworkspace.cpp:984
QWidget * windowWidget() const
QWorkspaceChild * maxWindow
Definition: qworkspace.cpp:988
Qt::WindowFlags windowFlags() const
Window flags are a combination of a type (e.
Definition: qwidget.h:939
const QRect & geometry() const

◆ minimizeWindow()

void QWorkspacePrivate::minimizeWindow ( QWidget w)

Definition at line 1634 of file qworkspace.cpp.

1635 {
1636  QWorkspaceChild* c = findChild(w);
1637 
1638  if (!w || !(w->windowFlags() & Qt::WindowMinimizeButtonHint))
1639  return;
1640 
1641  if (c) {
1642  bool wasMax = false;
1643  if (c == maxWindow) {
1644  wasMax = true;
1645  maxWindow = 0;
1648  QWorkspaceChild* c = *it;
1649  if (c->titlebar)
1650  c->titlebar->setMovable(true);
1651  c->widgetResizeHandler->setActive(true);
1652  }
1653  }
1654  c->hide();
1655  if (wasMax)
1656  c->setGeometry(maxRestore);
1657  if (!focus.contains(c))
1658  focus.append(c);
1659  insertIcon(c->iconWidget());
1660 
1661  if (!maxWindow)
1662  activateWindow(w);
1663 
1664  updateWorkspace();
1665 
1668  }
1669 }
QWorkspaceChild * findChild(QWidget *w)
unsigned char c[8]
Definition: qnumeric_p.h:62
#define it(className, varName)
iterator begin()
Returns an STL-style iterator pointing to the first item in the list.
Definition: qlist.h:267
void setGeometry(int x, int y, int w, int h)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: qwidget.h:1017
void overrideWindowState(Qt::WindowStates state)
Definition: qwidget.cpp:3098
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
void hideMaximizeControls()
QBool contains(const T &t) const
Returns true if the list contains an occurrence of value; otherwise returns false.
Definition: qlist.h:880
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the list...
Definition: qlist.h:270
void activateWindow(QWidget *w, bool change_focus=true)
QWidgetResizeHandler * widgetResizeHandler
Definition: qworkspace.cpp:964
QList< QWorkspaceChild * > windows
Definition: qworkspace.cpp:985
void setMovable(bool)
Definition: qworkspace.cpp:798
void hide()
Hides the widget.
Definition: qwidget.h:501
The QList::iterator class provides an STL-style non-const iterator for QList and QQueue.
Definition: qlist.h:181
QWidget * iconWidget() const
void insertIcon(QWidget *w)
QWorkspaceTitleBar * titlebar
Definition: qworkspace.cpp:965
QList< QWorkspaceChild * > focus
Definition: qworkspace.cpp:986
QWorkspaceChild * maxWindow
Definition: qworkspace.cpp:988
Qt::WindowFlags windowFlags() const
Window flags are a combination of a type (e.
Definition: qwidget.h:939

◆ normalizeWindow()

void QWorkspacePrivate::normalizeWindow ( QWidget w)

Definition at line 1671 of file qworkspace.cpp.

1672 {
1673  Q_Q(QWorkspace);
1674  QWorkspaceChild* c = findChild(w);
1675  if (!w)
1676  return;
1677  if (c) {
1681  if (w->minimumSize() != w->maximumSize())
1682  c->widgetResizeHandler->setActive(true);
1683  if (c->titlebar)
1684  c->titlebar->setMovable(true);
1685  }
1688 
1689  if (c == maxWindow) {
1690  c->setGeometry(maxRestore);
1691  maxWindow = 0;
1692  } else {
1693  if (c->iconw)
1694  removeIcon(c->iconw->parentWidget());
1695  c->show();
1696  }
1697 
1700  QWorkspaceChild* c = *it;
1701  if (c->titlebar)
1702  c->titlebar->setMovable(true);
1703  if (c->childWidget && c->childWidget->minimumSize() != c->childWidget->maximumSize())
1704  c->widgetResizeHandler->setActive(true);
1705  }
1706  activateWindow(w, true);
1707  updateWorkspace();
1708  }
1709 }
QSize maximumSize
the widget&#39;s maximum size in pixels
Definition: qwidget.h:173
QSize minimumSize
the widget&#39;s minimum size
Definition: qwidget.h:172
QPointer< QWorkspaceTitleBar > iconw
Definition: qworkspace.cpp:966
QWidget * parentWidget() const
Returns the parent of this widget, or 0 if it does not have any parent widget.
Definition: qwidget.h:1035
QWorkspaceChild * findChild(QWidget *w)
unsigned char c[8]
Definition: qnumeric_p.h:62
#define it(className, varName)
iterator begin()
Returns an STL-style iterator pointing to the first item in the list.
Definition: qlist.h:267
virtual int styleHint(StyleHint stylehint, const QStyleOption *opt=0, const QWidget *widget=0, QStyleHintReturn *returnData=0) const =0
Returns an integer representing the specified style hint for the given widget described by the provid...
QWidget * childWidget
Definition: qworkspace.cpp:963
void setGeometry(int x, int y, int w, int h)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: qwidget.h:1017
void overrideWindowState(Qt::WindowStates state)
Definition: qwidget.cpp:3098
void removeIcon(QWidget *w)
QStyle * style() const
Definition: qwidget.cpp:2742
#define Q_Q(Class)
Definition: qglobal.h:2483
The QWorkspace widget provides a workspace window that can be used in an MDI application.
Definition: qworkspace.h:60
void hideMaximizeControls()
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the list...
Definition: qlist.h:270
void activateWindow(QWidget *w, bool change_focus=true)
QWidgetResizeHandler * widgetResizeHandler
Definition: qworkspace.cpp:964
QList< QWorkspaceChild * > windows
Definition: qworkspace.cpp:985
void setMovable(bool)
Definition: qworkspace.cpp:798
The QList::iterator class provides an STL-style non-const iterator for QList and QQueue.
Definition: qlist.h:181
QPointer< QMenuBar > maxmenubar
Definition: qworkspace.cpp:991
QWorkspaceTitleBar * titlebar
Definition: qworkspace.cpp:965
QWorkspaceChild * maxWindow
Definition: qworkspace.cpp:988

◆ place()

void QWorkspacePrivate::place ( QWidget w)

Definition at line 1401 of file qworkspace.cpp.

1402 {
1403  Q_Q(QWorkspace);
1404 
1405  QList<QWidget *> widgets;
1407  if (*it != w)
1408  widgets.append(*it);
1409 
1410  int overlap, minOverlap = 0;
1411  int possible;
1412 
1413  QRect r1(0, 0, 0, 0);
1414  QRect r2(0, 0, 0, 0);
1415  QRect maxRect = q->rect();
1416  int x = maxRect.left(), y = maxRect.top();
1417  QPoint wpos(maxRect.left(), maxRect.top());
1418 
1419  bool firstPass = true;
1420 
1421  do {
1422  if (y + w->height() > maxRect.bottom()) {
1423  overlap = -1;
1424  } else if(x + w->width() > maxRect.right()) {
1425  overlap = -2;
1426  } else {
1427  overlap = 0;
1428 
1429  r1.setRect(x, y, w->width(), w->height());
1430 
1431  QWidget *l;
1432  QList<QWidget *>::Iterator it(widgets.begin());
1433  while (it != widgets.end()) {
1434  l = *it;
1435  ++it;
1436 
1437  if (maxWindow == l)
1438  r2 = QStyle::visualRect(q->layoutDirection(), maxRect, maxRestore);
1439  else
1440  r2 = QStyle::visualRect(q->layoutDirection(), maxRect,
1441  QRect(l->x(), l->y(), l->width(), l->height()));
1442 
1443  if (r2.intersects(r1)) {
1444  r2.setCoords(qMax(r1.left(), r2.left()),
1445  qMax(r1.top(), r2.top()),
1446  qMin(r1.right(), r2.right()),
1447  qMin(r1.bottom(), r2.bottom())
1448  );
1449 
1450  overlap += (r2.right() - r2.left()) *
1451  (r2.bottom() - r2.top());
1452  }
1453  }
1454  }
1455 
1456  if (overlap == 0) {
1457  wpos = QPoint(x, y);
1458  break;
1459  }
1460 
1461  if (firstPass) {
1462  firstPass = false;
1463  minOverlap = overlap;
1464  } else if (overlap >= 0 && overlap < minOverlap) {
1465  minOverlap = overlap;
1466  wpos = QPoint(x, y);
1467  }
1468 
1469  if (overlap > 0) {
1470  possible = maxRect.right();
1471  if (possible - w->width() > x) possible -= w->width();
1472 
1473  QWidget *l;
1474  QList<QWidget *>::Iterator it(widgets.begin());
1475  while (it != widgets.end()) {
1476  l = *it;
1477  ++it;
1478  if (maxWindow == l)
1479  r2 = QStyle::visualRect(q->layoutDirection(), maxRect, maxRestore);
1480  else
1481  r2 = QStyle::visualRect(q->layoutDirection(), maxRect,
1482  QRect(l->x(), l->y(), l->width(), l->height()));
1483 
1484  if((y < r2.bottom()) && (r2.top() < w->height() + y)) {
1485  if(r2.right() > x)
1486  possible = possible < r2.right() ?
1487  possible : r2.right();
1488 
1489  if(r2.left() - w->width() > x)
1490  possible = possible < r2.left() - w->width() ?
1491  possible : r2.left() - w->width();
1492  }
1493  }
1494 
1495  x = possible;
1496  } else if (overlap == -2) {
1497  x = maxRect.left();
1498  possible = maxRect.bottom();
1499 
1500  if (possible - w->height() > y) possible -= w->height();
1501 
1502  QWidget *l;
1503  QList<QWidget *>::Iterator it(widgets.begin());
1504  while (it != widgets.end()) {
1505  l = *it;
1506  ++it;
1507  if (maxWindow == l)
1508  r2 = QStyle::visualRect(q->layoutDirection(), maxRect, maxRestore);
1509  else
1510  r2 = QStyle::visualRect(q->layoutDirection(), maxRect,
1511  QRect(l->x(), l->y(), l->width(), l->height()));
1512 
1513  if(r2.bottom() > y)
1514  possible = possible < r2.bottom() ?
1515  possible : r2.bottom();
1516 
1517  if(r2.top() - w->height() > y)
1518  possible = possible < r2.top() - w->height() ?
1519  possible : r2.top() - w->height();
1520  }
1521 
1522  y = possible;
1523  }
1524  }
1525  while(overlap != 0 && overlap != -1);
1526 
1527  QRect resultRect = w->geometry();
1528  resultRect.moveTo(wpos);
1529  w->setGeometry(QStyle::visualRect(q->layoutDirection(), maxRect, resultRect));
1530  updateWorkspace();
1531 }
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
Definition: qglobal.h:1215
int width
the width of the widget excluding any window frame
Definition: qwidget.h:166
#define it(className, varName)
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
iterator begin()
Returns an STL-style iterator pointing to the first item in the list.
Definition: qlist.h:267
int left() const
Returns the x-coordinate of the rectangle&#39;s left edge.
Definition: qrect.h:240
void moveTo(int x, int t)
Moves the rectangle, leaving the top-left corner at the given position (x, y).
Definition: qrect.h:334
void setGeometry(int x, int y, int w, int h)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: qwidget.h:1017
int bottom() const
Returns the y-coordinate of the rectangle&#39;s bottom edge.
Definition: qrect.h:249
int x
the x coordinate of the widget relative to its parent including any window frame
Definition: qwidget.h:161
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
Definition: qglobal.h:1217
#define Q_Q(Class)
Definition: qglobal.h:2483
The QWorkspace widget provides a workspace window that can be used in an MDI application.
Definition: qworkspace.h:60
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
int height
the height of the widget excluding any window frame
Definition: qwidget.h:167
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the list...
Definition: qlist.h:270
QList< QWorkspaceChild * > windows
Definition: qworkspace.cpp:985
The QList::iterator class provides an STL-style non-const iterator for QList and QQueue.
Definition: qlist.h:181
int top() const
Returns the y-coordinate of the rectangle&#39;s top edge.
Definition: qrect.h:243
static QRect visualRect(Qt::LayoutDirection direction, const QRect &boundingRect, const QRect &logicalRect)
Returns the given logicalRectangle converted to screen coordinates based on the specified direction...
Definition: qstyle.cpp:2087
int right() const
Returns the x-coordinate of the rectangle&#39;s right edge.
Definition: qrect.h:246
int y
the y coordinate of the widget relative to its parent and including any window frame ...
Definition: qwidget.h:162
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
QFactoryLoader * l
QWorkspaceChild * maxWindow
Definition: qworkspace.cpp:988
QRect geometry
the geometry of the widget relative to its parent and excluding the window frame
Definition: qwidget.h:158

◆ removeIcon()

void QWorkspacePrivate::removeIcon ( QWidget w)

Definition at line 1571 of file qworkspace.cpp.

1572 {
1573  if (icons.removeAll(w))
1574  w->hide();
1575 }
QList< QWidget * > icons
Definition: qworkspace.cpp:987
void hide()
Hides the widget.
Definition: qwidget.h:501
int removeAll(const T &t)
Removes all occurrences of value in the list and returns the number of entries removed.
Definition: qlist.h:770

◆ showMaximizeControls()

void QWorkspacePrivate::showMaximizeControls ( )

Definition at line 1939 of file qworkspace.cpp.

1940 {
1941  Q_Q(QWorkspace);
1943 
1944  // merge windowtitle and modified state
1945  if (!topTitle.size())
1946  topTitle = q->window()->windowTitle();
1947 
1948  if (maxWindow->windowWidget()) {
1949  QString docTitle = maxWindow->windowWidget()->windowTitle();
1950  if (topTitle.size() && docTitle.size()) {
1951  inTitleChange = true;
1952  q->window()->setWindowTitle(QWorkspace::tr("%1 - [%2]").arg(topTitle).arg(docTitle));
1953  inTitleChange = false;
1954  }
1955  q->window()->setWindowModified(maxWindow->windowWidget()->isWindowModified());
1956  }
1957 
1958  if (!q->style()->styleHint(QStyle::SH_Workspace_FillSpaceOnMaximize, 0, q)) {
1959  QMenuBar* b = 0;
1960 
1961  // Do a breadth-first search first on every parent,
1962  QWidget* w = q->parentWidget();
1963  while (w) {
1964  b = findMenuBar(w);
1965  if (b)
1966  break;
1967  w = w->parentWidget();
1968  }
1969 
1970  // last attempt.
1971  if (!b)
1972  b = findMenuBar(q->window());
1973 
1974  if (!b)
1975  return;
1976 
1977  if (!maxcontrols) {
1978  maxmenubar = b;
1979  maxcontrols = new QMDIControl(b);
1980  QObject::connect(maxcontrols, SIGNAL(_q_minimize()),
1982  QObject::connect(maxcontrols, SIGNAL(_q_restore()),
1984  QObject::connect(maxcontrols, SIGNAL(_q_close()),
1985  q, SLOT(closeActiveWindow()));
1986  }
1987 
1989  if (b->isVisible())
1990  maxcontrols->show();
1991  if (!active && becomeActive) {
1993  active->setActive(true);
1994  becomeActive = 0;
1995  emit q->windowActivated(active->windowWidget());
1996  }
1997  if (active) {
1998  if (!maxtools) {
1999  maxtools = new QLabel(q->window());
2000  maxtools->setObjectName(QLatin1String("qt_maxtools"));
2002  }
2003  if (active->windowWidget() && !active->windowWidget()->windowIcon().isNull()) {
2004  QIcon icon = active->windowWidget()->windowIcon();
2005  int iconSize = maxcontrols->size().height();
2006  maxtools->setPixmap(icon.pixmap(QSize(iconSize, iconSize)));
2007  } else {
2008  QPixmap pm = q->style()->standardPixmap(QStyle::SP_TitleBarMenuButton, 0, q);
2009  if (pm.isNull()) {
2010  pm = QPixmap(14,14);
2011  pm.fill(Qt::black);
2012  }
2013  maxtools->setPixmap(pm);
2014  }
2016  if (b->isVisible())
2017  maxtools->show();
2018  }
2019  }
2020 }
QWidget * parentWidget() const
Returns the parent of this widget, or 0 if it does not have any parent widget.
Definition: qwidget.h:1035
QSize size() const
bool isVisible() const
Definition: qwidget.h:1005
#define SLOT(a)
Definition: qobjectdefs.h:226
QWidget * becomeActive
Definition: qworkspace.cpp:996
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
void _q_minimizeActiveWindow()
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
static QMenuBar * findMenuBar(QWidget *w)
The QString class provides a Unicode character string.
Definition: qstring.h:83
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
QIcon windowIcon
the widget&#39;s icon
Definition: qwidget.h:199
void setPixmap(const QPixmap &)
Definition: qlabel.cpp:439
void setObjectName(const QString &name)
Definition: qobject.cpp:1112
#define Q_Q(Class)
Definition: qglobal.h:2483
The QWorkspace widget provides a workspace window that can be used in an MDI application.
Definition: qworkspace.h:60
bool isWindowModified() const
Definition: qwidget.cpp:11554
#define SIGNAL(a)
Definition: qobjectdefs.h:227
void setActive(bool)
int size() const
Returns the number of characters in this string.
Definition: qstring.h:102
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
#define emit
Definition: qobjectdefs.h:76
bool isNull() const
Returns true if the icon is empty; otherwise returns false.
Definition: qicon.cpp:769
QString windowTitle
the window title (caption)
Definition: qwidget.h:198
void show()
Shows the widget and its child widgets.
QPointer< QLabel > maxtools
Definition: qworkspace.cpp:997
void fill(const QColor &fillColor=Qt::white)
Fills the pixmap with the given color.
Definition: qpixmap.cpp:1080
QPointer< QMenuBar > maxmenubar
Definition: qworkspace.cpp:991
void setCornerWidget(QWidget *w, Qt::Corner corner=Qt::TopRightCorner)
This sets the given widget to be shown directly on the left of the first menu item, or on the right of the last menu item, depending on corner.
Definition: qmenubar.cpp:1980
The QMenuBar class provides a horizontal menu bar.
Definition: qmenubar.h:62
void installEventFilter(QObject *)
Installs an event filter filterObj on this object.
Definition: qobject.cpp:2070
int height() const
Returns the height.
Definition: qsize.h:129
The QLabel widget provides a text or image display.
Definition: qlabel.h:55
The QPixmap class is an off-screen image representation that can be used as a paint device...
Definition: qpixmap.h:71
QWorkspaceChild * active
Definition: qworkspace.cpp:984
QPixmap pixmap(const QSize &size, Mode mode=Normal, State state=Off) const
Returns a pixmap with the requested size, mode, and state, generating one if necessary.
Definition: qicon.cpp:693
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53
QWidget * windowWidget() const
QWorkspaceChild * maxWindow
Definition: qworkspace.cpp:988
QPointer< QMDIControl > maxcontrols
Definition: qworkspace.cpp:990
bool isNull() const
Returns true if this is a null pixmap; otherwise returns false.
Definition: qpixmap.cpp:615
void _q_normalizeActiveWindow()
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60

◆ showWindow()

void QWorkspacePrivate::showWindow ( QWidget w)

Definition at line 1766 of file qworkspace.cpp.

1767 {
1769  minimizeWindow(w);
1770  else if ((maxWindow || w->isMaximized()) && w->windowFlags() & Qt::WindowMaximizeButtonHint)
1771  maximizeWindow(w);
1772  else if (w->windowFlags() & Qt::WindowMaximizeButtonHint)
1773  normalizeWindow(w);
1774  else
1775  w->parentWidget()->show();
1776  if (maxWindow)
1778  updateWorkspace();
1779 }
QWidget * parentWidget() const
Returns the parent of this widget, or 0 if it does not have any parent widget.
Definition: qwidget.h:1035
void minimizeWindow(QWidget *w)
void show()
Shows the widget and its child widgets.
bool isMaximized() const
Definition: qwidget.cpp:3074
void normalizeWindow(QWidget *w)
bool isMinimized() const
Definition: qwidget.cpp:3027
QWorkspaceChild * maxWindow
Definition: qworkspace.cpp:988
Qt::WindowFlags windowFlags() const
Window flags are a combination of a type (e.
Definition: qwidget.h:939
void maximizeWindow(QWidget *w)

◆ updateWorkspace()

QRect QWorkspacePrivate::updateWorkspace ( )

Definition at line 3234 of file qworkspace.cpp.

3235 {
3236  Q_Q(QWorkspace);
3237  QRect cr(q->rect());
3238 
3239  if (q->scrollBarsEnabled() && !maxWindow) {
3240  corner->raise();
3241  vbar->raise();
3242  hbar->raise();
3243  if (maxWindow)
3245 
3246  QRect r(0, 0, 0, 0);
3248  while (it != windows.end()) {
3249  QWorkspaceChild *child = *it;
3250  ++it;
3251  if (!child->isHidden())
3252  r = r.unite(child->geometry());
3253  }
3254  vbar->blockSignals(true);
3255  hbar->blockSignals(true);
3256 
3257  int hsbExt = hbar->sizeHint().height();
3258  int vsbExt = vbar->sizeHint().width();
3259 
3260 
3261  bool showv = yoffset || yoffset + r.bottom() - q->height() + 1 > 0 || yoffset + r.top() < 0;
3262  bool showh = xoffset || xoffset + r.right() - q->width() + 1 > 0 || xoffset + r.left() < 0;
3263 
3264  if (showh && !showv)
3265  showv = yoffset + r.bottom() - q->height() + hsbExt + 1 > 0;
3266  if (showv && !showh)
3267  showh = xoffset + r.right() - q->width() + vsbExt + 1 > 0;
3268 
3269  if (!showh)
3270  hsbExt = 0;
3271  if (!showv)
3272  vsbExt = 0;
3273 
3274  if (showv) {
3275  vbar->setSingleStep(qMax(q->height() / 12, 30));
3276  vbar->setPageStep(q->height() - hsbExt);
3277  vbar->setMinimum(qMin(0, yoffset + qMin(0, r.top())));
3278  vbar->setMaximum(qMax(0, yoffset + qMax(0, r.bottom() - q->height() + hsbExt + 1)));
3279  vbar->setGeometry(q->width() - vsbExt, 0, vsbExt, q->height() - hsbExt);
3280  vbar->setValue(yoffset);
3281  vbar->show();
3282  } else {
3283  vbar->hide();
3284  }
3285 
3286  if (showh) {
3287  hbar->setSingleStep(qMax(q->width() / 12, 30));
3288  hbar->setPageStep(q->width() - vsbExt);
3289  hbar->setMinimum(qMin(0, xoffset + qMin(0, r.left())));
3290  hbar->setMaximum(qMax(0, xoffset + qMax(0, r.right() - q->width() + vsbExt + 1)));
3291  hbar->setGeometry(0, q->height() - hsbExt, q->width() - vsbExt, hsbExt);
3292  hbar->setValue(xoffset);
3293  hbar->show();
3294  } else {
3295  hbar->hide();
3296  }
3297 
3298  if (showh && showv) {
3299  corner->setGeometry(q->width() - vsbExt, q->height() - hsbExt, vsbExt, hsbExt);
3300  corner->show();
3301  } else {
3302  corner->hide();
3303  }
3304 
3305  vbar->blockSignals(false);
3306  hbar->blockSignals(false);
3307 
3308  cr.setRect(0, 0, q->width() - vsbExt, q->height() - hsbExt);
3309  }
3310 
3312  while (ii != icons.end()) {
3313  QWidget* w = *ii;
3314  ++ii;
3315  int x = w->x();
3316  int y = w->y();
3317  bool m = false;
3318  if (x+w->width() > cr.width()) {
3319  m = true;
3320  x = cr.width() - w->width();
3321  }
3322  if (y+w->height() > cr.height()) {
3323  y = cr.height() - w->height();
3324  m = true;
3325  }
3326  if (m) {
3327  if (QWorkspaceChild *child = qobject_cast<QWorkspaceChild*>(w))
3328  child->move(x, y);
3329  else
3330  w->move(x, y);
3331  }
3332  }
3333 
3334  return cr;
3335 
3336 }
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
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
Definition: qglobal.h:1215
int width
the width of the widget excluding any window frame
Definition: qwidget.h:166
#define it(className, varName)
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
iterator begin()
Returns an STL-style iterator pointing to the first item in the list.
Definition: qlist.h:267
void setGeometry(int x, int y, int w, int h)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: qwidget.h:1017
QScrollBar * hbar
int x
the x coordinate of the widget relative to its parent including any window frame
Definition: qwidget.h:161
QScrollBar * vbar
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
Definition: qglobal.h:1217
#define Q_Q(Class)
Definition: qglobal.h:2483
The QWorkspace widget provides a workspace window that can be used in an MDI application.
Definition: qworkspace.h:60
bool isHidden() const
Returns true if the widget is hidden, otherwise returns false.
Definition: qwidget.h:1008
int width() const
Returns the width.
Definition: qsize.h:126
int height
the height of the widget excluding any window frame
Definition: qwidget.h:167
void raise()
Raises this widget to the top of the parent widget&#39;s stack.
Definition: qwidget.cpp:11901
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the list...
Definition: qlist.h:270
QList< QWidget * > icons
Definition: qworkspace.cpp:987
QList< QWorkspaceChild * > windows
Definition: qworkspace.cpp:985
void show()
Shows the widget and its child widgets.
void hide()
Hides the widget.
Definition: qwidget.h:501
The QList::iterator class provides an STL-style non-const iterator for QList and QQueue.
Definition: qlist.h:181
QSize sizeHint() const
Reimplemented Function
Definition: qscrollbar.cpp:490
int y
the y coordinate of the widget relative to its parent and including any window frame ...
Definition: qwidget.h:162
int height() const
Returns the height.
Definition: qsize.h:129
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
QWorkspaceChild * maxWindow
Definition: qworkspace.cpp:988
const QRect & geometry() const
void move(int x, int y)
This corresponds to move(QPoint(x, y)).
Definition: qwidget.h:1011
The QList class is a template class that provides lists.
Definition: qdatastream.h:62

Properties

◆ actions

QAction* QWorkspacePrivate::actions[NCountAct]

Definition at line 1002 of file qworkspace.cpp.

◆ active

QWorkspaceChild* QWorkspacePrivate::active

Definition at line 984 of file qworkspace.cpp.

◆ background

QBrush QWorkspacePrivate::background

Definition at line 1007 of file qworkspace.cpp.

◆ becomeActive

QWidget* QWorkspacePrivate::becomeActive

Definition at line 996 of file qworkspace.cpp.

◆ corner

QWidget* QWorkspacePrivate::corner

Definition at line 1005 of file qworkspace.cpp.

◆ focus

QList<QWorkspaceChild *> QWorkspacePrivate::focus

Definition at line 986 of file qworkspace.cpp.

◆ hbar

QScrollBar * QWorkspacePrivate::hbar

Definition at line 1004 of file qworkspace.cpp.

◆ icons

QList<QWidget *> QWorkspacePrivate::icons

Definition at line 987 of file qworkspace.cpp.

◆ inTitleChange

bool QWorkspacePrivate::inTitleChange
private

Definition at line 1034 of file qworkspace.cpp.

◆ maxcontrols

QPointer<QMDIControl> QWorkspacePrivate::maxcontrols

Definition at line 990 of file qworkspace.cpp.

◆ maxmenubar

QPointer<QMenuBar> QWorkspacePrivate::maxmenubar

Definition at line 991 of file qworkspace.cpp.

◆ maxRestore

QRect QWorkspacePrivate::maxRestore

Definition at line 989 of file qworkspace.cpp.

◆ maxtools

QPointer<QLabel> QWorkspacePrivate::maxtools

Definition at line 997 of file qworkspace.cpp.

◆ maxWindow

QWorkspaceChild* QWorkspacePrivate::maxWindow

Definition at line 988 of file qworkspace.cpp.

◆ popup

QMenu* QWorkspacePrivate::popup

Definition at line 1000 of file qworkspace.cpp.

◆ px

int QWorkspacePrivate::px

Definition at line 994 of file qworkspace.cpp.

◆ py

int QWorkspacePrivate::py

Definition at line 995 of file qworkspace.cpp.

◆ shortcutMap

QHash<int, const char*> QWorkspacePrivate::shortcutMap

Definition at line 992 of file qworkspace.cpp.

◆ toolPopup

QMenu * QWorkspacePrivate::toolPopup

Definition at line 1000 of file qworkspace.cpp.

◆ topTitle

QString QWorkspacePrivate::topTitle

Definition at line 998 of file qworkspace.cpp.

◆ vbar

QScrollBar* QWorkspacePrivate::vbar

Definition at line 1004 of file qworkspace.cpp.

◆ windows

QList<QWorkspaceChild *> QWorkspacePrivate::windows

Definition at line 985 of file qworkspace.cpp.

◆ xoffset

int QWorkspacePrivate::xoffset

Definition at line 1006 of file qworkspace.cpp.

◆ yoffset

int QWorkspacePrivate::yoffset

Definition at line 1006 of file qworkspace.cpp.


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