Isis Developer Reference
Preference.h
Go to the documentation of this file.
1 #ifndef Preference_h
2 #define Preference_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 
10 #include <string>
11 #include "Pvl.h"
12 
13 namespace Isis {
14  class Application;
15 
60  class Preference : public Pvl {
61 
62  public:
63  void Load(const QString &file);
64 
70  inline bool IsUnitTest() {
71  return p_unitTest;
72  }
73 
74  static Preference &Preferences(bool unitTest = false);
75 
76  private:
77  Preference();
78 
80  ~Preference() {};
81 
82  Preference(const Preference &p);
83  Preference &operator=(const Preference &p);
84 
85  static Preference *p_preference;
86  static bool p_unitTest;
89  static void Shutdown();
90  };
91 };
92 
93 #endif
Isis::PvlObject::clear
void clear()
Remove everything from the current PvlObject.
Definition: PvlObject.h:341
Isis::PvlKeyword::name
QString name() const
Returns the keyword name.
Definition: PvlKeyword.h:98
FileName.h
Isis::PvlObject::findGroup
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Definition: PvlObject.h:129
Isis::PvlObject::group
PvlGroup & group(const int index)
Return the group at the specified index.
Definition: PvlObject.cpp:452
Isis::IString::DownCase
IString DownCase()
Converts all upper case letters in the object IString into lower case characters.
Definition: IString.cpp:644
Isis::PvlKeyword
A single keyword-value pair.
Definition: PvlKeyword.h:82
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
Isis::PvlObject::groups
int groups() const
Returns the number of groups contained.
Definition: PvlObject.h:75
Isis::FileName::fileExists
bool fileExists() const
Returns true if the file exists; false otherwise.
Definition: FileName.cpp:449
Isis::PvlObject::hasGroup
bool hasGroup(const QString &name) const
Returns a boolean value based on whether the object has the specified group or not.
Definition: PvlObject.h:210
Isis::PvlContainer::hasKeyword
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
Definition: PvlContainer.cpp:159
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Preference.h
Isis::Preference::IsUnitTest
bool IsUnitTest()
Tests whether or not a file is a unitTest.
Definition: Preference.h:70
Isis::FileName::expanded
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
Definition: FileName.cpp:196
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Pvl.h
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Isis::Pvl::read
void read(const QString &file)
Loads PVL information from a stream.
Definition: Pvl.cpp:90
Isis::Preference
Reads user preferences from a data file.
Definition: Preference.h:60
Isis::PvlContainer::name
QString name() const
Returns the container name.
Definition: PvlContainer.h:63
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::PvlObject::addGroup
void addGroup(const Isis::PvlGroup &group)
Add a group to the object.
Definition: PvlObject.h:186
Isis::PvlContainer::deleteKeyword
void deleteKeyword(const QString &name)
Remove a specified keyword.
Definition: PvlContainer.cpp:97
IException.h
std
Namespace for the standard library.
Isis::Preference::Load
void Load(const QString &file)
Definition: Preference.cpp:28
Isis::PvlContainer::keywords
int keywords() const
Returns the number of keywords contained in the PvlContainer.
Definition: PvlContainer.h:86
Isis::IString
Adds specific functionality to C++ strings.
Definition: IString.h:165
Isis::Preference::Preferences
static Preference & Preferences(bool unitTest=false)
Definition: Preference.cpp:86
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::IString::ToQt
QString ToQt() const
Retuns the object string as a QString.
Definition: IString.cpp:869
Isis::IException::User
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
Definition: IException.h:126