QWSDecoration(3qt)

πŸ“¦ version 3.3.8b, in fedora 43, fedora 44

πŸ’– QWSDecoration β€” Qt/Embedded's window-decoration glow-up class πŸ’–

okay bestie, welcome to QWSDecoration(3qt), a page from the Qt 3 docs (yes, Qt 3, she's vintage but she ATE). this is your group chat briefing on how to make the Qt/Embedded Window Manager look however you want. no cap, it's giving "build your own window borders" energy and honestly? iconic. πŸŽ€


✨ NAME ✨

QWSDecoration β€” lets you customize the appearance of the Qt/Embedded Window Manager. periodt.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <qwsdecoration_qws.h>

🌸 Public Members 🌸

QWSDecoration ()
virtual ~QWSDecoration ()
enum Region { None = 0, All = 1, Title = 2, Top = 3, Bottom = 4, Left =
     5, Right = 6, TopLeft = 7, TopRight = 8, BottomLeft = 9, BottomRight
     = 10, Close = 11, Minimize = 12, Maximize = 13, Normalize = 14, Menu
     = 15, LastRegion = Menu }
virtual QRegion region ( const QWidget * widget, const QRect & rect,
    Region type = All ) = 0
virtual void close ( QWidget * widget )
virtual void minimize ( QWidget * widget )
virtual void maximize ( QWidget * widget )
virtual QPopupMenu * menu ( const QWidget *, const QPoint & )
virtual void paint ( QPainter * painter, const QWidget * widget ) = 0
virtual void paintButton ( QPainter * painter, const QWidget * widget,
    Region type, int state ) = 0

🌈 DESCRIPTION 🌈

The QWSDecoration class is literally the class that lets the appearance of the Qt/Embedded Window Manager be customized. yes queen, your windows, your rules. πŸ’…

Qt/Embedded provides window management to top level windows. The appearance of the borders and buttons (the decoration) around the managed windows can be customized by creating your own class derived from QWSDecoration and overriding a few methods. that's it, that's the whole vibe. subclass it, override the methods, serve looks. πŸ¦‹

important bestie!! This class is non-portable. It is available only in Qt/Embedded. do not expect her to show up anywhere else, she's Qt/Embedded exclusive iykyk.

See also QApplication::qwsSetDecoration() and Qt/Embedded.


πŸŽ€ Member Type Documentation πŸŽ€

QWSDecoration::Region

This enum describes the regions in the window decorations. lowkey this is the map of who does what:

  • QWSDecoration::None β€” used internally. she's shy, don't worry about her.
  • QWSDecoration::All β€” the entire region used by the window decoration. the whole fit. πŸ‘‘
  • QWSDecoration::Title β€” Displays the window title and allows the window to be moved by dragging. drag her around, she doesn't mind. ✨
  • QWSDecoration::Top β€” allows the top of the window to be resized.
  • QWSDecoration::Bottom β€” allows the bottom of the window to be resized.
  • QWSDecoration::Left β€” allows the left edge of the window to be resized.
  • QWSDecoration::Right β€” allows the right edge of the window to be resized.
  • QWSDecoration::TopLeft β€” allows the top-left of the window to be resized.
  • QWSDecoration::TopRight β€” allows the top-right of the window to be resized.
  • QWSDecoration::BottomLeft β€” allows the bottom-left of the window to be resized.
  • QWSDecoration::BottomRight β€” allows the bottom-right of the window to be resized.
  • QWSDecoration::Close β€” clicking in this region closes the window. bye bestie 🫢
  • QWSDecoration::Minimize β€” clicking in this region minimizes the window.
  • QWSDecoration::Maximize β€” clicking in this region maximizes the window.
  • QWSDecoration::Normalize β€” returns a maximized window to its previous size. the un-maximize, the "actually nvm" button. 😭
  • QWSDecoration::Menu β€” clicking in this region opens the window operations (system) menu.

πŸ’œ MEMBER FUNCTION DOCUMENTATION πŸ’œ

QWSDecoration::QWSDecoration ()

Constructs a decorator. she's born. 🍼

QWSDecoration::~QWSDecoration () [virtual]

Destroys a decorator. she's gone. πŸ’€

void QWSDecoration::close ( QWidget * widget ) [virtual]

Called when the user clicks in the Close region.

widget is the widget to be closed.

The default behaviour is to close the widget. fr fr, she just closes it.

void QWSDecoration::maximize ( QWidget * widget ) [virtual]

Called when the user clicks in the Maximize region.

widget is the widget to be maximized.

The default behaviour is to resize the widget to be full-screen. This method can be overridden e.g. to allow room for launch panels. so if you need to leave space for your lil panels, override her. 🫢

QPopupMenu * QWSDecoration::menu ( const QWidget *, const QPoint & ) [virtual]

Called to create a QPopupMenu containing the valid menu operations.

The default implementation adds all possible window operations. she gives you the full menu, no holding back. ✨

void QWSDecoration::minimize ( QWidget * widget ) [virtual]

Called when the user clicks in the Minimize region.

widget is the widget to be minimized.

The default behaviour is to ignore this action. not me being told to minimize and just... not. πŸ™ˆ

void QWSDecoration::paint ( QPainter * painter, const QWidget * widget ) [pure virtual]

Override to paint the border and title decoration around widget using painter. this is where you go feral with the aesthetic, bestie β€” she's pure virtual so you HAVE to override her.

void QWSDecoration::paintButton ( QPainter * painter, const QWidget * widget, Region type, int state ) [pure virtual]

Override to paint a button of type type using painter.

widget is the widget whose button is to be drawn. state is the state of the button. It can be a combination of the following OR-ed together:

  • QWSButton::MouseOver
  • QWSButton::Clicked
  • QWSButton::On

OR them together like a lil charm bracelet, that's the state. πŸ”₯

QRegion QWSDecoration::region ( const QWidget * widget, const QRect & rect, Region type = All ) [pure virtual]

Returns the requested region type which will contain widget with geometry rect. she's the map, you're the navigator. 🧚


🌟 SEE ALSO 🌟


Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.


🌸 AUTHOR 🌸

Generated automatically from the source code. (not a human, just vibes and a code generator, bestie.)


πŸ“ BUGS πŸ“

If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. (genuinely, ty, bug reports are the love language of open source. 🫢)

The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. (she's the convenience-store version, the real one is HTML, no cap.)

If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qwsdecoration.3qt) and the Qt version (3.3.8). don't forget the deets, bestie, they need them to reproduce. πŸ’–


and that's the whole page!! this was QWSDecoration(3qt) from Trolltech AS, dated 2 February 2007, and she was Qt version 3.3.8 energy. mwah, ily, go customize some window borders. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from