QGIS API Documentation  2.12.0-Lyon
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 
29 class GUI_EXPORT QgsAuthGuiUtils
30 {
31  public:
32 
34  static QColor greenColor();
35 
37  static QColor orangeColor();
38 
40  static QColor redColor();
41 
43  static QColor yellowColor();
44 
46  static QString greenTextStyleSheet( const QString& selector = "*" );
47 
49  static QString orangeTextStyleSheet( const QString& selector = "*" );
50 
52  static QString redTextStyleSheet( const QString& selector = "*" );
53 
54 
56  static bool isDisabled( QgsMessageBar *msgbar, int timeout = 0 );
57 
59  static void setMasterPassword( QgsMessageBar *msgbar, int timeout = 0 );
60 
62  static void clearCachedMasterPassword( QgsMessageBar *msgbar, int timeout = 0 );
63 
65  static void resetMasterPassword( QgsMessageBar *msgbar, int timeout = 0, QWidget *parent = 0 );
66 
68  static void clearCachedAuthenticationConfigs( QgsMessageBar *msgbar, int timeout = 0 );
69 
71  static void removeAuthenticationConfigs( QgsMessageBar *msgbar, int timeout = 0, QWidget *parent = 0 );
72 
74  static void eraseAuthenticationDatabase( QgsMessageBar *msgbar, int timeout = 0, QWidget *parent = 0 );
75 
77  static void fileFound( bool found, QWidget * widget );
78 
80  static QString getOpenFileName( QWidget *parent, const QString& title, const QString& extfilter );
81 };
82 
83 #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.