Qt Utilities 6.14.3
Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models
Loading...
Searching...
No Matches
dialogutils.h
Go to the documentation of this file.
1#ifndef DIALOGS_DIALOGUTILS_H
2#define DIALOGS_DIALOGUTILS_H
3
4#include "../global.h"
5
6#include <QtGlobal>
7
8QT_FORWARD_DECLARE_CLASS(QString)
9QT_FORWARD_DECLARE_CLASS(QWidget)
10QT_FORWARD_DECLARE_CLASS(QColor)
11QT_FORWARD_DECLARE_CLASS(QPalette)
12QT_FORWARD_DECLARE_CLASS(QPoint)
13QT_FORWARD_DECLARE_CLASS(QRect)
14
15namespace QtUtilities {
16
21enum class DocumentStatus {
24 Saved,
26 Unsaved
28};
29
30QT_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();
35QT_UTILITIES_EXPORT QColor windowFrameColorForPalette(const QPalette &palette);
36[[deprecated]] QT_UTILITIES_EXPORT QColor instructionTextColor();
37QT_UTILITIES_EXPORT QColor instructionTextColorForPalette(const QPalette &palette);
38#endif
39[[deprecated]] QT_UTILITIES_EXPORT const QString &dialogStyle();
40QT_UTILITIES_EXPORT QString dialogStyleForPalette(const QPalette &palette);
41#ifdef QT_UTILITIES_GUI_QTWIDGETS
42QT_UTILITIES_EXPORT QRect availableScreenGeometryAtPoint(const QPoint &point);
43QT_UTILITIES_EXPORT void centerWidget(QWidget *widget, const QWidget *parent = nullptr, const QPoint *position = nullptr);
44QT_UTILITIES_EXPORT bool centerWidgetAvoidingOverflow(QWidget *widget, const QWidget *parent = nullptr, const QPoint *position = nullptr);
45QT_UTILITIES_EXPORT void cornerWidget(QWidget *widget, const QPoint *position = nullptr);
46QT_UTILITIES_EXPORT void makeHeading(QWidget *widget);
47QT_UTILITIES_EXPORT void updateStyle(QWidget *widget);
48#endif
49#endif
50
51} // namespace QtUtilities
52
53#endif // DIALOGS_DIALOGUTILS_H
#define QT_UTILITIES_EXPORT
Marks the symbol to be exported by the qtutilities library.
Definition global.h:14
DocumentStatus
The DocumentStatus enum specifies the status of the document in a window.
Definition dialogutils.h:21
QT_UTILITIES_EXPORT QString generateWindowTitle(DocumentStatus documentStatus, const QString &documentPath)
Generates the window title string for the specified documentStatus and documentPath.