21 #include <QStringList> 54 static const Qt::WindowFlags ModalDialogFlags =
nullptr;
95 QString
const &filters, QStringList &selectedFiles, QString &enc, QString &title,
96 bool cancelAll =
false );
107 QPair<QString, QString> GUI_EXPORT
getSaveAsImageName( QWidget *parent,
const QString &message,
const QString &defaultFilename = QString() );
117 QString GUI_EXPORT
createFileFilter_( QString
const &longName, QString
const &glob );
138 QFont GUI_EXPORT
getFont(
bool &ok,
const QFont &initial,
const QString &title = QString() );
147 bool GUI_EXPORT
restoreGeometry( QWidget *widget,
const QString &keyName = QString() );
155 void GUI_EXPORT
saveGeometry( QWidget *widget,
const QString &keyName = QString() );
164 QString
createWidgetKey( QWidget *widget,
const QString &keyName = QString() );
183 QSize GUI_EXPORT
iconSize(
bool dockableToolbar =
false );
222 bool mHasOverride =
true;
254 std::vector< QCursor > mCursors;
258 #endif // QGSGUIUTILS_H QString createFileFilter_(QString const &longName, QString const &glob)
Convenience function for readily creating file filters.
Temporarily sets a cursor override for the QApplication for the lifetime of the object.
int scaleIconSize(int standardSize)
Scales an icon size to compensate for display pixel density, making the icon size hi-dpi friendly...
constexpr double CANVAS_MAGNIFICATION_MAX
Maximum magnification level allowed in map canvases.
QPair< QString, QString > GUI_EXPORT getSaveAsImageName(QWidget *parent, const QString &message, const QString &defaultFilename)
A helper function to get an image name from the user.
void saveGeometry(QWidget *widget, const QString &keyName)
Save the wigget geometry into settings.
bool restoreGeometry(QWidget *widget, const QString &keyName)
Restore the wigget geometry from settings.
QSize panelIconSize(QSize size)
Returns dockable panel toolbar icon width based on the provided window toolbar width.
The QgsGuiUtils namespace contains constants and helper functions used throughout the QGIS GUI...
QSize iconSize(bool dockableToolbar)
Returns the user-preferred size of a window's toolbar icons.
constexpr double CANVAS_MAGNIFICATION_MIN
Minimum magnification level allowed in map canvases.
QString createWidgetKey(QWidget *widget, const QString &keyName)
Creates a key for the given widget that can be used to store related data in settings.
Temporarily removes all cursor overrides for the QApplication for the lifetime of the object...
bool GUI_EXPORT openFilesRememberingFilter(QString const &filterName, QString const &filters, QStringList &selectedFiles, QString &enc, QString &title, bool cancelAll)
Open files, preferring to have the default file selector be the last one used, if any; also...
QFont getFont(bool &ok, const QFont &initial, const QString &title)
Show font selection dialog.