![]() |
KDWinUtils
Helper library for MFC to Qt migration
|
Functions | |
| void | centerWindow (QWidget *dialogWidget, const QRect &parentRect) |
| Centers the dialog widget in the parentRect. | |
| void | drawArc (QPainter *painter, const QRect &rect, const QPoint &p1, const QPoint &p2) |
| Draws an arc specified by the given rectangle, and 2 points. | |
| void | drawCenterLabel (QPainter *pDC, const QPoint &pt, const QString &label) |
| Draws a label centered at the specified point. | |
| void | drawChord (QPainter *painter, const QRect &rect, const QPoint &p1, const QPoint &p2) |
| Draws an chrod specified by the given rectangle, and 2 points. | |
| void | drawLabel (QPainter *pDC, const QPoint &pt, const QString &label, Qt::Alignment align) |
| Draws a label at the specified point with the given alignment. | |
| void | drawPie (QPainter *painter, const QRect &rect, const QPoint &p1, const QPoint &p2) |
| Draws a pie specified by the given rectangle, and 2 points. | |
| QAction * | findCommand (const QList< QAction * > &actionList, const QString &menuText) |
| Finds a command with the specified text from a list of commands. | |
| QAction * | findCommand (const QList< QAction * > &actionList, int id) |
| Finds a command with the specified ID from a list of commands. | |
| HWND | nativeHandle (QWidget *_widget) |
| Returns the native handle of the widget. | |
| float | scaleFactor (QWidget *widget) |
| Returns the scale factor of the widget. | |
| bool | setCommandChecked (const QList< QAction * > &actionList, int id, bool checked) |
| Checks the command with the specified ID from a list of commands. | |
| bool | setCommandEnabled (const QList< QAction * > &actionList, int id, bool enable) |
| Enables the command with the specified ID from a list of commands. | |
| COLORREF | toCOLORREF (const QColor &color) |
| Converts a QColor to a COLORREF. | |
| CPoint | toCPoint (const QPoint &point) |
| Converts a QPoint into a CPoint. | |
| CRect | toCRect (const QRect &rect) |
| Converts a QRect into a CRect. | |
| CSize | toCSize (const QSize &size) |
| Converts a QSize into a CSize. | |
| CString | toCString (const QString &str) |
| Converts a QString into a CString. | |
| HBITMAP | toHBITMAP (const QImage &image) |
| Converts a QImage to a HBITMAP. | |
| HICON | toHICON (const QImage &image) |
| Converts a QImage to a HICON. | |
| QColor | toQColor (COLORREF rgb) |
| Converts a COLORREF to a QColor. | |
| QColor | toQColor (COLORREF rgb, int alpha) |
| Converts a COLORREF to a QColor with alpha. | |
| QImage | toQImage (HBITMAP bitmap) |
| Converts a HBITMAP to a QImage. | |
| QImage | toQImage (HICON icon) |
| Converts a HICON to a QImage. | |
| QList< QImage > | toQImageList (CImageList *imageList) |
| Converts a CImageList to a list of QImage. | |
| QPoint | toQPoint (const CPoint &point) |
| Converts a QPoint into a CPoint. | |
| QRect | toQRect (const CRect &rect) |
| Converts a CRect into a QRect. | |
| QSize | toQSize (const CSize &size) |
| Converts a CSize into a QSize. | |
| QString | toQString (const CStringA &str) |
| Converts a CString (char) into a QString. | |
| QString | toQString (const CStringW &str) |
| Converts a CString (wide char) into a QString. | |
| QString | toQString (const wchar_t *str) |
| Converts a wide string into a QString. | |
| Qt::BrushStyle | toQtBrushStyle (int nIndex) |
| Converts a CBrush style to a Qt::BrushStyle. | |
| Qt::PenCapStyle | toQtPenCapStyle (int value) |
| Converts a CPen cap style to a Qt::PenCapStyle. | |
| Qt::PenJoinStyle | toQtPenJoinStyle (int value) |
| Converts a CPen join style to a Qt::PenJoinStyle. | |
| Qt::PenStyle | toQtPenStyle (int value) |
| Converts a CPen style to a Qt::PenStyle. | |
| void Utils::centerWindow | ( | QWidget * | dialogWidget, |
| const QRect & | parentRect ) |
Centers the dialog widget in the parentRect.
| void Utils::drawArc | ( | QPainter * | painter, |
| const QRect & | rect, | ||
| const QPoint & | p1, | ||
| const QPoint & | p2 ) |
Draws an arc specified by the given rectangle, and 2 points.
| void Utils::drawCenterLabel | ( | QPainter * | pDC, |
| const QPoint & | pt, | ||
| const QString & | label ) |
Draws a label centered at the specified point.
| void Utils::drawChord | ( | QPainter * | painter, |
| const QRect & | rect, | ||
| const QPoint & | p1, | ||
| const QPoint & | p2 ) |
Draws an chrod specified by the given rectangle, and 2 points.
| void Utils::drawLabel | ( | QPainter * | pDC, |
| const QPoint & | pt, | ||
| const QString & | label, | ||
| Qt::Alignment | align ) |
Draws a label at the specified point with the given alignment.
| void Utils::drawPie | ( | QPainter * | painter, |
| const QRect & | rect, | ||
| const QPoint & | p1, | ||
| const QPoint & | p2 ) |
Draws a pie specified by the given rectangle, and 2 points.
| QAction * Utils::findCommand | ( | const QList< QAction * > & | actionList, |
| const QString & | menuText ) |
Finds a command with the specified text from a list of commands.
| QAction * Utils::findCommand | ( | const QList< QAction * > & | actionList, |
| int | id ) |
Finds a command with the specified ID from a list of commands.
| HWND Utils::nativeHandle | ( | QWidget * | _widget | ) |
Returns the native handle of the widget.
| float Utils::scaleFactor | ( | QWidget * | widget | ) |
Returns the scale factor of the widget.
| bool Utils::setCommandChecked | ( | const QList< QAction * > & | actionList, |
| int | id, | ||
| bool | checked ) |
Checks the command with the specified ID from a list of commands.
| bool Utils::setCommandEnabled | ( | const QList< QAction * > & | actionList, |
| int | id, | ||
| bool | enable ) |
Enables the command with the specified ID from a list of commands.
| COLORREF Utils::toCOLORREF | ( | const QColor & | color | ) |
Converts a QColor to a COLORREF.
| CPoint Utils::toCPoint | ( | const QPoint & | point | ) |
Converts a QPoint into a CPoint.
| CRect Utils::toCRect | ( | const QRect & | rect | ) |
Converts a QRect into a CRect.
| CSize Utils::toCSize | ( | const QSize & | size | ) |
Converts a QSize into a CSize.
| CString Utils::toCString | ( | const QString & | str | ) |
Converts a QString into a CString.
Depending if the macro UNICODE is set, will use wide char or normal char.
| HBITMAP Utils::toHBITMAP | ( | const QImage & | image | ) |
Converts a QImage to a HBITMAP.
| HICON Utils::toHICON | ( | const QImage & | image | ) |
Converts a QImage to a HICON.
| QColor Utils::toQColor | ( | COLORREF | rgb | ) |
Converts a COLORREF to a QColor.
| QColor Utils::toQColor | ( | COLORREF | rgb, |
| int | alpha ) |
Converts a COLORREF to a QColor with alpha.
| QImage Utils::toQImage | ( | HBITMAP | bitmap | ) |
Converts a HBITMAP to a QImage.
| QImage Utils::toQImage | ( | HICON | icon | ) |
Converts a HICON to a QImage.
| QList< QImage > Utils::toQImageList | ( | CImageList * | imageList | ) |
Converts a CImageList to a list of QImage.
| QPoint Utils::toQPoint | ( | const CPoint & | point | ) |
Converts a QPoint into a CPoint.
| QRect Utils::toQRect | ( | const CRect & | rect | ) |
Converts a CRect into a QRect.
| QSize Utils::toQSize | ( | const CSize & | size | ) |
Converts a CSize into a QSize.
| QString Utils::toQString | ( | const CStringA & | str | ) |
Converts a CString (char) into a QString.
| QString Utils::toQString | ( | const CStringW & | str | ) |
Converts a CString (wide char) into a QString.
| QString Utils::toQString | ( | const wchar_t * | str | ) |
Converts a wide string into a QString.
| Qt::BrushStyle Utils::toQtBrushStyle | ( | int | nIndex | ) |
Converts a CBrush style to a Qt::BrushStyle.
| Qt::PenCapStyle Utils::toQtPenCapStyle | ( | int | value | ) |
Converts a CPen cap style to a Qt::PenCapStyle.
| Qt::PenJoinStyle Utils::toQtPenJoinStyle | ( | int | value | ) |
Converts a CPen join style to a Qt::PenJoinStyle.
| Qt::PenStyle Utils::toQtPenStyle | ( | int | value | ) |
Converts a CPen style to a Qt::PenStyle.