Tip: Click lines to highlight, hold ctrl/cmd to multi-select

PsuedoCode (24-Aug @ 17:51)

mrgenixus

Syntax Highlighted Code

  1. QFrame master:
  2.     QLabels [browse level (from stack 'ants')] Ants
  3.     QFrame [from current level] 'body'
  4.     QButton 'close'
  5.     QProgress [global operation status] 'curOp'
  6.     {
  7.         default QFrame: directory
  8.         qframeSwitch(frame)
  9.         {
  10.             body->emptyframe
  11.             reset curOp 0/0
  12.             while (!ready(frame)) ;;
  13.             body->frame
  14.         }
  15.         fileSum(fileId)
  16.         {
  17.             return stored filesum for CurrentFile
  18.         }
  19.         fileSumByName (fileURI)
  20.         {
  21.             return stored filesum for fileURI
  22.         }
  23.         fileIDfromName(fileURI)
  24.         {
  25.             return fileID for fileURI
  26.         }
  27.     }
  28.  
  29. QFrame directory
  30.     QLabel [access Errors] 'dirError'
  31.     QLabel [constant text] 'directory'
  32.     QUrlInput [defaults to most recent or dnaskittle.org/master.dir] 'directoryUrl'
  33.     QListBox [directories from settings] 'directoryHistory'
  34.     QButton 'read directory'
  35.     QButton 'load from history'
  36.     QButton 'operate locally'
  37.     {    
  38.         initialize curFileID
  39.        
  40.         read directory (loading)
  41.             update curOp from reply-status
  42.            
  43.         read directory:
  44.             if success:
  45.                 initialize directoryID, repoList, repoHist
  46.                 qframeSwitch(repositories)
  47.             else: error -> dirError
  48.            
  49.         load from history
  50.             initialize repoHist
  51.             qframeSwitch(repositories)
  52.            
  53.         operatelocally
  54.             local -> true
  55.             qframeSwitch(repositoryDashboard)
  56.            
  57.     }
  58.    
  59. QFrame repositories
  60.     QLabel [access Errors] 'repoError'
  61.     QLabel [constant text] 'repository'
  62.     QUrlInput [defaults to most recent or repository.dnaskittle.org] 'repositoryUrl'
  63.     QListBox [repositories from directory, history (two sections)] 'repositoryHistory'
  64.     QButton 'read repository'
  65.     {
  66.        
  67.         read repository
  68.             initialize repositoryID, repositoryName
  69.             if autheticated
  70.                 qframeSwitch(repositoryDashboard)
  71.             else
  72.                 qframeSwitch(authenticate)
  73.                
  74.         read repository (loading)
  75.             update curOp from reply-status
  76.     }
  77.  
  78. QFrame authenticate
  79.     QLabel [authentication Errors] 'authError'
  80.     QLabel 'username' QInput 'username'
  81.     QLabel 'password' QInput 'password'
  82.     QButton 'sign in'
  83.     {
  84.         'sign in':
  85.             if valid('username','password')
  86.                 initialize userID
  87.                 authenticated -> true
  88.                 qframeSwitch(repositoryDashboard)
  89.             else
  90.                 authError->"Invalid username/password"
  91.     }
  92.    
  93. QFrame repositoryDashboard
  94.     QLabel [operation errors] 'opError'
  95.     QGroup 'file maintenance'
  96.         QButton 'synchronize with server'
  97.         QButton 'edit file metaData' QCombo 'filename'
  98.     QGroup 'annotation maintenance'
  99.         QButton 'download by group'
  100.         QButton 'upload annotations'
  101.         QButton 'update annotations'
  102.         QButton 'remove annotations'
  103.     QButton 'log off'
  104.     {
  105.         'download by group':
  106.             qframeSwitch(groups)
  107.         'log off'
  108.             authenticated -> false
  109.             uninitialize userID
  110.             qframeSwich(repositories)
  111.     }
  112.        
  113.  
  114. QFrame groups
  115.     QLabel [annotation Fetch Errors] 'groupError'
  116.     QLabel [constant text] 'groups'
  117.     QInput [defaults to 'all'(0) (tokenize on ',')] 'groupID'
  118.     QListBox [list repository groups(by userid)] 'groupList'
  119.     QButton 'get annotations'
  120.     {
  121.         'get annotations':
  122.             initialize groups from groupID
  123.             get annotations by fileSum(curFileID), groups
  124.                 if success, count > 1
  125.                     initialize annotList
  126.                     qframeSwitch(annotations)
  127.                 else
  128.                     groupError -> "Unable to Fetch Annotations, network Error or no Annotations Found"
  129.                    
  130.             (loading)
  131.                 update curOp from reply-status
  132.     }
  133.        
  134. QFrame annotations
  135.     QLabel [annotation Fetch Errors] 'annotError'
  136.     QLabel [constant text] 'groups'
  137.     QInput [defaults to 'all'(0) (tokenize on ',')] 'groupID'
  138.     QListBox [list repository groups(by userid)] 'groupList'
  139.     QButton 'get annotations'
  140.     {
  141.         'get annotations':
  142.             get annotations by curFileID, groups
  143.                 if success, count > 1
  144.                     initialize annotList
  145.                     qframeSwitch(annotations)
  146.                 else
  147.                     groupError -> "Unable to Fetch Annotations, network Error or no Annotations Found"
  148.                    
  149.             (loading)
  150.                 update curOp from reply-status
  151.        
  152.     }
  153.  

