Package client :: Module Preferences :: Class GeneralPreferences
[hide private]
[frames] | no frames]

Class GeneralPreferences

source code


Overview

These are essentially the miscellaneous options that weren't grouped well enough to warrant their own section. They include such things as:

These settings get saved in ~/.basin/client/general.conf

Nested Classes [hide private]

Inherited from PyQt4.QtGui.QBoxLayout: Direction

Inherited from PyQt4.QtGui.QLayout: SizeConstraint

Instance Methods [hide private]
 
__init__(self, bridge)
GeneralPreferences.__init__ (self, bridge)
source code
 
getValues(self)
GeneralPreferences.getValues (self)
source code
 
saveSettings(self)
GeneralPreferences.saveSettings (self)
source code

Inherited from PyQt4.QtGui.QVBoxLayout: addChildLayout, addChildWidget, alignmentRect, childEvent, connectNotify, customEvent, disconnectNotify, insertItem, receivers, sender, timerEvent, widgetEvent

Inherited from PyQt4.QtGui.QBoxLayout: addItem, addLayout, addSpacing, addStretch, addStrut, addWidget, count, direction, expandingDirections, hasHeightForWidth, heightForWidth, insertLayout, insertSpacing, insertStretch, insertWidget, invalidate, itemAt, maximumSize, minimumHeightForWidth, minimumSize, setDirection, setGeometry, setStretchFactor, sizeHint, takeAt

Inherited from PyQt4.QtGui.QLayout: activate, closestAcceptableSize, geometry, indexOf, isEmpty, isEnabled, layout, margin, menuBar, parentWidget, removeItem, removeWidget, setAlignment, setEnabled, setMargin, setMenuBar, setSizeConstraint, setSpacing, sizeConstraint, spacing, totalHeightForWidth, totalMaximumSize, totalMinimumSize, totalSizeHint, update

Inherited from PyQt4.QtCore.QObject: blockSignals, children, connect, deleteLater, disconnect, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, emit, event, eventFilter, findChild, findChildren, inherits, installEventFilter, isWidgetType, killTimer, metaObject, moveToThread, objectName, parent, property, removeEventFilter, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, tr, trUtf8

Inherited from PyQt4.QtGui.QLayoutItem: alignment, spacerItem, widget

Inherited from sip.wrapper: __delattr__, __getattribute__, __new__, __setattr__

Inherited from object: __hash__, __reduce__, __reduce_ex__, __repr__, __str__

Class Variables [hide private]

Inherited from PyQt4.QtGui.QBoxLayout: BottomToTop, Down, LeftToRight, RightToLeft, TopToBottom, Up

Inherited from PyQt4.QtGui.QLayout: SetDefaultConstraint, SetFixedSize, SetMaximumSize, SetMinAndMaxSize, SetMinimumSize, SetNoConstraint

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, bridge)
(Constructor)

source code 

GeneralPreferences.__init__ (self, bridge)

The initialization of the General Preferences section of the Preferences dialog simply lays out a few simple options for the user.

It sets up a place to enter a default path for open/saving to default to.

It sets up three checkboxes for auto-guessing auto-inplace functions, and limiting output.

Overrides: object.__init__

getValues(self)

source code 

GeneralPreferences.getValues (self)

This method is generally only to be called initially. It retrieves the settings that it controls from the bridge.

The widgets which are affected from these settings need to be aware of the settings from the bridge, so this informs the preferences menu of what is already set.

If settings are then applied after this, they will both be saved to the bridge, where they will go into effect, but also to the conf file: ~/.basin/client/general.conf

saveSettings(self)

source code 

GeneralPreferences.saveSettings (self)

This is a fairly straight forward method which takes the current settings, regarldess of what they are, were, or anything, saves them to ~/.basin/client/general.conf

If the file didn't already exist, thats no problem and it will now. This will also make the bridge re-load the values from the newly created file.

In general, the format of the file ignores non newline whitespace. It follows the format:

 SETTING:value

Order is irrelevant!

Everything obviously gets saved as a string, to this needs to be kept in mind when re-loading at the bridge.