ATLAS Offline Software
Loading...
Searching...
No Matches
VP1Settings.cxx
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// Implementation of class VP1Settings //
9// //
10// Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
11// Initial version: December 2008 //
12// //
14
15#include "VP1Base/VP1Settings.h"
16#include "VP1Base/VP1QtUtils.h"
17
18#include <QFileInfo>
19#include <QDir>
20
21//____________________________________________________________________
23{
24 static QString thedir;
25 if (thedir.isEmpty()) {
26 #if defined BUILDVP1LIGHT
27 thedir = VP1QtUtils::expertSettingValue("expert","ExpertSettings/VP1_FILESELECTDIR");
28 #else
29 thedir = VP1QtUtils::environmentVariableValue("VP1_FILESELECTDIR");
30 #endif
31 if (thedir.isEmpty()||!QFileInfo(thedir).isDir()||!QFileInfo(thedir).exists())
32 thedir = QDir::currentPath();
33 }
34 return thedir;
35}
static QString expertSettingValue(const QString &type, const QString &name)
static QString environmentVariableValue(const QString &name)
static QString defaultFileSelectDirectory()
bool exists(const std::string &filename)
does a file exist