QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
qgisgui.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgisgui.h - Constants used throughout the QGIS GUI.
3  --------------------------------------
4  Date : 11-Jan-2006
5  Copyright : (C) 2006 by Tom Elwertowski
6  Email : telwertowski at users dot sourceforge dot net
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 #ifndef QGISGUI_H
16 #define QGISGUI_H
17 
18 #include <Qt>
19 #include <QPair>
20 #include <QWidget>
21 #include <QStringList>
22 
23 class QFont;
24 
30 namespace QgisGui
31 {
32 
50  static const Qt::WindowFlags ModalDialogFlags = nullptr;
51 
57  static const double CANVAS_MAGNIFICATION_MIN = 0.1;
58 
64  // Must be a factor of 2, so zooming in to max from 100% then zooming back out will result in 100% mag
65  static const double CANVAS_MAGNIFICATION_MAX = 16.0;
66 
90  bool GUI_EXPORT openFilesRememberingFilter( QString const &filterName,
91  QString const &filters, QStringList & selectedFiles, QString& enc, QString &title,
92  bool cancelAll = false );
93 
102  QPair<QString, QString> GUI_EXPORT getSaveAsImageName( QWidget * theParent, const QString& theMessage, const QString& defaultFilename = QString::null );
103 
112  QString GUI_EXPORT createFileFilter_( QString const &longName, QString const &glob );
113 
120  QString GUI_EXPORT createFileFilter_( QString const &format );
121 
129  QFont GUI_EXPORT getFont( bool &ok, const QFont &initial, const QString &title = QString() );
130 }
131 
132 #endif
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...
Definition: qgisgui.cpp:28
static const Qt::WindowFlags ModalDialogFlags
Definition: qgisgui.h:50
/namespace QgisGui The QgisGui namespace contains constants and helper functions used throughout the ...
Definition: qgisgui.cpp:25
QFont getFont(bool &ok, const QFont &initial, const QString &title)
Show font selection dialog.
Definition: qgisgui.cpp:191
QString createFileFilter_(QString const &longName, QString const &glob)
Convenience function for readily creating file filters.
Definition: qgisgui.cpp:179
static const double CANVAS_MAGNIFICATION_MIN
Minimum magnification level allowed in map canvases.
Definition: qgisgui.h:57
QPair< QString, QString > GUI_EXPORT getSaveAsImageName(QWidget *theParent, const QString &theMessage, const QString &defaultFilename)
A helper function to get an image name from the user.
Definition: qgisgui.cpp:86
typedef WindowFlags
static const double CANVAS_MAGNIFICATION_MAX
Maximum magnification level allowed in map canvases.
Definition: qgisgui.h:65