Qt Utilities: misc/dialogutils.h Source File

Qt Utilities 6.22.0 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
21 enum class DocumentStatus {
22 NoDocument,
24 Saved,
26 Unsaved
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} // namespace QtUtilities
52
53#endif // DIALOGS_DIALOGUTILS_H
global.h
QT_UTILITIES_EXPORT
#define QT_UTILITIES_EXPORT
Marks the symbol to be exported by the qtutilities library.
Definition global.h:14
QtUtilities
!
Definition trylocker.h:8
QtUtilities::DocumentStatus
DocumentStatus
The DocumentStatus enum specifies the status of the document in a window.
Definition dialogutils.h:21
QtUtilities::DocumentStatus::Unsaved
@ Unsaved
Definition dialogutils.h:26
QtUtilities::DocumentStatus::Saved
@ Saved
Definition dialogutils.h:24
QtUtilities::DocumentStatus::NoDocument
@ NoDocument
Definition dialogutils.h:22
QtUtilities::generateWindowTitle
QT_UTILITIES_EXPORT QString generateWindowTitle(DocumentStatus documentStatus, const QString &documentPath)
Generates the window title string for the specified documentStatus and documentPath.
Definition dialogutils.cpp:31