~ubuntu-branches/ubuntu/maverick/ktechlab/maverick

« back to all changes in this revision

Viewing changes to src/electronics/components/magnitudecomparator.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Georges Khaznadar
  • Date: 2009-02-09 00:28:49 UTC
  • mfrom: (5.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090209002849-9o8eqqiczqo4vat3
Tags: 0.3.6-4
modified debian/rules so it does not invoke make if there is no 
Makefile
Closes: #514552

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
LibraryItem* MagnitudeComparator::libraryItem()
24
24
{
25
25
        return new LibraryItem(
26
 
                        QString("ec/magnitudecomparator"),
 
26
                        "ec/magnitudecomparator",
27
27
        i18n("Magnitude Comparator"),
28
28
        i18n("Integrated Circuits"),
29
29
        "ic1.png",
36
36
        : Component( icnDocument, newItem, id ? id : "magnitudecomparator" )
37
37
{
38
38
        m_name = i18n("Magnitude Comparator");
39
 
//      m_desc = i18n("Compares to two binary number and generates input to indicate which binary number has greater magnitude. It has 3 cascading inputs: I0 for I<SUB>A &gt; B</SUB>, I1 for I<SUB>A &lt; B</SUB>, and I2 for I<SUB>A = B</SUB> and 3 outputs: O0 for O<SUB>A &gt; B</SUB>, O1 for O<SUB>A &lt; B</SUB>, and O2 for O<SUB>A = B</SUB>");
40
 
        m_desc = i18n("Compares two binary numbers and generates output to indicate which binary number has the greater magnitude. It has 3 cascading inputs:"
41
 
                        "<ul><li>I: A &gt; B</li>"
42
 
                        "<li>I: A &lt; B</li>"
43
 
                        "<li>I: A = B</li></ul>"
44
 
                        "and 3 outputs:"
45
 
                        "<ul><li>O: A &gt; B</li>"
46
 
                        "<li>O: A &lt; B</li>"
47
 
                        "<li>O: A = B</li></ul>");
48
39
        
49
40
        createProperty( "numInput", Variant::Type::Int );
50
41
        property("numInput")->setCaption( i18n("Number Inputs") );
92
83
        
93
84
        if ( m_cLogic[2]->isHigh() )
94
85
                m_output[2]->setHigh(true);
95
 
        else if ( m_cLogic[0]->isHigh() )
 
86
        else if ( m_cLogic[0]->isHigh() ) {
96
87
                if ( !m_cLogic[1]->isHigh() )
97
88
                        m_output[0]->setHigh(true);
98
 
        else
99
 
                ;
100
 
        else if ( m_cLogic[1]->isHigh() )
 
89
        } else if ( m_cLogic[1]->isHigh() )
101
90
                m_output[1]->setHigh(true);
102
91
        else {
103
92
                m_output[0]->setHigh(true);