2015-07-07 00:48:52 +02:00
|
|
|
#ifndef DIALOGS_DIALOGUTILS_H
|
|
|
|
#define DIALOGS_DIALOGUTILS_H
|
|
|
|
|
2016-08-29 15:41:11 +02:00
|
|
|
#include "../global.h"
|
2015-07-07 00:48:52 +02:00
|
|
|
|
|
|
|
#include <QtGlobal>
|
|
|
|
|
2015-09-26 20:28:30 +02:00
|
|
|
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)
|
2015-07-07 00:48:52 +02:00
|
|
|
|
2019-06-10 21:57:46 +02:00
|
|
|
namespace QtUtilities {
|
2015-07-07 00:48:52 +02:00
|
|
|
|
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
|
|
|
*/
|
2015-07-07 00:48:52 +02: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.
|
|
|
|
*/
|
2015-07-07 00:48:52 +02:00
|
|
|
};
|
|
|
|
|
2016-08-29 15:41:11 +02:00
|
|
|
QString QT_UTILITIES_EXPORT generateWindowTitle(DocumentStatus documentStatus, const QString &documentPath);
|
2015-07-07 00:48:52 +02:00
|
|
|
|
2017-05-01 03:16:25 +02:00
|
|
|
#if defined(QT_UTILITIES_GUI_QTWIDGETS) || defined(QT_UTILITIES_GUI_QTQUICK)
|
|
|
|
#ifdef Q_OS_WIN32
|
2016-08-29 15:41:11 +02:00
|
|
|
QColor QT_UTILITIES_EXPORT windowFrameColor();
|
|
|
|
QColor QT_UTILITIES_EXPORT instructionTextColor();
|
2017-05-01 03:16:25 +02:00
|
|
|
#endif
|
2016-08-29 15:41:11 +02:00
|
|
|
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);
|
2016-08-29 15:41:11 +02:00
|
|
|
void QT_UTILITIES_EXPORT cornerWidget(QWidget *widget);
|
|
|
|
void QT_UTILITIES_EXPORT makeHeading(QWidget *widget);
|
|
|
|
void QT_UTILITIES_EXPORT updateStyle(QWidget *widget);
|
2017-05-01 03:16:25 +02:00
|
|
|
#endif
|
2015-09-26 20:28:30 +02:00
|
|
|
#endif
|
|
|
|
|
2019-06-10 21:57:46 +02:00
|
|
|
} // namespace QtUtilities
|
2015-07-07 00:48:52 +02:00
|
|
|
|
|
|
|
#endif // DIALOGS_DIALOGUTILS_H
|