~ubuntu-branches/ubuntu/wily/udj-desktop-client/wily

« back to all changes in this revision

Viewing changes to src/AddressWidget.cpp

  • Committer: Package Import Robot
  • Author(s): Nathan Handler
  • Date: 2012-11-14 15:29:07 UTC
  • mfrom: (1.2.1) (4.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20121114152907-8uj9bwcima77vu28
Tags: 0.6.3-1
* New upstream release
* debian/copyright: Add stanzas for new upstream files
* debian/rules:
  - Do not install ./usr/share/doc/udj/UDJ.1
  - Remove /usr/share/doc/udj directory if it is empty
* debian/control:
  - Bump Standards-Version to 3.9.4 (no changes)
  - Use my @debian.org address for the Maintainer field

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
  setupStateCombo(state);
40
40
  zipcodeEdit = new QLineEdit(zipcode);
41
41
  QFormLayout *formLayout = new QFormLayout;
42
 
  formLayout->addRow(tr("Address:"), streetAddressEdit);
43
 
  formLayout->addRow(tr("City:"), cityEdit);
 
42
  formLayout->addRow(tr("Address (Optional):"), streetAddressEdit);
 
43
  formLayout->addRow(tr("City (Optional):"), cityEdit);
44
44
  formLayout->addRow(tr("State:"), stateCombo);
45
45
  formLayout->addRow(tr("Zipcode:"), zipcodeEdit);
46
46
  setLayout(formLayout);
59
59
  return stateCombo->currentText();
60
60
}
61
61
 
62
 
int AddressWidget::getZipcode() const{
63
 
  return zipcodeEdit->text().toInt();
 
62
QString AddressWidget::getZipcode() const{
 
63
  return zipcodeEdit->text();
64
64
}
65
65
 
66
66
 
67
67
QString AddressWidget::getBadInputs() const{
68
68
  QString toReturn ="";
69
 
  int errorCounter = 1;
 
69
/*  int errorCounter = 1;
70
70
  if(streetAddressEdit->text() == ""){
71
71
    toReturn += QString::number(errorCounter++) + 
72
72
      ". You did not enter a street address.\n";
78
78
  if(!getZipcodeRegex().exactMatch(zipcodeEdit->text())){
79
79
    toReturn += QString::number(errorCounter++) + 
80
80
      ". Zipcode invalid.";
81
 
  }
 
81
  }*/
82
82
  return toReturn;
83
83
}
84
84