Qt Utilities 6.6.1
Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models
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(QPoint)
12QT_FORWARD_DECLARE_CLASS(QRect)
13
14namespace QtUtilities {
15
20enum class DocumentStatus {
23 Saved,
25 Unsaved
27};
28
29QT_UTILITIES_EXPORT QString generateWindowTitle(DocumentStatus documentStatus, const QString &documentPath);
30
31#if defined(QT_UTILITIES_GUI_QTWIDGETS) || defined(QT_UTILITIES_GUI_QTQUICK)
32#ifdef Q_OS_WIN32
33QT_UTILITIES_EXPORT QColor windowFrameColor();
34QT_UTILITIES_EXPORT QColor instructionTextColor();
35#endif
36QT_UTILITIES_EXPORT const QString &dialogStyle();
37#ifdef QT_UTILITIES_GUI_QTWIDGETS
38QT_UTILITIES_EXPORT QRect availableScreenGeometryAtPoint(const QPoint &point);
39QT_UTILITIES_EXPORT void centerWidget(QWidget *widget, const QWidget *parent = nullptr, const QPoint *position = nullptr);
40QT_UTILITIES_EXPORT bool centerWidgetAvoidingOverflow(QWidget *widget, const QWidget *parent = nullptr, const QPoint *position = nullptr);
41QT_UTILITIES_EXPORT void cornerWidget(QWidget *widget, const QPoint *position = nullptr);
42QT_UTILITIES_EXPORT void makeHeading(QWidget *widget);
43QT_UTILITIES_EXPORT void updateStyle(QWidget *widget);
44#endif
45#endif
46
47} // namespace QtUtilities
48
49#endif // DIALOGS_DIALOGUTILS_H
#define QT_UTILITIES_EXPORT
Marks the symbol to be exported by the qtutilities library.
DocumentStatus
The DocumentStatus enum specifies the status of the document in a window.
Definition: dialogutils.h:20
QT_UTILITIES_EXPORT QString generateWindowTitle(DocumentStatus documentStatus, const QString &documentPath)
Generates the window title string for the specified documentStatus and documentPath.
Definition: dialogutils.cpp:29