![]() |
LeechCraft
%{LEECHCRAFT_VERSION}
Modular cross-platform feature rich live environment.
|
General GUI widgets and classes. More...
Classes | |
class | LeechCraft::Util::AutoResizeMixin |
Automatically moves a widget to fit a rectangle on resize. More... | |
class | LeechCraft::Util::ClearLineEditAddon |
Provides a "clear text" action for line edits. More... | |
class | LeechCraft::Util::ColorButton |
A button for choosing a color. More... | |
class | LeechCraft::Util::FindNotification |
A horizontal bar with typical widgets for text search. More... | |
class | LeechCraft::Util::FindNotificationWk |
A helper class to aid connecting FindNotification with Qt WebKit. More... | |
class | LeechCraft::Util::FlowLayout |
A simple flow layout implementation. More... | |
class | LeechCraft::Util::LineEditButtonManager |
Manages additional overlay buttons in a QLineEdit. More... | |
class | LeechCraft::Util::PageNotification |
A horizontal widget embedding into the parent layout of the passed parent widget. More... | |
class | LeechCraft::Util::SelectableBrowser |
A "browser" that shows HTML either via QTextBrowser or a browser plugin. More... | |
class | LeechCraft::Util::UnhoverDeleteMixin |
Allows to hide a widget or popup after mouse leave. More... | |
Functions | |
QPoint | LeechCraft::Util::FitRectScreen (QPoint pos, const QSize &size, FitFlags flags=NoFlags, const QPoint &shiftAdd=QPoint(0, 0)) |
Tries to fit a rectangle (like a dialog or popup) into screen. More... | |
QPoint | LeechCraft::Util::FitRect (QPoint pos, const QSize &size, const QRect &geometry, FitFlags flags=NoFlags, const QPoint &shiftAdd=QPoint(0, 0)) |
Tries to fit a rectangle (like a dialog or popup) into geometry. More... | |
QLabel * | LeechCraft::Util::ShowPixmapLabel (const QPixmap &pixmap, const QPoint &pos=QPoint()) |
Shows a pixmap at the given pos. More... | |
General GUI widgets and classes.
Various options controlling the search behavior.
Definition at line 92 of file findnotification.h.
UTIL_GUI_API QPoint LeechCraft::Util::FitRect | ( | QPoint | pos, |
const QSize & | size, | ||
const QRect & | geometry, | ||
FitFlags | flags = NoFlags , |
||
const QPoint & | shiftAdd = QPoint(0, 0) |
||
) |
Tries to fit a rectangle (like a dialog or popup) into geometry.
This function tries to move the rectangle with top left point at pos and with given size so that it fits completely into the rectangle given by the geometry parameter. It leaves the size intact, instead returning the new top left position.
If the rectangle is actually moved by this function, the shiftAdd parameter is used to customize how it is moved: the shiftAdd.x()
component is added to the result iff pos.x()
is changed, and shiftAdd.y()
is added to the result iff pos.y()
is changed.
[in] | pos | The original top left position of the rect to fit. |
[in] | size | The size of the rectangle to fit. |
[in] | geometry | The rectangle into which the source rectangle should be fitted. |
[in] | flags | Additional fitting parameters. |
[in] | shiftAdd | Additional components to be added if the rectangle is actually moved in the corresponding directions. |
Definition at line 49 of file util.cpp.
References LeechCraft::Util::NoOverlap.
Referenced by LeechCraft::Util::FitRectScreen().
UTIL_GUI_API QPoint LeechCraft::Util::FitRectScreen | ( | QPoint | pos, |
const QSize & | size, | ||
FitFlags | flags = NoFlags , |
||
const QPoint & | shiftAdd = QPoint(0, 0) |
||
) |
Tries to fit a rectangle (like a dialog or popup) into screen.
This function tries to move the rectangle with top left point at pos and with given size so that it fits completely into the available geometry of the screen that contains the point pos. It leaves the rectangle size intact, instead returning the new top left position.
Calling this function is equivalent to calling FitRect() with the geometry parameter set to QDesktopWidget::availableGeometry(pos)
. See the documentation for FitRect() for more details.
[in] | pos | The original top left position of the rect to fit. |
[in] | size | The size of the rectangle to fit. |
[in] | flags | Additional fitting parameters. |
[in] | shiftAdd | Additional components to be added if the rectangle is actually moved in the corresponding directions. |
Definition at line 44 of file util.cpp.
References LeechCraft::Util::FitRect().
UTIL_GUI_API QLabel * LeechCraft::Util::ShowPixmapLabel | ( | const QPixmap & | pixmap, |
const QPoint & | pos = QPoint() |
||
) |
Shows a pixmap at the given pos.
This function shows a dialog with the given pixmap at the given position. If the pixmap is too big, it is scaled down. A QLabel created with window decorations is used as the dialog. The created label is returned from the function, so one could also set the window title and further customize the label.
This function is useful to display full version of album art in a media player or a user avatar in an IM application.
[in] | pixmap | The pixmap to show. |
[in] | pos | The position where the dialog should be shown. |