ATLAS Offline Software
VP1QtUtils.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
7 // //
8 // Header file for class VP1QtUtils //
9 // //
10 // Description: Misc. utilities. //
11 // //
12 // Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
13 // Initial version: April 2008 //
14 // //
16 
17 #ifndef VP1QTUTILS_H
18 #define VP1QTUTILS_H
19 
20 #include <QString>
21 //NB: Keep includes very few here!
22 class QImage;
23 
24 class VP1QtUtils {
25 public:
26 
28  // For getting/setting environment variables //
30 
31  static bool expertSettingIsSet(const QString& type, const QString& name);
32  static QString expertSettingValue(const QString& type, const QString& name);
33  static bool expertSettingIsOn(const QString& type, const QString& name);
34  static void setExpertSetting(const QString& type, const QString& name, const QString& content);
35 
36  static bool environmentVariableIsSet( const QString& name );//If variable is at all defined (returns true if variable has value "0")
37  static QString environmentVariableValue( const QString& name );//Returns "" if not defined.
38  static bool environmentVariableIsOn( const QString& name );//Returns false if undefined or value is "0", "", "false"/"off"/"no" (any capitalisation). Otherwise returns true.
39 
40  static void setEnvironmentVariable( const QString& name, const QString& content );
41  static void unsetEnvironmentVariable( const QString& name );
42 
44  // Image manipulations //
46 
47  static QImage fadeImage(QImage img0, QImage img1, double fadefact );
48 
49 private:
52 };
53 
54 #endif
VP1QtUtils::VP1QtUtils
VP1QtUtils()
VP1QtUtils::setEnvironmentVariable
static void setEnvironmentVariable(const QString &name, const QString &content)
Definition: VP1QtUtils.cxx:146
VP1QtUtils::~VP1QtUtils
~VP1QtUtils()
VP1QtUtils::expertSettingValue
static QString expertSettingValue(const QString &type, const QString &name)
Definition: VP1QtUtils.cxx:43
VP1QtUtils::environmentVariableValue
static QString environmentVariableValue(const QString &name)
Definition: VP1QtUtils.cxx:117
grepfile.content
string content
Definition: grepfile.py:56
VP1QtUtils::setExpertSetting
static void setExpertSetting(const QString &type, const QString &name, const QString &content)
Definition: VP1QtUtils.cxx:86
VP1QtUtils::expertSettingIsSet
static bool expertSettingIsSet(const QString &type, const QString &name)
Definition: VP1QtUtils.cxx:27
VP1QtUtils::environmentVariableIsOn
static bool environmentVariableIsOn(const QString &name)
Definition: VP1QtUtils.cxx:127
VP1QtUtils::environmentVariableIsSet
static bool environmentVariableIsSet(const QString &name)
Definition: VP1QtUtils.cxx:108
VP1QtUtils::expertSettingIsOn
static bool expertSettingIsOn(const QString &type, const QString &name)
Definition: VP1QtUtils.cxx:60
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
VP1QtUtils::unsetEnvironmentVariable
static void unsetEnvironmentVariable(const QString &name)
Definition: VP1QtUtils.cxx:161
VP1QtUtils::fadeImage
static QImage fadeImage(QImage img0, QImage img1, double fadefact)
Definition: VP1QtUtils.cxx:176
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
VP1QtUtils
Definition: VP1QtUtils.h:24