qtutilities/misc/dialogutils.h

49 lines
1.6 KiB
C
Raw Normal View History

#ifndef DIALOGS_DIALOGUTILS_H
#define DIALOGS_DIALOGUTILS_H
#include "../global.h"
#include <QtGlobal>
QT_FORWARD_DECLARE_CLASS(QString)
QT_FORWARD_DECLARE_CLASS(QWidget)
QT_FORWARD_DECLARE_CLASS(QColor)
2019-05-04 22:16:46 +02:00
QT_FORWARD_DECLARE_CLASS(QPoint)
QT_FORWARD_DECLARE_CLASS(QRect)
namespace QtUtilities {
2016-02-05 20:23:02 +01:00
/*!
2017-05-04 22:46:37 +02:00
* \brief The DocumentStatus enum specifies the status of the document in a
* window.
2016-02-05 20:23:02 +01:00
*/
enum class DocumentStatus {
2017-05-04 22:46:37 +02:00
NoDocument, /**< There is no document opened. The document path is ignored in
this case. */
Saved, /**< There is a document opened. All modifications have been saved yet.
*/
Unsaved /**< There is a document opened and there are unsaved modifications.
*/
};
QString QT_UTILITIES_EXPORT generateWindowTitle(DocumentStatus documentStatus, const QString &documentPath);
2017-05-01 03:16:25 +02:00
#if defined(QT_UTILITIES_GUI_QTWIDGETS) || defined(QT_UTILITIES_GUI_QTQUICK)
#ifdef Q_OS_WIN32
QColor QT_UTILITIES_EXPORT windowFrameColor();
QColor QT_UTILITIES_EXPORT instructionTextColor();
2017-05-01 03:16:25 +02:00
#endif
const QString QT_UTILITIES_EXPORT &dialogStyle();
2017-05-01 03:16:25 +02:00
#ifdef QT_UTILITIES_GUI_QTWIDGETS
2019-05-04 22:16:46 +02:00
QRect QT_UTILITIES_EXPORT availableScreenGeometryAtPoint(const QPoint &point);
void QT_UTILITIES_EXPORT centerWidget(QWidget *widget, const QWidget *parent = nullptr, const QPoint *position = nullptr);
void QT_UTILITIES_EXPORT cornerWidget(QWidget *widget, const QPoint *position = nullptr);
void QT_UTILITIES_EXPORT makeHeading(QWidget *widget);
void QT_UTILITIES_EXPORT updateStyle(QWidget *widget);
2017-05-01 03:16:25 +02:00
#endif
#endif
} // namespace QtUtilities
#endif // DIALOGS_DIALOGUTILS_H