QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Functions | Variables
qgsguiutils.h File Reference
#include <QPair>
#include <QWidget>
#include <QStringList>
#include "qgis_gui.h"
#include "qgis.h"
Include dependency graph for qgsguiutils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  QgsTemporaryCursorOverride
 Temporarily sets a cursor override for the QApplication for the lifetime of the object. More...
 
class  QgsTemporaryCursorRestoreOverride
 Temporarily removes all cursor overrides for the QApplication for the lifetime of the object. More...
 
class  QWidgetUpdateBlocker
 Temporarily disables updates for a QWidget for the lifetime of the object. More...
 

Namespaces

namespace  QgsGuiUtils
 The QgsGuiUtils namespace contains constants and helper functions used throughout the QGIS GUI.
 

Macros

#define SIP_NO_FILE
 

Functions

QString QgsGuiUtils::createFileFilter_ (QString const &format)
 Create file filters suitable for use with QFileDialog.
 
QString QgsGuiUtils::createFileFilter_ (QString const &longName, QString const &glob)
 Convenience function for readily creating file filters.
 
QString QgsGuiUtils::createWidgetKey (QWidget *widget, const QString &keyName=QString())
 Creates a key for the given widget that can be used to store related data in settings.
 
QString QgsGuiUtils::displayValueWithMaximumDecimals (const Qgis::DataType dataType, const double value, bool displayTrailingZeroes=false)
 Returns a localized string representation of the value with the appropriate number of decimals supported by the dataType.
 
QFont QgsGuiUtils::getFont (bool &ok, const QFont &initial, const QString &title=QString())
 Show font selection dialog.
 
QPair< QString, QString > GUI_EXPORT QgsGuiUtils::getSaveAsImageName (QWidget *parent, const QString &message, const QString &defaultFilename=QString())
 A helper function to get an image name from the user.
 
QSize QgsGuiUtils::iconSize (bool dockableToolbar=false)
 Returns the user-preferred size of a window's toolbar icons.
 
bool GUI_EXPORT QgsGuiUtils::openFilesRememberingFilter (QString const &filterName, QString const &filters, QStringList &selectedFiles, QString &enc, QString &title, bool cancelAll=false)
 Open files, preferring to have the default file selector be the last one used, if any; also, prefer to start in the last directory associated with filterName.
 
QSize QgsGuiUtils::panelIconSize (QSize size)
 Returns dockable panel toolbar icon width based on the provided window toolbar width.
 
bool QgsGuiUtils::restoreGeometry (QWidget *widget, const QString &keyName=QString())
 Restore the wigget geometry from settings.
 
void QgsGuiUtils::saveGeometry (QWidget *widget, const QString &keyName=QString())
 Save the wigget geometry into settings.
 
int QgsGuiUtils::scaleIconSize (int standardSize)
 Scales an icon size to compensate for display pixel density, making the icon size hi-dpi friendly, whilst still resulting in pixel-perfect sizes for low-dpi displays.
 
int QgsGuiUtils::significantDigits (const Qgis::DataType rasterDataType)
 Returns the maximum number of significant digits a for the given rasterDataType.
 

Variables

constexpr double QgsGuiUtils::CANVAS_MAGNIFICATION_MAX = 16.0
 Maximum magnification level allowed in map canvases.
 
constexpr double QgsGuiUtils::CANVAS_MAGNIFICATION_MIN = 0.1
 Minimum magnification level allowed in map canvases.
 

Macro Definition Documentation

◆ SIP_NO_FILE

#define SIP_NO_FILE

Definition at line 24 of file qgsguiutils.h.