QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
qgsauthguiutils.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsauthguiutils.h
3  ---------------------
4  begin : October 24, 2014
5  copyright : (C) 2014 by Boundless Spatial, Inc. USA
6  author : Larry Shaffer
7  email : lshaffer at boundlessgeo dot com
8  ***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 
17 #ifndef QGSAUTHGUIUTILS_H
18 #define QGSAUTHGUIUTILS_H
19 
20 #include <QColor>
21 
22 class QWidget;
23 class QgsMessageBar;
24 
25 
30 class GUI_EXPORT QgsAuthGuiUtils
31 {
32  public:
33 
35  static QColor greenColor();
36 
38  static QColor orangeColor();
39 
41  static QColor redColor();
42 
44  static QColor yellowColor();
45 
47  static QString greenTextStyleSheet( const QString& selector = "*" );
48 
50  static QString orangeTextStyleSheet( const QString& selector = "*" );
51 
53  static QString redTextStyleSheet( const QString& selector = "*" );
54 
55 
57  static bool isDisabled( QgsMessageBar *msgbar, int timeout = 0 );
58 
60  static void setMasterPassword( QgsMessageBar *msgbar, int timeout = 0 );
61 
63  static void clearCachedMasterPassword( QgsMessageBar *msgbar, int timeout = 0 );
64 
66  static void resetMasterPassword( QgsMessageBar *msgbar, int timeout = 0, QWidget *parent = nullptr );
67 
69  static void clearCachedAuthenticationConfigs( QgsMessageBar *msgbar, int timeout = 0 );
70 
72  static void removeAuthenticationConfigs( QgsMessageBar *msgbar, int timeout = 0, QWidget *parent = nullptr );
73 
75  static void eraseAuthenticationDatabase( QgsMessageBar *msgbar, int timeout = 0, QWidget *parent = nullptr );
76 
78  static void fileFound( bool found, QWidget * widget );
79 
81  static QString getOpenFileName( QWidget *parent, const QString& title, const QString& extfilter );
82 };
83 
84 #endif // QGSAUTHGUIUTILS_H
A bar for displaying non-blocking messages to the user.
Definition: qgsmessagebar.h:42
Utility functions for use by authentication GUI widgets or standalone apps.