Plain Code

QFrame master:
    QLabels [browse level (from stack 'ants')] Ants
    QFrame [from current level] 'body'
    QButton 'close'
    QProgress [global operation status] 'curOp'
    {
        default QFrame: directory
        qframeSwitch(frame)
        {
            body->emptyframe
            reset curOp 0/0
            while (!ready(frame)) ;;
            body->frame
        }
        fileSum(fileId)
        {
            return stored filesum for CurrentFile
        }
        fileSumByName (fileURI)
        {
            return stored filesum for fileURI
        }
        fileIDfromName(fileURI)
        {
            return fileID for fileURI
        }
    }

QFrame directory
    QLabel [access Errors] 'dirError'
    QLabel [constant text] 'directory'
    QUrlInput [defaults to most recent or dnaskittle.org/master.dir] 'directoryUrl'
    QListBox [directories from settings] 'directoryHistory'
    QButton 'read directory'
    QButton 'load from history'
    QButton 'operate locally'
    {    
        initialize curFileID
        
        read directory (loading)
            update curOp from reply-status
            
        read directory:
            if success:
                initialize directoryID, repoList, repoHist
                qframeSwitch(repositories)
            else: error -> dirError
            
        load from history
            initialize repoHist
            qframeSwitch(repositories)
            
        operatelocally
            local -> true
            qframeSwitch(repositoryDashboard)
            
    }
    
QFrame repositories
    QLabel [access Errors] 'repoError'
    QLabel [constant text] 'repository'
    QUrlInput [defaults to most recent or repository.dnaskittle.org] 'repositoryUrl'
    QListBox [repositories from directory, history (two sections)] 'repositoryHistory'
    QButton 'read repository'
    {
        
        read repository
            initialize repositoryID, repositoryName
            if autheticated
                qframeSwitch(repositoryDashboard)
            else
                qframeSwitch(authenticate)
                
        read repository (loading)
            update curOp from reply-status
    }

QFrame authenticate
    QLabel [authentication Errors] 'authError'
    QLabel 'username' QInput 'username'
    QLabel 'password' QInput 'password'
    QButton 'sign in'
    {
        'sign in':
            if valid('username','password')
                initialize userID
                authenticated -> true
                qframeSwitch(repositoryDashboard)
            else
                authError->"Invalid username/password"
    }
    
QFrame repositoryDashboard
    QLabel [operation errors] 'opError'
    QGroup 'file maintenance'
        QButton 'synchronize with server'
        QButton 'edit file metaData' QCombo 'filename'
    QGroup 'annotation maintenance'
        QButton 'download by group'
        QButton 'upload annotations'
        QButton 'update annotations'
        QButton 'remove annotations'
    QButton 'log off'
    {
        'download by group':
            qframeSwitch(groups)
        'log off'
            authenticated -> false
            uninitialize userID
            qframeSwich(repositories)
    }
        

QFrame groups
    QLabel [annotation Fetch Errors] 'groupError'
    QLabel [constant text] 'groups'
    QInput [defaults to 'all'(0) (tokenize on ',')] 'groupID'
    QListBox [list repository groups(by userid)] 'groupList'
    QButton 'get annotations'
    {
        'get annotations':
            initialize groups from groupID
            get annotations by fileSum(curFileID), groups
                if success, count > 1
                    initialize annotList
                    qframeSwitch(annotations)
                else
                    groupError -> "Unable to Fetch Annotations, network Error or no Annotations Found"
                    
            (loading)
                update curOp from reply-status
    }
        
QFrame annotations
    QLabel [annotation Fetch Errors] 'annotError'
    QLabel [constant text] 'groups'
    QInput [defaults to 'all'(0) (tokenize on ',')] 'groupID'
    QListBox [list repository groups(by userid)] 'groupList'
    QButton 'get annotations'
    {
        'get annotations':
            get annotations by curFileID, groups
                if success, count > 1
                    initialize annotList
                    qframeSwitch(annotations)
                else
                    groupError -> "Unable to Fetch Annotations, network Error or no Annotations Found"
                    
            (loading)
                update curOp from reply-status
        
    }

Permalink: http://codedumper.com/utoye