| 1 |
#ifndef DIALOGS_DIALOGUTILS_H |
| 2 |
#define DIALOGS_DIALOGUTILS_H |
| 3 |
|
| 4 |
#include "../global.h" |
| 5 |
|
| 6 |
#include <QtGlobal> |
| 7 |
|
| 8 |
QT_FORWARD_DECLARE_CLASS(QString) |
| 9 |
QT_FORWARD_DECLARE_CLASS(QWidget) |
| 10 |
QT_FORWARD_DECLARE_CLASS(QColor) |
| 11 |
QT_FORWARD_DECLARE_CLASS(QPalette) |
| 12 |
QT_FORWARD_DECLARE_CLASS(QPoint) |
| 13 |
QT_FORWARD_DECLARE_CLASS(QRect) |
| 14 |
|
| 15 |
namespace QtUtilities { |
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
enum class DocumentStatus { |
| 22 |
NoDocument, |
| 23 |
|
| 24 |
Saved, |
| 25 |
|
| 26 |
Unsaved |
| 27 |
|
| 28 |
}; |
| 29 |
|
| 30 |
QT_UTILITIES_EXPORT QString generateWindowTitle(DocumentStatus documentStatus, const QString &documentPath); |
| 31 |
|
| 32 |
#if defined(QT_UTILITIES_GUI_QTWIDGETS) || defined(QT_UTILITIES_GUI_QTQUICK) |
| 33 |
#ifdef Q_OS_WINDOWS |
| 34 |
[[deprecated]] QT_UTILITIES_EXPORT QColor windowFrameColor(); |
| 35 |
QT_UTILITIES_EXPORT QColor windowFrameColorForPalette(const QPalette &palette); |
| 36 |
[[deprecated]] QT_UTILITIES_EXPORT QColor instructionTextColor(); |
| 37 |
QT_UTILITIES_EXPORT QColor instructionTextColorForPalette(const QPalette &palette); |
| 38 |
#endif |
| 39 |
[[deprecated]] QT_UTILITIES_EXPORT const QString &dialogStyle(); |
| 40 |
QT_UTILITIES_EXPORT QString dialogStyleForPalette(const QPalette &palette); |
| 41 |
#ifdef QT_UTILITIES_GUI_QTWIDGETS |
| 42 |
QT_UTILITIES_EXPORT QRect availableScreenGeometryAtPoint(const QPoint &point); |
| 43 |
QT_UTILITIES_EXPORT void centerWidget(QWidget *widget, const QWidget *parent = nullptr, const QPoint *position = nullptr); |
| 44 |
QT_UTILITIES_EXPORT bool centerWidgetAvoidingOverflow(QWidget *widget, const QWidget *parent = nullptr, const QPoint *position = nullptr); |
| 45 |
QT_UTILITIES_EXPORT void cornerWidget(QWidget *widget, const QPoint *position = nullptr); |
| 46 |
QT_UTILITIES_EXPORT void makeHeading(QWidget *widget); |
| 47 |
QT_UTILITIES_EXPORT void updateStyle(QWidget *widget); |
| 48 |
#endif |
| 49 |
#endif |
| 50 |
|
| 51 |
} |
| 52 |
|
| 53 |
#endif |