Browse Source

store inverse code as a sequence of 1s and 2s into an integer

convert-to-qt5
Wes Hardaker 11 years ago
parent
commit
554bced174
  1. 246
      inverse_code.h

246
inverse_code.h

@ -1,163 +1,163 @@
qlist = QList<Morse::ditdah>();
qlist << Morse::DIT << Morse::DAH;
inverseCode[qlist] = 'a';
qlist = QList<Morse::ditdah>();
qlist << Morse::DAH << Morse::DIT << Morse::DIT << Morse::DIT;
inverseCode[qlist] = 'b';
intCode = 0x12;
inverseCode[intCode] = 'a';
qlist = QList<Morse::ditdah>();
qlist << Morse::DAH << Morse::DIT << Morse::DAH << Morse::DIT;
inverseCode[qlist] = 'c';
qlist = QList<Morse::ditdah>();
qlist << Morse::DAH << Morse::DIT << Morse::DIT;
inverseCode[qlist] = 'd';
intCode = 0x2111;
inverseCode[intCode] = 'b';
qlist = QList<Morse::ditdah>();
qlist << Morse::DIT;
inverseCode[qlist] = 'e';
qlist = QList<Morse::ditdah>();
qlist << Morse::DIT << Morse::DIT << Morse::DAH << Morse::DIT;
inverseCode[qlist] = 'f';
intCode = 0x2121;
inverseCode[intCode] = 'c';
qlist = QList<Morse::ditdah>();
qlist << Morse::DAH << Morse::DAH << Morse::DIT;
inverseCode[qlist] = 'g';
qlist = QList<Morse::ditdah>();
qlist << Morse::DIT << Morse::DIT << Morse::DIT << Morse::DIT;
inverseCode[qlist] = 'h';
intCode = 0x211;
inverseCode[intCode] = 'd';
qlist = QList<Morse::ditdah>();
qlist << Morse::DIT << Morse::DIT;
inverseCode[qlist] = 'i';
qlist = QList<Morse::ditdah>();
qlist << Morse::DIT << Morse::DAH << Morse::DAH << Morse::DAH;
inverseCode[qlist] = 'j';
intCode = 0x1;
inverseCode[intCode] = 'e';
qlist = QList<Morse::ditdah>();
qlist << Morse::DAH << Morse::DIT << Morse::DAH;
inverseCode[qlist] = 'k';
qlist = QList<Morse::ditdah>();
qlist << Morse::DIT << Morse::DAH << Morse::DIT << Morse::DIT;
inverseCode[qlist] = 'l';
intCode = 0x1121;
inverseCode[intCode] = 'f';
qlist = QList<Morse::ditdah>();
qlist << Morse::DAH << Morse::DAH;
inverseCode[qlist] = 'm';
qlist = QList<Morse::ditdah>();
qlist << Morse::DAH << Morse::DIT;
inverseCode[qlist] = 'n';
intCode = 0x221;
inverseCode[intCode] = 'g';
qlist = QList<Morse::ditdah>();
qlist << Morse::DAH << Morse::DAH << Morse::DAH;
inverseCode[qlist] = 'o';
qlist = QList<Morse::ditdah>();
qlist << Morse::DIT << Morse::DAH << Morse::DAH << Morse::DIT;
inverseCode[qlist] = 'p';
intCode = 0x1111;
inverseCode[intCode] = 'h';
qlist = QList<Morse::ditdah>();
qlist << Morse::DAH << Morse::DAH << Morse::DIT << Morse::DAH;
inverseCode[qlist] = 'q';
qlist = QList<Morse::ditdah>();
qlist << Morse::DIT << Morse::DAH << Morse::DIT;
inverseCode[qlist] = 'r';
intCode = 0x11;
inverseCode[intCode] = 'i';
qlist = QList<Morse::ditdah>();
qlist << Morse::DIT << Morse::DIT << Morse::DIT;
inverseCode[qlist] = 's';
qlist = QList<Morse::ditdah>();
qlist << Morse::DAH;
inverseCode[qlist] = 't';
intCode = 0x1222;
inverseCode[intCode] = 'j';
qlist = QList<Morse::ditdah>();
qlist << Morse::DIT << Morse::DIT << Morse::DAH;
inverseCode[qlist] = 'u';
qlist = QList<Morse::ditdah>();
qlist << Morse::DIT << Morse::DIT << Morse::DIT << Morse::DAH;
inverseCode[qlist] = 'v';
intCode = 0x212;
inverseCode[intCode] = 'k';
qlist = QList<Morse::ditdah>();
qlist << Morse::DIT << Morse::DAH << Morse::DAH;
inverseCode[qlist] = 'w';
qlist = QList<Morse::ditdah>();
qlist << Morse::DAH << Morse::DIT << Morse::DIT << Morse::DAH;
inverseCode[qlist] = 'x';
intCode = 0x1211;
inverseCode[intCode] = 'l';
qlist = QList<Morse::ditdah>();
qlist << Morse::DAH << Morse::DIT << Morse::DAH << Morse::DAH;
inverseCode[qlist] = 'y';
qlist = QList<Morse::ditdah>();
qlist << Morse::DAH << Morse::DAH << Morse::DIT << Morse::DIT;
inverseCode[qlist] = 'z';
intCode = 0x22;
inverseCode[intCode] = 'm';
qlist = QList<Morse::ditdah>();
qlist << Morse::DAH << Morse::DAH << Morse::DAH << Morse::DAH << Morse::DAH;
inverseCode[qlist] = '0';
qlist = QList<Morse::ditdah>();
qlist << Morse::DIT << Morse::DAH << Morse::DAH << Morse::DAH << Morse::DAH;
inverseCode[qlist] = '1';
intCode = 0x21;
inverseCode[intCode] = 'n';
qlist = QList<Morse::ditdah>();
qlist << Morse::DIT << Morse::DIT << Morse::DAH << Morse::DAH << Morse::DAH;
inverseCode[qlist] = '2';
qlist = QList<Morse::ditdah>();
qlist << Morse::DIT << Morse::DIT << Morse::DIT << Morse::DAH << Morse::DAH;
inverseCode[qlist] = '3';
intCode = 0x222;
inverseCode[intCode] = 'o';
qlist = QList<Morse::ditdah>();
qlist << Morse::DIT << Morse::DIT << Morse::DIT << Morse::DIT << Morse::DAH;
inverseCode[qlist] = '4';
qlist = QList<Morse::ditdah>();
qlist << Morse::DIT << Morse::DIT << Morse::DIT << Morse::DIT << Morse::DIT;
inverseCode[qlist] = '5';
intCode = 0x1221;
inverseCode[intCode] = 'p';
qlist = QList<Morse::ditdah>();
qlist << Morse::DAH << Morse::DIT << Morse::DIT << Morse::DIT << Morse::DIT;
inverseCode[qlist] = '6';
qlist = QList<Morse::ditdah>();
qlist << Morse::DAH << Morse::DAH << Morse::DIT << Morse::DIT << Morse::DIT;
inverseCode[qlist] = '7';
intCode = 0x2212;
inverseCode[intCode] = 'q';
qlist = QList<Morse::ditdah>();
qlist << Morse::DAH << Morse::DAH << Morse::DAH << Morse::DIT << Morse::DIT;
inverseCode[qlist] = '8';
qlist = QList<Morse::ditdah>();
qlist << Morse::DAH << Morse::DAH << Morse::DAH << Morse::DAH << Morse::DIT;
inverseCode[qlist] = '9';
intCode = 0x121;
inverseCode[intCode] = 'r';
qlist = QList<Morse::ditdah>();
qlist << Morse::DIT << Morse::DAH << Morse::DIT << Morse::DAH << Morse::DIT << Morse::DAH;
inverseCode[qlist] = '.';
qlist = QList<Morse::ditdah>();
qlist << Morse::DAH << Morse::DAH << Morse::DIT << Morse::DIT << Morse::DAH << Morse::DAH;
inverseCode[qlist] = ',';
intCode = 0x111;
inverseCode[intCode] = 's';
qlist = QList<Morse::ditdah>();
qlist << Morse::DAH << Morse::DIT << Morse::DIT << Morse::DAH << Morse::DIT;
inverseCode[qlist] = '/';
qlist = QList<Morse::ditdah>();
qlist << Morse::DIT << Morse::DIT << Morse::DAH << Morse::DAH << Morse::DIT << Morse::DIT;
inverseCode[qlist] = '?';
intCode = 0x2;
inverseCode[intCode] = 't';
qlist = QList<Morse::ditdah>();
qlist << Morse::DAH << Morse::DIT << Morse::DIT << Morse::DIT << Morse::DAH;
inverseCode[qlist] = '=';
intCode = 0x112;
inverseCode[intCode] = 'u';
intCode = 0x1112;
inverseCode[intCode] = 'v';
intCode = 0x122;
inverseCode[intCode] = 'w';
intCode = 0x2112;
inverseCode[intCode] = 'x';
intCode = 0x2122;
inverseCode[intCode] = 'y';
intCode = 0x2211;
inverseCode[intCode] = 'z';
intCode = 0x22222;
inverseCode[intCode] = '0';
intCode = 0x12222;
inverseCode[intCode] = '1';
intCode = 0x11222;
inverseCode[intCode] = '2';
intCode = 0x11122;
inverseCode[intCode] = '3';
intCode = 0x11112;
inverseCode[intCode] = '4';
intCode = 0x11111;
inverseCode[intCode] = '5';
intCode = 0x21111;
inverseCode[intCode] = '6';
intCode = 0x22111;
inverseCode[intCode] = '7';
intCode = 0x22211;
inverseCode[intCode] = '8';
intCode = 0x22221;
inverseCode[intCode] = '9';
intCode = 0x121212;
inverseCode[intCode] = '.';
intCode = 0x221122;
inverseCode[intCode] = ',';
intCode = 0x21121;
inverseCode[intCode] = '/';
intCode = 0x112211;
inverseCode[intCode] = '?';
intCode = 0x21112;
inverseCode[intCode] = '=';

Loading…
Cancel
Save