13 setWindowTitle(
"UltraScan III Registration" );
28 tr(
"UltraScan III Registration\nPlease enter all fields" ) );
31 QRect( xpos, ypos, width, spacing + 2 *
rowHeight ) );
44 connect(
le_firstname, SIGNAL( textChanged (
const QString& ) ),
49 QLabel* comma =
new QLabel(
",",
this );
50 comma->setGeometry( xpos, ypos, 10,
rowHeight );
57 connect(
le_lastname, SIGNAL( textChanged (
const QString& ) ),
64 QLabel*
email =
us_label( tr(
"E-mail Address:" ), 0, QFont::Bold );
71 connect(
le_email, SIGNAL( textChanged (
const QString& ) ),
93 address->setGeometry( xpos, ypos, buttonw,
rowHeight );
99 connect(
le_address, SIGNAL( textChanged (
const QString& ) ),
106 QLabel*
city =
us_label( tr(
"City:" ), 0, QFont::Bold );
107 city->setGeometry( xpos, ypos, buttonw,
rowHeight );
113 connect(
le_city, SIGNAL( textChanged(
const QString& ) ),
118 QLabel* lb_state =
us_label( tr(
"State:" ), 0, QFont::Bold );
124 states <<
"NON-US" <<
"AL" <<
"AR" <<
"AZ" <<
"CA" <<
"CO" <<
"CT"
125 <<
"DC" <<
"DE" <<
"FL" <<
"GA" <<
"HI" <<
"IA" <<
"ID"
126 <<
"IL" <<
"IN" <<
"KS" <<
"KY" <<
"LA" <<
"MA" <<
"MD"
127 <<
"ME" <<
"MI" <<
"MN" <<
"MO" <<
"MS" <<
"MT" <<
"NC"
128 <<
"ND" <<
"NE" <<
"NH" <<
"NJ" <<
"NM" <<
"NV" <<
"NY"
129 <<
"OH" <<
"OK" <<
"OR" <<
"PA" <<
"PR" <<
"RI" <<
"SC"
130 <<
"SD" <<
"TN" <<
"TX" <<
"UT" <<
"VA" <<
"VI" <<
"VT"
131 <<
"WA" <<
"WI" <<
"WV" <<
"WY" ;
137 connect(
cbb_state, SIGNAL( currentIndexChanged(
const QString& ) ),
142 QLabel*
zip =
us_label( tr(
"Zip:" ), 0, QFont::Bold );
149 connect(
le_zip, SIGNAL( textChanged(
const QString& ) ),
156 QLabel*
phone =
us_label( tr(
"Phone Number:" ), 0, QFont::Bold );
157 phone->setGeometry( xpos, ypos, buttonw,
rowHeight );
163 connect(
le_phone, SIGNAL( textChanged (
const QString& ) ),
168 QLabel* lb_licensetype =
us_label( tr(
"License:" ), 0, QFont::Bold );
174 types <<
"academic" <<
"commercial";
179 connect(
cbb_licensetype, SIGNAL( currentIndexChanged(
const QString& ) ),
190 QLabel* status =
us_banner( tr(
"License Status" ) );
191 status->setGeometry( QRect( xpos, ypos, width, spacing +
rowHeight ) );
196 gray.setColor( QPalette::Base, QColor( 0xe0, 0xe0, 0xe0 ) );
254 pb_update->setText(
"Finish Registration" );
267 connect(
pb_help, SIGNAL( clicked() ), SLOT(
help() ) );
273 connect(
pb_cancel, SIGNAL( clicked() ), SLOT( close() ) );
277 setMinimumSize( spacing + width + spacing, ypos );
290 QString title = phrase;
293 for (
int i = 0; i < title.size(); i++ )
295 QChar c = title[ i ];
297 if ( c == QChar(
' ' ) ) cap =
true;
301 title[ i ] = c.toUpper();
305 title[ i ] = c.toLower();
331 if ( license.size() >= 12 )
337 city = license [ 4 ];
338 state = license [ 5 ];
340 phone = license [ 7 ];
341 email = license [ 8 ];
347 if ( license.size() == 14 )
372 for (
int i = 0; i <
types.count(); i++ )
382 for (
int i = 0; i <
states.count(); i++ )
399 validMsg =
"Valid Registration";
403 validMsg =
"Expired Registration";
409 validMsg =
"Invalid Registration";
413 validMsg =
"Missing Registration";
417 validMsg =
"Pending Registration";
421 validMsg =
"Unknown";
438 QMessageBox::information (
this,
439 tr(
"Request Error" ),
440 tr(
"Your request is incomplete.\n"
441 "Please fill out all requested information." ) );
449 if ( license.size() > 8 )
452 if (
le_email->text() != license[ 8 ] )
454 int result = QMessageBox::question(
this,
455 tr(
"License Change" ),
456 tr(
"Your email address is changing.\n"
457 "You must validate your new address using new registration procedures.\n"
459 QMessageBox::Yes, QMessageBox::No );
461 if ( result == QMessageBox::No )
489 +
"&platform=" + PLATFORM
495 QString url =
"http://129.111.140.167/update-license.php";
497 connect( transmit, SIGNAL( US_Http_post_response(
const QString& ) ),
504 QStringList data = response.split(
"-" );
506 int error = data[ 0 ].toInt();
528 QMessageBox::information (
this,
529 tr(
"Update Error" ), response );
546 +
"&platform=" + PLATFORM
563 QString url =
"http://ultrascan.uthscsa.edu/request-license.php";
565 connect( transmit, SIGNAL( US_Http_post_response(
const QString& ) ),
571 QStringList data = response.split(
"-" );
573 int error = data[ 0 ].toInt();
578 pb_update->setText(
"Finish Registration" );
580 QMessageBox::information (
this,
581 tr(
"Request Success" ),
582 tr(
"You have been sent an email to confirm your request.\n"
583 "After you respond to the email, select 'Finish Registration'." ) );
588 QMessageBox::information (
this,
589 tr(
"Request Error" ),
614 message = tr(
"Failure.\n"
615 "The date of the registration is more than one year ago." );
619 message = tr(
"Failure.\n"
620 "The data presented is invalid." );
624 message = tr(
"Failure.\n"
625 "The wrong hardware architecture has been selected." );
629 message = tr(
"Failure.\n"
630 "The wrong operating system has been selected." );
635 message = tr(
"Success.\n"
636 "The registration has been saved successfully." );
642 message = tr(
"An unknown error occured." );
646 QMessageBox::information(
this, tr(
"License save results" ), message );
653 QRegExp blanks(
"(^\\s+)|(\\s+$)" );
655 s.replace( blanks,
"" );