Description of TimeUnit

Home > BiKEGG > TimeUnit.m

# TimeUnit

## PURPOSE

TimeUnit(GUI)

## SYNOPSIS

function varargout = TimeUnit(varargin)

## DESCRIPTION

     TimeUnit(GUI)
     is prompted for each visualization task in KeggDraw
     to determine the time-serie unit of input data (in dynamic conditions).

## CROSS-REFERENCE INFORMATION

This function calls:

- TimeUnit TimeUnit(GUI)

This function is called by:

- KeggDraw KeggDraw
- TimeUnit TimeUnit(GUI)

## SUBFUNCTIONS

- function TimeUnit_OpeningFcn(hObject, eventdata, handles, varargin)
- function varargout = TimeUnit_OutputFcn(hObject, eventdata, handles)
- function InsertManuallyEdit_Callback(hObject, eventdata, handles)
- function InsertManuallyEdit_CreateFcn(hObject, eventdata, handles)
- function ChooseUipanel_SelectionChangeFcn(hObject, eventdata, handles)
- function OKPushbutton_Callback(hObject, eventdata, handles)

## SOURCE CODE

    0001 function varargout = TimeUnit(varargin)
    0002 % TimeUnit(GUI)
    0003 % is prompted for each visualization task in KeggDraw
    0004 % to determine the time-serie unit of input data (in dynamic conditions).
    0005
    0006 % O. Jamialahmadi
    0007 % TMU, Chem. Eng. Dept., Biotech. Group
    0008 % Mar. 2015
    0009
    0010 gui_Singleton = 1;
    0011 gui_State = struct('gui_Name',       mfilename, ...
    0012                    'gui_Singleton',  gui_Singleton, ...
    0013                    'gui_OpeningFcn', @TimeUnit_OpeningFcn, ...
    0014                    'gui_OutputFcn',  @TimeUnit_OutputFcn, ...
    0015                    'gui_LayoutFcn',  [] , ...
    0016                    'gui_Callback',   []);
    0017 if nargin && ischar(varargin{1})
    0018     gui_State.gui_Callback = str2func(varargin{1});
    0019 end
    0020
    0021 if nargout
    0022     [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
    0023 else
    0024     gui_mainfcn(gui_State, varargin{:});
    0025 end
    0026 % End initialization code - DO NOT EDIT
    0027
    0028
    0029 % --- Executes just before TimeUnit is made visible.
    0030 function TimeUnit_OpeningFcn(hObject, eventdata, handles, varargin)
    0031 handles.output = hObject;
    0032 guidata(hObject, handles);
    0033
    0034
    0035 % --- Outputs from this function are returned to the command line.
    0036 function varargout = TimeUnit_OutputFcn(hObject, eventdata, handles)
    0037
    0038 varargout{1} = handles.output;
    0039
    0040 function InsertManuallyEdit_Callback(hObject, eventdata, handles)
    0041
    0042 % --- Executes during object creation, after setting all properties.
    0043 function InsertManuallyEdit_CreateFcn(hObject, eventdata, handles)
    0044 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    0045     set(hObject,'BackgroundColor','white');
    0046 end
    0047
    0048 % --- Executes when selected object is changed in ChooseUipanel.
    0049 function ChooseUipanel_SelectionChangeFcn(hObject, eventdata, handles)
    0050
    0051 % --- Executes on button press in OKPushbutton.
    0052 function OKPushbutton_Callback(hObject, eventdata, handles)
    0053 IMedit=get(handles.InsertManuallyEdit, 'String');
    0054 if strcmp(IMedit,'Or Insert manually')
    0055     hSelectedObj=get(handles.ChooseUipanel, 'SelectedObject');
    0056     selectedObjTag=get(hSelectedObj, 'Tag');
    0057     switch selectedObjTag
    0058         case 'DonotshowRadio'
    0059             SelectString='NShow';
    0060         case 'SecondRadio'
    0061             SelectString='s';
    0062         case 'MinuteRadio'
    0063             SelectString='m';
    0064         case 'HourRadio'
    0065             SelectString='h';
    0066         case 'NoRadio'
    0067             SelectString='NO';
    0068     end
    0069 else
    0070     SelectString=IMedit;
    0071 end
    0072 setappdata(0,'SelectString',SelectString)
    0073 close(TimeUnit)