|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.jhu.cs.oose.elevel.preferences.Preferences
public class Preferences
Stores preferences for the E-Level application, implementing QSettings.
| Method Summary | |
|---|---|
void |
changeExportLocation(com.trolltech.qt.gui.QWidget parent,
java.lang.String text)
Prompts the user for input if there is not a default directory |
static Preferences |
getInstance()
Get the singleton instance of this class |
java.util.List<java.lang.String> |
getPreviouslyOpenDecks()
Returns a list of file locations for the previously open decks |
java.util.Map<java.lang.String,java.lang.String> |
getTestingPreferences()
Returns a Map containing all the testing preferences |
java.lang.String |
getValue(java.lang.String key)
Get the preference with the specified name |
boolean |
hasExportLocation()
Returns whether or not the program has a default export location that exists on disk. |
void |
setDefault(boolean overwrite)
Set the default settings on the first run |
void |
setDefaultLocation()
Set the default export location to a platform-dependent location on disk |
void |
setValue(java.lang.String key,
java.lang.String value)
Set the preference represented by the specified key to the specified value, to be written on close |
void |
writeSettings()
Write all the current settings out to a file on disk |
void |
writeSettings(java.util.List<Deck> openDecks)
Write all the current settings out to a file on disk |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Preferences getInstance()
public void changeExportLocation(com.trolltech.qt.gui.QWidget parent,
java.lang.String text)
public java.util.Map<java.lang.String,java.lang.String> getTestingPreferences()
Map containing all the testing preferences
Map containing all the testing preferencespublic java.lang.String getValue(java.lang.String key)
key - A String representing the name of the preference
Object representing the value of the specified preferencepublic boolean hasExportLocation()
true if the program has a default export location and the directory exists on disk,
false otherwise.public java.util.List<java.lang.String> getPreviouslyOpenDecks()
public void setDefault(boolean overwrite)
public void setDefaultLocation()
public void setValue(java.lang.String key,
java.lang.String value)
key - A String representing the name of a preferencevalue - A Object representing the value of the preferencepublic void writeSettings()
public void writeSettings(java.util.List<Deck> openDecks)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||