next up previous contents
Next: 7.3 AnalysisPlugins Up: 7 SAM Graphical User Previous: 7.1 Controller   Contents

Subsections

7.2 Logger

7.2.1 Logger class

The main Logger window consists of a GtkWindow containing a GtkHBox with two main entries: a GtkVBox for settings, and a GtkVBox for status. When the user first opens the window, the settings are all available and the status widgets are greyed out and insensitive, to show that they are not currently applicable. When the user begins logging, by selecting settings and then clicking on the `Begin Logging' button, the settings become greyed out and insensitive and the status of the current logging becomes available. In this way it is clear to the user what is happening at any point in time, and what if any input is expected of them.

The settings GtkVBox features clear left-aligned headings for each field, allowing the user to quickly identify a field's location. GtkSpinButtons are used for all numeric entry values, giving the user a clear range of valid entry values, and making it harder for the user to enter an invalid value. The interval GtkSpinButton also changes in range and step value depending on whether the `ms' or `packets' GtkRadioButton is selected. If the value a user entered was previously valid, but is no longer with the change, the value is altered to be the nearest value in the new range. This again makes it harder for the user to enter an invalid value.

The use of a `Close' button rather than a `Cancel' button indicates to the user that the window does not close automatically after logging has been performed. This allows the user to run multiple consecutive logging runs by simply leaving the window open and creating logs whenever desired.

To aid in the common cases of selecting all fields, and clearing the current selection of fields, there are buttons for 'Select All Fields' and 'Deselect All Fields'. These allow the user to quickly select either all or none of the fields. These buttons also have shortcut keys, both the same as for selecting streams in the main window, but also through the use of ALT key combinations with an underscore showing the key to be pressed along with ALT.

Figure 20: The widgets used in SAM's Logger class
\includegraphics[width=12.61cm]{diagrams/logger-window}

Figure 21: The widget tree for SAM's Logger class

Widget Name Widget Class Signals Handlers
close_button GtkButton clicked self.hide()
end_button GtkButton clicked self.end()
field_list GtkList select_child self.handleSelected()
    unselect_child self.handleSelected()
logger_window GtkWindow destroy self.hide()
logging_button GtkButton clicked self.begin()
ms_radiobutton GtkButton toggled self.intervalToggle()
packets_radiobutton GtkButton toggled self.intervalToggle()
selectallbutton GtkButton clicked self.handleFieldButtons()
dselectallbuttont GtkButton clicked self.handleFieldButtons()


next up previous contents
Next: 7.3 AnalysisPlugins Up: 7 SAM Graphical User Previous: 7.1 Controller   Contents