~paulbrianstewart/ubuntu/oneiric/tellico/852247-Formatting-Fix

« back to all changes in this revision

Viewing changes to src/isbnvalidator.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Hermann
  • Date: 2008-01-31 19:33:05 UTC
  • mfrom: (0.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20080131193305-9l01m5gfhykl6pkl
Tags: 1.3-1ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/control: build-dep on kdepim-dev
  - debian/control: drop versioned python from tellico-data suggests
  - debian/rules: call dh_icons

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
  return isbn10;
49
49
}
50
50
 
 
51
QString ISBNValidator::cleanValue(QString isbn) {
 
52
  isbn.remove(QRegExp(QString::fromLatin1("[^xX0123456789]")));
 
53
  return isbn;
 
54
}
 
55
 
51
56
ISBNValidator::ISBNValidator(QObject* parent_, const char* name_/*=0*/)
52
57
    : QValidator(parent_, name_) {
53
58
}
441
446
  ISBNGRP_1DIGIT(2,     ISBNPUB_6DIGIT(949999),  7, 9),
442
447
  ISBNGRP_1DIGIT(2,     ISBNPUB_7DIGIT(9999999), 8, 9),
443
448
 
 
449
  /* Group 2 : German */
 
450
  ISBNGRP_1DIGIT(3,     ISBNPUB_2DIGIT(19),      3, 9),
 
451
  ISBNGRP_1DIGIT(3,     ISBNPUB_3DIGIT(699),     4, 9),
 
452
  ISBNGRP_1DIGIT(3,     ISBNPUB_4DIGIT(8499),    5, 9),
 
453
  ISBNGRP_1DIGIT(3,     ISBNPUB_5DIGIT(89999),   6, 9),
 
454
  ISBNGRP_1DIGIT(3,     ISBNPUB_6DIGIT(949999),  7, 9),
 
455
  ISBNGRP_1DIGIT(3,     ISBNPUB_7DIGIT(9999999), 8, 9),
 
456
 
444
457
  ISBNGRP_1DIGIT(7,     ISBNPUB_2DIGIT(99),      0, 9),
 
458
  /* Group 80 : Czech */
 
459
  ISBNGRP_2DIGIT(80,    ISBNPUB_2DIGIT(19),      4, 9),
 
460
  ISBNGRP_2DIGIT(80,    ISBNPUB_3DIGIT(699),     5, 9),
 
461
  ISBNGRP_2DIGIT(80,    ISBNPUB_4DIGIT(8499),    6, 9),
 
462
  ISBNGRP_2DIGIT(80,    ISBNPUB_5DIGIT(89999),   7, 9),
 
463
  ISBNGRP_2DIGIT(80,    ISBNPUB_6DIGIT(949999),  8, 9),
 
464
 
 
465
  /* Group 90 * Netherlands */
 
466
  ISBNGRP_2DIGIT(90,    ISBNPUB_2DIGIT(19),      4, 9),
 
467
  ISBNGRP_2DIGIT(90,    ISBNPUB_3DIGIT(499),     5, 9),
 
468
  ISBNGRP_2DIGIT(90,    ISBNPUB_4DIGIT(6999),    6, 9),
 
469
  ISBNGRP_2DIGIT(90,    ISBNPUB_5DIGIT(79999),   7, 9),
 
470
  ISBNGRP_2DIGIT(90,    ISBNPUB_6DIGIT(849999),  8, 9),
 
471
  ISBNGRP_2DIGIT(90,    ISBNPUB_4DIGIT(8999),    6, 9),
 
472
  ISBNGRP_2DIGIT(90,    ISBNPUB_7DIGIT(9999999), 9, 9),
 
473
 
445
474
  ISBNGRP_2DIGIT(94,    ISBNPUB_2DIGIT(99),      0, 9),
446
475
  ISBNGRP_3DIGIT(993,   ISBNPUB_2DIGIT(99),      0, 9),
447
476
  ISBNGRP_4DIGIT(9989,  ISBNPUB_2DIGIT(99),      0, 9),