| 1 | // For license of this file, see <project-root-folder>/LICENSE.md. |
| 2 | |
| 3 | #ifndef GUIUTILITIES_H |
| 4 | #define GUIUTILITIES_H |
| 5 | |
| 6 | #include <QIcon> |
| 7 | #include <QLabel> |
| 8 | #include <QWidget> |
| 9 | |
| 10 | class RSSGUARD_DLLSPEC GuiUtilities { |
| 11 | public: |
| 12 | static void setLabelAsNotice(QLabel& label, bool is_warning, bool set_margins = true); |
| 13 | static void applyDialogProperties(QWidget& widget, const QIcon& icon = QIcon(), const QString& title = QString()); |
| 14 | static void fixTooBigDialog(QWidget& widget, bool move_to_center = true); |
| 15 | static void restoreState(QWidget* wdg, QByteArray state); |
| 16 | static QByteArray saveState(QWidget* wdg); |
| 17 | |
| 18 | static void loadDialogSize(QWidget& wdg); |
| 19 | static void saveSizeOnWidgetClosed(QWidget& wdg); |
| 20 | |
| 21 | private: |
| 22 | explicit GuiUtilities(); |
| 23 | }; |
| 24 | |
| 25 | inline GuiUtilities::GuiUtilities() {} |
| 26 | |
| 27 | #endif // GUIUTILITIES_H |