Shlomi Fish avatar Shlomi Fish committed c0eae78

Changed Access to Result.

Comments (0)

Files changed (1)

minicalc/Window.pm

 use QtCore4::slots
     echoChanged => ['int'],
     alignmentChanged => ['int'],
-    accessChanged => ['int'];
+    ;
 
 sub echoLineEdit() {
     return this->{echoLineEdit};
     return this->{alignmentLineEdit} = shift;
 }
 
-sub accessLineEdit() {
-    return this->{accessLineEdit};
+sub resultLineEdit() {
+    return this->{resultLineEdit};
 }
 
 sub setAccessLineEdit() {
-    return this->{accessLineEdit} = shift;
+    return this->{resultLineEdit} = shift;
 }
 
 # [0]
 
     this->setAlignmentLineEdit( Qt::LineEdit() );
 
-    my $accessGroup = Qt::GroupBox(this->tr('Result:'));
+    my $resultGroup = Qt::GroupBox(this->tr('Result:'));
 
-    my $accessLabel = Qt::Label(this->tr('Result:'));
+    my $resultLabel = Qt::Label(this->tr('Result:'));
 
     this->setAccessLineEdit( Qt::LineEdit() );
 
-    this->accessLineEdit->setReadOnly(1);
+    this->resultLineEdit->setReadOnly(1);
     this->connect($alignmentComboBox, SIGNAL 'activated(int)',
             this, SLOT 'alignmentChanged(int)');
 
     $alignmentLayout->addWidget(this->alignmentLineEdit, 1, 0, 1, 2);
     $alignmentGroup->setLayout($alignmentLayout);
 
-    my $accessLayout = Qt::GridLayout();
-    $accessLayout->addWidget($accessLabel, 0, 0);
-    $accessLayout->addWidget(this->accessLineEdit, 1, 0, 1, 2);
-    $accessGroup->setLayout($accessLayout);
+    my $resultLayout = Qt::GridLayout();
+    $resultLayout->addWidget($resultLabel, 0, 0);
+    $resultLayout->addWidget(this->resultLineEdit, 1, 0, 1, 2);
+    $resultGroup->setLayout($resultLayout);
 # [7]
 
 # [8]
     my $layout = Qt::GridLayout();
     $layout->addWidget($validatorGroup, 0, 0);
     $layout->addWidget($validator2Group, 0, 1);
-    $layout->addWidget($accessGroup, 0, 2);
+    $layout->addWidget($resultGroup, 0, 2);
     this->setLayout($layout);
 
     this->setWindowTitle(this->tr('Line Edits'));
 }
 # [11]
 
-# [13]
-sub accessChanged {
-    my ($index) = @_;
-    if ( $index == 0 ) {
-        this->accessLineEdit->setReadOnly(0);
-    }
-    elsif ( $index == 1 ) {
-        this->accessLineEdit->setReadOnly(1);
-    }
-}
-# [13]
-
 1;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.